# Google Cloud Policy Simulator V1 Client - Class ReplayResult (1.3.4)

1.3.4 (latest) 1.3.3 1.2.0 1.1.1 1.0.3 0.2.5 0.1.1 Reference documentation and code samples for the Google Cloud Policy Simulator V1 Client class ReplayResult.

The result of replaying a single access tuple against a simulated state.

Generated from protobuf message `google.cloud.policysimulator.v1.ReplayResult`

## Namespace

Google \\ Cloud \\ PolicySimulator \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ diff` | `https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.ReplayDiff` The difference between the principal's access under the current (baseline) policies and the principal's access under the proposed (simulated) policies. This field is only included for access tuples that were successfully replayed and had different results under the current policies and the proposed policies. |
| `↳ error` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` The error that caused the access tuple replay to fail. This field is only included for access tuples that were not replayed successfully. |
| `↳ name` | `string` The resource name of the `ReplayResult`, in the following format: `{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}/results/{replay-result-id}`, where `{resource-id}` is the ID of the project, folder, or organization that owns the [Replay](https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.Replay). Example: `projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36/results/1234` |
| `↳ parent` | `string` The [Replay](https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.Replay) that the access tuple was included in. |
| `↳ access_tuple` | `https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.AccessTuple` The access tuple that was replayed. This field includes information about the principal, resource, and permission that were involved in the access attempt. |
| `↳ last_seen_date` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html` The latest date this access tuple was seen in the logs. |

### getDiff

The difference between the principal's access under the current
(baseline) policies and the principal's access under the proposed
(simulated) policies.

This field is only included for access tuples that were successfully
replayed and had different results under the current policies and the
proposed policies.

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

### hasDiff

### setDiff

The difference between the principal's access under the current
(baseline) policies and the principal's access under the proposed
(simulated) policies.

This field is only included for access tuples that were successfully
replayed and had different results under the current policies and the
proposed policies.

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

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

### getError

The error that caused the access tuple replay to fail.

This field is only included for access tuples that were not replayed
successfully.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html|null` |   |

### hasError

### setError

The error that caused the access tuple replay to fail.

This field is only included for access tuples that were not replayed
successfully.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` |

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

### getName

The resource name of the `ReplayResult`, in the following format:
`{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}/results/{replay-result-id}`,
where `{resource-id}` is the ID of the project, folder, or organization
that owns the [Replay](https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.Replay).

Example:
`projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36/results/1234`

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

### setName

The resource name of the `ReplayResult`, in the following format:
`{projects|folders|organizations}/{resource-id}/locations/global/replays/{replay-id}/results/{replay-result-id}`,
where `{resource-id}` is the ID of the project, folder, or organization
that owns the [Replay](https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.Replay).

Example:
`projects/my-example-project/locations/global/replays/506a5f7f-38ce-4d7d-8e03-479ce1833c36/results/1234`

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

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

### getParent

The [Replay](https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.Replay) that the access tuple
was included in.

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

### setParent

The [Replay](https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.Replay) that the access tuple
was included in.

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

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

### getAccessTuple

The access tuple that was replayed. This field includes information about
the principal, resource, and permission that were involved in the access
attempt.

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

### hasAccessTuple

### clearAccessTuple

### setAccessTuple

The access tuple that was replayed. This field includes information about
the principal, resource, and permission that were involved in the access
attempt.

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

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

### getLastSeenDate

The latest date this access tuple was seen in the logs.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html|null` |   |

### hasLastSeenDate

### clearLastSeenDate

### setLastSeenDate

The latest date this access tuple was seen in the logs.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Type.Date.html` |

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

### getResult

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