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

The proposed changes to OrgPolicy.

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

## Namespace

Google \\ Cloud \\ PolicySimulator \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ policies` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.OrgPolicyOverlay.PolicyOverlay>` Optional. The OrgPolicy changes to preview violations for. Any existing OrgPolicies with the same name will be overridden in the simulation. That is, violations will be determined as if all policies in the overlay were created or updated. |
| `↳ custom_constraints` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.OrgPolicyOverlay.CustomConstraintOverlay>` Optional. The OrgPolicy CustomConstraint changes to preview violations for. Any existing CustomConstraints with the same name will be overridden in the simulation. That is, violations will be determined as if all custom constraints in the overlay were instantiated. Only a single custom_constraint is supported in the overlay at a time. For evaluating multiple constraints, multiple `GenerateOrgPolicyViolationsPreview` requests are made, where each request evaluates a single constraint. |

### getPolicies

Optional. The OrgPolicy changes to preview violations for.

Any existing OrgPolicies with the same name will be overridden
in the simulation. That is, violations will be determined as if all
policies in the overlay were created or updated.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.OrgPolicyOverlay.PolicyOverlay>` |   |

### setPolicies

Optional. The OrgPolicy changes to preview violations for.

Any existing OrgPolicies with the same name will be overridden
in the simulation. That is, violations will be determined as if all
policies in the overlay were created or updated.

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

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

### getCustomConstraints

Optional. The OrgPolicy CustomConstraint changes to preview violations for.

Any existing CustomConstraints with the same name will be overridden
in the simulation. That is, violations will be determined as if all
custom constraints in the overlay were instantiated.
Only a single custom_constraint is supported in the overlay at a time.
For evaluating multiple constraints, multiple
`GenerateOrgPolicyViolationsPreview` requests are made, where each request
evaluates a single constraint.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-policysimulator/latest/V1.OrgPolicyOverlay.CustomConstraintOverlay>` |   |

### setCustomConstraints

Optional. The OrgPolicy CustomConstraint changes to preview violations for.

Any existing CustomConstraints with the same name will be overridden
in the simulation. That is, violations will be determined as if all
custom constraints in the overlay were instantiated.
Only a single custom_constraint is supported in the overlay at a time.
For evaluating multiple constraints, multiple
`GenerateOrgPolicyViolationsPreview` requests are made, where each request
evaluates a single constraint.

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

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