# Google Cloud Workload Manager V1 Client - Class ViolationDetails (0.2.0)

0.2.0 (latest) 0.1.0 Reference documentation and code samples for the Google Cloud Workload Manager V1 Client class ViolationDetails.

The violation in an evaluation result.

Generated from protobuf message `google.cloud.workloadmanager.v1.ViolationDetails`

## Namespace

Google \\ Cloud \\ WorkloadManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ asset` | `string` The name of the asset. |
| `↳ service_account` | `string` The service account associated with the resource. |
| `↳ observed` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Details of the violation. |
| `↳ rule_output` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-workloadmanager/latest/V1.RuleOutput>` Output only. The rule output of the violation. |

### getAsset

The name of the asset.

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

### setAsset

The name of the asset.

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

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

### getServiceAccount

The service account associated with the resource.

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

### setServiceAccount

The service account associated with the resource.

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

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

### getObserved

Details of the violation.

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

### setObserved

Details of the violation.

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

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

### getRuleOutput

Output only. The rule output of the violation.

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

### setRuleOutput

Output only. The rule output of the violation.

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

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