public sealed class GetContextRequest : IMessage<GetContextRequest>, IEquatable<GetContextRequest>, IDeepCloneable<GetContextRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Google Cloud Dialogflow v2 API class GetContextRequest.
The request message for
[Contexts.GetContext][google.cloud.dialogflow.v2.Contexts.GetContext].
Required. The name of the context. Format:
projects/<Project ID>/agent/sessions/<Session ID>/contexts/<Context ID>
or projects/<Project ID>/agent/environments/<Environment ID>/users/<User
ID>/sessions/<Session ID>/contexts/<Context ID>.
If Environment ID is not specified, we assume default 'draft'
environment. If User ID is not specified, we assume default '-' user.
[[["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 latest version available for the \u003ccode\u003eGetContextRequest\u003c/code\u003e class in the Google Cloud Dialogflow v2 API is 4.26.0.\u003c/p\u003e\n"],["\u003cp\u003eThis document provides reference material for the \u003ccode\u003eGetContextRequest\u003c/code\u003e class, which is used to retrieve a specific context from a Dialogflow session.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGetContextRequest\u003c/code\u003e class has an inheritance from \u003ccode\u003eobject\u003c/code\u003e and 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.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eGetContextRequest\u003c/code\u003e class contains two constructors and properties such as \u003ccode\u003eContextName\u003c/code\u003e and \u003ccode\u003eName\u003c/code\u003e to specify the context that is being requested.\u003c/p\u003e\n"],["\u003cp\u003eThere is a history of prior releases of \u003ccode\u003eGetContextRequest\u003c/code\u003e dating back to version 3.2.0.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Dialogflow v2 API - Class GetContextRequest (4.26.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.26.0 (latest)](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.25.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.25.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.24.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.24.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.23.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.23.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.22.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.22.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.21.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.21.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.20.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.20.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.19.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.19.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.18.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.18.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.17.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.17.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.16.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.16.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.15.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.15.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.14.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.14.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.13.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.13.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.12.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.12.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.11.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.11.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.10.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.10.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.9.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.9.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.8.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.8.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.7.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.7.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.6.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.5.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.4.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.3.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.2.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.1.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/4.0.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [3.11.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/3.11.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [3.10.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/3.10.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/3.9.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/3.8.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/3.7.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/3.6.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/3.5.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/3.4.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/3.3.0/Google.Cloud.Dialogflow.V2.GetContextRequest)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/3.2.0/Google.Cloud.Dialogflow.V2.GetContextRequest) \n\n public sealed class GetContextRequest : IMessage\u003cGetContextRequest\u003e, IEquatable\u003cGetContextRequest\u003e, IDeepCloneable\u003cGetContextRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Dialogflow v2 API class GetContextRequest.\n\nThe request message for\n\\[Contexts.GetContext\\]\\[google.cloud.dialogflow.v2.Contexts.GetContext\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e GetContextRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[GetContextRequest](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.GetContextRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[GetContextRequest](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.GetContextRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[GetContextRequest](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.GetContextRequest), [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.Dialogflow.V2](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2)\n\nAssembly\n--------\n\nGoogle.Cloud.Dialogflow.V2.dll\n\nConstructors\n------------\n\n### GetContextRequest()\n\n public GetContextRequest()\n\n### GetContextRequest(GetContextRequest)\n\n public GetContextRequest(GetContextRequest other)\n\nProperties\n----------\n\n### ContextName\n\n public ContextName ContextName { get; set; }\n\n[ContextName](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.ContextName)-typed view over the [Name](/dotnet/docs/reference/Google.Cloud.Dialogflow.V2/latest/Google.Cloud.Dialogflow.V2.GetContextRequest#Google_Cloud_Dialogflow_V2_GetContextRequest_Name) resource name property.\n\n### Name\n\n public string Name { get; set; }\n\nRequired. The name of the context. Format:\n`projects/\u003cProject ID\u003e/agent/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`\nor `projects/\u003cProject ID\u003e/agent/environments/\u003cEnvironment ID\u003e/users/\u003cUser\nID\u003e/sessions/\u003cSession ID\u003e/contexts/\u003cContext ID\u003e`.\nIf `Environment ID` is not specified, we assume default 'draft'\nenvironment. If `User ID` is not specified, we assume default '-' user."]]