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

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

The result of an execution.

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

## Namespace

Google \\ Cloud \\ WorkloadManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ violation_message` | `string` The violation message of an execution. |
| `↳ severity` | `string` The severity of violation. |
| `↳ rule` | `string` The rule that is violated in an evaluation. |
| `↳ documentation_url` | `string` The URL for the documentation of the rule. |
| `↳ resource` | `https://docs.cloud.google.com/php/docs/reference/cloud-workloadmanager/latest/V1.Resource` The resource that violates the rule. |
| `↳ violation_details` | `https://docs.cloud.google.com/php/docs/reference/cloud-workloadmanager/latest/V1.ViolationDetails` The details of violation in an evaluation result. |
| `↳ commands` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-workloadmanager/latest/V1.Command>` The commands to remediate the violation. |
| `↳ type` | `int` Execution result type of the scanned resource. |

### getViolationMessage

The violation message of an execution.

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

### setViolationMessage

The violation message of an execution.

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

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

### getSeverity

The severity of violation.

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

### setSeverity

The severity of violation.

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

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

### getRule

The rule that is violated in an evaluation.

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

### setRule

The rule that is violated in an evaluation.

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

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

### getDocumentationUrl

The URL for the documentation of the rule.

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

### setDocumentationUrl

The URL for the documentation of the rule.

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

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

### getResource

The resource that violates the rule.

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

### hasResource

### clearResource

### setResource

The resource that violates the rule.

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

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

### getViolationDetails

The details of violation in an evaluation result.

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

### hasViolationDetails

### clearViolationDetails

### setViolationDetails

The details of violation in an evaluation result.

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

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

### getCommands

The commands to remediate 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.Command>` |   |

### setCommands

The commands to remediate the violation.

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

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

### getType

Execution result type of the scanned resource.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-workloadmanager/latest/V1.ExecutionResult.Type). |

### setType

Execution result type of the scanned resource.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [Type](https://docs.cloud.google.com/php/docs/reference/cloud-workloadmanager/latest/V1.ExecutionResult.Type). |

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