public sealed class RetrieveContextsRequest : IMessage<RetrieveContextsRequest>, IEquatable<RetrieveContextsRequest>, IDeepCloneable<RetrieveContextsRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Vertex AI v1beta1 API class RetrieveContextsRequest.
Request message for
[VertexRagService.RetrieveContexts][google.cloud.aiplatform.v1beta1.VertexRagService.RetrieveContexts].
Required. The resource name of the Location from which to retrieve
RagContexts. The users must have permission to make a call in the project.
Format:
projects/{project}/locations/{location}.
[[["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-14 UTC."],[[["\u003cp\u003eThis documentation details the \u003ccode\u003eRetrieveContextsRequest\u003c/code\u003e class, which is part of the Vertex AI v1beta1 API and is used for requesting context retrieval via \u003ccode\u003eVertexRagService.RetrieveContexts\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eRetrieveContextsRequest\u003c/code\u003e class inherits 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, enabling diverse functionalities such as message handling and deep cloning.\u003c/p\u003e\n"],["\u003cp\u003eThe class allows specifying the \u003ccode\u003eParent\u003c/code\u003e location resource name, formatted as \u003ccode\u003eprojects/{project}/locations/{location}\u003c/code\u003e, as well as offering a \u003ccode\u003eParentAsLocationName\u003c/code\u003e property for a typed view of this resource.\u003c/p\u003e\n"],["\u003cp\u003eIt includes a required \u003ccode\u003eQuery\u003c/code\u003e property of type \u003ccode\u003eRagQuery\u003c/code\u003e to define the retrieval parameters and supports selecting a \u003ccode\u003eVertexRagStore\u003c/code\u003e as the data source.\u003c/p\u003e\n"],["\u003cp\u003eThere are two versions of the documentation available: 1.0.0-beta21 (latest) and 1.0.0-beta20, with the documentation showing the structure of the latest one.\u003c/p\u003e\n"]]],[],null,["# Vertex AI v1beta1 API - Class RetrieveContextsRequest (1.0.0-beta47)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta47 (latest)](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsRequest)\n- [1.0.0-beta46](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/1.0.0-beta46/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsRequest) \n\n public sealed class RetrieveContextsRequest : IMessage\u003cRetrieveContextsRequest\u003e, IEquatable\u003cRetrieveContextsRequest\u003e, IDeepCloneable\u003cRetrieveContextsRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Vertex AI v1beta1 API class RetrieveContextsRequest.\n\nRequest message for\n\\[VertexRagService.RetrieveContexts\\]\\[google.cloud.aiplatform.v1beta1.VertexRagService.RetrieveContexts\\]. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e RetrieveContextsRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[RetrieveContextsRequest](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[RetrieveContextsRequest](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[RetrieveContextsRequest](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsRequest), [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.AIPlatform.V1Beta1](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.AIPlatform.V1Beta1.dll\n\nConstructors\n------------\n\n### RetrieveContextsRequest()\n\n public RetrieveContextsRequest()\n\n### RetrieveContextsRequest(RetrieveContextsRequest)\n\n public RetrieveContextsRequest(RetrieveContextsRequest other)\n\nProperties\n----------\n\n### DataSourceCase\n\n public RetrieveContextsRequest.DataSourceOneofCase DataSourceCase { get; }\n\n### Parent\n\n public string Parent { get; set; }\n\nRequired. The resource name of the Location from which to retrieve\nRagContexts. The users must have permission to make a call in the project.\nFormat:\n`projects/{project}/locations/{location}`.\n\n### ParentAsLocationName\n\n public LocationName ParentAsLocationName { get; set; }\n\n[LocationName](https://cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.ResourceNames.LocationName.html)-typed view over the [Parent](/dotnet/docs/reference/Google.Cloud.AIPlatform.V1Beta1/latest/Google.Cloud.AIPlatform.V1Beta1.RetrieveContextsRequest#Google_Cloud_AIPlatform_V1Beta1_RetrieveContextsRequest_Parent) resource name property.\n\n### Query\n\n public RagQuery Query { get; set; }\n\nRequired. Single RAG retrieve query.\n\n### VertexRagStore\n\n public RetrieveContextsRequest.Types.VertexRagStore VertexRagStore { get; set; }\n\nThe data source for Vertex RagStore."]]