0.6.0 (latest) 0.5.0 0.4.4 0.3.0 0.2.0 0.1.1 Reference documentation and code samples for the Google Cloud Ces V1 Client class OAuthConfig.

Configurations for authentication with OAuth.

Generated from protobuf message `google.cloud.ces.v1.OAuthConfig`

## Namespace

Google \\ Cloud \\ Ces \\ V1

## 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_version` | `string` Required. The name of the SecretManager secret version resource storing the client secret. Format: `projects/{project}/secrets/{secret}/versions/{version}` Note: You should grant `roles/secretmanager.secretAccessor` role to the CES service agent `service-<PROJECT-NUMBER>\@gcp-sa-ces.iam.gserviceaccount.com`. |
| `↳ 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-ces/latest/V1.OAuthConfig.OauthGrantType.md.txt). |

### setOauthGrantType

Required. OAuth grant types.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `var` | `int` Enum of type [OauthGrantType](https://docs.cloud.google.com/php/docs/reference/cloud-ces/latest/V1.OAuthConfig.OauthGrantType.md.txt). |

| **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` |   |

### getClientSecretVersion

Required. The name of the SecretManager secret version resource storing the
client secret.

Format: `projects/{project}/secrets/{secret}/versions/{version}`
Note: You should grant `roles/secretmanager.secretAccessor` role to the CES
service agent
`service-<PROJECT-NUMBER>\@gcp-sa-ces.iam.gserviceaccount.com`.

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

### setClientSecretVersion

Required. The name of the SecretManager secret version resource storing the
client secret.

Format: `projects/{project}/secrets/{secret}/versions/{version}`
Note: You should grant `roles/secretmanager.secretAccessor` role to the CES
service agent
`service-<PROJECT-NUMBER>\@gcp-sa-ces.iam.gserviceaccount.com`.

| **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** |
| `Google\Protobuf\RepeatedField<string>` |   |

### setScopes

Optional. The OAuth scopes to grant.

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

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