# Google Cloud Redis V1 Client - Class ListInstancesResponse (2.2.3)

2.2.3 (latest) 2.2.2 2.1.6 2.0.0 1.9.5 1.8.4 1.7.0 1.6.12 Reference documentation and code samples for the Google Cloud Redis V1 Client class ListInstancesResponse.

Response for [ListInstances](https://docs.cloud.google.com/php/docs/reference/cloud-redis/latest/V1.Client.CloudRedisClient#_Google_Cloud_Redis_V1_Client_CloudRedisClient__listInstances__).

Generated from protobuf message `google.cloud.redis.v1.ListInstancesResponse`

## Namespace

Google \\ Cloud \\ Redis \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ instances` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-redis/latest/V1.Instance>` A list of Redis instances in the project in the specified location, or across all locations. If the `location_id` in the parent field of the request is "-", all regions available to the project are queried, and the results aggregated. If in such an aggregated query a location is unavailable, a placeholder Redis entry is included in the response with the `name` field set to a value of the form `projects/{project_id}/locations/{location_id}/instances/`- and the `status` field set to ERROR and `status_message` field set to "location not available for ListInstances". |
| `↳ next_page_token` | `string` Token to retrieve the next page of results, or empty if there are no more results in the list. |
| `↳ unreachable` | `string[]` Locations that could not be reached. |

### getInstances

A list of Redis instances in the project in the specified location,
or across all locations.

If the `location_id` in the parent field of the request is "-", all regions
available to the project are queried, and the results aggregated.
If in such an aggregated query a location is unavailable, a placeholder
Redis entry is included in the response with the `name` field set to a
value of the form
`projects/{project_id}/locations/{location_id}/instances/`- and the
`status` field set to ERROR and `status_message` field set to "location not
available for ListInstances".

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

### setInstances

A list of Redis instances in the project in the specified location,
or across all locations.

If the `location_id` in the parent field of the request is "-", all regions
available to the project are queried, and the results aggregated.
If in such an aggregated query a location is unavailable, a placeholder
Redis entry is included in the response with the `name` field set to a
value of the form
`projects/{project_id}/locations/{location_id}/instances/`- and the
`status` field set to ERROR and `status_message` field set to "location not
available for ListInstances".

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

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

### getNextPageToken

Token to retrieve the next page of results, or empty if there are no more
results in the list.

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

### setNextPageToken

Token to retrieve the next page of results, or empty if there are no more
results in the list.

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

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

### getUnreachable

Locations that could not be reached.

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

### setUnreachable

Locations that could not be reached.

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

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