Class ListDocumentsRequest.Builder (3.21.1)

public static final class ListDocumentsRequest.Builder extends GeneratedMessageV3.Builder<ListDocumentsRequest.Builder> implements ListDocumentsRequestOrBuilder

The request for Firestore.ListDocuments.

Protobuf type google.firestore.v1.ListDocumentsRequest

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ListDocumentsRequest build()
Returns
Type Description
ListDocumentsRequest

buildPartial()

public ListDocumentsRequest buildPartial()
Returns
Type Description
ListDocumentsRequest

clear()

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

clearCollectionId()

public ListDocumentsRequest.Builder clearCollectionId()

Optional. The collection ID, relative to parent, to list.

For example: chatrooms or messages.

This is optional, and when not provided, Firestore will list documents from all collections under the provided parent.

string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

clearConsistencySelector()

public ListDocumentsRequest.Builder clearConsistencySelector()
Returns
Type Description
ListDocumentsRequest.Builder

clearField(Descriptors.FieldDescriptor field)

public ListDocumentsRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ListDocumentsRequest.Builder
Overrides

clearMask()

public ListDocumentsRequest.Builder clearMask()

Optional. 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 = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ListDocumentsRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public ListDocumentsRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ListDocumentsRequest.Builder
Overrides

clearOrderBy()

public ListDocumentsRequest.Builder clearOrderBy()

Optional. The optional ordering of the documents to return.

For example: priority desc, name desc.

This mirrors the ORDER BY used in Firestore queries but in a string representation. When absent, documents are ordered based on name ASC.

string order_by = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

clearPageSize()

public ListDocumentsRequest.Builder clearPageSize()

Optional. The maximum number of documents to return in a single response.

Firestore may return fewer than this value.

int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

clearPageToken()

public ListDocumentsRequest.Builder clearPageToken()

Optional. A page token, received from a previous ListDocuments response.

Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of page_size) must match the values set in the request that generated the page token.

string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

clearParent()

public ListDocumentsRequest.Builder clearParent()

Required. The parent resource name. In the format: projects/{project_id}/databases/{database_id}/documents or projects/{project_id}/databases/{database_id}/documents/{document_path}.

For example: projects/my-project/databases/my-database/documents or projects/my-project/databases/my-database/documents/chatrooms/my-chatroom

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

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

clearReadTime()

public ListDocumentsRequest.Builder clearReadTime()

Perform the read at the provided 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 = 10;

Returns
Type Description
ListDocumentsRequest.Builder

clearShowMissing()

public ListDocumentsRequest.Builder clearShowMissing()

If the list should show missing documents.

A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, create_time, or update_time set.

Requests with show_missing may not specify where or order_by.

bool show_missing = 12;

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

clearTransaction()

public ListDocumentsRequest.Builder clearTransaction()

Perform the read as part of an already active transaction.

bytes transaction = 8;

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

clone()

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

getCollectionId()

public String getCollectionId()

Optional. The collection ID, relative to parent, to list.

For example: chatrooms or messages.

This is optional, and when not provided, Firestore will list documents from all collections under the provided parent.

string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The collectionId.

getCollectionIdBytes()

public ByteString getCollectionIdBytes()

Optional. The collection ID, relative to parent, to list.

For example: chatrooms or messages.

This is optional, and when not provided, Firestore will list documents from all collections under the provided parent.

string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for collectionId.

getConsistencySelectorCase()

public ListDocumentsRequest.ConsistencySelectorCase getConsistencySelectorCase()
Returns
Type Description
ListDocumentsRequest.ConsistencySelectorCase

getDefaultInstanceForType()

public ListDocumentsRequest getDefaultInstanceForType()
Returns
Type Description
ListDocumentsRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getMask()

public DocumentMask getMask()

Optional. 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 = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DocumentMask

The mask.

getMaskBuilder()

public DocumentMask.Builder getMaskBuilder()

Optional. 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 = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DocumentMask.Builder

getMaskOrBuilder()

public DocumentMaskOrBuilder getMaskOrBuilder()

Optional. 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 = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
DocumentMaskOrBuilder

getOrderBy()

public String getOrderBy()

Optional. The optional ordering of the documents to return.

For example: priority desc, name desc.

