pub struct Target {
pub documents: Option<DocumentsTarget>,
pub expected_count: Option<i32>,
pub once: Option<bool>,
pub query: Option<QueryTarget>,
pub read_time: Option<DateTime<Utc>>,
pub resume_token: Option<Vec<u8>>,
pub target_id: Option<i32>,
}Expand description
A specification of a set of documents to listen to.
This type is not used in any activity, and only used as part of another schema.
Fields§
§documents: Option<DocumentsTarget>A target specified by a set of document names.
expected_count: Option<i32>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.
once: Option<bool>If the target should be removed once it is current and consistent.
query: Option<QueryTarget>A target specified by a query.
read_time: Option<DateTime<Utc>>Start listening after a specific read_time. The client must know the state of matching documents at this time.
resume_token: Option<Vec<u8>>A resume token from a prior TargetChange for an identical target. Using a resume token with a different target is unsupported and may fail.
target_id: Option<i32>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 TargetChange.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.