Package types (2.16.0)

API documentation for firestore_v1.types package.

Classes

AggregationResult

The result of a single bucket from a Firestore aggregation query.

The keys of aggregate_fields are the same for all results in an aggregation query, unlike document queries which can have different fields present for each result.

ArrayValue

An array value.

BatchGetDocumentsRequest

The request for Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

BatchGetDocumentsResponse

The streamed response for Firestore.BatchGetDocuments][google.firestore.v1.Firestore.BatchGetDocuments].

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

BatchWriteRequest

The request for Firestore.BatchWrite][google.firestore.v1.Firestore.BatchWrite].

BatchWriteResponse

The response from Firestore.BatchWrite][google.firestore.v1.Firestore.BatchWrite].

BeginTransactionRequest

The request for Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction].

BeginTransactionResponse

The response for Firestore.BeginTransaction][google.firestore.v1.Firestore.BeginTransaction].

BitSequence

A sequence of bits, encoded in a byte array.

Each byte in the bitmap byte array stores 8 bits of the sequence. The only exception is the last byte, which may store 8 or fewer bits. The padding defines the number of bits of the last byte to be ignored as "padding". The values of these "padding" bits are unspecified and must be ignored.

To retrieve the first bit, bit 0, calculate: (bitmap[0] & 0x01) != 0. To retrieve the second bit, bit 1, calculate: (bitmap[0] & 0x02) != 0. To retrieve the third bit, bit 2, calculate: (bitmap[0] & 0x04) != 0. To retrieve the fourth bit, bit 3, calculate: (bitmap[0] & 0x08) != 0. To retrieve bit n, calculate: (bitmap[n / 8] & (0x01 << (n % 8))) != 0.

The "size" of a BitSequence (the number of bits it contains) is calculated by this formula: (bitmap.length * 8) - padding.

BloomFilter

A bloom filter (https://en.wikipedia.org/wiki/Bloom_filter).

The bloom filter hashes the entries with MD5 and treats the resulting 128-bit hash as 2 distinct 64-bit hash values, interpreted as unsigned integers using 2's complement encoding.

These two hash values, named h1 and h2, are then used to compute the hash_count hash values using the formula, starting at i=0:

::

h(i) = h1 + (i * h2)

These resulting values are then taken modulo the number of bits in the bloom filter to get the bits of the bloom filter to test for the given entry.

CommitRequest

The request for Firestore.Commit][google.firestore.v1.Firestore.Commit].

CommitResponse

The response for Firestore.Commit][google.firestore.v1.Firestore.Commit].

CreateDocumentRequest

The request for Firestore.CreateDocument][google.firestore.v1.Firestore.CreateDocument].

Cursor

A position in a query result set.

DeleteDocumentRequest

The request for Firestore.DeleteDocument][google.firestore.v1.Firestore.DeleteDocument].

Document

A Firestore document.

Must not exceed 1 MiB - 4 bytes.

DocumentChange

A Document][google.firestore.v1.Document] has changed.

May be the result of multiple writes][google.firestore.v1.Write], including deletes, that ultimately resulted in a new value for the Document][google.firestore.v1.Document].

Multiple DocumentChange][google.firestore.v1.DocumentChange] messages may be returned for the same logical change, if multiple targets are affected.

DocumentDelete

A Document][google.firestore.v1.Document] has been deleted.

May be the result of multiple writes][google.firestore.v1.Write], including updates, the last of which deleted the Document][google.firestore.v1.Document].

Multiple DocumentDelete][google.firestore.v1.DocumentDelete] messages may be returned for the same logical delete, if multiple targets are affected.

DocumentMask

A set of field paths on a document. Used to restrict a get or update operation on a document to a subset of its fields. This is different from standard field masks, as this is always scoped to a Document][google.firestore.v1.Document], and takes in account the dynamic nature of Value][google.firestore.v1.Value].

DocumentRemove

A Document][google.firestore.v1.Document] has been removed from the view of the targets.

Sent if the document is no longer relevant to a target and is out of view. Can be sent instead of a DocumentDelete or a DocumentChange if the server can not send the new value of the document.

Multiple DocumentRemove][google.firestore.v1.DocumentRemove] messages may be returned for the same logical write or delete, if multiple targets are affected.

DocumentTransform

A transformation of a document.

ExecutionStats

Execution statistics for the query.

ExistenceFilter

A digest of all the documents that match a given target.

ExplainMetrics

Explain metrics for the query.

ExplainOptions

Explain options for the query.

GetDocumentRequest

The request for Firestore.GetDocument][google.firestore.v1.Firestore.GetDocument].

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

ListCollectionIdsRequest

The request for Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

ListCollectionIdsResponse

The response from Firestore.ListCollectionIds][google.firestore.v1.Firestore.ListCollectionIds].

ListDocumentsRequest

The request for Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

ListDocumentsResponse

The response for Firestore.ListDocuments][google.firestore.v1.Firestore.ListDocuments].

ListenRequest

A request for Firestore.Listen][google.firestore.v1.Firestore.Listen]

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

ListenResponse

The response for Firestore.Listen][google.firestore.v1.Firestore.Listen].

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

MapValue

A map value.

PartitionQueryRequest

The request for Firestore.PartitionQuery][google.firestore.v1.Firestore.PartitionQuery].

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

PartitionQueryResponse

The response for Firestore.PartitionQuery][google.firestore.v1.Firestore.PartitionQuery].

PlanSummary

Planning phase information for the query.

Precondition

A precondition on a document, used for conditional operations.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

RollbackRequest

The request for Firestore.Rollback][google.firestore.v1.Firestore.Rollback].

RunAggregationQueryRequest

The request for Firestore.RunAggregationQuery][google.firestore.v1.Firestore.RunAggregationQuery].

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

RunAggregationQueryResponse

The response for Firestore.RunAggregationQuery][google.firestore.v1.Firestore.RunAggregationQuery].

RunQueryRequest

The request for Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery].

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

RunQueryResponse

The response for Firestore.RunQuery][google.firestore.v1.Firestore.RunQuery].

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

StructuredAggregationQuery

Firestore query for running an aggregation over a StructuredQuery][google.firestore.v1.StructuredQuery].

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

StructuredQuery

A Firestore query.

The query stages are executed in the following order:

  1. from
  2. where
  3. select
  4. order_by + start_at + end_at
  5. offset
  6. limit

Target

A specification of a set of documents to listen to.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

TargetChange

Targets being watched have changed.

TransactionOptions

Options for creating a new transaction.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

UpdateDocumentRequest

The request for Firestore.UpdateDocument][google.firestore.v1.Firestore.UpdateDocument].

Value

A message that can hold any of the supported value types.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

Write

A write on a document.

This message has oneof_ fields (mutually exclusive fields). For each oneof, at most one member field can be set at the same time. Setting any member of the oneof automatically clears all other members.

.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields

WriteRequest

The request for Firestore.Write][google.firestore.v1.Firestore.Write].

The first request creates a stream, or resumes an existing one from a token.

When creating a new stream, the server replies with a response containing only an ID and a token, to use in the next request.

When resuming a stream, the server first streams any responses later than the given token, then a response containing only an up-to-date token, to use in the next request.

WriteResponse

The response for Firestore.Write][google.firestore.v1.Firestore.Write].

WriteResult

The result of applying a write.