# Google Cloud Batch V1 Client - Class ActionCondition (1.4.1)

1.4.1 (latest) 1.4.0 1.3.1 1.2.2 1.1.7 1.0.3 0.17.0 0.16.10 0.15.0 0.14.0 0.13.1 0.12.1 0.11.3 0.10.0 0.9.0 0.8.0 0.7.0 0.6.0 0.5.2 0.4.0 0.3.0 0.2.2 Reference documentation and code samples for the Google Cloud Batch V1 Client class ActionCondition.

Conditions for actions to deal with task failures.

Generated from protobuf message `google.cloud.batch.v1.LifecyclePolicy.ActionCondition`

## Namespace

Google \\ Cloud \\ Batch \\ V1 \\ LifecyclePolicy

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ exit_codes` | `int[]` Exit codes of a task execution. If there are more than 1 exit codes, when task executes with any of the exit code in the list, the condition is met and the action will be executed. |

### getExitCodes

Exit codes of a task execution.

If there are more than 1 exit codes,
when task executes with any of the exit code in the list,
the condition is met and the action will be executed.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://protobuf.dev/reference/php/api-docs/Google/Protobuf/RepeatedField<int>` |   |

### setExitCodes

Exit codes of a task execution.

If there are more than 1 exit codes,
when task executes with any of the exit code in the list,
the condition is met and the action will be executed.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int[]` |

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