Class Target (2.16.0)

Target(mapping=None, *, ignore_unknown_fields=False, **kwargs)

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

Attributes

NameDescription
query google.cloud.firestore_v1.types.Target.QueryTarget
A target specified by a query. This field is a member of oneof_ target_type.
documents google.cloud.firestore_v1.types.Target.DocumentsTarget
A target specified by a set of document names. This field is a member of oneof_ target_type.
resume_token bytes
A resume token from a prior TargetChange][google.firestore.v1.TargetChange] for an identical target. Using a resume token with a different target is unsupported and may fail. This field is a member of oneof_ resume_type.
read_time google.protobuf.timestamp_pb2.Timestamp
Start listening after a specific read_time. The client must know the state of matching documents at this time. This field is a member of oneof_ resume_type.
target_id int
The target ID that identifies the target on the stream. Must be a positive number and non-zero. If target_id is 0 (or unspecified), the server will assign an ID for this target and return that in a TargetChange::ADD event. Once a target with target_id=0 is added, all subsequent targets must also have target_id=0. If an AddTarget request with target_id != 0 is sent to the server after a target with target_id=0 is added, the server will immediately send a response with a TargetChange::Remove event. Note that if the client sends multiple AddTarget requests without an ID, the order of IDs returned in TargetChage.target_ids are undefined. Therefore, clients should provide a target ID instead of relying on the server to assign one. If target_id is non-zero, there must not be an existing active target on this stream with the same ID.
once bool
If the target should be removed once it is current and consistent.
expected_count google.protobuf.wrappers_pb2.Int32Value
The number of documents that last matched the query at the resume token or read time. This value is only relevant when a resume_type is provided. This value being present and greater than zero signals that the client wants ExistenceFilter.unchanged_names to be included in the response.

Classes

DocumentsTarget

DocumentsTarget(mapping=None, *, ignore_unknown_fields=False, **kwargs)

A target specified by a set of documents names.

QueryTarget

QueryTarget(mapping=None, *, ignore_unknown_fields=False, **kwargs)