# Google Cloud Deploy V1 API - Class Google::Cloud::Deploy::V1::PolicyViolation (v2.5.0)

2.5.0 (latest) 2.4.1 2.3.0 2.2.0 2.1.1 2.0.2 1.6.0 1.5.0 1.4.0 1.3.0 1.2.2 1.1.0 1.0.0 0.20.0 0.19.1 0.18.0 0.17.2 0.16.0 0.15.0 0.14.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.2.0 0.1.3 Reference documentation and code samples for the Google Cloud Deploy V1 API class Google::Cloud::Deploy::V1::PolicyViolation.

Returned from an action if one or more policies were
violated, and therefore the action was prevented. Contains information about
what policies were violated and why.

## Inherits

- Object

## Extended By

- Google::Protobuf::MessageExts::ClassMethods

## Includes

- Google::Protobuf::MessageExts

## Methods

### #policy_violation_details

    def policy_violation_details() -> ::Array<::Google::Cloud::Deploy::V1::PolicyViolationDetails>

**Returns**

- (::Array\<[::Google::Cloud::Deploy::V1::PolicyViolationDetails](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-deploy-v1/latest/Google-Cloud-Deploy-V1-PolicyViolationDetails)\>) --- Policy violation details.

### #policy_violation_details=

    def policy_violation_details=(value) -> ::Array<::Google::Cloud::Deploy::V1::PolicyViolationDetails>

**Parameter**

- **value** (::Array\<[::Google::Cloud::Deploy::V1::PolicyViolationDetails](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-deploy-v1/latest/Google-Cloud-Deploy-V1-PolicyViolationDetails)\>) --- Policy violation details.
**Returns**

- (::Array\<[::Google::Cloud::Deploy::V1::PolicyViolationDetails](https://docs.cloud.google.com/ruby/docs/reference/google-cloud-deploy-v1/latest/Google-Cloud-Deploy-V1-PolicyViolationDetails)\>) --- Policy violation details.