Google Cloud Discovery Engine V1 Client - Class AnswerQueryResponse (1.3.2)

Reference documentation and code samples for the Google Cloud Discovery Engine V1 Client class AnswerQueryResponse.

Response message for ConversationalSearchService.AnswerQuery method.

Generated from protobuf message google.cloud.discoveryengine.v1.AnswerQueryResponse

Namespace

Google \ Cloud \ DiscoveryEngine \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ answer Answer

Answer resource object. If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API.

↳ session Session

Session resource object. It will be only available when session field is set and valid in the AnswerQueryRequest request.

↳ answer_query_token string

A global unique ID used for logging.

getAnswer

Answer resource object.

If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API.

Returns
Type Description
Answer|null

hasAnswer

clearAnswer

setAnswer

Answer resource object.

If AnswerQueryRequest.QueryUnderstandingSpec.QueryRephraserSpec.max_rephrase_steps is greater than 1, use Answer.name to fetch answer information using ConversationalSearchService.GetAnswer API.

Parameter
Name Description
var Answer
Returns
Type Description
$this

getSession

Session resource object.

It will be only available when session field is set and valid in the AnswerQueryRequest request.

Returns
Type Description
Session|null

hasSession

clearSession

setSession

Session resource object.

It will be only available when session field is set and valid in the AnswerQueryRequest request.

Parameter
Name Description
var Session
Returns
Type Description
$this

getAnswerQueryToken

A global unique ID used for logging.

Returns
Type Description
string

setAnswerQueryToken

A global unique ID used for logging.

Parameter
Name Description
var string
Returns
Type Description
$this