# Grafeas V1 Client - Class ComplianceOccurrence (1.7.0)

1.7.0 (latest) 1.6.0 1.5.0 1.4.0 1.3.2 1.2.2 1.1.3 1.0.0 0.10.3 0.9.0 0.8.3 0.7.1 0.6.0 0.5.0 0.4.4 Reference documentation and code samples for the Grafeas V1 Client class ComplianceOccurrence.

An indication that the compliance checks in the associated ComplianceNote
were not satisfied for particular resources or a specified reason.

Generated from protobuf message `grafeas.v1.ComplianceOccurrence`

## Namespace

Grafeas \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ non_compliant_files` | `array<https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.NonCompliantFile>` |
| `↳ non_compliance_reason` | `string` |
| `↳ version` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.ComplianceVersion` The OS and config version the benchmark was run on. |

### getNonCompliantFiles

Generated from protobuf field `repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2;`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.NonCompliantFile>` |   |

### setNonCompliantFiles

Generated from protobuf field `repeated .grafeas.v1.NonCompliantFile non_compliant_files = 2;`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.NonCompliantFile>` |

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

### getNonComplianceReason

Generated from protobuf field `string non_compliance_reason = 3;`

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

### setNonComplianceReason

Generated from protobuf field `string non_compliance_reason = 3;`

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

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

### getVersion

The OS and config version the benchmark was run on.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.ComplianceVersion|null` |   |

### hasVersion

### clearVersion

### setVersion

The OS and config version the benchmark was run on.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/grafeas/latest/V1.ComplianceVersion` |

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