Class RestoreDatabaseRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
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 type google.spanner.admin.database.v1.RestoreDatabaseRequest
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
    • getDefaultInstanceForType

      public RestoreDatabaseRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public RestoreDatabaseRequest build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public RestoreDatabaseRequest buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
    • setField

      public RestoreDatabaseRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
    • clearField

      public RestoreDatabaseRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
    • clearOneof

      public RestoreDatabaseRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.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 interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
    • addRepeatedField

      public RestoreDatabaseRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
    • mergeFrom

      public RestoreDatabaseRequest.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<RestoreDatabaseRequest.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.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 interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<RestoreDatabaseRequest.Builder>
      Throws:
      IOException
    • getSourceCase

      public RestoreDatabaseRequest.SourceCase getSourceCase()
      Specified by:
      getSourceCase in interface RestoreDatabaseRequestOrBuilder
    • 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 interface RestoreDatabaseRequestOrBuilder
      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 interface RestoreDatabaseRequestOrBuilder
      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 interface RestoreDatabaseRequestOrBuilder
      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 interface RestoreDatabaseRequestOrBuilder
      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 interface RestoreDatabaseRequestOrBuilder
      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 interface RestoreDatabaseRequestOrBuilder
      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 interface RestoreDatabaseRequestOrBuilder
      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 interface RestoreDatabaseRequestOrBuilder
      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 interface RestoreDatabaseRequestOrBuilder
      Returns:
      The encryptionConfig.
    • setEncryptionConfig

       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

       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 interface RestoreDatabaseRequestOrBuilder
    • setUnknownFields

      public final RestoreDatabaseRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>
    • mergeUnknownFields

      public final RestoreDatabaseRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<RestoreDatabaseRequest.Builder>