Class CreateDatabaseRequest

publicfinalclassCreateDatabaseRequestextendsGeneratedMessageV3implementsCreateDatabaseRequestOrBuilder

The request for CreateDatabase.

Protobuf type google.spanner.admin.database.v1.CreateDatabaseRequest

Static Fields

CREATE_STATEMENT_FIELD_NUMBER

publicstaticfinalintCREATE_STATEMENT_FIELD_NUMBER
Field Value
TypeDescription
int

DATABASE_DIALECT_FIELD_NUMBER

publicstaticfinalintDATABASE_DIALECT_FIELD_NUMBER
Field Value
TypeDescription
int

ENCRYPTION_CONFIG_FIELD_NUMBER

publicstaticfinalintENCRYPTION_CONFIG_FIELD_NUMBER
Field Value
TypeDescription
int

EXTRA_STATEMENTS_FIELD_NUMBER

publicstaticfinalintEXTRA_STATEMENTS_FIELD_NUMBER
Field Value
TypeDescription
int

PARENT_FIELD_NUMBER

publicstaticfinalintPARENT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

publicstaticCreateDatabaseRequestgetDefaultInstance()
Returns
TypeDescription
CreateDatabaseRequest

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

publicstaticCreateDatabaseRequest.BuildernewBuilder()
Returns
TypeDescription
CreateDatabaseRequest.Builder

newBuilder(CreateDatabaseRequest prototype)

publicstaticCreateDatabaseRequest.BuildernewBuilder(CreateDatabaseRequestprototype)
Parameter
NameDescription
prototypeCreateDatabaseRequest
Returns
TypeDescription
CreateDatabaseRequest.Builder

parseDelimitedFrom(InputStream input)

publicstaticCreateDatabaseRequestparseDelimitedFrom(InputStreaminput)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CreateDatabaseRequest
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticCreateDatabaseRequestparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateDatabaseRequest
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

publicstaticCreateDatabaseRequestparseFrom(byte[]data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
CreateDatabaseRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticCreateDatabaseRequestparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateDatabaseRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticCreateDatabaseRequestparseFrom(ByteStringdata)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
CreateDatabaseRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticCreateDatabaseRequestparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateDatabaseRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticCreateDatabaseRequestparseFrom(CodedInputStreaminput)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
CreateDatabaseRequest
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticCreateDatabaseRequestparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateDatabaseRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

publicstaticCreateDatabaseRequestparseFrom(InputStreaminput)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
CreateDatabaseRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticCreateDatabaseRequestparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateDatabaseRequest
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

publicstaticCreateDatabaseRequestparseFrom(ByteBufferdata)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
CreateDatabaseRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticCreateDatabaseRequestparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
CreateDatabaseRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

publicstaticParser<CreateDatabaseRequest>parser()
Returns
TypeDescription
Parser<CreateDatabaseRequest>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getCreateStatement()

publicStringgetCreateStatement()

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] 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
TypeDescription
String

The createStatement.

getCreateStatementBytes()

publicByteStringgetCreateStatementBytes()

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

The bytes for createStatement.

getDatabaseDialect()

publicDatabaseDialectgetDatabaseDialect()

Optional. The dialect of the Cloud Spanner Database.

.google.spanner.admin.database.v1.DatabaseDialect database_dialect = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
DatabaseDialect

The databaseDialect.

getDatabaseDialectValue()

publicintgetDatabaseDialectValue()

Optional. The dialect of the Cloud Spanner Database.

.google.spanner.admin.database.v1.DatabaseDialect database_dialect = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
int

The enum numeric value on the wire for databaseDialect.

getDefaultInstanceForType()

publicCreateDatabaseRequestgetDefaultInstanceForType()
Returns
TypeDescription
CreateDatabaseRequest

getEncryptionConfig()

publicEncryptionConfiggetEncryptionConfig()

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];

Returns
TypeDescription
EncryptionConfig

The encryptionConfig.

getEncryptionConfigOrBuilder()

publicEncryptionConfigOrBuildergetEncryptionConfigOrBuilder()

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];

Returns
TypeDescription
EncryptionConfigOrBuilder

getExtraStatements(int index)

publicStringgetExtraStatements(intindex)

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];

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The extraStatements at the given index.

getExtraStatementsBytes(int index)

publicByteStringgetExtraStatementsBytes(intindex)

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];

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the extraStatements at the given index.

getExtraStatementsCount()

publicintgetExtraStatementsCount()

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

The count of extraStatements.

getExtraStatementsList()

publicProtocolStringListgetExtraStatementsList()

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

A list containing the extraStatements.

getParent()

publicStringgetParent()

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

The parent.

getParentBytes()

publicByteStringgetParentBytes()

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

The bytes for parent.

getParserForType()

publicParser<CreateDatabaseRequest>getParserForType()
Returns
TypeDescription
Parser<CreateDatabaseRequest>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
TypeDescription
int
Overrides

getUnknownFields()

publicfinalUnknownFieldSetgetUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

hasEncryptionConfig()

publicbooleanhasEncryptionConfig()

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];

Returns
TypeDescription
boolean

Whether the encryptionConfig field is set.

hashCode()

publicinthashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

publicCreateDatabaseRequest.BuildernewBuilderForType()
Returns
TypeDescription
CreateDatabaseRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedCreateDatabaseRequest.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
CreateDatabaseRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

publicCreateDatabaseRequest.BuildertoBuilder()
Returns
TypeDescription
CreateDatabaseRequest.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
NameDescription
outputCodedOutputStream
OverridesExceptions
TypeDescription
IOException