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
Namespace
Google \ Cloud \ Firestore \ V1Methods
__construct
Constructor.
| Parameters | |
|---|---|
| Name | Description |
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 |
Google\Rpc\Status
The error that resulted in this change, if applicable. |
↳ resume_token |
string
A token that can be used to resume the stream for the given |
↳ read_time |
Google\Protobuf\Timestamp
The consistent |
getTargetChangeType
The type of change that occurred.
| Returns | |
|---|---|
| Type | Description |
int |
Enum of type TargetChangeType. |
setTargetChangeType
The type of change that occurred.
| Parameter | |
|---|---|
| Name | Description |
var |
int
Enum of type TargetChangeType. |
| Returns | |
|---|---|
| Type | Description |
$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.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Internal\RepeatedField |
|
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.
| Parameter | |
|---|---|
| Name | Description |
var |
int[]
|
| Returns | |
|---|---|
| Type | Description |
$this |
|
getCause
The error that resulted in this change, if applicable.
| Returns | |
|---|---|
| Type | Description |
Google\Rpc\Status|null |
|
hasCause
clearCause
setCause
The error that resulted in this change, if applicable.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Rpc\Status
|
| Returns | |
|---|---|
| Type | Description |
$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.
| Returns | |
|---|---|
| Type | Description |
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.
| Parameter | |
|---|---|
| Name | Description |
var |
string
|
| Returns | |
|---|---|
| Type | Description |
$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.
| Returns | |
|---|---|
| Type | Description |
Google\Protobuf\Timestamp|null |
|
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.
| Parameter | |
|---|---|
| Name | Description |
var |
Google\Protobuf\Timestamp
|
| Returns | |
|---|---|
| Type | Description |
$this |
|