1.5.0 (latest) 1.4.0 1.3.0 1.2.0 1.1.0 1.0.0

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

Reference documentation and code samples for the Cloud Build v2 API class UserCredential.

Represents a personal access token that authorized the Connection,
and associated metadata.

## Inheritance

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

## Implements

[IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.md.txt)[UserCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/latest/Google.Cloud.CloudBuild.V2.UserCredential.md.txt), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[UserCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/latest/Google.Cloud.CloudBuild.V2.UserCredential.md.txt), [IDeepCloneable](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.md.txt)[UserCredential](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/latest/Google.Cloud.CloudBuild.V2.UserCredential.md.txt), [IBufferMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.md.txt), [IMessage](https://docs.cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.md.txt)

## 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.CloudBuild.V2](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/latest/Google.Cloud.CloudBuild.V2.md.txt)

## Assembly

Google.Cloud.CloudBuild.V2.dll

## Constructors

### UserCredential()

    public UserCredential()

### UserCredential(UserCredential)

    public UserCredential(UserCredential other)

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `other` | `UserCredential` |

## Properties

### UserTokenSecretVersion

    public string UserTokenSecretVersion { get; set; }

Required. A SecretManager resource containing the user token that
authorizes the Cloud Build connection. Format:
`projects/*/secrets/*/versions/*`.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |

### UserTokenSecretVersionAsSecretVersionName

    public SecretVersionName UserTokenSecretVersionAsSecretVersionName { get; set; }

[SecretVersionName](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/latest/Google.Cloud.CloudBuild.V2.SecretVersionName.md.txt)-typed view over the [UserTokenSecretVersion](https://docs.cloud.google.com/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/latest/Google.Cloud.CloudBuild.V2.UserCredential.md.txt#Google_Cloud_CloudBuild_V2_UserCredential_UserTokenSecretVersion) resource name
property.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `SecretVersionName` |   |

### Username

    public string Username { get; set; }

Output only. The username associated to this token.

| **Property Value** ||
|---|---|
| **Type** | **Description** |
| `string` |   |