Class UpdateDatabaseDdlRequest.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>
-
- com.google.spanner.admin.database.v1.UpdateDatabaseDdlRequest.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,UpdateDatabaseDdlRequestOrBuilder
,Cloneable
- Enclosing class:
- UpdateDatabaseDdlRequest
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 typegoogle.spanner.admin.database.v1.UpdateDatabaseDdlRequest
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>
-
clear
public UpdateDatabaseDdlRequest.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>
-
getDefaultInstanceForType
public UpdateDatabaseDdlRequest getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public UpdateDatabaseDdlRequest build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public UpdateDatabaseDdlRequest buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public UpdateDatabaseDdlRequest.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>
-
setField
public UpdateDatabaseDdlRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>
-
clearField
public UpdateDatabaseDdlRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>
-
clearOneof
public UpdateDatabaseDdlRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>
-
setRepeatedField
public UpdateDatabaseDdlRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>
-
addRepeatedField
public UpdateDatabaseDdlRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>
-
mergeFrom
public UpdateDatabaseDdlRequest.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<UpdateDatabaseDdlRequest.Builder>
-
mergeFrom
public UpdateDatabaseDdlRequest.Builder mergeFrom(UpdateDatabaseDdlRequest other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>
-
mergeFrom
public UpdateDatabaseDdlRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<UpdateDatabaseDdlRequest.Builder>
- Throws:
IOException
-
getDatabase
public String getDatabase()
Required. The database to update.
string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
- Specified by:
getDatabase
in interfaceUpdateDatabaseDdlRequestOrBuilder
- Returns:
- The database.
-
getDatabaseBytes
public com.google.protobuf.ByteString getDatabaseBytes()
Required. The database to update.
string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
- Specified by:
getDatabaseBytes
in interfaceUpdateDatabaseDdlRequestOrBuilder
- Returns:
- The bytes for database.
-
setDatabase
public UpdateDatabaseDdlRequest.Builder setDatabase(String value)
Required. The database to update.
string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
- Parameters:
value
- The database to set.- Returns:
- This builder for chaining.
-
clearDatabase
public UpdateDatabaseDdlRequest.Builder clearDatabase()
Required. The database to update.
string database = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
- Returns:
- This builder for chaining.
-
setDatabaseBytes
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) = { ... }
- Parameters:
value
- The bytes for database to set.- Returns:
- This builder for chaining.
-
getStatementsList
public com.google.protobuf.ProtocolStringList getStatementsList()
Required. DDL statements to be applied to the database.
repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getStatementsList
in interfaceUpdateDatabaseDdlRequestOrBuilder
- Returns:
- A list containing the statements.
-
getStatementsCount
public int getStatementsCount()
Required. DDL statements to be applied to the database.
repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getStatementsCount
in interfaceUpdateDatabaseDdlRequestOrBuilder
- Returns:
- The count of statements.
-
getStatements
public String getStatements(int index)
Required. DDL statements to be applied to the database.
repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];
- Specified by:
getStatements
in interfaceUpdateDatabaseDdlRequestOrBuilder
- Parameters:
index
- The index of the element to return.- Returns:
- The statements at the given index.
-
getStatementsBytes
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];
- Specified by:
getStatementsBytes
in interfaceUpdateDatabaseDdlRequestOrBuilder
- Parameters:
index
- The index of the value to return.- Returns:
- The bytes of the statements at the given index.
-
setStatements
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];
- Parameters:
index
- The index to set the value at.value
- The statements to set.- Returns:
- This builder for chaining.
-
addStatements
public UpdateDatabaseDdlRequest.Builder addStatements(String value)
Required. DDL statements to be applied to the database.
repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];
- Parameters:
value
- The statements to add.- Returns:
- This builder for chaining.
-
addAllStatements
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];
- Parameters:
values
- The statements to add.- Returns:
- This builder for chaining.
-
clearStatements
public UpdateDatabaseDdlRequest.Builder clearStatements()
Required. DDL statements to be applied to the database.
repeated string statements = 2 [(.google.api.field_behavior) = REQUIRED];
- Returns:
- This builder for chaining.
-
addStatementsBytes
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];
- Parameters:
value
- The bytes of the statements to add.- Returns:
- This builder for chaining.
-
getOperationId
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;
- Specified by:
getOperationId
in interfaceUpdateDatabaseDdlRequestOrBuilder
- Returns:
- The operationId.
-
getOperationIdBytes
public 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;
- Specified by:
getOperationIdBytes
in interfaceUpdateDatabaseDdlRequestOrBuilder
- Returns:
- The bytes for operationId.
-
setOperationId
public 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;
- Parameters:
value
- The operationId to set.- Returns:
- This builder for chaining.
-
clearOperationId
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;
- Returns:
- This builder for chaining.
-
setOperationIdBytes
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;
- Parameters:
value
- The bytes for operationId to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final UpdateDatabaseDdlRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>
-
mergeUnknownFields
public final UpdateDatabaseDdlRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<UpdateDatabaseDdlRequest.Builder>
-
-