[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eUserCredential\u003c/code\u003e class in the Cloud Build v2 API represents a personal access token used for authorizing connections, along with its associated metadata.\u003c/p\u003e\n"],["\u003cp\u003eThis class has multiple versions, with the latest being 1.4.0, and previous versions including 1.3.0, 1.2.0, 1.1.0, and 1.0.0.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eUserCredential\u003c/code\u003e inherits from \u003ccode\u003eobject\u003c/code\u003e and implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eUserCredential\u003c/code\u003e class includes properties such as \u003ccode\u003eUserTokenSecretVersion\u003c/code\u003e, \u003ccode\u003eUserTokenSecretVersionAsSecretVersionName\u003c/code\u003e, and \u003ccode\u003eUsername\u003c/code\u003e, which manage the token's secret version and associated user information.\u003c/p\u003e\n"],["\u003cp\u003eThe UserCredential class has two constructors, a default one, and another one that takes a UserCredential as a parameter for creation.\u003c/p\u003e\n"]]],[],null,["# Cloud Build v2 API - Class UserCredential (1.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.4.0 (latest)](/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/latest/Google.Cloud.CloudBuild.V2.UserCredential)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/1.3.0/Google.Cloud.CloudBuild.V2.UserCredential)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/1.2.0/Google.Cloud.CloudBuild.V2.UserCredential)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/1.1.0/Google.Cloud.CloudBuild.V2.UserCredential)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/1.0.0/Google.Cloud.CloudBuild.V2.UserCredential) \n\n public sealed class UserCredential : IMessage\u003cUserCredential\u003e, IEquatable\u003cUserCredential\u003e, IDeepCloneable\u003cUserCredential\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Build v2 API class UserCredential.\n\nRepresents a personal access token that authorized the Connection,\nand associated metadata. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e UserCredential \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[UserCredential](/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/latest/Google.Cloud.CloudBuild.V2.UserCredential), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[UserCredential](/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/latest/Google.Cloud.CloudBuild.V2.UserCredential), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[UserCredential](/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/latest/Google.Cloud.CloudBuild.V2.UserCredential), [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) \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.CloudBuild.V2](/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/latest/Google.Cloud.CloudBuild.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.CloudBuild.V2.dll\n\nConstructors\n------------\n\n### UserCredential()\n\n public UserCredential()\n\n### UserCredential(UserCredential)\n\n public UserCredential(UserCredential other)\n\nProperties\n----------\n\n### UserTokenSecretVersion\n\n public string UserTokenSecretVersion { get; set; }\n\nRequired. A SecretManager resource containing the user token that\nauthorizes the Cloud Build connection. Format:\n`projects/*/secrets/*/versions/*`.\n\n### UserTokenSecretVersionAsSecretVersionName\n\n public SecretVersionName UserTokenSecretVersionAsSecretVersionName { get; set; }\n\n[SecretVersionName](/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/latest/Google.Cloud.CloudBuild.V2.SecretVersionName)-typed view over the [UserTokenSecretVersion](/dotnet/docs/reference/Google.Cloud.CloudBuild.V2/latest/Google.Cloud.CloudBuild.V2.UserCredential#Google_Cloud_CloudBuild_V2_UserCredential_UserTokenSecretVersion) resource name\nproperty.\n\n### Username\n\n public string Username { get; set; }\n\nOutput only. The username associated to this token."]]