# Interface ViolationOrBuilder (0.57.0)

0.57.0 (latest) 0.55.0 0.52.0 0.51.0 0.49.0 0.47.0 0.46.0 0.45.0 0.44.0 0.42.0 0.40.0 0.39.0 0.38.0 0.37.0 0.36.0 0.34.0 0.32.0 0.31.0 0.28.0 0.27.0 0.26.0 0.24.0 0.23.0 0.22.0 0.21.0 0.20.0 0.19.0 0.18.0 0.17.0 0.16.0 0.15.0 0.13.0 0.12.0 0.11.0 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.0 0.4.0 0.3.0 0.1.0

    public interface ViolationOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getBeginTime()

    public abstract Timestamp getBeginTime()

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

`.google.protobuf.Timestamp begin_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The beginTime. |

### getBeginTimeOrBuilder()

    public abstract TimestampOrBuilder getBeginTimeOrBuilder()

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

`.google.protobuf.Timestamp begin_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getCategory()

    public abstract String getCategory()

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

`string category = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The category. |

### getCategoryBytes()

    public abstract ByteString getCategoryBytes()

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

`string category = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for category. |

### getDescription()

    public abstract String getDescription()

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

`string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The description. |

### getDescriptionBytes()

    public abstract ByteString getDescriptionBytes()

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

`string description = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for description. |

### getFolderId()

    public abstract long getFolderId()

The folder_id of the violation

`int64 folder_id = 9;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The folderId. |

### getName()

    public abstract String getName()

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

`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The name. |

### getNameBytes()

    public abstract ByteString getNameBytes()

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

`string name = 1 [(.google.api.field_behavior) = IDENTIFIER];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for name. |

### getNonCompliantOrgPolicy()

    public abstract String getNonCompliantOrgPolicy()

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}`

`
string non_compliant_org_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The nonCompliantOrgPolicy. |

### getNonCompliantOrgPolicyBytes()

    public abstract ByteString getNonCompliantOrgPolicyBytes()

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}`

`
string non_compliant_org_policy = 8 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IMMUTABLE];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for nonCompliantOrgPolicy. |

### getRemediation()

    public abstract Violation.Remediation getRemediation()

Output only. Compliance violation remediation

`
.google.cloud.cloudcontrolspartner.v1.Violation.Remediation remediation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudcontrolspartner/latest/com.google.cloud.cloudcontrolspartner.v1.Violation.Remediation` | The remediation. |

### getRemediationOrBuilder()

    public abstract Violation.RemediationOrBuilder getRemediationOrBuilder()

Output only. Compliance violation remediation

`
.google.cloud.cloudcontrolspartner.v1.Violation.Remediation remediation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudcontrolspartner/latest/com.google.cloud.cloudcontrolspartner.v1.Violation.RemediationOrBuilder` |   |

### getResolveTime()

    public abstract Timestamp getResolveTime()

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

`.google.protobuf.Timestamp resolve_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The resolveTime. |

### getResolveTimeOrBuilder()

    public abstract TimestampOrBuilder getResolveTimeOrBuilder()

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

`.google.protobuf.Timestamp resolve_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### getState()

    public abstract Violation.State getState()

Output only. State of the violation

`
.google.cloud.cloudcontrolspartner.v1.Violation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-cloudcontrolspartner/latest/com.google.cloud.cloudcontrolspartner.v1.Violation.State` | The state. |

### getStateValue()

    public abstract int getStateValue()

Output only. State of the violation

`
.google.cloud.cloudcontrolspartner.v1.Violation.State state = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for state. |

### getUpdateTime()

    public abstract Timestamp getUpdateTime()

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

`.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.Timestamp.html` | The updateTime. |

### getUpdateTimeOrBuilder()

    public abstract TimestampOrBuilder getUpdateTimeOrBuilder()

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

`.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.TimestampOrBuilder.html` |   |

### hasBeginTime()

    public abstract boolean hasBeginTime()

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

`.google.protobuf.Timestamp begin_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the beginTime field is set. |

### hasRemediation()

    public abstract boolean hasRemediation()

Output only. Compliance violation remediation

`
.google.cloud.cloudcontrolspartner.v1.Violation.Remediation remediation = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the remediation field is set. |

### hasResolveTime()

    public abstract boolean hasResolveTime()

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

`.google.protobuf.Timestamp resolve_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the resolveTime field is set. |

### hasUpdateTime()

    public abstract boolean hasUpdateTime()

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

`.google.protobuf.Timestamp update_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | Whether the updateTime field is set. |