Class CommitRequest.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, CommitRequestOrBuilder, Cloneable
    Enclosing class:
    CommitRequest

    public static final class CommitRequest.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<CommitRequest.Builder>
    implements CommitRequestOrBuilder
     The request for [Commit][google.spanner.v1.Spanner.Commit].
     
    Protobuf type google.spanner.v1.CommitRequest
    • Method Detail

      • 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<CommitRequest.Builder>
      • clear

        public CommitRequest.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<CommitRequest.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<CommitRequest.Builder>
      • getDefaultInstanceForType

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

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

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

        public CommitRequest.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<CommitRequest.Builder>
      • setField

        public CommitRequest.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<CommitRequest.Builder>
      • clearField

        public CommitRequest.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<CommitRequest.Builder>
      • clearOneof

        public CommitRequest.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<CommitRequest.Builder>
      • setRepeatedField

        public CommitRequest.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<CommitRequest.Builder>
      • addRepeatedField

        public CommitRequest.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<CommitRequest.Builder>
      • mergeFrom

        public CommitRequest.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<CommitRequest.Builder>
      • isInitialized

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

        public CommitRequest.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<CommitRequest.Builder>
        Throws:
        IOException
      • getSession

        public String getSession()
         Required. The session in which the transaction to be committed is running.
         
        string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Specified by:
        getSession in interface CommitRequestOrBuilder
        Returns:
        The session.
      • getSessionBytes

        public com.google.protobuf.ByteString getSessionBytes()
         Required. The session in which the transaction to be committed is running.
         
        string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Specified by:
        getSessionBytes in interface CommitRequestOrBuilder
        Returns:
        The bytes for session.
      • setSession

        public CommitRequest.Builder setSession​(String value)
         Required. The session in which the transaction to be committed is running.
         
        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 CommitRequest.Builder clearSession()
         Required. The session in which the transaction to be committed is running.
         
        string session = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
        Returns:
        This builder for chaining.
      • setSessionBytes

        public CommitRequest.Builder setSessionBytes​(com.google.protobuf.ByteString value)
         Required. The session in which the transaction to be committed is running.
         
        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.
      • hasTransactionId

        public boolean hasTransactionId()
         Commit a previously-started transaction.
         
        bytes transaction_id = 2;
        Specified by:
        hasTransactionId in interface CommitRequestOrBuilder
        Returns:
        Whether the transactionId field is set.
      • getTransactionId

        public com.google.protobuf.ByteString getTransactionId()
         Commit a previously-started transaction.
         
        bytes transaction_id = 2;
        Specified by:
        getTransactionId in interface CommitRequestOrBuilder
        Returns:
        The transactionId.
      • setTransactionId

        public CommitRequest.Builder setTransactionId​(com.google.protobuf.ByteString value)
         Commit a previously-started transaction.
         
        bytes transaction_id = 2;
        Parameters:
        value - The transactionId to set.
        Returns:
        This builder for chaining.
      • clearTransactionId

        public CommitRequest.Builder clearTransactionId()
         Commit a previously-started transaction.
         
        bytes transaction_id = 2;
        Returns:
        This builder for chaining.
      • hasSingleUseTransaction

        public boolean hasSingleUseTransaction()
         Execute mutations in a temporary transaction. Note that unlike
         commit of a previously-started transaction, commit with a
         temporary transaction is non-idempotent. That is, if the
         `CommitRequest` is sent to Cloud Spanner more than once (for
         instance, due to retries in the application, or in the
         transport library), it is possible that the mutations are
         executed more than once. If this is undesirable, use
         [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and
         [Commit][google.spanner.v1.Spanner.Commit] instead.
         
        .google.spanner.v1.TransactionOptions single_use_transaction = 3;
        Specified by:
        hasSingleUseTransaction in interface CommitRequestOrBuilder
        Returns:
        Whether the singleUseTransaction field is set.
      • getSingleUseTransaction

        public TransactionOptions getSingleUseTransaction()
         Execute mutations in a temporary transaction. Note that unlike
         commit of a previously-started transaction, commit with a
         temporary transaction is non-idempotent. That is, if the
         `CommitRequest` is sent to Cloud Spanner more than once (for
         instance, due to retries in the application, or in the
         transport library), it is possible that the mutations are
         executed more than once. If this is undesirable, use
         [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and
         [Commit][google.spanner.v1.Spanner.Commit] instead.
         
        .google.spanner.v1.TransactionOptions single_use_transaction = 3;
        Specified by:
        getSingleUseTransaction in interface CommitRequestOrBuilder
        Returns:
        The singleUseTransaction.
      • setSingleUseTransaction

        public CommitRequest.Builder setSingleUseTransaction​(TransactionOptions value)
         Execute mutations in a temporary transaction. Note that unlike
         commit of a previously-started transaction, commit with a
         temporary transaction is non-idempotent. That is, if the
         `CommitRequest` is sent to Cloud Spanner more than once (for
         instance, due to retries in the application, or in the
         transport library), it is possible that the mutations are
         executed more than once. If this is undesirable, use
         [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and
         [Commit][google.spanner.v1.Spanner.Commit] instead.
         
        .google.spanner.v1.TransactionOptions single_use_transaction = 3;
      • setSingleUseTransaction

        public CommitRequest.Builder setSingleUseTransaction​(TransactionOptions.Builder builderForValue)
         Execute mutations in a temporary transaction. Note that unlike
         commit of a previously-started transaction, commit with a
         temporary transaction is non-idempotent. That is, if the
         `CommitRequest` is sent to Cloud Spanner more than once (for
         instance, due to retries in the application, or in the
         transport library), it is possible that the mutations are
         executed more than once. If this is undesirable, use
         [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and
         [Commit][google.spanner.v1.Spanner.Commit] instead.
         
        .google.spanner.v1.TransactionOptions single_use_transaction = 3;
      • mergeSingleUseTransaction

        public CommitRequest.Builder mergeSingleUseTransaction​(TransactionOptions value)
         Execute mutations in a temporary transaction. Note that unlike
         commit of a previously-started transaction, commit with a
         temporary transaction is non-idempotent. That is, if the
         `CommitRequest` is sent to Cloud Spanner more than once (for
         instance, due to retries in the application, or in the
         transport library), it is possible that the mutations are
         executed more than once. If this is undesirable, use
         [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and
         [Commit][google.spanner.v1.Spanner.Commit] instead.
         
        .google.spanner.v1.TransactionOptions single_use_transaction = 3;
      • clearSingleUseTransaction

        public CommitRequest.Builder clearSingleUseTransaction()
         Execute mutations in a temporary transaction. Note that unlike
         commit of a previously-started transaction, commit with a
         temporary transaction is non-idempotent. That is, if the
         `CommitRequest` is sent to Cloud Spanner more than once (for
         instance, due to retries in the application, or in the
         transport library), it is possible that the mutations are
         executed more than once. If this is undesirable, use
         [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and
         [Commit][google.spanner.v1.Spanner.Commit] instead.
         
        .google.spanner.v1.TransactionOptions single_use_transaction = 3;
      • getSingleUseTransactionBuilder

        public TransactionOptions.Builder getSingleUseTransactionBuilder()
         Execute mutations in a temporary transaction. Note that unlike
         commit of a previously-started transaction, commit with a
         temporary transaction is non-idempotent. That is, if the
         `CommitRequest` is sent to Cloud Spanner more than once (for
         instance, due to retries in the application, or in the
         transport library), it is possible that the mutations are
         executed more than once. If this is undesirable, use
         [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and
         [Commit][google.spanner.v1.Spanner.Commit] instead.
         
        .google.spanner.v1.TransactionOptions single_use_transaction = 3;
      • getSingleUseTransactionOrBuilder

        public TransactionOptionsOrBuilder getSingleUseTransactionOrBuilder()
         Execute mutations in a temporary transaction. Note that unlike
         commit of a previously-started transaction, commit with a
         temporary transaction is non-idempotent. That is, if the
         `CommitRequest` is sent to Cloud Spanner more than once (for
         instance, due to retries in the application, or in the
         transport library), it is possible that the mutations are
         executed more than once. If this is undesirable, use
         [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction] and
         [Commit][google.spanner.v1.Spanner.Commit] instead.
         
        .google.spanner.v1.TransactionOptions single_use_transaction = 3;
        Specified by:
        getSingleUseTransactionOrBuilder in interface CommitRequestOrBuilder
      • getMutationsList

        public List<Mutation> getMutationsList()
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
        Specified by:
        getMutationsList in interface CommitRequestOrBuilder
      • getMutationsCount

        public int getMutationsCount()
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
        Specified by:
        getMutationsCount in interface CommitRequestOrBuilder
      • getMutations

        public Mutation getMutations​(int index)
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
        Specified by:
        getMutations in interface CommitRequestOrBuilder
      • setMutations

        public CommitRequest.Builder setMutations​(int index,
                                                  Mutation value)
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
      • setMutations

        public CommitRequest.Builder setMutations​(int index,
                                                  Mutation.Builder builderForValue)
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
      • addMutations

        public CommitRequest.Builder addMutations​(Mutation value)
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
      • addMutations

        public CommitRequest.Builder addMutations​(int index,
                                                  Mutation value)
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
      • addMutations

        public CommitRequest.Builder addMutations​(Mutation.Builder builderForValue)
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
      • addMutations

        public CommitRequest.Builder addMutations​(int index,
                                                  Mutation.Builder builderForValue)
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
      • addAllMutations

        public CommitRequest.Builder addAllMutations​(Iterable<? extends Mutation> values)
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
      • clearMutations

        public CommitRequest.Builder clearMutations()
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
      • removeMutations

        public CommitRequest.Builder removeMutations​(int index)
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
      • getMutationsBuilder

        public Mutation.Builder getMutationsBuilder​(int index)
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
      • getMutationsOrBuilder

        public MutationOrBuilder getMutationsOrBuilder​(int index)
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
        Specified by:
        getMutationsOrBuilder in interface CommitRequestOrBuilder
      • getMutationsOrBuilderList

        public List<? extends MutationOrBuilder> getMutationsOrBuilderList()
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
        Specified by:
        getMutationsOrBuilderList in interface CommitRequestOrBuilder
      • addMutationsBuilder

        public Mutation.Builder addMutationsBuilder()
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
      • addMutationsBuilder

        public Mutation.Builder addMutationsBuilder​(int index)
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
      • getMutationsBuilderList

        public List<Mutation.Builder> getMutationsBuilderList()
         The mutations to be executed when this transaction commits. All
         mutations are applied atomically, in the order they appear in
         this list.
         
        repeated .google.spanner.v1.Mutation mutations = 4;
      • getReturnCommitStats

        public boolean getReturnCommitStats()
         If `true`, then statistics related to the transaction will be included in
         the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. Default value is
         `false`.
         
        bool return_commit_stats = 5;
        Specified by:
        getReturnCommitStats in interface CommitRequestOrBuilder
        Returns:
        The returnCommitStats.
      • setReturnCommitStats

        public CommitRequest.Builder setReturnCommitStats​(boolean value)
         If `true`, then statistics related to the transaction will be included in
         the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. Default value is
         `false`.
         
        bool return_commit_stats = 5;
        Parameters:
        value - The returnCommitStats to set.
        Returns:
        This builder for chaining.
      • clearReturnCommitStats

        public CommitRequest.Builder clearReturnCommitStats()
         If `true`, then statistics related to the transaction will be included in
         the [CommitResponse][google.spanner.v1.CommitResponse.commit_stats]. Default value is
         `false`.
         
        bool return_commit_stats = 5;
        Returns:
        This builder for chaining.
      • hasRequestOptions

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

        public CommitRequest.Builder setRequestOptions​(RequestOptions value)
         Common options for this request.
         
        .google.spanner.v1.RequestOptions request_options = 6;
      • mergeRequestOptions

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

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

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

        public final CommitRequest.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<CommitRequest.Builder>
      • mergeUnknownFields

        public final CommitRequest.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<CommitRequest.Builder>