# Common Protos for Google Cloud APIs Client - Class ViolationInfo (1.0.0)

1.0.0 (latest) 0.8.3 0.7.0 0.6.0 0.5.2 0.4.2 0.3.8 Reference documentation and code samples for the Common Protos for Google Cloud APIs Client class ViolationInfo.

Provides information about the Policy violation info for this request.

Generated from protobuf message `google.cloud.audit.ViolationInfo`

## Namespace

Google \\ Cloud \\ Audit

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ constraint` | `string` Optional. Constraint name |
| `↳ error_message` | `string` Optional. Error message that policy is indicating. |
| `↳ checked_value` | `string` Optional. Value that is being checked for the policy. This could be in encrypted form (if pii sensitive). This field will only be emitted in LIST_POLICY types |
| `↳ policy_type` | `int` Optional. Indicates the type of the policy. |

### getConstraint

Optional. Constraint name

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setConstraint

Optional. Constraint name

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getErrorMessage

Optional. Error message that policy is indicating.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setErrorMessage

Optional. Error message that policy is indicating.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getCheckedValue

Optional. Value that is being checked for the policy.

This could be in encrypted form (if pii sensitive).
This field will only be emitted in LIST_POLICY types

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### setCheckedValue

Optional. Value that is being checked for the policy.

This could be in encrypted form (if pii sensitive).
This field will only be emitted in LIST_POLICY types

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `string` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |

### getPolicyType

Optional. Indicates the type of the policy.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [PolicyType](https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.ViolationInfo.PolicyType). |

### setPolicyType

Optional. Indicates the type of the policy.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [PolicyType](https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.ViolationInfo.PolicyType). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `$this` |   |