# Developer Connect v1 API - Class OAuthCredential (1.0.0-beta04)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [1.0.0-beta04 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DeveloperConnect.V1/latest/Google.Cloud.DeveloperConnect.V1.OAuthCredential)
- [1.0.0-beta03](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DeveloperConnect.V1/1.0.0-beta03/Google.Cloud.DeveloperConnect.V1.OAuthCredential)

    public sealed class OAuthCredential : IMessage<OAuthCredential>, IEquatable<OAuthCredential>, IDeepCloneable<OAuthCredential>, IBufferMessage, IMessage

Reference documentation and code samples for the Developer Connect v1 API class OAuthCredential.

Represents an OAuth token of the account that authorized the Connection,
and associated metadata.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> OAuthCredential

## Implements

[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[OAuthCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DeveloperConnect.V1/latest/Google.Cloud.DeveloperConnect.V1.OAuthCredential), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[OAuthCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DeveloperConnect.V1/latest/Google.Cloud.DeveloperConnect.V1.OAuthCredential), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[OAuthCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DeveloperConnect.V1/latest/Google.Cloud.DeveloperConnect.V1.OAuthCredential), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html)

## Inherited Members

[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Cloud.DeveloperConnect.V1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DeveloperConnect.V1/latest/Google.Cloud.DeveloperConnect.V1)

## Assembly

Google.Cloud.DeveloperConnect.V1.dll

## Constructors

### OAuthCredential()

    public OAuthCredential()

### OAuthCredential(OAuthCredential)

    public OAuthCredential(OAuthCredential other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DeveloperConnect.V1/latest/Google.Cloud.DeveloperConnect.V1.OAuthCredential` |

## Properties

### OauthTokenSecretVersion

    public string OauthTokenSecretVersion { get; set; }

Required. A SecretManager resource containing the OAuth token that
authorizes the connection. Format: `projects/*/secrets/*/versions/*` or
`projects/*/locations/*/secrets/*/versions/*` (if regional secrets are
supported in that location).

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |

### OauthTokenSecretVersionAsSecretVersionName

    public SecretVersionName OauthTokenSecretVersionAsSecretVersionName { get; set; }

[SecretVersionName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DeveloperConnect.V1/latest/Google.Cloud.DeveloperConnect.V1.SecretVersionName)-typed view over the [OauthTokenSecretVersion](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DeveloperConnect.V1/latest/Google.Cloud.DeveloperConnect.V1.OAuthCredential#Google_Cloud_DeveloperConnect_V1_OAuthCredential_OauthTokenSecretVersion) resource name
property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.DeveloperConnect.V1/latest/Google.Cloud.DeveloperConnect.V1.SecretVersionName` |   |

### Username

    public string Username { get; set; }

Output only. The username associated with this token.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.string` |   |