public static final class UpdateDatabaseDdlRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder> implements UpdateDatabaseDdlRequestOrBuilder
Enqueues the given DDL statements to be applied, in order but not necessarily all at once, to the database schema at some point (or points) in the future. The server checks that the statements are executable (syntactically valid, name tables that exist, etc.) before enqueueing them, but they may still fail upon later execution (e.g., if a statement from another batch of statements is applied first and it conflicts in some way, or if there is some data-related problem like a `NULL` value in a column to which `NOT NULL` would be added). If a statement fails, all subsequent statements in the batch are automatically cancelled. Each batch of statements is assigned a name which can be used with the [Operations][google.longrunning.Operations] API to monitor progress. See the [operation_id][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.operation_id] field for more details.Protobuf type
google.spanner.admin.database.v1.UpdateDatabaseDdlRequest| Modifier and Type | Method and Description |
|---|---|
UpdateDatabaseDdlRequest.Builder |
addAllStatements(Iterable<String> values)
Required.
|
UpdateDatabaseDdlRequest.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
UpdateDatabaseDdlRequest.Builder |
addStatements(String value)
Required.
|
UpdateDatabaseDdlRequest.Builder |
addStatementsBytes(com.google.protobuf.ByteString value)
Required.
|
UpdateDatabaseDdlRequest |
build() |
UpdateDatabaseDdlRequest |
buildPartial() |
UpdateDatabaseDdlRequest.Builder |
clear() |
UpdateDatabaseDdlRequest.Builder |
clearDatabase()
Required.
|
UpdateDatabaseDdlRequest.Builder |
clearField(com.google.protobuf.Descriptors.FieldDescriptor field) |
UpdateDatabaseDdlRequest.Builder |
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) |
UpdateDatabaseDdlRequest.Builder |
clearOperationId()
If empty, the new update request is assigned an
automatically-generated operation ID.
|
UpdateDatabaseDdlRequest.Builder |
clearStatements()
Required.
|
UpdateDatabaseDdlRequest.Builder |
clone() |
String |
getDatabase()
Required.
|
com.google.protobuf.ByteString |
getDatabaseBytes()
Required.
|
UpdateDatabaseDdlRequest |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getOperationId()
If empty, the new update request is assigned an
automatically-generated operation ID.
|
com.google.protobuf.ByteString |
getOperationIdBytes()
If empty, the new update request is assigned an
automatically-generated operation ID.
|
String |
getStatements(int index)
Required.
|
com.google.protobuf.ByteString |
getStatementsBytes(int index)
Required.
|
int |
getStatementsCount()
Required.
|
com.google.protobuf.ProtocolStringList |
getStatementsList()
Required.
|
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
UpdateDatabaseDdlRequest.Builder |
mergeFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
UpdateDatabaseDdlRequest.Builder |
mergeFrom(com.google.protobuf.Message other) |
UpdateDatabaseDdlRequest.Builder |
mergeFrom(UpdateDatabaseDdlRequest other) |
UpdateDatabaseDdlRequest.Builder |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
UpdateDatabaseDdlRequest.Builder |
setDatabase(String value)
Required.
|
UpdateDatabaseDdlRequest.Builder |
setDatabaseBytes(com.google.protobuf.ByteString value)
Required.
|
UpdateDatabaseDdlRequest.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
UpdateDatabaseDdlRequest.Builder |
setOperationId(String value)
If empty, the new update request is assigned an
automatically-generated operation ID.
|
UpdateDatabaseDdlRequest.Builder |
setOperationIdBytes(com.google.protobuf.ByteString value)
If empty, the new update request is assigned an
automatically-generated operation ID.
|
UpdateDatabaseDdlRequest.Builder |
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
Object value) |
UpdateDatabaseDdlRequest.Builder |
setStatements(int index,
String value)
Required.
|
UpdateDatabaseDdlRequest.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>public UpdateDatabaseDdlRequest.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>public UpdateDatabaseDdlRequest getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic UpdateDatabaseDdlRequest build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic UpdateDatabaseDdlRequest buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic UpdateDatabaseDdlRequest.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>public UpdateDatabaseDdlRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>public UpdateDatabaseDdlRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>public UpdateDatabaseDdlRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>public UpdateDatabaseDdlRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>public UpdateDatabaseDdlRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>public UpdateDatabaseDdlRequest.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<UpdateDatabaseDdlRequest.Builder>public UpdateDatabaseDdlRequest.Builder mergeFrom(UpdateDatabaseDdlRequest other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>public UpdateDatabaseDdlRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<UpdateDatabaseDdlRequest.Builder>IOExceptionpublic String getDatabase()
Required. The database to update.
string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
getDatabase in interface UpdateDatabaseDdlRequestOrBuilderpublic com.google.protobuf.ByteString getDatabaseBytes()
Required. The database to update.
string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
getDatabaseBytes in interface UpdateDatabaseDdlRequestOrBuilderpublic UpdateDatabaseDdlRequest.Builder setDatabase(String value)
Required. The database to update.
string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
value - The database to set.public UpdateDatabaseDdlRequest.Builder clearDatabase()
Required. The database to update.
string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
public UpdateDatabaseDdlRequest.Builder setDatabaseBytes(com.google.protobuf.ByteString value)
Required. The database to update.
string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
value - The bytes for database to set.public com.google.protobuf.ProtocolStringList getStatementsList()
Required. DDL statements to be applied to the database.
repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];getStatementsList in interface UpdateDatabaseDdlRequestOrBuilderpublic int getStatementsCount()
Required. DDL statements to be applied to the database.
repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];getStatementsCount in interface UpdateDatabaseDdlRequestOrBuilderpublic String getStatements(int index)
Required. DDL statements to be applied to the database.
repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];getStatements in interface UpdateDatabaseDdlRequestOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getStatementsBytes(int index)
Required. DDL statements to be applied to the database.
repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];getStatementsBytes in interface UpdateDatabaseDdlRequestOrBuilderindex - The index of the value to return.public UpdateDatabaseDdlRequest.Builder setStatements(int index, String value)
Required. DDL statements to be applied to the database.
repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];index - The index to set the value at.value - The statements to set.public UpdateDatabaseDdlRequest.Builder addStatements(String value)
Required. DDL statements to be applied to the database.
repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];value - The statements to add.public UpdateDatabaseDdlRequest.Builder addAllStatements(Iterable<String> values)
Required. DDL statements to be applied to the database.
repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];values - The statements to add.public UpdateDatabaseDdlRequest.Builder clearStatements()
Required. DDL statements to be applied to the database.
repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];public UpdateDatabaseDdlRequest.Builder addStatementsBytes(com.google.protobuf.ByteString value)
Required. DDL statements to be applied to the database.
repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];value - The bytes of the statements to add.public String getOperationId()
If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, `operation_id` is used to construct the name of the resulting [Operation][google.longrunning.Operation]. Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed, or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and `operation_id` fields can be combined to form the [name][google.longrunning.Operation.name] of the resulting [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`. `operation_id` should be unique within the database, and must be a valid identifier: `[a-z][a-z0-9_]*`. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns `ALREADY_EXISTS`.
string operation_id = 3;getOperationId in interface UpdateDatabaseDdlRequestOrBuilderpublic com.google.protobuf.ByteString getOperationIdBytes()
If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, `operation_id` is used to construct the name of the resulting [Operation][google.longrunning.Operation]. Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed, or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and `operation_id` fields can be combined to form the [name][google.longrunning.Operation.name] of the resulting [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`. `operation_id` should be unique within the database, and must be a valid identifier: `[a-z][a-z0-9_]*`. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns `ALREADY_EXISTS`.
string operation_id = 3;getOperationIdBytes in interface UpdateDatabaseDdlRequestOrBuilderpublic UpdateDatabaseDdlRequest.Builder setOperationId(String value)
If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, `operation_id` is used to construct the name of the resulting [Operation][google.longrunning.Operation]. Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed, or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and `operation_id` fields can be combined to form the [name][google.longrunning.Operation.name] of the resulting [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`. `operation_id` should be unique within the database, and must be a valid identifier: `[a-z][a-z0-9_]*`. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns `ALREADY_EXISTS`.
string operation_id = 3;value - The operationId to set.public UpdateDatabaseDdlRequest.Builder clearOperationId()
If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, `operation_id` is used to construct the name of the resulting [Operation][google.longrunning.Operation]. Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed, or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and `operation_id` fields can be combined to form the [name][google.longrunning.Operation.name] of the resulting [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`. `operation_id` should be unique within the database, and must be a valid identifier: `[a-z][a-z0-9_]*`. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns `ALREADY_EXISTS`.
string operation_id = 3;public UpdateDatabaseDdlRequest.Builder setOperationIdBytes(com.google.protobuf.ByteString value)
If empty, the new update request is assigned an automatically-generated operation ID. Otherwise, `operation_id` is used to construct the name of the resulting [Operation][google.longrunning.Operation]. Specifying an explicit operation ID simplifies determining whether the statements were executed in the event that the [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] call is replayed, or the return value is otherwise lost: the [database][google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.database] and `operation_id` fields can be combined to form the [name][google.longrunning.Operation.name] of the resulting [longrunning.Operation][google.longrunning.Operation]: `<database>/operations/<operation_id>`. `operation_id` should be unique within the database, and must be a valid identifier: `[a-z][a-z0-9_]*`. Note that automatically-generated operation IDs always begin with an underscore. If the named operation already exists, [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl] returns `ALREADY_EXISTS`.
string operation_id = 3;value - The bytes for operationId to set.public final UpdateDatabaseDdlRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>public final UpdateDatabaseDdlRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>Copyright © 2020 Google LLC. All rights reserved.