Class ReadOptions.Builder (2.17.6)

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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ReadOptions build()
Returns
TypeDescription
ReadOptions

buildPartial()

public ReadOptions buildPartial()
Returns
TypeDescription
ReadOptions

clear()

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

clearConsistencyType()

public ReadOptions.Builder clearConsistencyType()
Returns
TypeDescription
ReadOptions.Builder

clearField(Descriptors.FieldDescriptor field)

public ReadOptions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
ReadOptions.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearReadConsistency()

public ReadOptions.Builder clearReadConsistency()

The non-transactional read consistency to use.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ReadOptions.Builder

This builder for chaining.

clone()

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

getConsistencyTypeCase()

public ReadOptions.ConsistencyTypeCase getConsistencyTypeCase()
Returns
TypeDescription
ReadOptions.ConsistencyTypeCase

getDefaultInstanceForType()

public ReadOptions getDefaultInstanceForType()
Returns
TypeDescription
ReadOptions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
TransactionOptionsOrBuilder

getReadConsistency()

public ReadOptions.ReadConsistency getReadConsistency()

The non-transactional read consistency to use.

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

Returns
TypeDescription
ReadOptions.ReadConsistency

The readConsistency.

getReadConsistencyValue()

public int getReadConsistencyValue()

The non-transactional read consistency to use.

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

Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the transaction field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ReadOptions other)

public ReadOptions.Builder mergeFrom(ReadOptions other)
Parameter
NameDescription
otherReadOptions
Returns
TypeDescription
ReadOptions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public ReadOptions.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueTransactionOptions
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
ReadOptions.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setField(Descriptors.FieldDescriptor field, Object value)

public ReadOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueTransactionOptions
Returns
TypeDescription
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
NameDescription
builderForValueTransactionOptions.Builder
Returns
TypeDescription
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
NameDescription
valueReadOptions.ReadConsistency

The readConsistency to set.

Returns
TypeDescription
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
NameDescription
valueint

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

Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
ReadOptions.Builder

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

public ReadOptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueByteString

The transaction to set.

Returns
TypeDescription
ReadOptions.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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