Class CreateDatabaseRequest (6.66.0)

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

PROTO_DESCRIPTORS_FIELD_NUMBER

publicstaticfinalintPROTO_DESCRIPTORS_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

getProtoDescriptors()

publicByteStringgetProtoDescriptors()

Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in 'extra_statements' above. Contains a protobuf-serialized google.protobuf.FileDescriptorSet. To generate it, install and run protoc with --include_imports and --descriptor_set_out. For example, to generate for moon/shot/app.proto, run <code><code> $protoc --proto_path=/app_path --proto_path=/lib_path &#92; --include_imports &#92; --descriptor_set_out=descriptors.data &#92; moon/shot/app.proto </code></code> For more details, see protobuffer self description.

bytes proto_descriptors = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
ByteString

The protoDescriptors.

getSerializedSize()

publicintgetSerializedSize()
Returns
TypeDescription
int
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
Overrides
Exceptions
TypeDescription
IOException