0.13.0 (latest) 0.12.0 0.11.0 0.10.3 0.9.0 0.8.0 0.7.0 0.6.4 0.5.1 0.4.1 0.3.2 0.2.5 0.1.0 Reference documentation and code samples for the Google Cloud Redis Cluster V1 Client class AddAuthTokenRequest.

Request message for AddAuthToken.

Generated from protobuf message `google.cloud.redis.cluster.v1.AddAuthTokenRequest`

## Namespace

Google \\ Cloud \\ Redis \\ Cluster \\ V1

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ token_auth_user` | `string` Required. The name of the token auth user resource that this auth token will be added for. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user} |
| `↳ auth_token` | `https://docs.cloud.google.com/php/docs/reference/cloud-redis-cluster/latest/V1.AuthToken` Required. The auth token to add. |

### getTokenAuthUser

Required. The name of the token auth user resource that this auth token
will be added for. Format:
projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}

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

### setTokenAuthUser

Required. The name of the token auth user resource that this auth token
will be added for. Format:
projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user}

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

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

### getAuthToken

Required. The auth token to add.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-redis-cluster/latest/V1.AuthToken|null` |   |

### hasAuthToken

### clearAuthToken

### setAuthToken

Required. The auth token to add.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `https://docs.cloud.google.com/php/docs/reference/cloud-redis-cluster/latest/V1.AuthToken` |

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

### static::build

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `tokenAuthUser` | `string` Required. The name of the token auth user resource that this auth token will be added for. Format: projects/{project}/locations/{location}/clusters/{cluster}/tokenAuthUsers/{token_auth_user} Please see CloudRedisClusterClient::tokenAuthUserName() for help formatting this field. |
| `authToken` | `https://docs.cloud.google.com/php/docs/reference/cloud-redis-cluster/latest/V1.AuthToken` Required. The auth token to add. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/php/docs/reference/cloud-redis-cluster/latest/V1.AddAuthTokenRequest` |   |