Class BatchGetDocumentsRequest.Builder (3.17.0)

public static final class BatchGetDocumentsRequest.Builder extends GeneratedMessageV3.Builder<BatchGetDocumentsRequest.Builder> implements BatchGetDocumentsRequestOrBuilder

The request for Firestore.BatchGetDocuments.

Protobuf type google.firestore.v1.BatchGetDocumentsRequest

Static Methods

getDescriptor()

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

Methods

addAllDocuments(Iterable<String> values)

public BatchGetDocumentsRequest.Builder addAllDocuments(Iterable<String> values)

The names of the documents to retrieve. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}. The request will fail if any of the document is not a child resource of the given database. Duplicate names will be elided.

repeated string documents = 2;

Parameter
NameDescription
valuesIterable<String>

The documents to add.

Returns
TypeDescription
BatchGetDocumentsRequest.Builder

This builder for chaining.

addDocuments(String value)

public BatchGetDocumentsRequest.Builder addDocuments(String value)

The names of the documents to retrieve. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}. The request will fail if any of the document is not a child resource of the given database. Duplicate names will be elided.

repeated string documents = 2;

Parameter
NameDescription
valueString

The documents to add.

Returns
TypeDescription
BatchGetDocumentsRequest.Builder

This builder for chaining.

addDocumentsBytes(ByteString value)

public BatchGetDocumentsRequest.Builder addDocumentsBytes(ByteString value)

The names of the documents to retrieve. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}. The request will fail if any of the document is not a child resource of the given database. Duplicate names will be elided.

repeated string documents = 2;

Parameter
NameDescription
valueByteString

The bytes of the documents to add.

Returns
TypeDescription
BatchGetDocumentsRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public BatchGetDocumentsRequest build()
Returns
TypeDescription
BatchGetDocumentsRequest

buildPartial()

public BatchGetDocumentsRequest buildPartial()
Returns
TypeDescription
BatchGetDocumentsRequest

clear()

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

clearConsistencySelector()

public BatchGetDocumentsRequest.Builder clearConsistencySelector()
Returns
TypeDescription
BatchGetDocumentsRequest.Builder

clearDatabase()

public BatchGetDocumentsRequest.Builder clearDatabase()

Required. The database name. In the format: projects/{project_id}/databases/{database_id}.

string database = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
BatchGetDocumentsRequest.Builder

This builder for chaining.

clearDocuments()

public BatchGetDocumentsRequest.Builder clearDocuments()

The names of the documents to retrieve. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}. The request will fail if any of the document is not a child resource of the given database. Duplicate names will be elided.

repeated string documents = 2;

Returns
TypeDescription
BatchGetDocumentsRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearMask()

public BatchGetDocumentsRequest.Builder clearMask()

The fields to return. If not set, returns all fields.

If a document has a field that is not present in this mask, that field will not be returned in the response.

.google.firestore.v1.DocumentMask mask = 3;

Returns
TypeDescription
BatchGetDocumentsRequest.Builder

clearNewTransaction()

public BatchGetDocumentsRequest.Builder clearNewTransaction()

Starts a new transaction and reads the documents. Defaults to a read-only transaction. The new transaction ID will be returned as the first response in the stream.

.google.firestore.v1.TransactionOptions new_transaction = 5;

Returns
TypeDescription
BatchGetDocumentsRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearReadTime()

public BatchGetDocumentsRequest.Builder clearReadTime()

Reads documents as they were at the given time.

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 = 7;

Returns
TypeDescription
BatchGetDocumentsRequest.Builder

clearTransaction()

public BatchGetDocumentsRequest.Builder clearTransaction()

Reads documents in a transaction.

bytes transaction = 4;

Returns
TypeDescription
BatchGetDocumentsRequest.Builder

This builder for chaining.

clone()

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

getConsistencySelectorCase()

public BatchGetDocumentsRequest.ConsistencySelectorCase getConsistencySelectorCase()
Returns
TypeDescription
BatchGetDocumentsRequest.ConsistencySelectorCase

getDatabase()

public String getDatabase()

Required. The database name. In the format: projects/{project_id}/databases/{database_id}.

string database = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
String

The database.

getDatabaseBytes()

public ByteString getDatabaseBytes()

Required. The database name. In the format: projects/{project_id}/databases/{database_id}.

string database = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
ByteString

The bytes for database.

getDefaultInstanceForType()

public BatchGetDocumentsRequest getDefaultInstanceForType()
Returns
TypeDescription
BatchGetDocumentsRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDocuments(int index)

public String getDocuments(int index)

The names of the documents to retrieve. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}. The request will fail if any of the document is not a child resource of the given database. Duplicate names will be elided.

repeated string documents = 2;

Parameter
NameDescription
indexint

The index of the element to return.

