Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class SessionInfo.
Information about the session.
Generated from protobuf message google.cloud.discoveryengine.v1.SearchResponse.SessionInfo
Namespace
Google \ Cloud \ DiscoveryEngine \ V1 \ SearchResponse
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Name of the session. If the auto-session mode is used (when SearchRequest.session ends with "-"), this field holds the newly generated session name.
↳ query_id
string
Query ID that corresponds to this search API call. One session can have multiple turns, each with a unique query ID. By specifying the session name and this query ID in the Answer API call, the answer generation happens in the context of the search results from this search call.
getName
Name of the session.
If the auto-session mode is used (when
SearchRequest.session
ends with "-"), this field holds the newly generated session name.
Returns
Type
Description
string
setName
Name of the session.
If the auto-session mode is used (when
SearchRequest.session
ends with "-"), this field holds the newly generated session name.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getQueryId
Query ID that corresponds to this search API call.
One session can have multiple turns, each with a unique query ID.
By specifying the session name and this query ID in the Answer API call,
the answer generation happens in the context of the search results from
this search call.
Returns
Type
Description
string
setQueryId
Query ID that corresponds to this search API call.
One session can have multiple turns, each with a unique query ID.
By specifying the session name and this query ID in the Answer API call,
the answer generation happens in the context of the search results from
this search call.
[[["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."],[],[],null,["# Google Cloud Discovery Engine V1 Client - Class SessionInfo (1.7.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.7.0 (latest)](/php/docs/reference/cloud-discoveryengine/latest/V1.SearchResponse.SessionInfo)\n- [1.6.1](/php/docs/reference/cloud-discoveryengine/1.6.1/V1.SearchResponse.SessionInfo)\n- [1.5.1](/php/docs/reference/cloud-discoveryengine/1.5.1/V1.SearchResponse.SessionInfo)\n- [1.4.0](/php/docs/reference/cloud-discoveryengine/1.4.0/V1.SearchResponse.SessionInfo)\n- [1.3.3](/php/docs/reference/cloud-discoveryengine/1.3.3/V1.SearchResponse.SessionInfo)\n- [1.2.0](/php/docs/reference/cloud-discoveryengine/1.2.0/V1.SearchResponse.SessionInfo)\n- [1.1.0](/php/docs/reference/cloud-discoveryengine/1.1.0/V1.SearchResponse.SessionInfo)\n- [1.0.0](/php/docs/reference/cloud-discoveryengine/1.0.0/V1.SearchResponse.SessionInfo)\n- [0.11.3](/php/docs/reference/cloud-discoveryengine/0.11.3/V1.SearchResponse.SessionInfo)\n- [0.8.0](/php/docs/reference/cloud-discoveryengine/0.8.0/V1.SearchResponse.SessionInfo)\n- [0.7.1](/php/docs/reference/cloud-discoveryengine/0.7.1/V1.SearchResponse.SessionInfo)\n- [0.6.0](/php/docs/reference/cloud-discoveryengine/0.6.0/V1.SearchResponse.SessionInfo)\n- [0.5.0](/php/docs/reference/cloud-discoveryengine/0.5.0/V1.SearchResponse.SessionInfo)\n- [0.4.0](/php/docs/reference/cloud-discoveryengine/0.4.0/V1.SearchResponse.SessionInfo)\n- [0.3.0](/php/docs/reference/cloud-discoveryengine/0.3.0/V1.SearchResponse.SessionInfo)\n- [0.2.0](/php/docs/reference/cloud-discoveryengine/0.2.0/V1.SearchResponse.SessionInfo)\n- [0.1.1](/php/docs/reference/cloud-discoveryengine/0.1.1/V1.SearchResponse.SessionInfo) \nReference documentation and code samples for the Google Cloud Discovery Engine V1 Client class SessionInfo.\n\nInformation about the session.\n\nGenerated from protobuf message `google.cloud.discoveryengine.v1.SearchResponse.SessionInfo`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ DiscoveryEngine \\\\ V1 \\\\ SearchResponse\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nName of the session.\n\nIf the auto-session mode is used (when\n[SearchRequest.session](/php/docs/reference/cloud-discoveryengine/latest/V1.SearchRequest#_Google_Cloud_DiscoveryEngine_V1_SearchRequest__getSession__)\nends with \"-\"), this field holds the newly generated session name.\n\n### setName\n\nName of the session.\n\nIf the auto-session mode is used (when\n[SearchRequest.session](/php/docs/reference/cloud-discoveryengine/latest/V1.SearchRequest#_Google_Cloud_DiscoveryEngine_V1_SearchRequest__getSession__)\nends with \"-\"), this field holds the newly generated session name.\n\n### getQueryId\n\nQuery ID that corresponds to this search API call.\n\nOne session can have multiple turns, each with a unique query ID.\nBy specifying the session name and this query ID in the Answer API call,\nthe answer generation happens in the context of the search results from\nthis search call.\n\n### setQueryId\n\nQuery ID that corresponds to this search API call.\n\nOne session can have multiple turns, each with a unique query ID.\nBy specifying the session name and this query ID in the Answer API call,\nthe answer generation happens in the context of the search results from\nthis search call."]]