# Cloud Bigtable V2 Client - Class DataChange (2.25.0)

2.25.0 (latest) 2.24.0 2.23.0 2.22.0 2.21.1 2.20.2 2.19.2 2.18.0 2.17.1 2.16.0 2.15.0 2.14.0 2.13.0 2.12.0 2.11.1 2.9.1 2.8.0 2.7.0 2.6.3 2.5.0 2.4.0 2.3.0 2.2.1 2.1.0 2.0.1 1.32.1 1.31.1 1.30.0 1.29.2 1.28.3 1.27.0 1.26.2 1.25.0 1.24.1 1.23.0 1.22.2 1.21.1 1.20.3 Reference documentation and code samples for the Cloud Bigtable V2 Client class DataChange.

A message corresponding to one or more mutations to the partition
being streamed. A single logical `DataChange` message may also be split
across a sequence of multiple individual messages. Messages other than
the first in a sequence will only have the `type` and `chunks` fields
populated, with the final message in the sequence also containing `done`
set to true.

Generated from protobuf message `google.bigtable.v2.ReadChangeStreamResponse.DataChange`

## Namespace

Google \\ Cloud \\ Bigtable \\ V2 \\ ReadChangeStreamResponse

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ type` | `int` The type of the mutation. |
| `↳ source_cluster_id` | `string` The cluster where the mutation was applied. Not set when `type` is `GARBAGE_COLLECTION`. |
| `↳ row_key` | `string` The row key for all mutations that are part of this `DataChange`. If the `DataChange` is chunked across multiple messages, then this field will only be set for the first message. |
| `↳ commit_timestamp` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` The timestamp at which the mutation was applied on the Bigtable server. |
| `↳ tiebreaker` | `int` A value that lets stream consumers reconstruct Bigtable's conflict resolution semantics. <https://cloud.google.com/bigtable/docs/writes#conflict-resolution> In the event that the same row key, column family, column qualifier, timestamp are modified on different clusters at the same `commit_timestamp`, the mutation with the larger `tiebreaker` will be the one chosen for the eventually consistent state of the system. |
| `↳ chunks` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-bigtable/latest/V2.ReadChangeStreamResponse.MutationChunk>` The mutations associated with this change to the partition. May contain complete mutations or chunks of a multi-message chunked `DataChange` record. |
| `↳ done` | `bool` When true, indicates that the entire `DataChange` has been read and the client can safely process the message. |
| `↳ token` | `string` An encoded position for this stream's partition to restart reading from. This token is for the StreamPartition from the request. |
| `↳ estimated_low_watermark` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` An estimate of the commit timestamp that is usually lower than or equal to any timestamp for a record that will be delivered in the future on the stream. It is possible that, under particular circumstances that a future record has a timestamp that is lower than a previously seen timestamp. For an example usage see <https://beam.apache.org/documentation/basics/#watermarks> |

### getType

The type of the mutation.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-bigtable/latest/V2.ReadChangeStreamResponse.DataChange.Type). |

### setType

The type of the mutation.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-bigtable/latest/V2.ReadChangeStreamResponse.DataChange.Type). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getSourceClusterId

The cluster where the mutation was applied.

Not set when `type` is `GARBAGE_COLLECTION`.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setSourceClusterId

The cluster where the mutation was applied.

Not set when `type` is `GARBAGE_COLLECTION`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getRowKey

The row key for all mutations that are part of this `DataChange`.

If the `DataChange` is chunked across multiple messages, then this field
will only be set for the first message.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setRowKey

The row key for all mutations that are part of this `DataChange`.

If the `DataChange` is chunked across multiple messages, then this field
will only be set for the first message.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCommitTimestamp

The timestamp at which the mutation was applied on the Bigtable server.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasCommitTimestamp

### clearCommitTimestamp

### setCommitTimestamp

The timestamp at which the mutation was applied on the Bigtable server.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getTiebreaker

A value that lets stream consumers reconstruct Bigtable's
conflict resolution semantics.

<https://cloud.google.com/bigtable/docs/writes#conflict-resolution>
In the event that the same row key, column family, column qualifier,
timestamp are modified on different clusters at the same
`commit_timestamp`, the mutation with the larger `tiebreaker` will be the
one chosen for the eventually consistent state of the system.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setTiebreaker

A value that lets stream consumers reconstruct Bigtable's
conflict resolution semantics.

<https://cloud.google.com/bigtable/docs/writes#conflict-resolution>
In the event that the same row key, column family, column qualifier,
timestamp are modified on different clusters at the same
`commit_timestamp`, the mutation with the larger `tiebreaker` will be the
one chosen for the eventually consistent state of the system.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getChunks

The mutations associated with this change to the partition.

May contain complete mutations or chunks of a multi-message chunked
`DataChange` record.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-bigtable/latest/V2.ReadChangeStreamResponse.MutationChunk>` |   |

### setChunks

The mutations associated with this change to the partition.

May contain complete mutations or chunks of a multi-message chunked
`DataChange` record.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-bigtable/latest/V2.ReadChangeStreamResponse.MutationChunk>` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getDone

When true, indicates that the entire `DataChange` has been read
and the client can safely process the message.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `bool` |   |

### setDone

When true, indicates that the entire `DataChange` has been read
and the client can safely process the message.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `bool` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getToken

An encoded position for this stream's partition to restart reading from.

This token is for the StreamPartition from the request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setToken

An encoded position for this stream's partition to restart reading from.

This token is for the StreamPartition from the request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getEstimatedLowWatermark

An estimate of the commit timestamp that is usually lower than or equal
to any timestamp for a record that will be delivered in the future on the
stream. It is possible that, under particular circumstances that a future
record has a timestamp that is lower than a previously seen timestamp.

For an example usage see
<https://beam.apache.org/documentation/basics/#watermarks>

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp|null` |   |

### hasEstimatedLowWatermark

### clearEstimatedLowWatermark

### setEstimatedLowWatermark

An estimate of the commit timestamp that is usually lower than or equal
to any timestamp for a record that will be delivered in the future on the
stream. It is possible that, under particular circumstances that a future
record has a timestamp that is lower than a previously seen timestamp.

For an example usage see
<https://beam.apache.org/documentation/basics/#watermarks>

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Timestamp` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |