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 v1beta 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.v1beta.ConversationalSearchService.GetSession]
API, if
[GetSessionRequest.include_answer_details][google.cloud.discoveryengine.v1beta.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\u003eThe \u003ccode\u003eSession.Types.Turn\u003c/code\u003e class represents a single turn in a conversation, which includes a user query and a corresponding service answer within the Discovery Engine v1beta API.\u003c/p\u003e\n"],["\u003cp\u003eThis class is part of the \u003ccode\u003eGoogle.Cloud.DiscoveryEngine.V1Beta\u003c/code\u003e namespace and implements interfaces such as \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\u003eTurn\u003c/code\u003e class has properties \u003ccode\u003eAnswer\u003c/code\u003e, which is the resource name of the service's answer, \u003ccode\u003eAnswerAsAnswerName\u003c/code\u003e, providing a typed view over the answer resource name, and \u003ccode\u003eQuery\u003c/code\u003e, representing the user's input.\u003c/p\u003e\n"],["\u003cp\u003eThe class can be constructed with no arguments or another instance of itself.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the \u003ccode\u003eSession.Types.Turn\u003c/code\u003e class can be found at version 1.0.0-beta18, while version 1.0.0-beta17 is also available.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1beta API - Class Session.Types.Turn (1.0.0-beta19)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta19 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Session.Types.Turn)\n- [1.0.0-beta18](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/1.0.0-beta18/Google.Cloud.DiscoveryEngine.V1Beta.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 v1beta 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.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Session)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Session.Types)[Turn](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Session.Types.Turn), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[Session](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Session)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Session.Types)[Turn](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.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.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Session)[Types](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Session.Types)[Turn](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.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.V1Beta](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1Beta.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.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.AnswerName)-typed view over the [Answer](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.Session.Types.Turn#Google_Cloud_DiscoveryEngine_V1Beta_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.v1beta.ConversationalSearchService.GetSession\\]\nAPI, if\n\\[GetSessionRequest.include_answer_details\\]\\[google.cloud.discoveryengine.v1beta.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."]]