# Secret Manager V1 Client - Class ListSecretsResponse (2.3.0)

2.3.0 (latest) 2.2.2 2.1.1 2.0.2 1.15.4 1.13.0 1.12.3 1.11.0 1.10.4 1.9.7 Reference documentation and code samples for the Secret Manager V1 Client class ListSecretsResponse.

Response message for
[SecretManagerService.ListSecrets](https://docs.cloud.google.com/php/docs/reference/cloud-secret-manager/latest/V1.Client.SecretManagerServiceClient#_Google_Cloud_SecretManager_V1_Client_SecretManagerServiceClient__listSecrets__).

Generated from protobuf message `google.cloud.secretmanager.v1.ListSecretsResponse`

## Namespace

Google \\ Cloud \\ SecretManager \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ secrets` | `array<https://docs.cloud.google.com/php/docs/reference/cloud-secret-manager/latest/V1.Secret>` The list of [Secrets](https://docs.cloud.google.com/php/docs/reference/cloud-secret-manager/latest/V1.Secret) sorted in reverse by create_time (newest first). |
| `↳ next_page_token` | `string` A token to retrieve the next page of results. Pass this value in [ListSecretsRequest.page_token](https://docs.cloud.google.com/php/docs/reference/cloud-secret-manager/latest/V1.ListSecretsRequest#_Google_Cloud_SecretManager_V1_ListSecretsRequest__getPageToken__) to retrieve the next page. |
| `↳ total_size` | `int` The total number of [Secrets](https://docs.cloud.google.com/php/docs/reference/cloud-secret-manager/latest/V1.Secret) but 0 when the [ListSecretsRequest.filter](https://docs.cloud.google.com/php/docs/reference/cloud-secret-manager/latest/V1.ListSecretsRequest#_Google_Cloud_SecretManager_V1_ListSecretsRequest__getFilter__) field is set. |

### getSecrets

The list of [Secrets](https://docs.cloud.google.com/php/docs/reference/cloud-secret-manager/latest/V1.Secret) sorted in
reverse by create_time (newest first).

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

### setSecrets

The list of [Secrets](https://docs.cloud.google.com/php/docs/reference/cloud-secret-manager/latest/V1.Secret) sorted in
reverse by create_time (newest first).

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

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

### getNextPageToken

A token to retrieve the next page of results. Pass this value in
[ListSecretsRequest.page_token](https://docs.cloud.google.com/php/docs/reference/cloud-secret-manager/latest/V1.ListSecretsRequest#_Google_Cloud_SecretManager_V1_ListSecretsRequest__getPageToken__)
to retrieve the next page.

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

### setNextPageToken

A token to retrieve the next page of results. Pass this value in
[ListSecretsRequest.page_token](https://docs.cloud.google.com/php/docs/reference/cloud-secret-manager/latest/V1.ListSecretsRequest#_Google_Cloud_SecretManager_V1_ListSecretsRequest__getPageToken__)
to retrieve the next page.

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

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

### getTotalSize

The total number of [Secrets](https://docs.cloud.google.com/php/docs/reference/cloud-secret-manager/latest/V1.Secret) but 0
when the
[ListSecretsRequest.filter](https://docs.cloud.google.com/php/docs/reference/cloud-secret-manager/latest/V1.ListSecretsRequest#_Google_Cloud_SecretManager_V1_ListSecretsRequest__getFilter__)
field is set.

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

### setTotalSize

The total number of [Secrets](https://docs.cloud.google.com/php/docs/reference/cloud-secret-manager/latest/V1.Secret) but 0
when the
[ListSecretsRequest.filter](https://docs.cloud.google.com/php/docs/reference/cloud-secret-manager/latest/V1.ListSecretsRequest#_Google_Cloud_SecretManager_V1_ListSecretsRequest__getFilter__)
field is set.

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

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