# Google Cloud Dialogflow Cx V3 Client - Class OAuthConfig (0.11.1)

0.11.1 (latest) 0.11.0 0.10.2 0.9.2 0.8.1 0.7.2 0.6.0 0.5.2 0.4.1 0.3.4 0.2.1 0.1.1 Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class OAuthConfig.

Config for authentication with OAuth.

Generated from protobuf message `google.cloud.dialogflow.cx.v3.Tool.Authentication.OAuthConfig`

## Namespace

Google \\ Cloud \\ Dialogflow \\ Cx \\ V3 \\ Tool \\ Authentication

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ oauth_grant_type` | `int` Required. OAuth grant types. |
| `↳ client_id` | `string` Required. The client ID from the OAuth provider. |
| `↳ client_secret` | `string` Optional. The client secret from the OAuth provider. If the `secret_version_for_client_secret` field is set, this field will be ignored. |
| `↳ secret_version_for_client_secret` | `string` Optional. The name of the SecretManager secret version resource storing the client secret. If this field is set, the `client_secret` field will be ignored. Format: `projects/{project}/secrets/{secret}/versions/{version}` |
| `↳ token_endpoint` | `string` Required. The token endpoint in the OAuth provider to exchange for an access token. |
| `↳ scopes` | `string[]` Optional. The OAuth scopes to grant. |

### getOauthGrantType

Required. OAuth grant types.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `int` | Enum of type [OauthGrantType](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Tool.Authentication.OAuthConfig.OauthGrantType). |

### setOauthGrantType

Required. OAuth grant types.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [OauthGrantType](https://docs.cloud.google.com/php/docs/reference/cloud-dialogflow-cx/latest/V3.Tool.Authentication.OAuthConfig.OauthGrantType). |

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

### getClientId

Required. The client ID from the OAuth provider.

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

### setClientId

Required. The client ID from the OAuth provider.

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

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

### getClientSecret

Optional. The client secret from the OAuth provider. If the
`secret_version_for_client_secret` field is set, this field will be
ignored.

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

### setClientSecret

Optional. The client secret from the OAuth provider. If the
`secret_version_for_client_secret` field is set, this field will be
ignored.

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

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

### getSecretVersionForClientSecret

Optional. The name of the SecretManager secret version resource storing
the client secret. If this field is set, the `client_secret` field will
be ignored. Format:
`projects/{project}/secrets/{secret}/versions/{version}`

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

### setSecretVersionForClientSecret

Optional. The name of the SecretManager secret version resource storing
the client secret. If this field is set, the `client_secret` field will
be ignored. Format:
`projects/{project}/secrets/{secret}/versions/{version}`

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

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

### getTokenEndpoint

Required. The token endpoint in the OAuth provider to exchange for an
access token.

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

### setTokenEndpoint

Required. The token endpoint in the OAuth provider to exchange for an
access token.

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

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

### getScopes

Optional. The OAuth scopes to grant.

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

### setScopes

Optional. The OAuth scopes to grant.

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

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