Class ReadOptions.Builder (2.22.0)

public static final class ReadOptions.Builder extends GeneratedMessageV3.Builder<ReadOptions.Builder> implements ReadOptionsOrBuilder

The options shared by read requests.

Protobuf type google.datastore.v1.ReadOptions

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ReadOptions build()
Returns
Type Description
ReadOptions

buildPartial()

public ReadOptions buildPartial()
Returns
Type Description
ReadOptions

clear()

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

clearConsistencyType()

public ReadOptions.Builder clearConsistencyType()
Returns
Type Description
ReadOptions.Builder

clearField(Descriptors.FieldDescriptor field)

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

clearNewTransaction()

public ReadOptions.Builder clearNewTransaction()

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Returns
Type Description
ReadOptions.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearReadConsistency()

public ReadOptions.Builder clearReadConsistency()

The non-transactional read consistency to use.

.google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Returns
Type Description
ReadOptions.Builder

This builder for chaining.

clearReadTime()

public ReadOptions.Builder clearReadTime()

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Returns
Type Description
ReadOptions.Builder

clearTransaction()

public ReadOptions.Builder clearTransaction()

The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction.

bytes transaction = 2;

Returns
Type Description
ReadOptions.Builder

This builder for chaining.

clone()

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

getConsistencyTypeCase()

public ReadOptions.ConsistencyTypeCase getConsistencyTypeCase()
Returns
Type Description
ReadOptions.ConsistencyTypeCase

getDefaultInstanceForType()

public ReadOptions getDefaultInstanceForType()
Returns
Type Description
ReadOptions

getDescriptorForType()

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

getNewTransaction()

public TransactionOptions getNewTransaction()

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Returns
Type Description
TransactionOptions

The newTransaction.

getNewTransactionBuilder()

public TransactionOptions.Builder getNewTransactionBuilder()

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Returns
Type Description
TransactionOptions.Builder

getNewTransactionOrBuilder()

public TransactionOptionsOrBuilder getNewTransactionOrBuilder()

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Returns
Type Description
TransactionOptionsOrBuilder

getReadConsistency()

public ReadOptions.ReadConsistency getReadConsistency()

The non-transactional read consistency to use.

.google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Returns
Type Description
ReadOptions.ReadConsistency

The readConsistency.

getReadConsistencyValue()

public int getReadConsistencyValue()

The non-transactional read consistency to use.

.google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Returns
Type Description
int

The enum numeric value on the wire for readConsistency.

getReadTime()

public Timestamp getReadTime()

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Returns
Type Description
Timestamp

The readTime.

getReadTimeBuilder()

public Timestamp.Builder getReadTimeBuilder()

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Returns
Type Description
Builder

getReadTimeOrBuilder()

public TimestampOrBuilder getReadTimeOrBuilder()

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Returns
Type Description
TimestampOrBuilder

getTransaction()

public ByteString getTransaction()

The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction.

bytes transaction = 2;

Returns
Type Description
ByteString

The transaction.

hasNewTransaction()

public boolean hasNewTransaction()

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Returns
Type Description
boolean

Whether the newTransaction field is set.

hasReadConsistency()

public boolean hasReadConsistency()

The non-transactional read consistency to use.

.google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Returns
Type Description
boolean

Whether the readConsistency field is set.

hasReadTime()

public boolean hasReadTime()

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Returns
Type Description
boolean

Whether the readTime field is set.

hasTransaction()

public boolean hasTransaction()

The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction.

bytes transaction = 2;

Returns
Type Description
boolean

Whether the transaction field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ReadOptions other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeNewTransaction(TransactionOptions value)

public ReadOptions.Builder mergeNewTransaction(TransactionOptions value)

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Parameter
Name Description
value TransactionOptions
Returns
Type Description
ReadOptions.Builder

mergeReadTime(Timestamp value)

public ReadOptions.Builder mergeReadTime(Timestamp value)

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Parameter
Name Description
value Timestamp
Returns
Type Description
ReadOptions.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

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

setNewTransaction(TransactionOptions value)

public ReadOptions.Builder setNewTransaction(TransactionOptions value)

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Parameter
Name Description
value TransactionOptions
Returns
Type Description
ReadOptions.Builder

setNewTransaction(TransactionOptions.Builder builderForValue)

public ReadOptions.Builder setNewTransaction(TransactionOptions.Builder builderForValue)

Options for beginning a new transaction for this request.

The new transaction identifier will be returned in the corresponding response as either LookupResponse.transaction or RunQueryResponse.transaction.

.google.datastore.v1.TransactionOptions new_transaction = 3;

Parameter
Name Description
builderForValue TransactionOptions.Builder
Returns
Type Description
ReadOptions.Builder

setReadConsistency(ReadOptions.ReadConsistency value)

public ReadOptions.Builder setReadConsistency(ReadOptions.ReadConsistency value)

The non-transactional read consistency to use.

.google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Parameter
Name Description
value ReadOptions.ReadConsistency

The readConsistency to set.

Returns
Type Description
ReadOptions.Builder

This builder for chaining.

setReadConsistencyValue(int value)

public ReadOptions.Builder setReadConsistencyValue(int value)

The non-transactional read consistency to use.

.google.datastore.v1.ReadOptions.ReadConsistency read_consistency = 1;

Parameter
Name Description
value int

The enum numeric value on the wire for readConsistency to set.

Returns
Type Description
ReadOptions.Builder

This builder for chaining.

setReadTime(Timestamp value)

public ReadOptions.Builder setReadTime(Timestamp value)

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Parameter
Name Description
value Timestamp
Returns
Type Description
ReadOptions.Builder

setReadTime(Timestamp.Builder builderForValue)

public ReadOptions.Builder setReadTime(Timestamp.Builder builderForValue)

Reads entities as they were at the given time. This value is only supported for Cloud Firestore in Datastore mode.

This must be a microsecond precision timestamp within the past one hour, or if Point-in-Time Recovery is enabled, can additionally be a whole minute timestamp within the past 7 days.

.google.protobuf.Timestamp read_time = 4;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
ReadOptions.Builder

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

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

setTransaction(ByteString value)

public ReadOptions.Builder setTransaction(ByteString value)

The identifier of the transaction in which to read. A transaction identifier is returned by a call to Datastore.BeginTransaction.

bytes transaction = 2;

Parameter
Name Description
value ByteString

The transaction to set.

Returns
Type Description
ReadOptions.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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