# Common Protos for Google Cloud APIs Client - Class OrgPolicyViolationInfo (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 OrgPolicyViolationInfo.

Represents OrgPolicy Violation information.

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

## Namespace

Google \\ Cloud \\ Audit

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ payload` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` Optional. Resource payload that is currently in scope and is subjected to orgpolicy conditions. This payload may be the subset of the actual Resource that may come in the request. This payload should not contain any core content. |
| `↳ resource_type` | `string` Optional. Resource type that the orgpolicy is checked against. Example: compute.googleapis.com/Instance, store.googleapis.com/bucket |
| `↳ resource_tags` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Optional. Tags referenced on the resource at the time of evaluation. These also include the federated tags, if they are supplied in the CheckOrgPolicy or CheckCustomConstraints Requests. Optional field as of now. These tags are the Cloud tags that are available on the resource during the policy evaluation and will be available as part of the OrgPolicy check response for logging purposes. |
| `↳ violation_info` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.ViolationInfo>` Optional. Policy violations |

### getPayload

Optional. Resource payload that is currently in scope and is subjected to orgpolicy
conditions. This payload may be the subset of the actual Resource that may
come in the request. This payload should not contain any core content.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct|null` |   |

### hasPayload

### clearPayload

### setPayload

Optional. Resource payload that is currently in scope and is subjected to orgpolicy
conditions. This payload may be the subset of the actual Resource that may
come in the request. This payload should not contain any core content.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Struct` |

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

### getResourceType

Optional. Resource type that the orgpolicy is checked against.

Example: compute.googleapis.com/Instance, store.googleapis.com/bucket

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

### setResourceType

Optional. Resource type that the orgpolicy is checked against.

Example: compute.googleapis.com/Instance, store.googleapis.com/bucket

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

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

### getResourceTags

Optional. Tags referenced on the resource at the time of evaluation. These also
include the federated tags, if they are supplied in the CheckOrgPolicy
or CheckCustomConstraints Requests.

Optional field as of now. These tags are the Cloud tags that are
available on the resource during the policy evaluation and will
be available as part of the OrgPolicy check response for logging purposes.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |   |

### setResourceTags

Optional. Tags referenced on the resource at the time of evaluation. These also
include the federated tags, if they are supplied in the CheckOrgPolicy
or CheckCustomConstraints Requests.

Optional field as of now. These tags are the Cloud tags that are
available on the resource during the policy evaluation and will
be available as part of the OrgPolicy check response for logging purposes.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` |

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

### getViolationInfo

Optional. Policy violations

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.ViolationInfo>` |   |

### setViolationInfo

Optional. Policy violations

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-common-protos/latest/Audit.ViolationInfo>` |

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