Class: Google::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1Match

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/dialogflow_v3beta1/classes.rb,
lib/google/apis/dialogflow_v3beta1/representations.rb,
lib/google/apis/dialogflow_v3beta1/representations.rb

Overview

Represents one match result of MatchIntent.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowCxV3beta1Match

Returns a new instance of GoogleCloudDialogflowCxV3beta1Match.



8555
8556
8557
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8555

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#confidenceFloat

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. Corresponds to the JSON property confidence

Returns:

  • (Float)


8514
8515
8516
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8514

def confidence
  @confidence
end

#eventString

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

Returns:

  • (String)


8520
8521
8522
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8520

def event
  @event
end

#intentGoogle::Apis::DialogflowV3beta1::GoogleCloudDialogflowCxV3beta1Intent

An intent represents a user's intent to interact with a conversational agent. You can provide information for the Dialogflow API to use to match user input to an intent by adding training phrases (i.e., examples of user input) to your intent. Corresponds to the JSON property intent



8528
8529
8530
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8528

def intent
  @intent
end

#match_typeString

Type of this Match. Corresponds to the JSON property matchType

Returns:

  • (String)


8533
8534
8535
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8533

def match_type
  @match_type
end

#parametersHash<String,Object>

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. Corresponds to the JSON property parameters

Returns:

  • (Hash<String,Object>)


8546
8547
8548
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8546

def parameters
  @parameters
end

#resolved_inputString

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. Corresponds to the JSON property resolvedInput

Returns:

  • (String)


8553
8554
8555
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8553

def resolved_input
  @resolved_input
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8560
8561
8562
8563
8564
8565
8566
8567
# File 'lib/google/apis/dialogflow_v3beta1/classes.rb', line 8560

def update!(**args)
  @confidence = args[:confidence] if args.key?(:confidence)
  @event = args[:event] if args.key?(:event)
  @intent = args[:intent] if args.key?(:intent)
  @match_type = args[:match_type] if args.key?(:match_type)
  @parameters = args[:parameters] if args.key?(:parameters)
  @resolved_input = args[:resolved_input] if args.key?(:resolved_input)
end