This mirrors the ORDER BY used in Firestore queries but in a string representation. When absent, documents are ordered based on name ASC.

string order_by = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The orderBy.

getOrderByBytes()

public ByteString getOrderByBytes()

Optional. The optional ordering of the documents to return.

For example: priority desc, name desc.

This mirrors the ORDER BY used in Firestore queries but in a string representation. When absent, documents are ordered based on name ASC.

string order_by = 6 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for orderBy.

getPageSize()

public int getPageSize()

Optional. The maximum number of documents to return in a single response.

Firestore may return fewer than this value.

int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The pageSize.

getPageToken()

public String getPageToken()

Optional. A page token, received from a previous ListDocuments response.

Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of page_size) must match the values set in the request that generated the page token.

string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The pageToken.

getPageTokenBytes()

public ByteString getPageTokenBytes()

Optional. A page token, received from a previous ListDocuments response.

Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of page_size) must match the values set in the request that generated the page token.

string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for pageToken.

getParent()

public String getParent()

Required. The parent resource name. In the format: projects/{project_id}/databases/{database_id}/documents or projects/{project_id}/databases/{database_id}/documents/{document_path}.

For example: projects/my-project/databases/my-database/documents or projects/my-project/databases/my-database/documents/chatrooms/my-chatroom

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

Returns
Type Description
String

The parent.

getParentBytes()

public ByteString getParentBytes()

Required. The parent resource name. In the format: projects/{project_id}/databases/{database_id}/documents or projects/{project_id}/databases/{database_id}/documents/{document_path}.

For example: projects/my-project/databases/my-database/documents or projects/my-project/databases/my-database/documents/chatrooms/my-chatroom

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

Returns
Type Description
ByteString

The bytes for parent.

getReadTime()

public Timestamp getReadTime()

Perform the read at the provided 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 = 10;

Returns
Type Description
Timestamp

The readTime.

getReadTimeBuilder()

public Timestamp.Builder getReadTimeBuilder()

Perform the read at the provided 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 = 10;

Returns
Type Description
Builder

getReadTimeOrBuilder()

public TimestampOrBuilder getReadTimeOrBuilder()

Perform the read at the provided 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 = 10;

Returns
Type Description
TimestampOrBuilder

getShowMissing()

public boolean getShowMissing()

If the list should show missing documents.

A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, create_time, or update_time set.

Requests with show_missing may not specify where or order_by.

bool show_missing = 12;

Returns
Type Description
boolean

The showMissing.

getTransaction()

public ByteString getTransaction()

Perform the read as part of an already active transaction.

bytes transaction = 8;

Returns
Type Description
ByteString

The transaction.

hasMask()

public boolean hasMask()

Optional. 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 = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
boolean

Whether the mask field is set.

hasReadTime()

public boolean hasReadTime()

Perform the read at the provided 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 = 10;

Returns
Type Description
boolean

Whether the readTime field is set.

hasTransaction()

public boolean hasTransaction()

Perform the read as part of an already active transaction.

bytes transaction = 8;

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

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public ListDocumentsRequest.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ListDocumentsRequest.Builder
Overrides

mergeMask(DocumentMask value)

public ListDocumentsRequest.Builder mergeMask(DocumentMask value)

Optional. 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 = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value DocumentMask
Returns
Type Description
ListDocumentsRequest.Builder

mergeReadTime(Timestamp value)

public ListDocumentsRequest.Builder mergeReadTime(Timestamp value)

Perform the read at the provided 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 = 10;

Parameter
Name Description
value Timestamp
Returns
Type Description
ListDocumentsRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ListDocumentsRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ListDocumentsRequest.Builder
Overrides

setCollectionId(String value)

public ListDocumentsRequest.Builder setCollectionId(String value)

Optional. The collection ID, relative to parent, to list.

For example: chatrooms or messages.

This is optional, and when not provided, Firestore will list documents from all collections under the provided parent.

string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The collectionId to set.

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

setCollectionIdBytes(ByteString value)

public ListDocumentsRequest.Builder setCollectionIdBytes(ByteString value)

Optional. The collection ID, relative to parent, to list.

For example: chatrooms or messages.

This is optional, and when not provided, Firestore will list documents from all collections under the provided parent.

