Google Cloud Dialogflow V2 Client - Class SearchKnowledgeAnswer (1.15.1)

Reference documentation and code samples for the Google Cloud Dialogflow V2 Client class SearchKnowledgeAnswer.

Represents a SearchKnowledge answer.

Generated from protobuf message google.cloud.dialogflow.v2.SearchKnowledgeAnswer

Namespace

Google \ Cloud \ Dialogflow \ V2

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ answer string

The piece of text from the knowledge base documents that answers the search query

↳ answer_type int

The type of the answer.

↳ answer_sources array<Google\Cloud\Dialogflow\V2\SearchKnowledgeAnswer\AnswerSource>

All sources used to generate the answer.

↳ answer_record string

The name of the answer record. Format: projects/<Project ID>/locations/<location ID>/answer Records/<Answer Record ID>

getAnswer

The piece of text from the knowledge base documents that answers the search query

Returns
Type Description
string

setAnswer

The piece of text from the knowledge base documents that answers the search query

Parameter
Name Description
var string
Returns
Type Description
$this

getAnswerType

The type of the answer.

Returns
Type Description
int

setAnswerType

The type of the answer.

Parameter
Name Description
var int
Returns
Type Description
$this

getAnswerSources

All sources used to generate the answer.

Returns
Type Description
Google\Protobuf\Internal\RepeatedField

setAnswerSources

All sources used to generate the answer.

Parameter
Name Description
var array<Google\Cloud\Dialogflow\V2\SearchKnowledgeAnswer\AnswerSource>
Returns
Type Description
$this

getAnswerRecord

The name of the answer record.

Format: projects/<Project ID>/locations/<location ID>/answer Records/<Answer Record ID>

Returns
Type Description
string

setAnswerRecord

The name of the answer record.

Format: projects/<Project ID>/locations/<location ID>/answer Records/<Answer Record ID>

Parameter
Name Description
var string
Returns
Type Description
$this