Class BatchGetDocumentsRequest (3.11.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
TypeDescription
int

DOCUMENTS_FIELD_NUMBER

public static final int DOCUMENTS_FIELD_NUMBER
Field Value
TypeDescription
int

MASK_FIELD_NUMBER

public static final int MASK_FIELD_NUMBER
Field Value
TypeDescription
int

NEW_TRANSACTION_FIELD_NUMBER

public static final int NEW_TRANSACTION_FIELD_NUMBER
Field Value
TypeDescription
int

READ_TIME_FIELD_NUMBER

public static final int READ_TIME_FIELD_NUMBER
Field Value
TypeDescription
int

TRANSACTION_FIELD_NUMBER

public static final int TRANSACTION_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static BatchGetDocumentsRequest getDefaultInstance()
Returns
TypeDescription
BatchGetDocumentsRequest

getDescriptor()

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

newBuilder()

public static BatchGetDocumentsRequest.Builder newBuilder()
Returns
TypeDescription
BatchGetDocumentsRequest.Builder

newBuilder(BatchGetDocumentsRequest prototype)

public static BatchGetDocumentsRequest.Builder newBuilder(BatchGetDocumentsRequest prototype)
Parameter
NameDescription
prototypeBatchGetDocumentsRequest
Returns
TypeDescription
BatchGetDocumentsRequest.Builder

parseDelimitedFrom(InputStream input)

public static BatchGetDocumentsRequest parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
BatchGetDocumentsRequest
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BatchGetDocumentsRequest parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BatchGetDocumentsRequest
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static BatchGetDocumentsRequest parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
BatchGetDocumentsRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static BatchGetDocumentsRequest parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BatchGetDocumentsRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static BatchGetDocumentsRequest parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
BatchGetDocumentsRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static BatchGetDocumentsRequest parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BatchGetDocumentsRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static BatchGetDocumentsRequest parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
BatchGetDocumentsRequest
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static BatchGetDocumentsRequest parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BatchGetDocumentsRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static BatchGetDocumentsRequest parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
BatchGetDocumentsRequest
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static BatchGetDocumentsRequest parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BatchGetDocumentsRequest
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static BatchGetDocumentsRequest parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
BatchGetDocumentsRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static BatchGetDocumentsRequest parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
BatchGetDocumentsRequest
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<BatchGetDocumentsRequest> parser()
Returns
TypeDescription
Parser<BatchGetDocumentsRequest>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
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

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.

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.

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

getParserForType()

public Parser<BatchGetDocumentsRequest> getParserForType()
Returns
TypeDescription
Parser<BatchGetDocumentsRequest>
Overrides

getReadTime()

public Timestamp getReadTime()

Reads documents as they were at the given time. This may not be older than 270 seconds.

.google.protobuf.Timestamp read_time = 7;

Returns
TypeDescription
Timestamp

The readTime.

getReadTimeOrBuilder()

public TimestampOrBuilder getReadTimeOrBuilder()

Reads documents as they were at the given time. This may not be older than 270 seconds.

.google.protobuf.Timestamp read_time = 7;

Returns
TypeDescription
TimestampOrBuilder

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

getTransaction()

public ByteString getTransaction()

Reads documents in a transaction.

bytes transaction = 4;

Returns
TypeDescription
ByteString

The transaction.

getUnknownFields()

public final UnknownFieldSet getUnknownFields()
Returns
TypeDescription
UnknownFieldSet
Overrides

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 may not be older than 270 seconds.

.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.

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

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

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected BatchGetDocumentsRequest.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
BatchGetDocumentsRequest.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

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

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException