1.4.0 (latest) 1.3.0 1.2.0 1.1.0 1.0.0

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

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

OrgPolicyViolation is a resource representing a single resource violating a
single OrgPolicy constraint.

## Inheritance

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

## Implements

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

## 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.md.txt)

## Assembly

Google.Cloud.PolicySimulator.V1.dll

## Constructors

### OrgPolicyViolation()

    public OrgPolicyViolation()

### OrgPolicyViolation(OrgPolicyViolation)

    public OrgPolicyViolation(OrgPolicyViolation other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `OrgPolicyViolation` |

## Properties

### CustomConstraint

    public CustomConstraint CustomConstraint { get; set; }

The custom constraint being violated.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `CustomConstraint` |   |

### Error

    public Status Error { get; set; }

Any error encountered during the evaluation.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `Status` |   |

### Name

    public string Name { get; set; }

The name of the `OrgPolicyViolation`. Example:
organizations/my-example-org/locations/global/orgPolicyViolationsPreviews/506a5f7f/orgPolicyViolations/38ce\`

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### OrgPolicyViolationName

    public OrgPolicyViolationName OrgPolicyViolationName { get; set; }

[OrgPolicyViolationName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolationName.md.txt)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.PolicySimulator.V1/latest/Google.Cloud.PolicySimulator.V1.OrgPolicyViolation.md.txt#Google_Cloud_PolicySimulator_V1_OrgPolicyViolation_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `OrgPolicyViolationName` |   |

### Resource

    public ResourceContext Resource { get; set; }

The resource violating the constraint.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `ResourceContext` |   |