Class BatchWriteRequest.Builder (6.82.0)

public static final class BatchWriteRequest.Builder extends GeneratedMessageV3.Builder<BatchWriteRequest.Builder> implements BatchWriteRequestOrBuilder

The request for BatchWrite.

Protobuf type google.spanner.v1.BatchWriteRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllMutationGroups(Iterable<? extends BatchWriteRequest.MutationGroup> values)

public BatchWriteRequest.Builder addAllMutationGroups(Iterable<? extends BatchWriteRequest.MutationGroup> values)

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<? extends com.google.spanner.v1.BatchWriteRequest.MutationGroup>
Returns
Type Description
BatchWriteRequest.Builder

addMutationGroups(BatchWriteRequest.MutationGroup value)

public BatchWriteRequest.Builder addMutationGroups(BatchWriteRequest.MutationGroup value)

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value BatchWriteRequest.MutationGroup
Returns
Type Description
BatchWriteRequest.Builder

addMutationGroups(BatchWriteRequest.MutationGroup.Builder builderForValue)

public BatchWriteRequest.Builder addMutationGroups(BatchWriteRequest.MutationGroup.Builder builderForValue)

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue BatchWriteRequest.MutationGroup.Builder
Returns
Type Description
BatchWriteRequest.Builder

addMutationGroups(int index, BatchWriteRequest.MutationGroup value)

public BatchWriteRequest.Builder addMutationGroups(int index, BatchWriteRequest.MutationGroup value)

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value BatchWriteRequest.MutationGroup
Returns
Type Description
BatchWriteRequest.Builder

addMutationGroups(int index, BatchWriteRequest.MutationGroup.Builder builderForValue)

public BatchWriteRequest.Builder addMutationGroups(int index, BatchWriteRequest.MutationGroup.Builder builderForValue)

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue BatchWriteRequest.MutationGroup.Builder
Returns
Type Description
BatchWriteRequest.Builder

addMutationGroupsBuilder()

public BatchWriteRequest.MutationGroup.Builder addMutationGroupsBuilder()

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
BatchWriteRequest.MutationGroup.Builder

addMutationGroupsBuilder(int index)

public BatchWriteRequest.MutationGroup.Builder addMutationGroupsBuilder(int index)

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
BatchWriteRequest.MutationGroup.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BatchWriteRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BatchWriteRequest.Builder
Overrides

build()

public BatchWriteRequest build()
Returns
Type Description
BatchWriteRequest

buildPartial()

public BatchWriteRequest buildPartial()
Returns
Type Description
BatchWriteRequest

clear()

public BatchWriteRequest.Builder clear()
Returns
Type Description
BatchWriteRequest.Builder
Overrides

clearExcludeTxnFromChangeStreams()

public BatchWriteRequest.Builder clearExcludeTxnFromChangeStreams()

Optional. When exclude_txn_from_change_streams is set to true:

  • Mutations from all transactions in this batch write operation will not be recorded in change streams with DDL option allow_txn_exclusion=true that are tracking columns modified by these transactions.
  • Mutations from all transactions in this batch write operation will be recorded in change streams with DDL option allow_txn_exclusion=false or not set that are tracking columns modified by these transactions.

    When exclude_txn_from_change_streams is set to false or not set, mutations from all transactions in this batch write operation will be recorded in all change streams that are tracking columns modified by these transactions.

bool exclude_txn_from_change_streams = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
BatchWriteRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public BatchWriteRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
BatchWriteRequest.Builder
Overrides

clearMutationGroups()

public BatchWriteRequest.Builder clearMutationGroups()

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
BatchWriteRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public BatchWriteRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
BatchWriteRequest.Builder
Overrides

clearRequestOptions()

public BatchWriteRequest.Builder clearRequestOptions()

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 3;

Returns
Type Description
BatchWriteRequest.Builder

clearSession()

public BatchWriteRequest.Builder clearSession()

Required. The session in which the batch request is to be run.

string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
BatchWriteRequest.Builder

This builder for chaining.

clone()

public BatchWriteRequest.Builder clone()
Returns
Type Description
BatchWriteRequest.Builder
Overrides

getDefaultInstanceForType()

public BatchWriteRequest getDefaultInstanceForType()
Returns
Type Description
BatchWriteRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getExcludeTxnFromChangeStreams()

public boolean getExcludeTxnFromChangeStreams()

Optional. When exclude_txn_from_change_streams is set to true:

  • Mutations from all transactions in this batch write operation will not be recorded in change streams with DDL option allow_txn_exclusion=true that are tracking columns modified by these transactions.
  • Mutations from all transactions in this batch write operation will be recorded in change streams with DDL option allow_txn_exclusion=false or not set that are tracking columns modified by these transactions.

    When exclude_txn_from_change_streams is set to false or not set, mutations from all transactions in this batch write operation will be recorded in all change streams that are tracking columns modified by these transactions.

bool exclude_txn_from_change_streams = 5 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

The excludeTxnFromChangeStreams.

getMutationGroups(int index)

public BatchWriteRequest.MutationGroup getMutationGroups(int index)

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
BatchWriteRequest.MutationGroup

getMutationGroupsBuilder(int index)

public BatchWriteRequest.MutationGroup.Builder getMutationGroupsBuilder(int index)

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
BatchWriteRequest.MutationGroup.Builder