Returns
TypeDescription
String

The documents at the given index.

getDocumentsBytes(int index)

public ByteString getDocumentsBytes(int index)

The names of the documents to retrieve. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}. The request will fail if any of the document is not a child resource of the given database. Duplicate names will be elided.

repeated string documents = 2;

Parameter
NameDescription
indexint

The index of the value to return.

Returns
TypeDescription
ByteString

The bytes of the documents at the given index.

getDocumentsCount()

public int getDocumentsCount()

The names of the documents to retrieve. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}. The request will fail if any of the document is not a child resource of the given database. Duplicate names will be elided.

repeated string documents = 2;

Returns
TypeDescription
int

The count of documents.

getDocumentsList()

public ProtocolStringList getDocumentsList()

The names of the documents to retrieve. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}. The request will fail if any of the document is not a child resource of the given database. Duplicate names will be elided.

repeated string documents = 2;

Returns
TypeDescription
ProtocolStringList

A list containing the documents.

getMask()

public DocumentMask getMask()

The fields to return. If not set, returns all fields.

If a document has a field that is not present in this mask, that field will not be returned in the response.

.google.firestore.v1.DocumentMask mask = 3;

Returns
TypeDescription
DocumentMask

The mask.

getMaskBuilder()

public DocumentMask.Builder getMaskBuilder()

The fields to return. If not set, returns all fields.

If a document has a field that is not present in this mask, that field will not be returned in the response.

.google.firestore.v1.DocumentMask mask = 3;

Returns
TypeDescription
DocumentMask.Builder

getMaskOrBuilder()

public DocumentMaskOrBuilder getMaskOrBuilder()

The fields to return. If not set, returns all fields.

If a document has a field that is not present in this mask, that field will not be returned in the response.

.google.firestore.v1.DocumentMask mask = 3;

Returns
TypeDescription
DocumentMaskOrBuilder

getNewTransaction()

public TransactionOptions getNewTransaction()

Starts a new transaction and reads the documents. Defaults to a read-only transaction. The new transaction ID will be returned as the first response in the stream.

.google.firestore.v1.TransactionOptions new_transaction = 5;

Returns
TypeDescription
TransactionOptions

The newTransaction.

getNewTransactionBuilder()

public TransactionOptions.Builder getNewTransactionBuilder()

Starts a new transaction and reads the documents. Defaults to a read-only transaction. The new transaction ID will be returned as the first response in the stream.

.google.firestore.v1.TransactionOptions new_transaction = 5;

Returns
TypeDescription
TransactionOptions.Builder

getNewTransactionOrBuilder()

public TransactionOptionsOrBuilder getNewTransactionOrBuilder()

Starts a new transaction and reads the documents. Defaults to a read-only transaction. The new transaction ID will be returned as the first response in the stream.

.google.firestore.v1.TransactionOptions new_transaction = 5;

Returns
TypeDescription
TransactionOptionsOrBuilder

getReadTime()

public Timestamp getReadTime()

Reads documents as they were at the given time.

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 = 7;

Returns
TypeDescription
Timestamp

The readTime.

getReadTimeBuilder()

public Timestamp.Builder getReadTimeBuilder()

Reads documents as they were at the given time.

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 = 7;

Returns
TypeDescription
Builder

getReadTimeOrBuilder()

public TimestampOrBuilder getReadTimeOrBuilder()

Reads documents as they were at the given time.

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 = 7;

Returns
TypeDescription
TimestampOrBuilder

getTransaction()

public ByteString getTransaction()

Reads documents in a transaction.

bytes transaction = 4;

Returns
TypeDescription
ByteString

The transaction.

hasMask()

public boolean hasMask()

The fields to return. If not set, returns all fields.

If a document has a field that is not present in this mask, that field will not be returned in the response.

.google.firestore.v1.DocumentMask mask = 3;

Returns
TypeDescription
boolean

Whether the mask field is set.

hasNewTransaction()

public boolean hasNewTransaction()

Starts a new transaction and reads the documents. Defaults to a read-only transaction. The new transaction ID will be returned as the first response in the stream.

.google.firestore.v1.TransactionOptions new_transaction = 5;

Returns
TypeDescription
boolean

Whether the newTransaction field is set.

hasReadTime()

public boolean hasReadTime()

Reads documents as they were at the given time.

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 = 7;

Returns
TypeDescription
boolean

Whether the readTime field is set.

hasTransaction()

public boolean hasTransaction()

Reads documents in a transaction.

bytes transaction = 4;

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(BatchGetDocumentsRequest other)

public BatchGetDocumentsRequest.Builder mergeFrom(BatchGetDocumentsRequest other)
Parameter
NameDescription
otherBatchGetDocumentsRequest
Returns
TypeDescription
BatchGetDocumentsRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeMask(DocumentMask value)

