Cloud Firestore V1beta1 Client - Class Target (1.45.2)

Reference documentation and code samples for the Cloud Firestore V1beta1 Client class Target.

A specification of a set of documents to listen to.

Generated from protobuf message google.firestore.v1beta1.Target

Namespace

Google \ Cloud \ Firestore \ V1beta1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ query Google\Cloud\Firestore\V1beta1\Target\QueryTarget

A target specified by a query.

↳ documents Google\Cloud\Firestore\V1beta1\Target\DocumentsTarget

A target specified by a set of document names.

↳ resume_token string

A resume token from a prior TargetChange for an identical target. Using a resume token with a different target is unsupported and may fail.

↳ read_time Google\Protobuf\Timestamp

Start listening after a specific read_time. The client must know the state of matching documents at this time.

↳ target_id int

The target ID that identifies the target on the stream. Must be a positive number and non-zero.

↳ once bool

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

getQuery

A target specified by a query.

Returns
Type Description
Google\Cloud\Firestore\V1beta1\Target\QueryTarget

setQuery

A target specified by a query.

Parameter
Name Description
var Google\Cloud\Firestore\V1beta1\Target\QueryTarget
Returns
Type Description
$this

getDocuments

A target specified by a set of document names.

Returns
Type Description
Google\Cloud\Firestore\V1beta1\Target\DocumentsTarget

setDocuments

A target specified by a set of document names.

Parameter
Name Description
var Google\Cloud\Firestore\V1beta1\Target\DocumentsTarget
Returns
Type Description
$this

getResumeToken

A resume token from a prior TargetChange for an identical target.

Using a resume token with a different target is unsupported and may fail.

Returns
Type Description
string

setResumeToken

A resume token from a prior TargetChange for an identical target.

Using a resume token with a different target is unsupported and may fail.

Parameter
Name Description
var string
Returns
Type Description
$this

getReadTime

Start listening after a specific read_time.

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

Returns
Type Description
Google\Protobuf\Timestamp

setReadTime

Start listening after a specific read_time.

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

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getTargetId

The target ID that identifies the target on the stream. Must be a positive number and non-zero.

Returns
Type Description
int

setTargetId

The target ID that identifies the target on the stream. Must be a positive number and non-zero.

Parameter
Name Description
var int
Returns
Type Description
$this

getOnce

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

Returns
Type Description
bool

setOnce

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

Parameter
Name Description
var bool
Returns
Type Description
$this

getTargetType

Returns
Type Description
string

getResumeType

Returns
Type Description
string