# Policy Simulator v1 API - Class OrgPolicyOverlay (1.4.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.4.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyOverlay)
- [1.3.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.3.0/Google.Cloud.PolicySimulator.V1.OrgPolicyOverlay)
- [1.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.2.0/Google.Cloud.PolicySimulator.V1.OrgPolicyOverlay)
- [1.1.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.1.0/Google.Cloud.PolicySimulator.V1.OrgPolicyOverlay)
- [1.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/1.0.0/Google.Cloud.PolicySimulator.V1.OrgPolicyOverlay)

    public sealed class OrgPolicyOverlay : IMessage<OrgPolicyOverlay>, IEquatable<OrgPolicyOverlay>, IDeepCloneable<OrgPolicyOverlay>, IBufferMessage, IMessage

Reference documentation and code samples for the Policy Simulator v1 API class OrgPolicyOverlay.

The proposed changes to OrgPolicy.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> OrgPolicyOverlay

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[OrgPolicyOverlay](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyOverlay), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[OrgPolicyOverlay](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyOverlay), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[OrgPolicyOverlay](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyOverlay), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.PolicySimulator.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1)

## Assembly

Google.Cloud.PolicySimulator.V1.dll

## Constructors

### OrgPolicyOverlay()

    public OrgPolicyOverlay()

### OrgPolicyOverlay(OrgPolicyOverlay)

    public OrgPolicyOverlay(OrgPolicyOverlay other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyOverlay` |

## Properties

### CustomConstraints

    public RepeatedField<OrgPolicyOverlay.Types.CustomConstraintOverlay> CustomConstraints { get; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyOverlayhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyOverlay.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyOverlay.Types.CustomConstraintOverlay` |   |

### Policies

    public RepeatedField<OrgPolicyOverlay.Types.PolicyOverlay> Policies { get; }

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.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Collections.RepeatedField-1.htmlhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyOverlayhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyOverlay.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyOverlay.Types.PolicyOverlay` |   |