Class CreateDatabaseRequest.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, CreateDatabaseRequestOrBuilder, Cloneable
    Enclosing class:
    CreateDatabaseRequest

    public static final class CreateDatabaseRequest.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<CreateDatabaseRequest.Builder>
    implements CreateDatabaseRequestOrBuilder
     The request for [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].
     
    Protobuf type google.spanner.admin.database.v1.CreateDatabaseRequest
    • Method Detail

      • 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<CreateDatabaseRequest.Builder>
      • clear

        public CreateDatabaseRequest.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<CreateDatabaseRequest.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<CreateDatabaseRequest.Builder>
      • getDefaultInstanceForType

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

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

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

        public CreateDatabaseRequest.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<CreateDatabaseRequest.Builder>
      • clearField

        public CreateDatabaseRequest.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<CreateDatabaseRequest.Builder>
      • clearOneof

        public CreateDatabaseRequest.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<CreateDatabaseRequest.Builder>
      • setRepeatedField

        public CreateDatabaseRequest.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<CreateDatabaseRequest.Builder>
      • addRepeatedField

        public CreateDatabaseRequest.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<CreateDatabaseRequest.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<CreateDatabaseRequest.Builder>
      • mergeFrom

        public CreateDatabaseRequest.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<CreateDatabaseRequest.Builder>
        Throws:
        IOException
      • getParent

        public String getParent()
         Required. The name of the instance that will serve the new database.
         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 CreateDatabaseRequestOrBuilder
        Returns:
        The parent.
      • getParentBytes

        public com.google.protobuf.ByteString getParentBytes()
         Required. The name of the instance that will serve the new database.
         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 CreateDatabaseRequestOrBuilder
        Returns:
        The bytes for parent.
      • setParent

        public CreateDatabaseRequest.Builder setParent​(String value)
         Required. The name of the instance that will serve the new database.
         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 CreateDatabaseRequest.Builder clearParent()
         Required. The name of the instance that will serve the new database.
         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 CreateDatabaseRequest.Builder setParentBytes​(com.google.protobuf.ByteString value)
         Required. The name of the instance that will serve the new database.
         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.
      • getCreateStatement

        public String getCreateStatement()
         Required. A `CREATE DATABASE` statement, which specifies the ID of the
         new database.  The database ID must conform to the regular expression
         `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length.
         If the database ID is a reserved word or if it contains a hyphen, the
         database ID must be enclosed in backticks (`` ` ``).
         
        string create_statement = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getCreateStatement in interface CreateDatabaseRequestOrBuilder
        Returns:
        The createStatement.
      • getCreateStatementBytes

        public com.google.protobuf.ByteString getCreateStatementBytes()
         Required. A `CREATE DATABASE` statement, which specifies the ID of the
         new database.  The database ID must conform to the regular expression
         `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length.
         If the database ID is a reserved word or if it contains a hyphen, the
         database ID must be enclosed in backticks (`` ` ``).
         
        string create_statement = 2 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getCreateStatementBytes in interface CreateDatabaseRequestOrBuilder
        Returns:
        The bytes for createStatement.
      • setCreateStatement

        public CreateDatabaseRequest.Builder setCreateStatement​(String value)
         Required. A `CREATE DATABASE` statement, which specifies the ID of the
         new database.  The database ID must conform to the regular expression
         `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length.
         If the database ID is a reserved word or if it contains a hyphen, the
         database ID must be enclosed in backticks (`` ` ``).
         
        string create_statement = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The createStatement to set.
        Returns:
        This builder for chaining.
      • clearCreateStatement

        public CreateDatabaseRequest.Builder clearCreateStatement()
         Required. A `CREATE DATABASE` statement, which specifies the ID of the
         new database.  The database ID must conform to the regular expression
         `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length.
         If the database ID is a reserved word or if it contains a hyphen, the
         database ID must be enclosed in backticks (`` ` ``).
         
        string create_statement = 2 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setCreateStatementBytes

        public CreateDatabaseRequest.Builder setCreateStatementBytes​(com.google.protobuf.ByteString value)
         Required. A `CREATE DATABASE` statement, which specifies the ID of the
         new database.  The database ID must conform to the regular expression
         `[a-z][a-z0-9_\-]*[a-z0-9]` and be between 2 and 30 characters in length.
         If the database ID is a reserved word or if it contains a hyphen, the
         database ID must be enclosed in backticks (`` ` ``).
         
        string create_statement = 2 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for createStatement to set.
        Returns:
        This builder for chaining.
      • getExtraStatementsList

        public com.google.protobuf.ProtocolStringList getExtraStatementsList()
         Optional. A list of DDL statements to run inside the newly created
         database. Statements can create tables, indexes, etc. These
         statements execute atomically with the creation of the database:
         if there is an error in any statement, the database is not created.
         
        repeated string extra_statements = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getExtraStatementsList in interface CreateDatabaseRequestOrBuilder
        Returns:
        A list containing the extraStatements.
      • getExtraStatementsCount

        public int getExtraStatementsCount()
         Optional. A list of DDL statements to run inside the newly created
         database. Statements can create tables, indexes, etc. These
         statements execute atomically with the creation of the database:
         if there is an error in any statement, the database is not created.
         
        repeated string extra_statements = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getExtraStatementsCount in interface CreateDatabaseRequestOrBuilder
        Returns:
        The count of extraStatements.
      • getExtraStatements

        public String getExtraStatements​(int index)
         Optional. A list of DDL statements to run inside the newly created
         database. Statements can create tables, indexes, etc. These
         statements execute atomically with the creation of the database:
         if there is an error in any statement, the database is not created.
         
        repeated string extra_statements = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getExtraStatements in interface CreateDatabaseRequestOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The extraStatements at the given index.
      • getExtraStatementsBytes

        public com.google.protobuf.ByteString getExtraStatementsBytes​(int index)
         Optional. A list of DDL statements to run inside the newly created
         database. Statements can create tables, indexes, etc. These
         statements execute atomically with the creation of the database:
         if there is an error in any statement, the database is not created.
         
        repeated string extra_statements = 3 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getExtraStatementsBytes in interface CreateDatabaseRequestOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the extraStatements at the given index.
      • setExtraStatements

        public CreateDatabaseRequest.Builder setExtraStatements​(int index,
                                                                String value)
         Optional. A list of DDL statements to run inside the newly created
         database. Statements can create tables, indexes, etc. These
         statements execute atomically with the creation of the database:
         if there is an error in any statement, the database is not created.
         
        repeated string extra_statements = 3 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        index - The index to set the value at.
        value - The extraStatements to set.
        Returns:
        This builder for chaining.
      • addExtraStatements

        public CreateDatabaseRequest.Builder addExtraStatements​(String value)
         Optional. A list of DDL statements to run inside the newly created
         database. Statements can create tables, indexes, etc. These
         statements execute atomically with the creation of the database:
         if there is an error in any statement, the database is not created.
         
        repeated string extra_statements = 3 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The extraStatements to add.
        Returns:
        This builder for chaining.
      • addAllExtraStatements

        public CreateDatabaseRequest.Builder addAllExtraStatements​(Iterable<String> values)
         Optional. A list of DDL statements to run inside the newly created
         database. Statements can create tables, indexes, etc. These
         statements execute atomically with the creation of the database:
         if there is an error in any statement, the database is not created.
         
        repeated string extra_statements = 3 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        values - The extraStatements to add.
        Returns:
        This builder for chaining.
      • clearExtraStatements

        public CreateDatabaseRequest.Builder clearExtraStatements()
         Optional. A list of DDL statements to run inside the newly created
         database. Statements can create tables, indexes, etc. These
         statements execute atomically with the creation of the database:
         if there is an error in any statement, the database is not created.
         
        repeated string extra_statements = 3 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • addExtraStatementsBytes

        public CreateDatabaseRequest.Builder addExtraStatementsBytes​(com.google.protobuf.ByteString value)
         Optional. A list of DDL statements to run inside the newly created
         database. Statements can create tables, indexes, etc. These
         statements execute atomically with the creation of the database:
         if there is an error in any statement, the database is not created.
         
        repeated string extra_statements = 3 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The bytes of the extraStatements to add.
        Returns:
        This builder for chaining.
      • hasEncryptionConfig

        public boolean hasEncryptionConfig()
         Optional. The encryption configuration for the database. If this field is not
         specified, Cloud Spanner will encrypt/decrypt all data at rest using
         Google default encryption.
         
        .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        hasEncryptionConfig in interface CreateDatabaseRequestOrBuilder
        Returns:
        Whether the encryptionConfig field is set.
      • getEncryptionConfig

        public EncryptionConfig getEncryptionConfig()
         Optional. The encryption configuration for the database. If this field is not
         specified, Cloud Spanner will encrypt/decrypt all data at rest using
         Google default encryption.
         
        .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getEncryptionConfig in interface CreateDatabaseRequestOrBuilder
        Returns:
        The encryptionConfig.
      • setEncryptionConfig

        public CreateDatabaseRequest.Builder setEncryptionConfig​(EncryptionConfig value)
         Optional. The encryption configuration for the database. If this field is not
         specified, Cloud Spanner will encrypt/decrypt all data at rest using
         Google default encryption.
         
        .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
      • setEncryptionConfig

        public CreateDatabaseRequest.Builder setEncryptionConfig​(EncryptionConfig.Builder builderForValue)
         Optional. The encryption configuration for the database. If this field is not
         specified, Cloud Spanner will encrypt/decrypt all data at rest using
         Google default encryption.
         
        .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
      • mergeEncryptionConfig

        public CreateDatabaseRequest.Builder mergeEncryptionConfig​(EncryptionConfig value)
         Optional. The encryption configuration for the database. If this field is not
         specified, Cloud Spanner will encrypt/decrypt all data at rest using
         Google default encryption.
         
        .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
      • clearEncryptionConfig

        public CreateDatabaseRequest.Builder clearEncryptionConfig()
         Optional. The encryption configuration for the database. If this field is not
         specified, Cloud Spanner will encrypt/decrypt all data at rest using
         Google default encryption.
         
        .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
      • getEncryptionConfigBuilder

        public EncryptionConfig.Builder getEncryptionConfigBuilder()
         Optional. The encryption configuration for the database. If this field is not
         specified, Cloud Spanner will encrypt/decrypt all data at rest using
         Google default encryption.
         
        .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
      • getEncryptionConfigOrBuilder

        public EncryptionConfigOrBuilder getEncryptionConfigOrBuilder()
         Optional. The encryption configuration for the database. If this field is not
         specified, Cloud Spanner will encrypt/decrypt all data at rest using
         Google default encryption.
         
        .google.spanner.admin.database.v1.EncryptionConfig encryption_config = 4 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getEncryptionConfigOrBuilder in interface CreateDatabaseRequestOrBuilder
      • getDatabaseDialectValue

        public int getDatabaseDialectValue()
         Optional. The dialect of the Cloud Spanner Database.
         
        .google.spanner.admin.database.v1.DatabaseDialect database_dialect = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDatabaseDialectValue in interface CreateDatabaseRequestOrBuilder
        Returns:
        The enum numeric value on the wire for databaseDialect.
      • setDatabaseDialectValue

        public CreateDatabaseRequest.Builder setDatabaseDialectValue​(int value)
         Optional. The dialect of the Cloud Spanner Database.
         
        .google.spanner.admin.database.v1.DatabaseDialect database_dialect = 5 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The enum numeric value on the wire for databaseDialect to set.
        Returns:
        This builder for chaining.
      • getDatabaseDialect

        public DatabaseDialect getDatabaseDialect()
         Optional. The dialect of the Cloud Spanner Database.
         
        .google.spanner.admin.database.v1.DatabaseDialect database_dialect = 5 [(.google.api.field_behavior) = OPTIONAL];
        Specified by:
        getDatabaseDialect in interface CreateDatabaseRequestOrBuilder
        Returns:
        The databaseDialect.
      • setDatabaseDialect

        public CreateDatabaseRequest.Builder setDatabaseDialect​(DatabaseDialect value)
         Optional. The dialect of the Cloud Spanner Database.
         
        .google.spanner.admin.database.v1.DatabaseDialect database_dialect = 5 [(.google.api.field_behavior) = OPTIONAL];
        Parameters:
        value - The databaseDialect to set.
        Returns:
        This builder for chaining.
      • clearDatabaseDialect

        public CreateDatabaseRequest.Builder clearDatabaseDialect()
         Optional. The dialect of the Cloud Spanner Database.
         
        .google.spanner.admin.database.v1.DatabaseDialect database_dialect = 5 [(.google.api.field_behavior) = OPTIONAL];
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final CreateDatabaseRequest.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<CreateDatabaseRequest.Builder>
      • mergeUnknownFields

        public final CreateDatabaseRequest.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<CreateDatabaseRequest.Builder>