# Google Cloud Policy Simulator V1 Client - Class ReplayConfig (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 ReplayConfig.

The configuration used for a
[Replay](https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.Replay).

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

## Namespace

Google \\ Cloud \\ PolicySimulator \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ policy_overlay` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` A mapping of the resources that you want to simulate policies for and the policies that you want to simulate. Keys are the full resource names for the resources. For example, `//cloudresourcemanager.googleapis.com/projects/my-project`. For examples of full resource names for Google Cloud services, see <https://cloud.google.com/iam/help/troubleshooter/full-resource-names>. Values are [Policy](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.Policy.html) objects representing the policies that you want to simulate. Replays automatically take into account any IAM policies inherited through the resource hierarchy, and any policies set on descendant resources. You do not need to include these policies in the policy overlay. |
| `↳ log_source` | `int` The logs to use as input for the [Replay](https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.Replay). |

### getPolicyOverlay

A mapping of the resources that you want to simulate policies for and the
policies that you want to simulate.

Keys are the full resource names for the resources. For example,
`//cloudresourcemanager.googleapis.com/projects/my-project`.
For examples of full resource names for Google Cloud services, see
<https://cloud.google.com/iam/help/troubleshooter/full-resource-names>.
Values are [Policy](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.Policy.html) objects representing the policies
that you want to simulate.
Replays automatically take into account any IAM policies inherited through
the resource hierarchy, and any policies set on descendant resources. You
do not need to include these policies in the policy overlay.

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

### setPolicyOverlay

A mapping of the resources that you want to simulate policies for and the
policies that you want to simulate.

Keys are the full resource names for the resources. For example,
`//cloudresourcemanager.googleapis.com/projects/my-project`.
For examples of full resource names for Google Cloud services, see
<https://cloud.google.com/iam/help/troubleshooter/full-resource-names>.
Values are [Policy](https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Cloud.Iam.V1.Policy.html) objects representing the policies
that you want to simulate.
Replays automatically take into account any IAM policies inherited through
the resource hierarchy, and any policies set on descendant resources. You
do not need to include these policies in the policy overlay.

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

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

### getLogSource

The logs to use as input for the
[Replay](https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.Replay).

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [LogSource](https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.ReplayConfig.LogSource). |

### setLogSource

The logs to use as input for the
[Replay](https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.Replay).

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [LogSource](https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.ReplayConfig.LogSource). |

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