public sealed class GenerateAccessTokenRequest : IMessage<GenerateAccessTokenRequest>, IEquatable<GenerateAccessTokenRequest>, IDeepCloneable<GenerateAccessTokenRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Cloud Workstations v1 API class GenerateAccessTokenRequest.
Desired expiration time of the access token. This value must
be at most 24 hours in the future. If a value is not specified, the
token's expiration time will be set to a default value of 1 hour in the
future.
Desired lifetime duration of the access token. This value must
be at most 24 hours. If a value is not specified, the token's lifetime
will be set to a default value of 1 hour.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThis document provides the reference documentation for the \u003ccode\u003eGenerateAccessTokenRequest\u003c/code\u003e class within the Cloud Workstations v1 API, with the latest version being 1.3.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGenerateAccessTokenRequest\u003c/code\u003e class is used to construct a request message for generating an access token for a specific workstation.\u003c/p\u003e\n"],["\u003cp\u003eThe class implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits from \u003ccode\u003eobject\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eGenerateAccessTokenRequest\u003c/code\u003e class include \u003ccode\u003eExpireTime\u003c/code\u003e, \u003ccode\u003eTtl\u003c/code\u003e (time to live), and \u003ccode\u003eWorkstation\u003c/code\u003e which is the name of the workstation to obtain the token for.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eExpiration\u003c/code\u003e property defines how the token will expire, either through a definitive \u003ccode\u003eExpireTime\u003c/code\u003e or a \u003ccode\u003eTtl\u003c/code\u003e of how long it will last.\u003c/p\u003e\n"]]],[],null,["# Cloud Workstations v1 API - Class GenerateAccessTokenRequest (1.3.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.3.0 (latest)](/dotnet/docs/reference/Google.Cloud.Workstations.V1/latest/Google.Cloud.Workstations.V1.GenerateAccessTokenRequest)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.Workstations.V1/1.2.0/Google.Cloud.Workstations.V1.GenerateAccessTokenRequest)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.Workstations.V1/1.1.0/Google.Cloud.Workstations.V1.GenerateAccessTokenRequest)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.Workstations.V1/1.0.0/Google.Cloud.Workstations.V1.GenerateAccessTokenRequest) \n\n public sealed class GenerateAccessTokenRequest : IMessage\u003cGenerateAccessTokenRequest\u003e, IEquatable\u003cGenerateAccessTokenRequest\u003e, IDeepCloneable\u003cGenerateAccessTokenRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Cloud Workstations v1 API class GenerateAccessTokenRequest.\n\nRequest message for GenerateAccessToken. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e GenerateAccessTokenRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[GenerateAccessTokenRequest](/dotnet/docs/reference/Google.Cloud.Workstations.V1/latest/Google.Cloud.Workstations.V1.GenerateAccessTokenRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[GenerateAccessTokenRequest](/dotnet/docs/reference/Google.Cloud.Workstations.V1/latest/Google.Cloud.Workstations.V1.GenerateAccessTokenRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[GenerateAccessTokenRequest](/dotnet/docs/reference/Google.Cloud.Workstations.V1/latest/Google.Cloud.Workstations.V1.GenerateAccessTokenRequest), [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.Workstations.V1](/dotnet/docs/reference/Google.Cloud.Workstations.V1/latest/Google.Cloud.Workstations.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Workstations.V1.dll\n\nConstructors\n------------\n\n### GenerateAccessTokenRequest()\n\n public GenerateAccessTokenRequest()\n\n### GenerateAccessTokenRequest(GenerateAccessTokenRequest)\n\n public GenerateAccessTokenRequest(GenerateAccessTokenRequest other)\n\nProperties\n----------\n\n### ExpirationCase\n\n public GenerateAccessTokenRequest.ExpirationOneofCase ExpirationCase { get; }\n\n### ExpireTime\n\n public Timestamp ExpireTime { get; set; }\n\nDesired expiration time of the access token. This value must\nbe at most 24 hours in the future. If a value is not specified, the\ntoken's expiration time will be set to a default value of 1 hour in the\nfuture.\n\n### Ttl\n\n public Duration Ttl { get; set; }\n\nDesired lifetime duration of the access token. This value must\nbe at most 24 hours. If a value is not specified, the token's lifetime\nwill be set to a default value of 1 hour.\n\n### Workstation\n\n public string Workstation { get; set; }\n\nRequired. Name of the workstation for which the access token should be\ngenerated.\n\n### WorkstationAsWorkstationName\n\n public WorkstationName WorkstationAsWorkstationName { get; set; }\n\n[WorkstationName](/dotnet/docs/reference/Google.Cloud.Workstations.V1/latest/Google.Cloud.Workstations.V1.WorkstationName)-typed view over the [Workstation](/dotnet/docs/reference/Google.Cloud.Workstations.V1/latest/Google.Cloud.Workstations.V1.GenerateAccessTokenRequest#Google_Cloud_Workstations_V1_GenerateAccessTokenRequest_Workstation) resource name property."]]