Abstract types

ArrayValue

static

An array value.

Property

Parameter

values

Array of Object

Values in the array.

This object should have the same structure as Value

See also

google.firestore.v1beta1.ArrayValue definition in proto format

BatchGetDocumentsRequest

static

The request for Firestore.BatchGetDocuments.

Properties

Parameter

database

string

The database name. In the format: projects/{project_id}/databases/{database_id}.

documents

Array of string

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.

mask

Object

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.

This object should have the same structure as DocumentMask

transaction

string

Reads documents in a transaction.

newTransaction

Object

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.

This object should have the same structure as TransactionOptions

readTime

Object

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

This object should have the same structure as Timestamp

See also

google.firestore.v1beta1.BatchGetDocumentsRequest definition in proto format

BatchGetDocumentsResponse

static

The streamed response for Firestore.BatchGetDocuments.

Properties

Parameter

found

Object

A document that was requested.

This object should have the same structure as Document

missing

string

A document name that was requested but does not exist. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}.

transaction

string

The transaction that was started as part of this request. Will only be set in the first response, and only if BatchGetDocumentsRequest.new_transaction was set in the request.

readTime

Object

The time at which the document was read. This may be monotically increasing, in this case the previous documents in the result stream are guaranteed not to have changed between their read_time and this one.

This object should have the same structure as Timestamp

See also

google.firestore.v1beta1.BatchGetDocumentsResponse definition in proto format

BeginTransactionRequest

static

The request for Firestore.BeginTransaction.

Properties

Parameter

database

string

The database name. In the format: projects/{project_id}/databases/{database_id}.

options

Object

The options for the transaction. Defaults to a read-write transaction.

This object should have the same structure as TransactionOptions

See also

google.firestore.v1beta1.BeginTransactionRequest definition in proto format

BeginTransactionResponse

static

The response for Firestore.BeginTransaction.

Property

Parameter

transaction

string

The transaction that was started.

See also

google.firestore.v1beta1.BeginTransactionResponse definition in proto format

CollectionSelector

static

A selection of a collection, such as messages as m1.

Properties

Parameter

collectionId

string

The collection ID. When set, selects only collections with this ID.

allDescendants

boolean

When false, selects only collections that are immediate children of the parent specified in the containing RunQueryRequest. When true, selects all descendant collections.

See also

google.firestore.v1beta1.StructuredQuery.CollectionSelector definition in proto format

CommitRequest

static

The request for Firestore.Commit.

Properties

Parameter

database

string

The database name. In the format: projects/{project_id}/databases/{database_id}.

writes

Array of Object

The writes to apply.

Always executed atomically and in order.

This object should have the same structure as Write

transaction

string

If set, applies all writes in this transaction, and commits it.

See also

google.firestore.v1beta1.CommitRequest definition in proto format

CommitResponse

static

The response for Firestore.Commit.

Properties

Parameter

writeResults

Array of Object

The result of applying the writes.

This i-th write result corresponds to the i-th write in the request.

This object should have the same structure as WriteResult

commitTime

Object

The time at which the commit occurred.

This object should have the same structure as Timestamp

See also

google.firestore.v1beta1.CommitResponse definition in proto format

CompositeFilter

static

A filter that merges multiple other filters using the given operator.

Properties

Parameter

op

number

The operator for combining multiple filters.

The number should be among the values of Operator

filters

Array of Object

The list of filters to combine. Must contain at least one filter.

This object should have the same structure as Filter

See also

google.firestore.v1beta1.StructuredQuery.CompositeFilter definition in proto format

CreateDocumentRequest

static

The request for Firestore.CreateDocument.

Properties

Parameter

parent

string

The parent resource. For example: projects/{project_id}/databases/{database_id}/documents or projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}

collectionId

string

The collection ID, relative to parent, to list. For example: chatrooms.

documentId

string

The client-assigned document ID to use for this document.

Optional. If not specified, an ID will be assigned by the service.

document

Object

The document to create. name must not be set.

This object should have the same structure as Document

mask

Object

The fields to return. If not set, returns all fields.

If the document has a field that is not present in this mask, that field will not be returned in the response.

This object should have the same structure as DocumentMask

See also

google.firestore.v1beta1.CreateDocumentRequest definition in proto format

Cursor

static

A position in a query result set.

Properties

Parameter

values

Array of Object

The values that represent a position, in the order they appear in the order by clause of a query.

Can contain fewer values than specified in the order by clause.

This object should have the same structure as Value

before

boolean

If the position is just before or just after the given values, relative to the sort order defined by the query.

See also

google.firestore.v1beta1.Cursor definition in proto format

DeleteDocumentRequest

static

The request for Firestore.DeleteDocument.

Properties

Parameter

name

string

The resource name of the Document to delete. In the format: projects/{project_id}/databases/{database_id}/documents/{document_path}.

currentDocument

Object

An optional precondition on the document. The request will fail if this is set and not met by the target document.

This object should have the same structure as Precondition

See also

google.firestore.v1beta1.DeleteDocumentRequest definition in proto format

Document

static

A Firestore document.

Must not exceed 1 MiB - 4 bytes.

Properties

Parameter

name

string

The resource name of the document, for example projects/{project_id}/databases/{database_id}/documents/{document_path}.

fields

Object with Object properties

The document's fields.

The map keys represent field names.

A simple field name contains only characters a to z, A to Z, 0 to 9, or , and must not start with 0 to 9 or . For example, foo_bar_17.

Field names matching the regular expression .* are reserved. Reserved field names are forbidden except in certain documented contexts. The map keys, represented as UTF-8, must not exceed 1,500 bytes and cannot be empty.

Field paths may be used in other contexts to refer to structured fields defined here. For map_value, the field path is represented by the simple or quoted field names of the containing fields, delimited by .. For example, the structured field "foo" : { map_value: { "x&y" : { string_value: "hello" }}} would be represented by the field path foo.x&y.

Within a field path, a quoted field name starts and ends with </code> and may contain any character. Some characters, including <code>, must be escaped using a \. For example, x&amp;y represents x&y and bak\tik</code> represents <code>baktik.

createTime

Object

Output only. The time at which the document was created.

This value increases monotonically when a document is deleted then recreated. It can also be compared to values from other documents and the read_time of a query.

This object should have the same structure as Timestamp

updateTime

Object

Output only. The time at which the document was last changed.

This value is initally set to the create_time then increases monotonically with each change to the document. It can also be compared to values from other documents and the read_time of a query.

This object should have the same structure as Timestamp

See also

google.firestore.v1beta1.Document definition in proto format

DocumentChange

static

A Document has changed.

May be the result of multiple writes, including deletes, that ultimately resulted in a new value for the Document.

Multiple DocumentChange messages may be returned for the same logical change, if multiple targets are affected.

Properties

Parameter

document

Object

The new state of the Document.

If mask i