Google Cloud Dialogflow Cx V3 Client - Class PBMatch (0.4.0)

Reference documentation and code samples for the Google Cloud Dialogflow Cx V3 Client class PBMatch.

Represents one match result of MatchIntent.

Generated from protobuf message google.cloud.dialogflow.cx.v3.Match

Namespace

Google \ Cloud \ Dialogflow \ Cx \ V3

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ intent Google\Cloud\Dialogflow\Cx\V3\Intent

The Intent that matched the query. Some, not all fields are filled in this message, including but not limited to: name and display_name. Only filled for INTENT match type.

↳ event string

The event that matched the query. Filled for EVENT, NO_MATCH and NO_INPUT match types.

↳ parameters Google\Protobuf\Struct

The collection of parameters extracted from the query. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.

↳ resolved_input string

Final text input which was matched during MatchIntent. This value can be different from original input sent in request because of spelling correction or other processing.

↳ match_type int

Type of this Match.

↳ confidence float

The confidence of this match. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation.

getIntent

The Intent that matched the query.

Some, not all fields are filled in this message, including but not limited to: name and display_name. Only filled for INTENT match type.

Returns
Type Description
Google\Cloud\Dialogflow\Cx\V3\Intent|null

hasIntent

clearIntent

setIntent

The Intent that matched the query.

Some, not all fields are filled in this message, including but not limited to: name and display_name. Only filled for INTENT match type.

Parameter
Name Description
var Google\Cloud\Dialogflow\Cx\V3\Intent
Returns
Type Description
$this

getEvent

The event that matched the query. Filled for EVENT, NO_MATCH and NO_INPUT match types.

Returns
Type Description
string

setEvent

The event that matched the query. Filled for EVENT, NO_MATCH and NO_INPUT match types.

Parameter
Name Description
var string
Returns
Type Description
$this

getParameters

The collection of parameters extracted from the query.

Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs:

  • MapKey type: string
  • MapKey value: parameter name
  • MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map.
  • MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
Returns
Type Description
Google\Protobuf\Struct|null

hasParameters

clearParameters

setParameters

The collection of parameters extracted from the query.

Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs:

  • MapKey type: string
  • MapKey value: parameter name
  • MapValue type: If parameter's entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map.
  • MapValue value: If parameter's entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
Parameter
Name Description
var Google\Protobuf\Struct
Returns
Type Description
$this

getResolvedInput

Final text input which was matched during MatchIntent. This value can be different from original input sent in request because of spelling correction or other processing.

Returns
Type Description
string

setResolvedInput

Final text input which was matched during MatchIntent. This value can be different from original input sent in request because of spelling correction or other processing.

Parameter
Name Description
var string
Returns
Type Description
$this

getMatchType

Type of this Match.

Returns
Type Description
int

setMatchType

Type of this Match.

Parameter
Name Description
var int
Returns
Type Description
$this

getConfidence

The confidence of this match. Values range from 0.0 (completely uncertain) to 1.0 (completely certain).

This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation.

Returns
Type Description
float

setConfidence

The confidence of this match. Values range from 0.0 (completely uncertain) to 1.0 (completely certain).

This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation.

Parameter
Name Description
var float
Returns
Type Description
$this