# Cloud Controls Partner V1 API - Class Google::Cloud::CloudControlsPartner::V1::Violation (v2.3.0)

2.3.0 (latest) 2.2.1 2.1.0 2.0.1 1.3.0 1.2.0 1.1.0 1.0.1 0.1.1 Reference documentation and code samples for the Cloud Controls Partner V1 API class Google::Cloud::CloudControlsPartner::V1::Violation.

Details of resource Violation

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #begin_time

    def begin_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_controls_partner-v1/latest/Google-Protobuf-Timestamp)) --- Output only. Time of the event which triggered the Violation.

### #category

    def category() -> ::String

**Returns**

- (::String) --- Output only. Category under which this violation is mapped. e.g. Location, Service Usage, Access, Encryption, etc.

### #description

    def description() -> ::String

**Returns**

- (::String) --- Output only. Description for the Violation. e.g. OrgPolicy gcp.resourceLocations has non compliant value.

### #folder_id

    def folder_id() -> ::Integer

**Returns**

- (::Integer) --- The folder_id of the violation

### #folder_id=

    def folder_id=(value) -> ::Integer

**Parameter**

- **value** (::Integer) --- The folder_id of the violation
**Returns**

- (::Integer) --- The folder_id of the violation

### #name

    def name() -> ::String

**Returns**

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

### #name=

    def name=(value) -> ::String

**Parameter**

- **value** (::String) --- Identifier. Format: `organizations/{organization}/locations/{location}/customers/{customer}/workloads/{workload}/violations/{violation}`
**Returns**

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

### #non_compliant_org_policy

    def non_compliant_org_policy() -> ::String

**Returns**

- (::String) --- 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}`

### #remediation

    def remediation() -> ::Google::Cloud::CloudControlsPartner::V1::Violation::Remediation

**Returns**

- ([::Google::Cloud::CloudControlsPartner::V1::Violation::Remediation](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_controls_partner-v1/latest/Google-Cloud-CloudControlsPartner-V1-Violation-Remediation)) --- Output only. Compliance violation remediation

### #resolve_time

    def resolve_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_controls_partner-v1/latest/Google-Protobuf-Timestamp)) --- Output only. Time of the event which fixed the Violation. If the violation is ACTIVE this will be empty.

### #state

    def state() -> ::Google::Cloud::CloudControlsPartner::V1::Violation::State

**Returns**

- ([::Google::Cloud::CloudControlsPartner::V1::Violation::State](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_controls_partner-v1/latest/Google-Cloud-CloudControlsPartner-V1-Violation-State)) --- Output only. State of the violation

### #update_time

    def update_time() -> ::Google::Protobuf::Timestamp

**Returns**

- ([::Google::Protobuf::Timestamp](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-cloud_controls_partner-v1/latest/Google-Protobuf-Timestamp)) --- Output only. The last time when the Violation record was updated.