Cloud Firestore V1beta1 Client - Class DocumentChange (1.38.0)

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

A Document has changed.

May be the result of multiple writes, including deletes, that ultimately resulted in a new value for the Document. Multiple DocumentChange messages may be returned for the same logical change, if multiple targets are affected.

Generated from protobuf message google.firestore.v1beta1.DocumentChange

Namespace

Google \ Cloud \ Firestore \ V1beta1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ document Google\Cloud\Firestore\V1beta1\Document

The new state of the Document. If mask is set, contains only fields that were updated or added.

↳ target_ids int[]

A set of target IDs of targets that match this document.

↳ removed_target_ids int[]

A set of target IDs for targets that no longer match this document.

getDocument

The new state of the Document.

If mask is set, contains only fields that were updated or added.

Returns
TypeDescription
Google\Cloud\Firestore\V1beta1\Document

setDocument

The new state of the Document.

If mask is set, contains only fields that were updated or added.

Parameter
NameDescription
var Google\Cloud\Firestore\V1beta1\Document
Returns
TypeDescription
$this

getTargetIds

A set of target IDs of targets that match this document.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setTargetIds

A set of target IDs of targets that match this document.

Parameter
NameDescription
var int[]
Returns
TypeDescription
$this

getRemovedTargetIds

A set of target IDs for targets that no longer match this document.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setRemovedTargetIds

A set of target IDs for targets that no longer match this document.

Parameter
NameDescription
var int[]
Returns
TypeDescription
$this