# Google Cloud Tasks V2 Client - Class ListTasksResponse (2.2.0)

2.2.0 (latest) 2.1.2 2.0.2 1.15.2 1.14.6 1.13.2 1.12.2 1.11.11 Reference documentation and code samples for the Google Cloud Tasks V2 Client class ListTasksResponse.

Response message for listing tasks using
[ListTasks](https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.Client.CloudTasksClient#_Google_Cloud_Tasks_V2_Client_CloudTasksClient__listTasks__).

Generated from protobuf message `google.cloud.tasks.v2.ListTasksResponse`

## Namespace

Google \\ Cloud \\ Tasks \\ V2

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ tasks` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.Task>` The list of tasks. |
| `↳ next_page_token` | `string` A token to retrieve next page of results. To return the next page of results, call [ListTasks](https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.Client.CloudTasksClient#_Google_Cloud_Tasks_V2_Client_CloudTasksClient__listTasks__) with this value as the [page_token](https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.ListTasksRequest#_Google_Cloud_Tasks_V2_ListTasksRequest__getPageToken__). If the next_page_token is empty, there are no more results. |

### getTasks

The list of tasks.

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

### setTasks

The list of tasks.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.Task>` |

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

### getNextPageToken

A token to retrieve next page of results.

To return the next page of results, call
[ListTasks](https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.Client.CloudTasksClient#_Google_Cloud_Tasks_V2_Client_CloudTasksClient__listTasks__) with this value as
the [page_token](https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.ListTasksRequest#_Google_Cloud_Tasks_V2_ListTasksRequest__getPageToken__).
If the next_page_token is empty, there are no more results.

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

### setNextPageToken

A token to retrieve next page of results.

To return the next page of results, call
[ListTasks](https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.Client.CloudTasksClient#_Google_Cloud_Tasks_V2_Client_CloudTasksClient__listTasks__) with this value as
the [page_token](https://docs.cloud.google.com/php/docs/reference/cloud-tasks/latest/V2.ListTasksRequest#_Google_Cloud_Tasks_V2_ListTasksRequest__getPageToken__).
If the next_page_token is empty, there are no more results.

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

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