public sealed class GenerateGroundedContentRequest : IMessage<GenerateGroundedContentRequest>, IEquatable<GenerateGroundedContentRequest>, IDeepCloneable<GenerateGroundedContentRequest>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1 API class GenerateGroundedContentRequest.
Top-level message sent by the client for the GenerateGroundedContent
method.
public RepeatedField<GroundedGenerationContent> Contents { get; }
Content of the current conversation with the model.
For single-turn queries, this is a single instance. For multi-turn queries,
this is a repeated field that contains conversation history + latest
request.
public MapField<string, string> UserLabels { get; }
The user labels applied to a resource must meet the following requirements:
Each resource can have multiple labels, up to a maximum of 64.
Each label must be a key-value pair.
Keys have a minimum length of 1 character and a maximum length of 63
characters and cannot be empty. Values can be empty and have a maximum
length of 63 characters.
Keys and values can contain only lowercase letters, numeric characters,
underscores, and dashes. All characters must use UTF-8 encoding, and
international characters are allowed.
The key portion of a label must be unique. However, you can use the same
key with multiple resources.
Keys must start with a lowercase letter or international character.
[[["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 documentation details the \u003ccode\u003eGenerateGroundedContentRequest\u003c/code\u003e class, which is the primary message sent by clients for the \u003ccode\u003eGenerateGroundedContent\u003c/code\u003e method within the Discovery Engine v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of \u003ccode\u003eGenerateGroundedContentRequest\u003c/code\u003e is 1.6.0, with previous versions available back to 1.0.0-beta06 for users to utilize if necessary.\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, which provides its functionality and compatibility.\u003c/p\u003e\n"],["\u003cp\u003eKey properties of the \u003ccode\u003eGenerateGroundedContentRequest\u003c/code\u003e class include \u003ccode\u003eContents\u003c/code\u003e, \u003ccode\u003eGenerationSpec\u003c/code\u003e, \u003ccode\u003eGroundingSpec\u003c/code\u003e, \u003ccode\u003eLocation\u003c/code\u003e, \u003ccode\u003eSystemInstruction\u003c/code\u003e, and \u003ccode\u003eUserLabels\u003c/code\u003e, which define the request's parameters and structure.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eLocation\u003c/code\u003e property is a required field that specifies the resource location, and \u003ccode\u003eLocationAsLocationName\u003c/code\u003e provides a typed view of the \u003ccode\u003eLocation\u003c/code\u003e resource name.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1 API - Class GenerateGroundedContentRequest (1.9.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.9.0 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest) \n\n public sealed class GenerateGroundedContentRequest : IMessage\u003cGenerateGroundedContentRequest\u003e, IEquatable\u003cGenerateGroundedContentRequest\u003e, IDeepCloneable\u003cGenerateGroundedContentRequest\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1 API class GenerateGroundedContentRequest.\n\nTop-level message sent by the client for the `GenerateGroundedContent`\nmethod. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e GenerateGroundedContentRequest \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[GenerateGroundedContentRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[GenerateGroundedContentRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[GenerateGroundedContentRequest](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest), [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.DiscoveryEngine.V1](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1.dll\n\nConstructors\n------------\n\n### GenerateGroundedContentRequest()\n\n public GenerateGroundedContentRequest()\n\n### GenerateGroundedContentRequest(GenerateGroundedContentRequest)\n\n public GenerateGroundedContentRequest(GenerateGroundedContentRequest other)\n\nProperties\n----------\n\n### Contents\n\n public RepeatedField\u003cGroundedGenerationContent\u003e Contents { get; }\n\nContent of the current conversation with the model.\n\nFor single-turn queries, this is a single instance. For multi-turn queries,\nthis is a repeated field that contains conversation history + latest\nrequest.\n\n### GenerationSpec\n\n public GenerateGroundedContentRequest.Types.GenerationSpec GenerationSpec { get; set; }\n\nContent generation specification.\n\n### GroundingSpec\n\n public GenerateGroundedContentRequest.Types.GroundingSpec GroundingSpec { get; set; }\n\nGrounding specification.\n\n### Location\n\n public string Location { get; set; }\n\nRequired. Location resource.\n\nFormat: `projects/{project}/locations/{location}`.\n\n### LocationAsLocationName\n\n public LocationName LocationAsLocationName { get; set; }\n\n[LocationName](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.LocationName)-typed view over the [Location](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.GenerateGroundedContentRequest#Google_Cloud_DiscoveryEngine_V1_GenerateGroundedContentRequest_Location) resource name property.\n\n### SystemInstruction\n\n public GroundedGenerationContent SystemInstruction { get; set; }\n\nContent of the system instruction for the current API.\n\nThese instructions will take priority over any other prompt instructions\nif the selected model is supporting them.\n\n### UserLabels\n\n public MapField\u003cstring, string\u003e UserLabels { get; }\n\nThe user labels applied to a resource must meet the following requirements:\n\n- Each resource can have multiple labels, up to a maximum of 64.\n- Each label must be a key-value pair.\n- Keys have a minimum length of 1 character and a maximum length of 63 characters and cannot be empty. Values can be empty and have a maximum length of 63 characters.\n- Keys and values can contain only lowercase letters, numeric characters, underscores, and dashes. All characters must use UTF-8 encoding, and international characters are allowed.\n- The key portion of a label must be unique. However, you can use the same key with multiple resources.\n- Keys must start with a lowercase letter or international character.\n\nSee [Google Cloud\nDocument](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)\nfor more details."]]