public BatchGetDocumentsRequest.Builder mergeMask(DocumentMask value)

The fields to return. If not set, returns all fields.

If a document has a field that is not present in this mask, that field will not be returned in the response.

.google.firestore.v1.DocumentMask mask = 3;

Parameter
NameDescription
valueDocumentMask
Returns
TypeDescription
BatchGetDocumentsRequest.Builder

mergeNewTransaction(TransactionOptions value)

public BatchGetDocumentsRequest.Builder mergeNewTransaction(TransactionOptions value)

Starts a new transaction and reads the documents. Defaults to a read-only transaction. The new transaction ID will be returned as the first response in the stream.

.google.firestore.v1.TransactionOptions new_transaction = 5;

Parameter
NameDescription
valueTransactionOptions
Returns
TypeDescription
BatchGetDocumentsRequest.Builder

mergeReadTime(Timestamp value)

public BatchGetDocumentsRequest.Builder mergeReadTime(Timestamp value)

Reads documents as they were at the given time.

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 = 7;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
BatchGetDocumentsRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

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

setDatabase(String value)

public BatchGetDocumentsRequest.Builder setDatabase(String value)

Required. The database name. In the format: projects/{project_id}/databases/{database_id}.

string database = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueString

The database to set.

Returns
TypeDescription
BatchGetDocumentsRequest.Builder

This builder for chaining.

setDatabaseBytes(ByteString value)

public BatchGetDocumentsRequest.Builder setDatabaseBytes(ByteString value)

Required. The database name. In the format: projects/{project_id}/databases/{database_id}.

string database = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueByteString

The bytes for database to set.

Returns
TypeDescription
BatchGetDocumentsRequest.Builder

This builder for chaining.

setDocuments(int index, String value)

public BatchGetDocumentsRequest.Builder setDocuments(int index, String value)

The names of the documents to retrieve. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}. The request will fail if any of the document is not a child resource of the given database. Duplicate names will be elided.

repeated string documents = 2;

Parameters
NameDescription
indexint

The index to set the value at.

valueString

The documents to set.

Returns
TypeDescription
BatchGetDocumentsRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setMask(DocumentMask value)

public BatchGetDocumentsRequest.Builder setMask(DocumentMask value)

The fields to return. If not set, returns all fields.

If a document has a field that is not present in this mask, that field will not be returned in the response.

.google.firestore.v1.DocumentMask mask = 3;

Parameter
NameDescription
valueDocumentMask
Returns
TypeDescription
BatchGetDocumentsRequest.Builder

setMask(DocumentMask.Builder builderForValue)

public BatchGetDocumentsRequest.Builder setMask(DocumentMask.Builder builderForValue)

The fields to return. If not set, returns all fields.

If a document has a field that is not present in this mask, that field will not be returned in the response.

.google.firestore.v1.DocumentMask mask = 3;

Parameter
NameDescription
builderForValueDocumentMask.Builder
Returns
TypeDescription
BatchGetDocumentsRequest.Builder

setNewTransaction(TransactionOptions value)

public BatchGetDocumentsRequest.Builder setNewTransaction(TransactionOptions value)

Starts a new transaction and reads the documents. Defaults to a read-only transaction. The new transaction ID will be returned as the first response in the stream.

.google.firestore.v1.TransactionOptions new_transaction = 5;

Parameter
NameDescription
valueTransactionOptions
Returns
TypeDescription
BatchGetDocumentsRequest.Builder

setNewTransaction(TransactionOptions.Builder builderForValue)

public BatchGetDocumentsRequest.Builder setNewTransaction(TransactionOptions.Builder builderForValue)

Starts a new transaction and reads the documents. Defaults to a read-only transaction. The new transaction ID will be returned as the first response in the stream.

.google.firestore.v1.TransactionOptions new_transaction = 5;

Parameter
NameDescription
builderForValueTransactionOptions.Builder
Returns
TypeDescription
BatchGetDocumentsRequest.Builder

setReadTime(Timestamp value)

public BatchGetDocumentsRequest.Builder setReadTime(Timestamp value)

Reads documents as they were at the given time.

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 = 7;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
BatchGetDocumentsRequest.Builder

setReadTime(Timestamp.Builder builderForValue)

public BatchGetDocumentsRequest.Builder setReadTime(Timestamp.Builder builderForValue)

Reads documents as they were at the given time.

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 = 7;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
BatchGetDocumentsRequest.Builder

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

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

setTransaction(ByteString value)

public BatchGetDocumentsRequest.Builder setTransaction(ByteString value)

Reads documents in a transaction.

bytes transaction = 4;

Parameter
NameDescription
valueByteString

The transaction to set.

Returns
TypeDescription
BatchGetDocumentsRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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