Class BeginTransactionRequest.Builder

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

public static final class BeginTransactionRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<BeginTransactionRequest.Builder> implements BeginTransactionRequestOrBuilder
 The request for
 [BeginTransaction][google.spanner.v1.Spanner.BeginTransaction].
 
Protobuf type google.spanner.v1.BeginTransactionRequest
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<BeginTransactionRequest.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.GeneratedMessage.Builder<BeginTransactionRequest.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.GeneratedMessage.Builder<BeginTransactionRequest.Builder>
    • getDefaultInstanceForType

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

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

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

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

    • isInitialized

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

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

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

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

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

      public BeginTransactionRequest.Builder setSessionBytes(com.google.protobuf.ByteString value)
       Required. The session in which the transaction runs.
       
      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.
    • hasOptions

      public boolean hasOptions()
       Required. Options for the new transaction.
       
      .google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      hasOptions in interface BeginTransactionRequestOrBuilder
      Returns:
      Whether the options field is set.
    • getOptions

      public TransactionOptions getOptions()
       Required. Options for the new transaction.
       
      .google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getOptions in interface BeginTransactionRequestOrBuilder
      Returns:
      The options.
    • setOptions

       Required. Options for the new transaction.
       
      .google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];
    • setOptions

      public BeginTransactionRequest.Builder setOptions(TransactionOptions.Builder builderForValue)
       Required. Options for the new transaction.
       
      .google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];
    • mergeOptions

       Required. Options for the new transaction.
       
      .google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];
    • clearOptions

      public BeginTransactionRequest.Builder clearOptions()
       Required. Options for the new transaction.
       
      .google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];
    • getOptionsBuilder

      public TransactionOptions.Builder getOptionsBuilder()
       Required. Options for the new transaction.
       
      .google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];
    • getOptionsOrBuilder

      public TransactionOptionsOrBuilder getOptionsOrBuilder()
       Required. Options for the new transaction.
       
      .google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getOptionsOrBuilder in interface BeginTransactionRequestOrBuilder
    • hasRequestOptions

      public boolean hasRequestOptions()
       Common options for this request.
       Priority is ignored for this request. Setting the priority in this
       `request_options` struct doesn't do anything. To set the priority for a
       transaction, set it on the reads and writes that are part of this
       transaction instead.
       
      .google.spanner.v1.RequestOptions request_options = 3;
      Specified by:
      hasRequestOptions in interface BeginTransactionRequestOrBuilder
      Returns:
      Whether the requestOptions field is set.
    • getRequestOptions

      public RequestOptions getRequestOptions()
       Common options for this request.
       Priority is ignored for this request. Setting the priority in this
       `request_options` struct doesn't do anything. To set the priority for a
       transaction, set it on the reads and writes that are part of this
       transaction instead.
       
      .google.spanner.v1.RequestOptions request_options = 3;
      Specified by:
      getRequestOptions in interface BeginTransactionRequestOrBuilder
      Returns:
      The requestOptions.
    • setRequestOptions

      public BeginTransactionRequest.Builder setRequestOptions(RequestOptions value)
       Common options for this request.
       Priority is ignored for this request. Setting the priority in this
       `request_options` struct doesn't do anything. To set the priority for a
       transaction, set it on the reads and writes that are part of this
       transaction instead.
       
      .google.spanner.v1.RequestOptions request_options = 3;
    • setRequestOptions

      public BeginTransactionRequest.Builder setRequestOptions(RequestOptions.Builder builderForValue)
       Common options for this request.
       Priority is ignored for this request. Setting the priority in this
       `request_options` struct doesn't do anything. To set the priority for a
       transaction, set it on the reads and writes that are part of this
       transaction instead.
       
      .google.spanner.v1.RequestOptions request_options = 3;
    • mergeRequestOptions

      public BeginTransactionRequest.Builder mergeRequestOptions(RequestOptions value)
       Common options for this request.
       Priority is ignored for this request. Setting the priority in this
       `request_options` struct doesn't do anything. To set the priority for a
       transaction, set it on the reads and writes that are part of this
       transaction instead.
       
      .google.spanner.v1.RequestOptions request_options = 3;
    • clearRequestOptions

      public BeginTransactionRequest.Builder clearRequestOptions()
       Common options for this request.
       Priority is ignored for this request. Setting the priority in this
       `request_options` struct doesn't do anything. To set the priority for a
       transaction, set it on the reads and writes that are part of this
       transaction instead.
       
      .google.spanner.v1.RequestOptions request_options = 3;
    • getRequestOptionsBuilder

      public RequestOptions.Builder getRequestOptionsBuilder()
       Common options for this request.
       Priority is ignored for this request. Setting the priority in this
       `request_options` struct doesn't do anything. To set the priority for a
       transaction, set it on the reads and writes that are part of this
       transaction instead.
       
      .google.spanner.v1.RequestOptions request_options = 3;
    • getRequestOptionsOrBuilder

      public RequestOptionsOrBuilder getRequestOptionsOrBuilder()
       Common options for this request.
       Priority is ignored for this request. Setting the priority in this
       `request_options` struct doesn't do anything. To set the priority for a
       transaction, set it on the reads and writes that are part of this
       transaction instead.
       
      .google.spanner.v1.RequestOptions request_options = 3;
      Specified by:
      getRequestOptionsOrBuilder in interface BeginTransactionRequestOrBuilder
    • hasMutationKey

      public boolean hasMutationKey()
       Optional. Required for read-write transactions on a multiplexed session
       that commit mutations but don't perform any reads or queries. You must
       randomly select one of the mutations from the mutation set and send it as a
       part of this request.
       
      .google.spanner.v1.Mutation mutation_key = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasMutationKey in interface BeginTransactionRequestOrBuilder
      Returns:
      Whether the mutationKey field is set.
    • getMutationKey

      public Mutation getMutationKey()
       Optional. Required for read-write transactions on a multiplexed session
       that commit mutations but don't perform any reads or queries. You must
       randomly select one of the mutations from the mutation set and send it as a
       part of this request.
       
      .google.spanner.v1.Mutation mutation_key = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMutationKey in interface BeginTransactionRequestOrBuilder
      Returns:
      The mutationKey.
    • setMutationKey

      public BeginTransactionRequest.Builder setMutationKey(Mutation value)
       Optional. Required for read-write transactions on a multiplexed session
       that commit mutations but don't perform any reads or queries. You must
       randomly select one of the mutations from the mutation set and send it as a
       part of this request.
       
      .google.spanner.v1.Mutation mutation_key = 4 [(.google.api.field_behavior) = OPTIONAL];
    • setMutationKey

      public BeginTransactionRequest.Builder setMutationKey(Mutation.Builder builderForValue)
       Optional. Required for read-write transactions on a multiplexed session
       that commit mutations but don't perform any reads or queries. You must
       randomly select one of the mutations from the mutation set and send it as a
       part of this request.
       
      .google.spanner.v1.Mutation mutation_key = 4 [(.google.api.field_behavior) = OPTIONAL];
    • mergeMutationKey

      public BeginTransactionRequest.Builder mergeMutationKey(Mutation value)
       Optional. Required for read-write transactions on a multiplexed session
       that commit mutations but don't perform any reads or queries. You must
       randomly select one of the mutations from the mutation set and send it as a
       part of this request.
       
      .google.spanner.v1.Mutation mutation_key = 4 [(.google.api.field_behavior) = OPTIONAL];
    • clearMutationKey

      public BeginTransactionRequest.Builder clearMutationKey()
       Optional. Required for read-write transactions on a multiplexed session
       that commit mutations but don't perform any reads or queries. You must
       randomly select one of the mutations from the mutation set and send it as a
       part of this request.
       
      .google.spanner.v1.Mutation mutation_key = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getMutationKeyBuilder

      public Mutation.Builder getMutationKeyBuilder()
       Optional. Required for read-write transactions on a multiplexed session
       that commit mutations but don't perform any reads or queries. You must
       randomly select one of the mutations from the mutation set and send it as a
       part of this request.
       
      .google.spanner.v1.Mutation mutation_key = 4 [(.google.api.field_behavior) = OPTIONAL];
    • getMutationKeyOrBuilder

      public MutationOrBuilder getMutationKeyOrBuilder()
       Optional. Required for read-write transactions on a multiplexed session
       that commit mutations but don't perform any reads or queries. You must
       randomly select one of the mutations from the mutation set and send it as a
       part of this request.
       
      .google.spanner.v1.Mutation mutation_key = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getMutationKeyOrBuilder in interface BeginTransactionRequestOrBuilder
    • hasRoutingHint

      public boolean hasRoutingHint()
       Optional. Makes the Spanner requests location-aware if present.
      
       It gives the server hints that can be used to route the request
       to an appropriate server, potentially significantly decreasing latency and
       improving throughput. To achieve improved performance, most fields must be
       filled in with accurate values.
       
      .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      hasRoutingHint in interface BeginTransactionRequestOrBuilder
      Returns:
      Whether the routingHint field is set.
    • getRoutingHint

      public RoutingHint getRoutingHint()
       Optional. Makes the Spanner requests location-aware if present.
      
       It gives the server hints that can be used to route the request
       to an appropriate server, potentially significantly decreasing latency and
       improving throughput. To achieve improved performance, most fields must be
       filled in with accurate values.
       
      .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRoutingHint in interface BeginTransactionRequestOrBuilder
      Returns:
      The routingHint.
    • setRoutingHint

      public BeginTransactionRequest.Builder setRoutingHint(RoutingHint value)
       Optional. Makes the Spanner requests location-aware if present.
      
       It gives the server hints that can be used to route the request
       to an appropriate server, potentially significantly decreasing latency and
       improving throughput. To achieve improved performance, most fields must be
       filled in with accurate values.
       
      .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL];
    • setRoutingHint

      public BeginTransactionRequest.Builder setRoutingHint(RoutingHint.Builder builderForValue)
       Optional. Makes the Spanner requests location-aware if present.
      
       It gives the server hints that can be used to route the request
       to an appropriate server, potentially significantly decreasing latency and
       improving throughput. To achieve improved performance, most fields must be
       filled in with accurate values.
       
      .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL];
    • mergeRoutingHint

      public BeginTransactionRequest.Builder mergeRoutingHint(RoutingHint value)
       Optional. Makes the Spanner requests location-aware if present.
      
       It gives the server hints that can be used to route the request
       to an appropriate server, potentially significantly decreasing latency and
       improving throughput. To achieve improved performance, most fields must be
       filled in with accurate values.
       
      .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL];
    • clearRoutingHint

      public BeginTransactionRequest.Builder clearRoutingHint()
       Optional. Makes the Spanner requests location-aware if present.
      
       It gives the server hints that can be used to route the request
       to an appropriate server, potentially significantly decreasing latency and
       improving throughput. To achieve improved performance, most fields must be
       filled in with accurate values.
       
      .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL];
    • getRoutingHintBuilder

      public RoutingHint.Builder getRoutingHintBuilder()
       Optional. Makes the Spanner requests location-aware if present.
      
       It gives the server hints that can be used to route the request
       to an appropriate server, potentially significantly decreasing latency and
       improving throughput. To achieve improved performance, most fields must be
       filled in with accurate values.
       
      .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL];
    • getRoutingHintOrBuilder

      public RoutingHintOrBuilder getRoutingHintOrBuilder()
       Optional. Makes the Spanner requests location-aware if present.
      
       It gives the server hints that can be used to route the request
       to an appropriate server, potentially significantly decreasing latency and
       improving throughput. To achieve improved performance, most fields must be
       filled in with accurate values.
       
      .google.spanner.v1.RoutingHint routing_hint = 5 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getRoutingHintOrBuilder in interface BeginTransactionRequestOrBuilder