# Cloud Controls Partner v1beta API - Class Violation (1.0.0-beta05)

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

- [1.0.0-beta05 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/latest/Google.Cloud.CloudControlsPartner.V1Beta.Violation)
- [1.0.0-beta04](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/1.0.0-beta04/Google.Cloud.CloudControlsPartner.V1Beta.Violation)

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

Reference documentation and code samples for the Cloud Controls Partner v1beta API class Violation.

Details of resource Violation

## Inheritance

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

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Violation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/latest/Google.Cloud.CloudControlsPartner.V1Beta.Violation), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Violation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/latest/Google.Cloud.CloudControlsPartner.V1Beta.Violation), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Violation](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/latest/Google.Cloud.CloudControlsPartner.V1Beta.Violation), [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.CloudControlsPartner.V1Beta](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/latest/Google.Cloud.CloudControlsPartner.V1Beta)

## Assembly

Google.Cloud.CloudControlsPartner.V1Beta.dll

## Constructors

### Violation()

    public Violation()

### Violation(Violation)

    public Violation(Violation other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/latest/Google.Cloud.CloudControlsPartner.V1Beta.Violation` |

## Properties

### BeginTime

    public Timestamp BeginTime { get; set; }

Output only. Time of the event which triggered the Violation.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### Category

    public string Category { get; set; }

Output only. Category under which this violation is mapped.
e.g. Location, Service Usage, Access, Encryption, etc.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Description

    public string Description { get; set; }

Output only. Description for the Violation.
e.g. OrgPolicy gcp.resourceLocations has non compliant value.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### FolderId

    public long FolderId { get; set; }

The folder_id of the violation

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.int64` |   |

### Name

    public string Name { get; set; }

Identifier. Format:
`organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}`

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### NonCompliantOrgPolicy

    public string NonCompliantOrgPolicy { get; set; }

Output only. Immutable. Name of the OrgPolicy which was modified with
non-compliant change and resulted this violation. Format:
`projects/{project_number}/policies/{constraint_name}`
`folders/{folder_id}/policies/{constraint_name}`
`organizations/{organization_id}/policies/{constraint_name}`

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### Remediation

    public Violation.Types.Remediation Remediation { get; set; }

Output only. Compliance violation remediation

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/latest/Google.Cloud.CloudControlsPartner.V1Beta.Violationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/latest/Google.Cloud.CloudControlsPartner.V1Beta.Violation.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/latest/Google.Cloud.CloudControlsPartner.V1Beta.Violation.Types.Remediation` |   |

### ResolveTime

    public Timestamp ResolveTime { get; set; }

Output only. Time of the event which fixed the Violation.
If the violation is ACTIVE this will be empty.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### State

    public Violation.Types.State State { get; set; }

Output only. State of the violation

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/latest/Google.Cloud.CloudControlsPartner.V1Beta.Violationhttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/latest/Google.Cloud.CloudControlsPartner.V1Beta.Violation.Typeshttps://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/latest/Google.Cloud.CloudControlsPartner.V1Beta.Violation.Types.State` |   |

### UpdateTime

    public Timestamp UpdateTime { get; set; }

Output only. The last time when the Violation record was updated.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.WellKnownTypes.Timestamp.html` |   |

### ViolationName

    public ViolationName ViolationName { get; set; }

[ViolationName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/latest/Google.Cloud.CloudControlsPartner.V1Beta.ViolationName)-typed view over the [Name](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/latest/Google.Cloud.CloudControlsPartner.V1Beta.Violation#Google_Cloud_CloudControlsPartner_V1Beta_Violation_Name) resource name property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudControlsPartner.V1Beta/latest/Google.Cloud.CloudControlsPartner.V1Beta.ViolationName` |   |