Class BeginTransactionRequest.Builder (6.54.0)

public static final class BeginTransactionRequest.Builder extends GeneratedMessageV3.Builder<BeginTransactionRequest.Builder> implements BeginTransactionRequestOrBuilder

The request for BeginTransaction.

Protobuf type google.spanner.v1.BeginTransactionRequest

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public BeginTransactionRequest.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
BeginTransactionRequest.Builder
Overrides

build()

public BeginTransactionRequest build()
Returns
TypeDescription
BeginTransactionRequest

buildPartial()

public BeginTransactionRequest buildPartial()
Returns
TypeDescription
BeginTransactionRequest

clear()

public BeginTransactionRequest.Builder clear()
Returns
TypeDescription
BeginTransactionRequest.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public BeginTransactionRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
BeginTransactionRequest.Builder
Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public BeginTransactionRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
BeginTransactionRequest.Builder
Overrides

clearOptions()

public BeginTransactionRequest.Builder clearOptions()

Required. Options for the new transaction.

.google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
BeginTransactionRequest.Builder

clearRequestOptions()

public BeginTransactionRequest.Builder clearRequestOptions()

Common options for this request. Priority is ignored for this request. Setting the priority in this request_options struct will not 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;

Returns
TypeDescription
BeginTransactionRequest.Builder

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
TypeDescription
BeginTransactionRequest.Builder

This builder for chaining.

clone()

public BeginTransactionRequest.Builder clone()
Returns
TypeDescription
BeginTransactionRequest.Builder
Overrides

getDefaultInstanceForType()

public BeginTransactionRequest getDefaultInstanceForType()
Returns
TypeDescription
BeginTransactionRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getOptions()

public TransactionOptions getOptions()

Required. Options for the new transaction.

.google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
TransactionOptions

The options.

getOptionsBuilder()

public TransactionOptions.Builder getOptionsBuilder()

Required. Options for the new transaction.

.google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
TransactionOptions.Builder

getOptionsOrBuilder()

public TransactionOptionsOrBuilder getOptionsOrBuilder()

Required. Options for the new transaction.

.google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
TransactionOptionsOrBuilder

getRequestOptions()

public RequestOptions getRequestOptions()

Common options for this request. Priority is ignored for this request. Setting the priority in this request_options struct will not 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;

Returns
TypeDescription
RequestOptions

The requestOptions.

getRequestOptionsBuilder()

public RequestOptions.Builder getRequestOptionsBuilder()

Common options for this request. Priority is ignored for this request. Setting the priority in this request_options struct will not 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;

Returns
TypeDescription
RequestOptions.Builder

getRequestOptionsOrBuilder()

public RequestOptionsOrBuilder getRequestOptionsOrBuilder()

Common options for this request. Priority is ignored for this request. Setting the priority in this request_options struct will not 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;

Returns
TypeDescription
RequestOptionsOrBuilder

getSession()

public String getSession()

Required. The session in which the transaction runs.

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

Returns
TypeDescription
String

The session.

getSessionBytes()

public ByteString getSessionBytes()

Required. The session in which the transaction runs.

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

Returns
TypeDescription
ByteString

The bytes for session.

hasOptions()

public boolean hasOptions()

Required. Options for the new transaction.

.google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the options field is set.

hasRequestOptions()

public boolean hasRequestOptions()

Common options for this request. Priority is ignored for this request. Setting the priority in this request_options struct will not 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;

Returns
TypeDescription
boolean

Whether the requestOptions field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public BeginTransactionRequest.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BeginTransactionRequest.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public BeginTransactionRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
BeginTransactionRequest.Builder
Overrides

mergeFrom(BeginTransactionRequest other)

public BeginTransactionRequest.Builder mergeFrom(BeginTransactionRequest other)
Parameter
NameDescription
otherBeginTransactionRequest
Returns
TypeDescription
BeginTransactionRequest.Builder

mergeOptions(TransactionOptions value)

public BeginTransactionRequest.Builder mergeOptions(TransactionOptions value)

Required. Options for the new transaction.

.google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueTransactionOptions
Returns
TypeDescription
BeginTransactionRequest.Builder

mergeRequestOptions(RequestOptions value)

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 will not 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;

Parameter
NameDescription
valueRequestOptions
Returns
TypeDescription
BeginTransactionRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BeginTransactionRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
BeginTransactionRequest.Builder
Overrides

setField(Descriptors.FieldDescriptor field, Object value)

public BeginTransactionRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
BeginTransactionRequest.Builder
Overrides

setOptions(TransactionOptions value)

public BeginTransactionRequest.Builder setOptions(TransactionOptions value)

Required. Options for the new transaction.

.google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueTransactionOptions
Returns
TypeDescription
BeginTransactionRequest.Builder

setOptions(TransactionOptions.Builder builderForValue)

public BeginTransactionRequest.Builder setOptions(TransactionOptions.Builder builderForValue)

Required. Options for the new transaction.

.google.spanner.v1.TransactionOptions options = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueTransactionOptions.Builder
Returns
TypeDescription
BeginTransactionRequest.Builder

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

public BeginTransactionRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
BeginTransactionRequest.Builder
Overrides

setRequestOptions(RequestOptions value)

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 will not 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;

Parameter
NameDescription
valueRequestOptions
Returns
TypeDescription
BeginTransactionRequest.Builder

setRequestOptions(RequestOptions.Builder builderForValue)

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 will not 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;

Parameter
NameDescription
builderForValueRequestOptions.Builder
Returns
TypeDescription
BeginTransactionRequest.Builder

setSession(String value)

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) = { ... }

Parameter
NameDescription
valueString

The session to set.

Returns
TypeDescription
BeginTransactionRequest.Builder

This builder for chaining.

setSessionBytes(ByteString value)

public BeginTransactionRequest.Builder setSessionBytes(ByteString value)

Required. The session in which the transaction runs.

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

Parameter
NameDescription
valueByteString

The bytes for session to set.

Returns
TypeDescription
BeginTransactionRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final BeginTransactionRequest.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
BeginTransactionRequest.Builder
Overrides