public sealed class Session.Types.Turn : IMessage<Session.Types.Turn>, IEquatable<Session.Types.Turn>, IDeepCloneable<Session.Types.Turn>, IBufferMessage, IMessage
Reference documentation and code samples for the Discovery Engine v1 API class Session.Types.Turn.
Represents a turn, including a query from the user and a
answer from service.
Output only. In
[ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession]
API, if
[GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details]
is set to true, this field will be populated when getting answer query
session.
public MapField<string, string> QueryConfig { get; }
Optional. Represents metadata related to the query config, for example
LLM model and version used, model parameters (temperature, grounding
parameters, etc.). The prefix "google." is reserved for Google-developed
functionality.
[[["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 covers the \u003ccode\u003eSession.Types.Turn\u003c/code\u003e class within the Google Cloud Discovery Engine v1 API, which represents a single turn of interaction in a session, including the user's query and the service's answer.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSession.Types.Turn\u003c/code\u003e class is available in multiple versions, with the latest being version 1.6.0, which is the latest release, alongside other prior versions like 1.5.0, 1.4.0, 1.3.0, 1.2.0, 1.1.0, and 1.0.0-beta06.\u003c/p\u003e\n"],["\u003cp\u003eThe class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e interfaces, providing functionality for message handling, equality checks, deep cloning, and buffer management.\u003c/p\u003e\n"],["\u003cp\u003eThe class contains two key properties: \u003ccode\u003eQuery\u003c/code\u003e, which holds the user's query, and \u003ccode\u003eAnswer\u003c/code\u003e, which contains the resource name of the service's answer to the query, and also has an \u003ccode\u003eAnswerAsAnswerName\u003c/code\u003e property which is a typed view over the answer.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSession.Types.Turn\u003c/code\u003e class has two constructors: a default one, \u003ccode\u003eTurn()\u003c/code\u003e, and one that takes another \u003ccode\u003eSession.Types.Turn\u003c/code\u003e instance as a parameter, \u003ccode\u003eTurn(Session.Types.Turn other)\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1 API - Class Session.Types.Turn (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.Session.Types.Turn)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Google.Cloud.DiscoveryEngine.V1.Session.Types.Turn)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Google.Cloud.DiscoveryEngine.V1.Session.Types.Turn)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Google.Cloud.DiscoveryEngine.V1.Session.Types.Turn)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Google.Cloud.DiscoveryEngine.V1.Session.Types.Turn)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Google.Cloud.DiscoveryEngine.V1.Session.Types.Turn)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Google.Cloud.DiscoveryEngine.V1.Session.Types.Turn)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Google.Cloud.DiscoveryEngine.V1.Session.Types.Turn)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Google.Cloud.DiscoveryEngine.V1.Session.Types.Turn)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Google.Cloud.DiscoveryEngine.V1.Session.Types.Turn) \n\n public sealed class Session.Types.Turn : IMessage\u003cSession.Types.Turn\u003e, IEquatable\u003cSession.Types.Turn\u003e, IDeepCloneable\u003cSession.Types.Turn\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Discovery Engine v1 API class Session.Types.Turn.\n\nRepresents a turn, including a query from the user and a\nanswer from service. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Session.Types.Turn \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[Session](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Session)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Session.Types)[Turn](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Session.Types.Turn), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Session](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Session)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Session.Types)[Turn](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Session.Types.Turn), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[Session](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Session)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Session.Types)[Turn](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Session.Types.Turn), [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### Turn()\n\n public Turn()\n\n### Turn(Turn)\n\n public Turn(Session.Types.Turn other)\n\nProperties\n----------\n\n### Answer\n\n public string Answer { get; set; }\n\nOptional. The resource name of the answer to the user query.\n\nOnly set if the answer generation (/answer API call) happened in this\nturn.\n\n### AnswerAsAnswerName\n\n public AnswerName AnswerAsAnswerName { get; set; }\n\n[AnswerName](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.AnswerName)-typed view over the [Answer](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.Session.Types.Turn#Google_Cloud_DiscoveryEngine_V1_Session_Types_Turn_Answer) resource name property.\n\n### DetailedAnswer\n\n public Answer DetailedAnswer { get; set; }\n\nOutput only. In\n\\[ConversationalSearchService.GetSession\\]\\[google.cloud.discoveryengine.v1.ConversationalSearchService.GetSession\\]\nAPI, if\n\\[GetSessionRequest.include_answer_details\\]\\[google.cloud.discoveryengine.v1.GetSessionRequest.include_answer_details\\]\nis set to true, this field will be populated when getting answer query\nsession.\n\n### Query\n\n public Query Query { get; set; }\n\nOptional. The user query. May not be set if this turn is merely\nregenerating an answer to a different turn\n\n### QueryConfig\n\n public MapField\u003cstring, string\u003e QueryConfig { get; }\n\nOptional. Represents metadata related to the query config, for example\nLLM model and version used, model parameters (temperature, grounding\nparameters, etc.). The prefix \"google.\" is reserved for Google-developed\nfunctionality."]]