Firestore v1 API - Class Target (3.5.1)

public sealed class Target : IMessage<Target>, IEquatable<Target>, IDeepCloneable<Target>, IBufferMessage, IMessage

Reference documentation and code samples for the Firestore v1 API class Target.

A specification of a set of documents to listen to.

Inheritance

object > Target

Namespace

Google.Cloud.Firestore.V1

Assembly

Google.Cloud.Firestore.V1.dll

Constructors

Target()

public Target()

Target(Target)

public Target(Target other)
Parameter
NameDescription
otherTarget

Properties

Documents

public Target.Types.DocumentsTarget Documents { get; set; }

A target specified by a set of document names.

Property Value
TypeDescription
TargetTypesDocumentsTarget

ExpectedCount

public int? ExpectedCount { get; set; }

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.

Property Value
TypeDescription
int

HasResumeToken

public bool HasResumeToken { get; }

Gets whether the "resume_token" field is set

Property Value
TypeDescription
bool

Once

public bool Once { get; set; }

If the target should be removed once it is current and consistent.

Property Value
TypeDescription
bool

Query

public Target.Types.QueryTarget Query { get; set; }

A target specified by a query.

Property Value
TypeDescription
TargetTypesQueryTarget

ReadTime

public Timestamp ReadTime { get; set; }

Start listening after a specific read_time.

The client must know the state of matching documents at this time.

Property Value
TypeDescription
Timestamp

ResumeToken

public ByteString ResumeToken { get; set; }

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.

Property Value
TypeDescription
ByteString

ResumeTypeCase

public Target.ResumeTypeOneofCase ResumeTypeCase { get; }
Property Value
TypeDescription
TargetResumeTypeOneofCase

TargetId

public int TargetId { get; set; }

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.

Property Value
TypeDescription
int

TargetTypeCase

public Target.TargetTypeOneofCase TargetTypeCase { get; }
Property Value
TypeDescription
TargetTargetTypeOneofCase