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 EntityResult.

The result of fetching an entity from Datastore.

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

## Namespace

Google \\ Cloud \\ Datastore \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ entity` | `https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.Entity` The resulting entity. |
| `↳ version` | `int|string` The version of the entity, a strictly positive number that monotonically increases with changes to the entity. This field is set for [`FULL`](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.EntityResult.ResultType#_Google_Cloud_Datastore_V1_EntityResult_ResultType__FULL) entity results. For [missing](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.LookupResponse#_Google_Cloud_Datastore_V1_LookupResponse__getMissing__) entities in `LookupResponse`, this is the version of the snapshot that was used to look up the entity, and it is always set except for eventually consistent reads. |
| `↳ create_time` | `Google\Protobuf\Timestamp` The time at which the entity was created. This field is set for [`FULL`](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.EntityResult.ResultType#_Google_Cloud_Datastore_V1_EntityResult_ResultType__FULL) entity results. If this entity is missing, this field will not be set. |
| `↳ update_time` | `Google\Protobuf\Timestamp` The time at which the entity was last changed. This field is set for [`FULL`](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.EntityResult.ResultType#_Google_Cloud_Datastore_V1_EntityResult_ResultType__FULL) entity results. If this entity is missing, this field will not be set. |
| `↳ cursor` | `string` A cursor that points to the position after the result entity. Set only when the `EntityResult` is part of a `QueryResultBatch` message. |

### getEntity

The resulting entity.

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

### hasEntity

### clearEntity

### setEntity

The resulting entity.

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

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

### getVersion

The version of the entity, a strictly positive number that monotonically
increases with changes to the entity.

This field is set for
[`FULL`](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.EntityResult.ResultType#_Google_Cloud_Datastore_V1_EntityResult_ResultType__FULL) entity results.
For [missing](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.LookupResponse#_Google_Cloud_Datastore_V1_LookupResponse__getMissing__) entities in
`LookupResponse`, this is the version of the snapshot that was used to look
up the entity, and it is always set except for eventually consistent reads.

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

### setVersion

The version of the entity, a strictly positive number that monotonically
increases with changes to the entity.

This field is set for
[`FULL`](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.EntityResult.ResultType#_Google_Cloud_Datastore_V1_EntityResult_ResultType__FULL) entity results.
For [missing](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.LookupResponse#_Google_Cloud_Datastore_V1_LookupResponse__getMissing__) entities in
`LookupResponse`, this is the version of the snapshot that was used to look
up the entity, and it is always set except for eventually consistent reads.

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

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

### getCreateTime

The time at which the entity was created.

This field is set for
[`FULL`](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.EntityResult.ResultType#_Google_Cloud_Datastore_V1_EntityResult_ResultType__FULL) entity results.
If this entity is missing, this field will not be set.

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

### hasCreateTime

### clearCreateTime

### setCreateTime

The time at which the entity was created.

This field is set for
[`FULL`](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.EntityResult.ResultType#_Google_Cloud_Datastore_V1_EntityResult_ResultType__FULL) entity results.
If this entity is missing, this field will not be set.

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

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

### getUpdateTime

The time at which the entity was last changed.

This field is set for
[`FULL`](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.EntityResult.ResultType#_Google_Cloud_Datastore_V1_EntityResult_ResultType__FULL) entity results.
If this entity is missing, this field will not be set.

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

### hasUpdateTime

### clearUpdateTime

### setUpdateTime

The time at which the entity was last changed.

This field is set for
[`FULL`](https://docs.cloud.google.com/php/docs/reference/cloud-datastore/latest/V1.EntityResult.ResultType#_Google_Cloud_Datastore_V1_EntityResult_ResultType__FULL) entity results.
If this entity is missing, this field will not be set.

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

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

### getCursor

A cursor that points to the position after the result entity.

Set only when the `EntityResult` is part of a `QueryResultBatch` message.

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

### setCursor

A cursor that points to the position after the result entity.

Set only when the `EntityResult` is part of a `QueryResultBatch` message.

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

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