Google Cloud Dialogflow V2 Client - Class SearchKnowledgeAnswer (1.11.0)

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
NameDescription
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
TypeDescription
string

setAnswer

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getAnswerType

The type of the answer.

Returns
TypeDescription
int

setAnswerType

The type of the answer.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getAnswerSources

All sources used to generate the answer.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setAnswerSources

All sources used to generate the answer.

Parameter
NameDescription
var array<Google\Cloud\Dialogflow\V2\SearchKnowledgeAnswer\AnswerSource>
Returns
TypeDescription
$this

getAnswerRecord

The name of the answer record.

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

Returns
TypeDescription
string

setAnswerRecord

The name of the answer record.

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this