# Google Cloud Batch V1 Client - Class TaskGroupStatus (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 TaskGroupStatus.

Aggregated task status for a TaskGroup.

Generated from protobuf message `google.cloud.batch.v1.JobStatus.TaskGroupStatus`

## Namespace

Google \\ Cloud \\ Batch \\ V1 \\ JobStatus

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ counts` | `array|https://protobuf.dev/reference/php/api-docs/Google/Protobuf/Internal/MapField` Count of task in each state in the TaskGroup. The map key is task state name. |
| `↳ instances` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-batch/latest/V1.JobStatus.InstanceStatus>` Status of instances allocated for the TaskGroup. |

### getCounts

Count of task in each state in the TaskGroup.

The map key is task state name.

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

### setCounts

Count of task in each state in the TaskGroup.

The map key is task state name.

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

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

### getInstances

Status of instances allocated for the TaskGroup.

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

### setInstances

Status of instances allocated for the TaskGroup.

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

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