getMutationGroupsBuilderList()

public List<BatchWriteRequest.MutationGroup.Builder> getMutationGroupsBuilderList()

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Builder>

getMutationGroupsCount()

public int getMutationGroupsCount()

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getMutationGroupsList()

public List<BatchWriteRequest.MutationGroup> getMutationGroupsList()

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<MutationGroup>

getMutationGroupsOrBuilder(int index)

public BatchWriteRequest.MutationGroupOrBuilder getMutationGroupsOrBuilder(int index)

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
BatchWriteRequest.MutationGroupOrBuilder

getMutationGroupsOrBuilderList()

public List<? extends BatchWriteRequest.MutationGroupOrBuilder> getMutationGroupsOrBuilderList()

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<? extends com.google.spanner.v1.BatchWriteRequest.MutationGroupOrBuilder>

getRequestOptions()

public RequestOptions getRequestOptions()

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 3;

Returns
Type Description
RequestOptions

The requestOptions.

getRequestOptionsBuilder()

public RequestOptions.Builder getRequestOptionsBuilder()

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 3;

Returns
Type Description
RequestOptions.Builder

getRequestOptionsOrBuilder()

public RequestOptionsOrBuilder getRequestOptionsOrBuilder()

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 3;

Returns
Type Description
RequestOptionsOrBuilder

getSession()

public String getSession()

Required. The session in which the batch request is to be run.

string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
String

The session.

getSessionBytes()

public ByteString getSessionBytes()

Required. The session in which the batch request is to be run.

string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Returns
Type Description
ByteString

The bytes for session.

hasRequestOptions()

public boolean hasRequestOptions()

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 3;

Returns
Type Description
boolean

Whether the requestOptions field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BatchWriteRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BatchWriteRequest.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public BatchWriteRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
BatchWriteRequest.Builder
Overrides

mergeFrom(BatchWriteRequest other)

public BatchWriteRequest.Builder mergeFrom(BatchWriteRequest other)
Parameter
Name Description
other BatchWriteRequest
Returns
Type Description
BatchWriteRequest.Builder

mergeRequestOptions(RequestOptions value)

public BatchWriteRequest.Builder mergeRequestOptions(RequestOptions value)

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 3;

Parameter
Name Description
value RequestOptions
Returns
Type Description
BatchWriteRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BatchWriteRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BatchWriteRequest.Builder
Overrides

removeMutationGroups(int index)

public BatchWriteRequest.Builder removeMutationGroups(int index)

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
BatchWriteRequest.Builder

setExcludeTxnFromChangeStreams(boolean value)

public BatchWriteRequest.Builder setExcludeTxnFromChangeStreams(boolean value)

Optional. When exclude_txn_from_change_streams is set to true:

  • Mutations from all transactions in this batch write operation will not be recorded in change streams with DDL option allow_txn_exclusion=true that are tracking columns modified by these transactions.
  • Mutations from all transactions in this batch write operation will be recorded in change streams with DDL option allow_txn_exclusion=false or not set that are tracking columns modified by these transactions.

    When exclude_txn_from_change_streams is set to false or not set, mutations from all transactions in this batch write operation will be recorded in all change streams that are tracking columns modified by these transactions.

bool exclude_txn_from_change_streams = 5 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value boolean

The excludeTxnFromChangeStreams to set.

Returns
Type Description
BatchWriteRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public BatchWriteRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
BatchWriteRequest.Builder
Overrides

setMutationGroups(int index, BatchWriteRequest.MutationGroup value)

public BatchWriteRequest.Builder setMutationGroups(int index, BatchWriteRequest.MutationGroup value)

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value BatchWriteRequest.MutationGroup
Returns
Type Description
BatchWriteRequest.Builder

setMutationGroups(int index, BatchWriteRequest.MutationGroup.Builder builderForValue)

public BatchWriteRequest.Builder setMutationGroups(int index, BatchWriteRequest.MutationGroup.Builder builderForValue)

Required. The groups of mutations to be applied.

repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue BatchWriteRequest.MutationGroup.Builder
Returns
Type Description
BatchWriteRequest.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public BatchWriteRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
BatchWriteRequest.Builder
Overrides

setRequestOptions(RequestOptions value)

public BatchWriteRequest.Builder setRequestOptions(RequestOptions value)

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 3;

Parameter
Name Description
value RequestOptions
Returns
Type Description
BatchWriteRequest.Builder

setRequestOptions(RequestOptions.Builder builderForValue)

public BatchWriteRequest.Builder setRequestOptions(RequestOptions.Builder builderForValue)

Common options for this request.

.google.spanner.v1.RequestOptions request_options = 3;

Parameter
Name Description
builderForValue RequestOptions.Builder
Returns
Type Description
BatchWriteRequest.Builder

setSession(String value)

public BatchWriteRequest.Builder setSession(String value)

Required. The session in which the batch request is to be run.

string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value String

The session to set.

Returns
Type Description
BatchWriteRequest.Builder

This builder for chaining.

setSessionBytes(ByteString value)

public BatchWriteRequest.Builder setSessionBytes(ByteString value)

Required. The session in which the batch request is to be run.

string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }

Parameter
Name Description
value ByteString

The bytes for session to set.

Returns
Type Description
BatchWriteRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final BatchWriteRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
BatchWriteRequest.Builder
Overrides