Class BatchGetDocumentsRequest (3.30.0)

public final class BatchGetDocumentsRequest extends GeneratedMessageV3 implements BatchGetDocumentsRequestOrBuilder

The request for Firestore.BatchGetDocuments.

Protobuf type google.firestore.v1.BatchGetDocumentsRequest

Static Fields

DATABASE_FIELD_NUMBER

public static final int DATABASE_FIELD_NUMBER
Field Value
Type Description
int

DOCUMENTS_FIELD_NUMBER

public static final int DOCUMENTS_FIELD_NUMBER
Field Value
Type Description
int

MASK_FIELD_NUMBER

public static final int MASK_FIELD_NUMBER
Field Value
Type Description
int

NEW_TRANSACTION_FIELD_NUMBER

public static final int NEW_TRANSACTION_FIELD_NUMBER
Field Value
Type Description
int

READ_TIME_FIELD_NUMBER

public static final int READ_TIME_FIELD_NUMBER
Field Value
Type Description
int

TRANSACTION_FIELD_NUMBER

public static final int TRANSACTION_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static BatchGetDocumentsRequest getDefaultInstance()
Returns
Type Description
BatchGetDocumentsRequest

getDescriptor()

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

newBuilder()

public static BatchGetDocumentsRequest.Builder newBuilder()
Returns
Type Description
BatchGetDocumentsRequest.Builder

newBuilder(BatchGetDocumentsRequest prototype)

public static BatchGetDocumentsRequest.Builder newBuilder(BatchGetDocumentsRequest prototype)
Parameter
Name Description
prototype BatchGetDocumentsRequest
Returns
Type Description
BatchGetDocumentsRequest.Builder

parseDelimitedFrom(InputStream input)

public static BatchGetDocumentsRequest parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
BatchGetDocumentsRequest
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BatchGetDocumentsRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BatchGetDocumentsRequest
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static BatchGetDocumentsRequest parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
BatchGetDocumentsRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static BatchGetDocumentsRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BatchGetDocumentsRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static BatchGetDocumentsRequest parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
BatchGetDocumentsRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static BatchGetDocumentsRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BatchGetDocumentsRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static BatchGetDocumentsRequest parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
BatchGetDocumentsRequest
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static BatchGetDocumentsRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BatchGetDocumentsRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static BatchGetDocumentsRequest parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
BatchGetDocumentsRequest
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BatchGetDocumentsRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BatchGetDocumentsRequest
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static BatchGetDocumentsRequest parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
BatchGetDocumentsRequest
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static BatchGetDocumentsRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
BatchGetDocumentsRequest
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<BatchGetDocumentsRequest> parser()
Returns
Type Description
Parser<BatchGetDocumentsRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
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

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.

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.

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

getParserForType()

public Parser<BatchGetDocumentsRequest> getParserForType()
Returns
Type Description
Parser<BatchGetDocumentsRequest>
Overrides

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.

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

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.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public BatchGetDocumentsRequest.Builder newBuilderForType()
Returns
Type Description
BatchGetDocumentsRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected BatchGetDocumentsRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
BatchGetDocumentsRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public BatchGetDocumentsRequest.Builder toBuilder()
Returns
Type Description
BatchGetDocumentsRequest.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException