Google Cloud Dialogflow V2 Client - Class SearchContext (2.5.0)

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

Search context is information useful for knowledge search that helps enrich the query.

Example: search_context { key: "application name" value: "DesignApp" }

Generated from protobuf message google.cloud.dialogflow.v2.KnowledgeAssistAnswer.SuggestedQuery.SearchContext

Namespace

Google \ Cloud \ Dialogflow \ V2 \ KnowledgeAssistAnswer \ SuggestedQuery

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ key string

Optional. The key of the search context, e.g. "application name".

↳ value string

Optional. The value of the search context, e.g. "DesignApp".

getKey

Optional. The key of the search context, e.g. "application name".

Returns
Type Description
string

setKey

Optional. The key of the search context, e.g. "application name".

Parameter
Name Description
var string
Returns
Type Description
$this

getValue

Optional. The value of the search context, e.g. "DesignApp".

Returns
Type Description
string

setValue

Optional. The value of the search context, e.g. "DesignApp".

Parameter
Name Description
var string
Returns
Type Description
$this