# Google Cloud Run V2 Client - Class TaskAttemptResult (1.12.2)

1.12.2 (latest) 1.12.1 1.11.0 1.10.1 1.9.0 1.8.0 1.7.0 1.6.0 1.5.2 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0 0.9.3 0.8.0 0.7.2 0.6.0 0.5.2 0.4.0 0.3.4 Reference documentation and code samples for the Google Cloud Run V2 Client class TaskAttemptResult.

Result of a task attempt.

Generated from protobuf message `google.cloud.run.v2.TaskAttemptResult`

## Namespace

Google \\ Cloud \\ Run \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ status` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` Output only. The status of this attempt. If the status code is OK, then the attempt succeeded. |
| `↳ exit_code` | `int` Output only. The exit code of this attempt. This may be unset if the container was unable to exit cleanly with a code due to some other failure. See status field for possible failure details. At most one of exit_code or term_signal will be set. |
| `↳ term_signal` | `int` Output only. Termination signal of the container. This is set to non-zero if the container is terminated by the system. At most one of exit_code or term_signal will be set. |

### getStatus

Output only. The status of this attempt.

If the status code is OK, then the attempt succeeded.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html|null` |   |

### hasStatus

### clearStatus

### setStatus

Output only. The status of this attempt.

If the status code is OK, then the attempt succeeded.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/common-protos/latest/Rpc.Status.html` |

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

### getExitCode

Output only. The exit code of this attempt.

This may be unset if the container was unable to exit cleanly with a code
due to some other failure.
See status field for possible failure details.
At most one of exit_code or term_signal will be set.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setExitCode

Output only. The exit code of this attempt.

This may be unset if the container was unable to exit cleanly with a code
due to some other failure.
See status field for possible failure details.
At most one of exit_code or term_signal will be set.

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

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

### getTermSignal

Output only. Termination signal of the container. This is set to non-zero
if the container is terminated by the system.

At most one of exit_code or term_signal will be set.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` |   |

### setTermSignal

Output only. Termination signal of the container. This is set to non-zero
if the container is terminated by the system.

At most one of exit_code or term_signal will be set.

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

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