Class BatchWriteRequest.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
com.google.spanner.v1.BatchWriteRequest.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, BatchWriteRequestOrBuilder, Cloneable
Enclosing class:
BatchWriteRequest

public static final class BatchWriteRequest.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder> implements BatchWriteRequestOrBuilder
 The request for [BatchWrite][google.spanner.v1.Spanner.BatchWrite].
 
Protobuf type google.spanner.v1.BatchWriteRequest
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
    • clear

      public BatchWriteRequest.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
    • getDefaultInstanceForType

      public BatchWriteRequest getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public BatchWriteRequest build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public BatchWriteRequest buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public BatchWriteRequest.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
    • setField

      public BatchWriteRequest.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
    • clearField

      public BatchWriteRequest.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
    • clearOneof

      public BatchWriteRequest.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
    • setRepeatedField

      public BatchWriteRequest.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
    • addRepeatedField

      public BatchWriteRequest.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
    • mergeFrom

      public BatchWriteRequest.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<BatchWriteRequest.Builder>
    • mergeFrom

      public BatchWriteRequest.Builder mergeFrom(BatchWriteRequest other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
    • mergeFrom

      public BatchWriteRequest.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<BatchWriteRequest.Builder>
      Throws:
      IOException
    • 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) = { ... }
      Specified by:
      getSession in interface BatchWriteRequestOrBuilder
      Returns:
      The session.
    • getSessionBytes

      public com.google.protobuf.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) = { ... }
      Specified by:
      getSessionBytes in interface BatchWriteRequestOrBuilder
      Returns:
      The bytes for session.
    • setSession

      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) = { ... }
      Parameters:
      value - The session to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setSessionBytes

      public BatchWriteRequest.Builder setSessionBytes(com.google.protobuf.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) = { ... }
      Parameters:
      value - The bytes for session to set.
      Returns:
      This builder for chaining.
    • hasRequestOptions

      public boolean hasRequestOptions()
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 3;
      Specified by:
      hasRequestOptions in interface BatchWriteRequestOrBuilder
      Returns:
      Whether the requestOptions field is set.
    • getRequestOptions

      public RequestOptions getRequestOptions()
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 3;
      Specified by:
      getRequestOptions in interface BatchWriteRequestOrBuilder
      Returns:
      The requestOptions.
    • setRequestOptions

      public BatchWriteRequest.Builder setRequestOptions(RequestOptions value)
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 3;
    • setRequestOptions

      public BatchWriteRequest.Builder setRequestOptions(RequestOptions.Builder builderForValue)
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 3;
    • mergeRequestOptions

      public BatchWriteRequest.Builder mergeRequestOptions(RequestOptions value)
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 3;
    • clearRequestOptions

      public BatchWriteRequest.Builder clearRequestOptions()
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 3;
    • getRequestOptionsBuilder

      public RequestOptions.Builder getRequestOptionsBuilder()
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 3;
    • getRequestOptionsOrBuilder

      public RequestOptionsOrBuilder getRequestOptionsOrBuilder()
       Common options for this request.
       
      .google.spanner.v1.RequestOptions request_options = 3;
      Specified by:
      getRequestOptionsOrBuilder in interface BatchWriteRequestOrBuilder
    • 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];
      Specified by:
      getMutationGroupsList in interface BatchWriteRequestOrBuilder
    • 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];
      Specified by:
      getMutationGroupsCount in interface BatchWriteRequestOrBuilder
    • getMutationGroups

      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];
      Specified by:
      getMutationGroups in interface BatchWriteRequestOrBuilder
    • setMutationGroups

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

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

       Required. The groups of mutations to be applied.
       
      repeated .google.spanner.v1.BatchWriteRequest.MutationGroup mutation_groups = 4 [(.google.api.field_behavior) = REQUIRED];
    • addMutationGroups

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

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

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

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

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

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

      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];
      Specified by:
      getMutationGroupsOrBuilder in interface BatchWriteRequestOrBuilder
    • 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];
      Specified by:
      getMutationGroupsOrBuilderList in interface BatchWriteRequestOrBuilder
    • 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];
    • addMutationGroupsBuilder

      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];
    • 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];
    • 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];
      Specified by:
      getExcludeTxnFromChangeStreams in interface BatchWriteRequestOrBuilder
      Returns:
      The excludeTxnFromChangeStreams.
    • setExcludeTxnFromChangeStreams

      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];
      Parameters:
      value - The excludeTxnFromChangeStreams to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • setUnknownFields

      public final BatchWriteRequest.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>
    • mergeUnknownFields

      public final BatchWriteRequest.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<BatchWriteRequest.Builder>