Reference documentation and code samples for the Cloud Firestore V1 Client class TargetChange.
Targets being watched have changed.
Generated from protobuf message google.firestore.v1.TargetChange
Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ target_change_type
int
The type of change that occurred.
↳ target_ids
array
The target IDs of targets that have changed. If empty, the change applies to all targets. The order of the target IDs is not defined.
↳ cause
↳ resume_token
string
A token that can be used to resume the stream for the given target_ids
, or all targets if target_ids
is empty. Not set on every target change.
↳ read_time
Google\Protobuf\Timestamp
The consistent read_time
for the given target_ids
(omitted when the target_ids are not at a consistent snapshot). The stream is guaranteed to send a read_time
with target_ids
empty whenever the entire stream reaches a new consistent snapshot. ADD, CURRENT, and RESET messages are guaranteed to (eventually) result in a new consistent snapshot (while NO_CHANGE and REMOVE messages are not). For a given stream, read_time
is guaranteed to be monotonically increasing.
getTargetChangeType
The type of change that occurred.
int
setTargetChangeType
The type of change that occurred.
var
int
$this
getTargetIds
The target IDs of targets that have changed.
If empty, the change applies to all targets. The order of the target IDs is not defined.
setTargetIds
The target IDs of targets that have changed.
If empty, the change applies to all targets. The order of the target IDs is not defined.
var
int[]
$this
getCause
The error that resulted in this change, if applicable.
hasCause
clearCause
setCause
The error that resulted in this change, if applicable.
$this
getResumeToken
A token that can be used to resume the stream for the given target_ids
,
or all targets if target_ids
is empty.
Not set on every target change.
string
setResumeToken
A token that can be used to resume the stream for the given target_ids
,
or all targets if target_ids
is empty.
Not set on every target change.
var
string
$this
getReadTime
The consistent read_time
for the given target_ids
(omitted when the
target_ids are not at a consistent snapshot).
The stream is guaranteed to send a read_time
with target_ids
empty
whenever the entire stream reaches a new consistent snapshot. ADD,
CURRENT, and RESET messages are guaranteed to (eventually) result in a
new consistent snapshot (while NO_CHANGE and REMOVE messages are not).
For a given stream, read_time
is guaranteed to be monotonically
increasing.
hasReadTime
clearReadTime
setReadTime
The consistent read_time
for the given target_ids
(omitted when the
target_ids are not at a consistent snapshot).
The stream is guaranteed to send a read_time
with target_ids
empty
whenever the entire stream reaches a new consistent snapshot. ADD,
CURRENT, and RESET messages are guaranteed to (eventually) result in a
new consistent snapshot (while NO_CHANGE and REMOVE messages are not).
For a given stream, read_time
is guaranteed to be monotonically
increasing.
$this