Class ListDocumentsRequest.Builder (3.17.0)

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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public ListDocumentsRequest build()
Returns
TypeDescription
ListDocumentsRequest

buildPartial()

public ListDocumentsRequest buildPartial()
Returns
TypeDescription
ListDocumentsRequest

clear()

public ListDocumentsRequest.Builder clear()
Returns
TypeDescription
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
TypeDescription
ListDocumentsRequest.Builder

This builder for chaining.

clearConsistencySelector()

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

clearField(Descriptors.FieldDescriptor field)

public ListDocumentsRequest.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
ListDocumentsRequest.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public ListDocumentsRequest.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
ListDocumentsRequest.Builder

This builder for chaining.

clone()

public ListDocumentsRequest.Builder clone()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ByteString

The bytes for collectionId.

getConsistencySelectorCase()

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

getDefaultInstanceForType()

public ListDocumentsRequest getDefaultInstanceForType()
Returns
TypeDescription
ListDocumentsRequest

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

The showMissing.

getTransaction()

public ByteString getTransaction()

Perform the read as part of an already active transaction.

bytes transaction = 8;

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

public ListDocumentsRequest.Builder mergeFrom(ListDocumentsRequest other)
Parameter
NameDescription
otherListDocumentsRequest
Returns
TypeDescription
ListDocumentsRequest.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

public ListDocumentsRequest.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
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
NameDescription
valueDocumentMask
Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
ListDocumentsRequest.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ListDocumentsRequest.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueString

The collectionId to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for collectionId to set.

Returns
TypeDescription
ListDocumentsRequest.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public ListDocumentsRequest.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
valueDocumentMask
Returns
TypeDescription
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
NameDescription
builderForValueDocumentMask.Builder
Returns
TypeDescription
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
NameDescription
valueString

The orderBy to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for orderBy to set.

Returns
TypeDescription
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
NameDescription
valueint

The pageSize to set.

Returns
TypeDescription
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
NameDescription
valueString

The pageToken to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for pageToken to set.

Returns
TypeDescription
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
NameDescription
valueString

The parent to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for parent to set.

Returns
TypeDescription
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
NameDescription
valueTimestamp
Returns
TypeDescription
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
NameDescription
builderForValueBuilder
Returns
TypeDescription
ListDocumentsRequest.Builder

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

public ListDocumentsRequest.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
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
NameDescription
valueboolean

The showMissing to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The transaction to set.

Returns
TypeDescription
ListDocumentsRequest.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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