Class BatchGetDocumentsRequest.Builder (3.22.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
Type Description
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
Name Description
values Iterable<String>

The documents to add.

Returns
Type Description
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
Name Description
value String

The documents to add.

Returns
Type Description
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
Name Description
value ByteString

The bytes of the documents to add.

Returns
Type Description
BatchGetDocumentsRequest.Builder

This builder for chaining.

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public BatchGetDocumentsRequest build()
Returns
Type Description
BatchGetDocumentsRequest

buildPartial()

public BatchGetDocumentsRequest buildPartial()
Returns
Type Description
BatchGetDocumentsRequest

clear()

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

clearConsistencySelector()

public BatchGetDocumentsRequest.Builder clearConsistencySelector()
Returns
Type Description
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
Type Description
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
Type Description
BatchGetDocumentsRequest.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public BatchGetDocumentsRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
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
Type Description
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
Type Description
BatchGetDocumentsRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public BatchGetDocumentsRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
BatchGetDocumentsRequest.Builder

clearTransaction()

public BatchGetDocumentsRequest.Builder clearTransaction()

Reads documents in a transaction.

bytes transaction = 4;

Returns
Type Description
BatchGetDocumentsRequest.Builder

This builder for chaining.

clone()

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

getConsistencySelectorCase()

public BatchGetDocumentsRequest.ConsistencySelectorCase getConsistencySelectorCase()
Returns
Type Description
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
Type Description
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
Type Description
ByteString

The bytes for database.

getDefaultInstanceForType()

public BatchGetDocumentsRequest getDefaultInstanceForType()
Returns
Type Description
BatchGetDocumentsRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
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
Name Description
index int

The index of the element to return.

Returns
Type Description
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
Name Description
index int

The index of the value to return.

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
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
Type Description
TimestampOrBuilder

getTransaction()

public ByteString getTransaction()

Reads documents in a transaction.

bytes transaction = 4;

Returns
Type Description
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
Type Description
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
Type Description
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
Type Description
boolean

Whether the readTime field is set.

hasTransaction()

public boolean hasTransaction()

Reads documents in a transaction.

bytes transaction = 4;

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

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public BatchGetDocumentsRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
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
Name Description
value DocumentMask
Returns
Type Description
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
Name Description
value TransactionOptions
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
BatchGetDocumentsRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final BatchGetDocumentsRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
value String

The database to set.

Returns
Type Description
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
Name Description
value ByteString

The bytes for database to set.

Returns
Type Description
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
Name Description
index int

The index to set the value at.

value String

The documents to set.

Returns
Type Description
BatchGetDocumentsRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public BatchGetDocumentsRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
value DocumentMask
Returns
Type Description
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
Name Description
builderForValue DocumentMask.Builder
Returns
Type Description
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
Name Description
value TransactionOptions
Returns
Type Description
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
Name Description
builderForValue TransactionOptions.Builder
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
BatchGetDocumentsRequest.Builder

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

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

setTransaction(ByteString value)

public BatchGetDocumentsRequest.Builder setTransaction(ByteString value)

Reads documents in a transaction.

bytes transaction = 4;

Parameter
Name Description
value ByteString

The transaction to set.

Returns
Type Description
BatchGetDocumentsRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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