# Interface OAuthConfigOrBuilder (0.9.0)

0.9.0 (latest) 0.7.0 0.4.0 0.3.0 0.1.0

    public interface OAuthConfigOrBuilder extends MessageOrBuilder

## Implements

[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)

## Methods

### getClientId()

    public abstract String getClientId()

Required. The client ID from the OAuth provider.

`string client_id = 2 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The clientId. |

### getClientIdBytes()

    public abstract ByteString getClientIdBytes()

Required. The client ID from the OAuth provider.

`string client_id = 2 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for clientId. |

### getClientSecretVersion()

    public abstract String 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`.

`
string client_secret_version = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The clientSecretVersion. |

### getClientSecretVersionBytes()

    public abstract ByteString getClientSecretVersionBytes()

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

`
string client_secret_version = 3 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for clientSecretVersion. |

### getOauthGrantType()

    public abstract OAuthConfig.OauthGrantType getOauthGrantType()

Required. OAuth grant types.

`
.google.cloud.ces.v1.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/java/docs/reference/google-cloud-ces/latest/com.google.cloud.ces.v1.OAuthConfig.OauthGrantType` | The oauthGrantType. |

### getOauthGrantTypeValue()

    public abstract int getOauthGrantTypeValue()

Required. OAuth grant types.

`
.google.cloud.ces.v1.OAuthConfig.OauthGrantType oauth_grant_type = 1 [(.google.api.field_behavior) = REQUIRED];
`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The enum numeric value on the wire for oauthGrantType. |

### getScopes(int index)

    public abstract String getScopes(int index)

Optional. The OAuth scopes to grant.

`repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the element to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The scopes at the given index. |

### getScopesBytes(int index)

    public abstract ByteString getScopesBytes(int index)

Optional. The OAuth scopes to grant.

`repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];`

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `index` | `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` The index of the value to return. |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes of the scopes at the given index. |

### getScopesCount()

    public abstract int getScopesCount()

Optional. The OAuth scopes to grant.

`repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html` | The count of scopes. |

### getScopesList()

    public abstract List<String> getScopesList()

Optional. The OAuth scopes to grant.

`repeated string scopes = 5 [(.google.api.field_behavior) = OPTIONAL];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/util/List.html<https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>` | A list containing the scopes. |

### getTokenEndpoint()

    public abstract String getTokenEndpoint()

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

`string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` | The tokenEndpoint. |

### getTokenEndpointBytes()

    public abstract ByteString getTokenEndpointBytes()

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

`string token_endpoint = 4 [(.google.api.field_behavior) = REQUIRED];`

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.ByteString.html` | The bytes for tokenEndpoint. |