# Google Cloud Datastream V1 Client - Class Oauth2ClientCredentials (2.5.3)

2.5.3 (latest) 2.5.2 2.4.0 2.3.1 2.2.0 2.1.1 2.0.1 1.5.5 1.4.2 1.3.0 1.2.1 1.1.0 1.0.5 Reference documentation and code samples for the Google Cloud Datastream V1 Client class Oauth2ClientCredentials.

OAuth2 Client Credentials.

Generated from protobuf message `google.cloud.datastream.v1.SalesforceProfile.Oauth2ClientCredentials`

## Namespace

Google \\ Cloud \\ Datastream \\ V1 \\ SalesforceProfile

## Methods

### __construct

Constructor.

| **Parameters** ||
|---|---|
| **Name** | **Description** |
| `data` | `array` Optional. Data for populating the Message object. |
| `↳ client_id` | `string` Required. Client ID for Salesforce OAuth2 Client Credentials. |
| `↳ client_secret` | `string` Optional. Client secret for Salesforce OAuth2 Client Credentials. Mutually exclusive with the `secret_manager_stored_client_secret` field. |
| `↳ secret_manager_stored_client_secret` | `string` Optional. A reference to a Secret Manager resource name storing the Salesforce OAuth2 client_secret. Mutually exclusive with the `client_secret` field. |

### getClientId

Required. Client ID for Salesforce OAuth2 Client Credentials.

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

### setClientId

Required. Client ID for Salesforce OAuth2 Client Credentials.

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

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

### getClientSecret

Optional. Client secret for Salesforce OAuth2 Client Credentials.

Mutually exclusive with the `secret_manager_stored_client_secret` field.

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

### setClientSecret

Optional. Client secret for Salesforce OAuth2 Client Credentials.

Mutually exclusive with the `secret_manager_stored_client_secret` field.

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

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

### getSecretManagerStoredClientSecret

Optional. A reference to a Secret Manager resource name storing the
Salesforce OAuth2 client_secret. Mutually exclusive with the
`client_secret` field.

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

### setSecretManagerStoredClientSecret

Optional. A reference to a Secret Manager resource name storing the
Salesforce OAuth2 client_secret. Mutually exclusive with the
`client_secret` field.

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

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