2.2.0 (latest) 2.0.6 1.34.2 1.33.1 1.32.3 1.31.0 1.30.0 1.29.2 1.28.2 1.26.0 1.25.0 1.24.4 1.23.0 1.22.1 1.21.2 1.19.0 1.18.1 1.17.1 Reference documentation and code samples for the Cloud Datastore V1 Client class MutationResult.

The result of applying a mutation.

Generated from protobuf message `google.datastore.v1.MutationResult`

## Namespace

Google \\ Cloud \\ Datastore \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ key` | `https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.Key` The automatically allocated key. Set only when the mutation allocated a key. |
| `↳ version` | `int|string` The version of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the version will be the version of the current entity or, if no entity is present, a version that is strictly greater than the version of any previous entity and less than the version of any possible future entity. |
| `↳ create_time` | `Google\Protobuf\Timestamp` The create time of the entity. This field will not be set after a 'delete'. |
| `↳ update_time` | `Google\Protobuf\Timestamp` The update time of the entity on the server after processing the mutation. If the mutation doesn't change anything on the server, then the timestamp will be the update timestamp of the current entity. This field will not be set after a 'delete'. |
| `↳ conflict_detected` | `bool` Whether a conflict was detected for this mutation. Always false when a conflict detection strategy field is not set in the mutation. |
| `↳ transform_results` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.Value>` The results of applying each [PropertyTransform](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.PropertyTransform), in the same order of the request. |

### getKey

The automatically allocated key.

Set only when the mutation allocated a key.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.Key|null` |   |

### hasKey

### clearKey

### setKey

The automatically allocated key.

Set only when the mutation allocated a key.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.Key` |

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

### getVersion

The version of the entity on the server after processing the mutation. If
the mutation doesn't change anything on the server, then the version will
be the version of the current entity or, if no entity is present, a version
that is strictly greater than the version of any previous entity and less
than the version of any possible future entity.

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

### setVersion

The version of the entity on the server after processing the mutation. If
the mutation doesn't change anything on the server, then the version will
be the version of the current entity or, if no entity is present, a version
that is strictly greater than the version of any previous entity and less
than the version of any possible future entity.

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

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

### getCreateTime

The create time of the entity. This field will not be set after a 'delete'.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasCreateTime

### clearCreateTime

### setCreateTime

The create time of the entity. This field will not be set after a 'delete'.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getUpdateTime

The update time of the entity on the server after processing the mutation.

If the mutation doesn't change anything on the server, then the timestamp
will be the update timestamp of the current entity. This field will not be
set after a 'delete'.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\Timestamp|null` |   |

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

The update time of the entity on the server after processing the mutation.

If the mutation doesn't change anything on the server, then the timestamp
will be the update timestamp of the current entity. This field will not be
set after a 'delete'.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `Google\Protobuf\Timestamp` |

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

### getConflictDetected

Whether a conflict was detected for this mutation. Always false when a
conflict detection strategy field is not set in the mutation.

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

### setConflictDetected

Whether a conflict was detected for this mutation. Always false when a
conflict detection strategy field is not set in the mutation.

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

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

### getTransformResults

The results of applying each
[PropertyTransform](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.PropertyTransform), in the same
order of the request.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `Google\Protobuf\RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.Value>` |   |

### setTransformResults

The results of applying each
[PropertyTransform](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.PropertyTransform), in the same
order of the request.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.Value>` |

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