string collection_id = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for collectionId to set.

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setMask(DocumentMask value)

public ListDocumentsRequest.Builder setMask(DocumentMask value)

Optional. 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 = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value DocumentMask
Returns
Type Description
ListDocumentsRequest.Builder

setMask(DocumentMask.Builder builderForValue)

public ListDocumentsRequest.Builder setMask(DocumentMask.Builder builderForValue)

Optional. 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 = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue DocumentMask.Builder
Returns
Type Description
ListDocumentsRequest.Builder

setOrderBy(String value)

public ListDocumentsRequest.Builder setOrderBy(String value)

Optional. The optional ordering of the documents to return.

For example: priority desc, name desc.

This mirrors the ORDER BY used in Firestore queries but in a string representation. When absent, documents are ordered based on name ASC.

string order_by = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The orderBy to set.

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

setOrderByBytes(ByteString value)

public ListDocumentsRequest.Builder setOrderByBytes(ByteString value)

Optional. The optional ordering of the documents to return.

For example: priority desc, name desc.

This mirrors the ORDER BY used in Firestore queries but in a string representation. When absent, documents are ordered based on name ASC.

string order_by = 6 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for orderBy to set.

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

setPageSize(int value)

public ListDocumentsRequest.Builder setPageSize(int value)

Optional. The maximum number of documents to return in a single response.

Firestore may return fewer than this value.

int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The pageSize to set.

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

setPageToken(String value)

public ListDocumentsRequest.Builder setPageToken(String value)

Optional. A page token, received from a previous ListDocuments response.

Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of page_size) must match the values set in the request that generated the page token.

string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The pageToken to set.

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

setPageTokenBytes(ByteString value)

public ListDocumentsRequest.Builder setPageTokenBytes(ByteString value)

Optional. A page token, received from a previous ListDocuments response.

Provide this to retrieve the subsequent page. When paginating, all other parameters (with the exception of page_size) must match the values set in the request that generated the page token.

string page_token = 4 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for pageToken to set.

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

setParent(String value)

public ListDocumentsRequest.Builder setParent(String value)

Required. The parent resource name. In the format: projects/{project_id}/databases/{database_id}/documents or projects/{project_id}/databases/{database_id}/documents/{document_path}.

For example: projects/my-project/databases/my-database/documents or projects/my-project/databases/my-database/documents/chatrooms/my-chatroom

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

Parameter
Name Description
value String

The parent to set.

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

setParentBytes(ByteString value)

public ListDocumentsRequest.Builder setParentBytes(ByteString value)

Required. The parent resource name. In the format: projects/{project_id}/databases/{database_id}/documents or projects/{project_id}/databases/{database_id}/documents/{document_path}.

For example: projects/my-project/databases/my-database/documents or projects/my-project/databases/my-database/documents/chatrooms/my-chatroom

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

Parameter
Name Description
value ByteString

The bytes for parent to set.

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

setReadTime(Timestamp value)

public ListDocumentsRequest.Builder setReadTime(Timestamp value)

Perform the read at the provided 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 = 10;

Parameter
Name Description
value Timestamp
Returns
Type Description
ListDocumentsRequest.Builder

setReadTime(Timestamp.Builder builderForValue)

public ListDocumentsRequest.Builder setReadTime(Timestamp.Builder builderForValue)

Perform the read at the provided 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 = 10;

Parameter
Name Description
builderForValue Builder
Returns
Type Description
ListDocumentsRequest.Builder

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

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

setShowMissing(boolean value)

public ListDocumentsRequest.Builder setShowMissing(boolean value)

If the list should show missing documents.

A document is missing if it does not exist, but there are sub-documents nested underneath it. When true, such missing documents will be returned with a key but will not have fields, create_time, or update_time set.

Requests with show_missing may not specify where or order_by.

bool show_missing = 12;

Parameter
Name Description
value boolean

The showMissing to set.

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

setTransaction(ByteString value)

public ListDocumentsRequest.Builder setTransaction(ByteString value)

Perform the read as part of an already active transaction.

bytes transaction = 8;

Parameter
Name Description
value ByteString

The transaction to set.

Returns
Type Description
ListDocumentsRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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