Class: Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3QueryResult

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

Overview

Represents the result of a conversational query.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowCxV3QueryResult

Returns a new instance of GoogleCloudDialogflowCxV3QueryResult.



5702
5703
5704
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5702

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

Instance Attribute Details

#advanced_settingsGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3AdvancedSettings

Hierarchical advanced settings for agent/flow/page/fulfillment/parameter. Settings exposed at lower level overrides the settings exposed at higher level. Overriding occurs at the sub-setting level. For example, the playback_interruption_settings at fulfillment level only overrides the playback_interruption_settings at the agent level, leaving other settings at the agent level unchanged. DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Hierarchy: Agent->Flow->Page->Fulfillment/Parameter. Corresponds to the JSON property advancedSettings



5528
5529
5530
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5528

def advanced_settings
  @advanced_settings
end

#allow_answer_feedbackBoolean Also known as: allow_answer_feedback?

Indicates whether the Thumbs up/Thumbs down rating controls are need to be shown for the response in the Dialogflow Messenger widget. Corresponds to the JSON property allowAnswerFeedback

Returns:

  • (Boolean)


5534
5535
5536
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5534

def allow_answer_feedback
  @allow_answer_feedback
end

#current_flowGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3Flow

Flows represents the conversation flows when you build your chatbot agent. A flow consists of many pages connected by the transition routes. Conversations always start with the built-in Start Flow (with an all-0 ID). Transition routes can direct the conversation session from the current flow (parent flow) to another flow (sub flow). When the sub flow is finished, Dialogflow will bring the session back to the parent flow, where the sub flow is started. Usually, when a transition route is followed by a matched intent, the intent will be "consumed". This means the intent won't activate more transition routes. However, when the followed transition route moves the conversation session into a different flow, the matched intent can be carried over and to be consumed in the target flow. Corresponds to the JSON property currentFlow



5550
5551
5552
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5550

def current_flow
  @current_flow
end

#current_pageGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3Page

A Dialogflow CX conversation (session) can be described and visualized as a state machine. The states of a CX session are represented by pages. For each flow, you define many pages, where your combined pages can handle a complete conversation on the topics the flow is designed for. At any given moment, exactly one page is the current page, the current page is considered active, and the flow associated with that page is considered active. Every flow has a special start page. When a flow initially becomes active, the start page page becomes the current page. For each conversational turn, the current page will either stay the same or transition to another page. You configure each page to collect information from the end-user that is relevant for the conversational state represented by the page. For more information, see the Page guide. Corresponds to the JSON property currentPage



5566
5567
5568
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5566

def current_page
  @current_page
end

#diagnostic_infoHash<String,Object>

The free-form diagnostic info. For example, this field could contain webhook call latency. The fields of this data can change without notice, so you should not write code that depends on its structure. One of the fields is called " Alternative Matched Intents", which may aid with debugging. The following describes these intent results: - The list is empty if no intent was matched to end-user input. - Only intents that are referenced in the currently active flow are included. - The matched intent is included. - Other intents that could have matched end-user input, but did not match because they are referenced by intent routes that are out of scope, are included. - Other intents referenced by intent routes in scope that matched end-user input, but had a lower confidence score. Corresponds to the JSON property diagnosticInfo

Returns:

  • (Hash<String,Object>)


5582
5583
5584
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5582

def diagnostic_info
  @diagnostic_info
end

#dtmfGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3DtmfInput

Represents the input for dtmf event. Corresponds to the JSON property dtmf



5587
5588
5589
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5587

def dtmf
  @dtmf
end

#intentGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3Intent

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



5595
5596
5597
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5595

def intent
  @intent
end

#intent_detection_confidenceFloat

The intent detection confidence. 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. This field is deprecated, please use QueryResult.match instead. Corresponds to the JSON property intentDetectionConfidence

Returns:

  • (Float)


5605
5606
5607
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5605

def intent_detection_confidence
  @intent_detection_confidence
end

#language_codeString

The language that was triggered during intent detection. See Language Support for a list of the currently supported language codes. Corresponds to the JSON property languageCode

Returns:

  • (String)


5612
5613
5614
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5612

def language_code
  @language_code
end

#matchGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3Match

Represents one match result of MatchIntent. Corresponds to the JSON property match



5617
5618
5619
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5617

def match
  @match
end

#parametersHash<String,Object>

The collected session parameters. 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>)


5630
5631
5632
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5630

def parameters
  @parameters
end

#response_messagesArray<Google::Apis::DialogflowV3::GoogleCloudDialogflowCxV3ResponseMessage>

The list of rich messages returned to the client. Responses vary from simple text messages to more sophisticated, structured payloads used to drive complex logic. Corresponds to the JSON property responseMessages



5637
5638
5639
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5637

def response_messages
  @response_messages
end

#sentiment_analysis_resultGoogle::Apis::DialogflowV3::GoogleCloudDialogflowCxV3SentimentAnalysisResult

The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user's attitude as positive, negative, or neutral. Corresponds to the JSON property sentimentAnalysisResult



5644
5645
5646
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5644

def sentiment_analysis_result
  @sentiment_analysis_result
end

#textString

If natural language text was provided as input, this field will contain a copy of the text. Corresponds to the JSON property text

Returns:

  • (String)


5650
5651
5652
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5650

def text
  @text
end

#transcriptString

If natural language speech audio was provided as input, this field will contain the transcript for the audio. Corresponds to the JSON property transcript

Returns:

  • (String)


5656
5657
5658
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5656

def transcript
  @transcript
end

#trigger_eventString

If an event was provided as input, this field will contain the name of the event. Corresponds to the JSON property triggerEvent

Returns:

  • (String)


5662
5663
5664
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5662

def trigger_event
  @trigger_event
end

#trigger_intentString

If an intent was provided as input, this field will contain a copy of the intent identifier. Format: projects//locations//agents//intents/. Corresponds to the JSON property triggerIntent

Returns:

  • (String)


5668
5669
5670
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5668

def trigger_intent
  @trigger_intent
end

#webhook_display_namesArray<String>

The list of webhook display names in the order of call sequence. Corresponds to the JSON property webhookDisplayNames

Returns:

  • (Array<String>)


5673
5674
5675
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5673

def webhook_display_names
  @webhook_display_names
end

#webhook_idsArray<String>

The list of webhook ids in the order of call sequence. Corresponds to the JSON property webhookIds

Returns:

  • (Array<String>)


5678
5679
5680
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5678

def webhook_ids
  @webhook_ids
end

#webhook_latenciesArray<String>

The list of webhook latencies in the order of call sequence. Corresponds to the JSON property webhookLatencies

Returns:

  • (Array<String>)


5683
5684
5685
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5683

def webhook_latencies
  @webhook_latencies
end

#webhook_payloadsArray<Hash<String,Object>>

The list of webhook payload in WebhookResponse.payload, in the order of call sequence. If some webhook call fails or doesn't return any payload, an empty Struct would be used instead. Corresponds to the JSON property webhookPayloads

Returns:

  • (Array<Hash<String,Object>>)


5690
5691
5692
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5690

def webhook_payloads
  @webhook_payloads
end

#webhook_statusesArray<Google::Apis::DialogflowV3::GoogleRpcStatus>

The list of webhook call status in the order of call sequence. Corresponds to the JSON property webhookStatuses



5695
5696
5697
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5695

def webhook_statuses
  @webhook_statuses
end

#webhook_tagsArray<String>

The list of webhook tags in the order of call sequence. Corresponds to the JSON property webhookTags

Returns:

  • (Array<String>)


5700
5701
5702
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5700

def webhook_tags
  @webhook_tags
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
# File 'lib/google/apis/dialogflow_v3/classes.rb', line 5707

def update!(**args)
  @advanced_settings = args[:advanced_settings] if args.key?(:advanced_settings)
  @allow_answer_feedback = args[:allow_answer_feedback] if args.key?(:allow_answer_feedback)
  @current_flow = args[:current_flow] if args.key?(:current_flow)
  @current_page = args[:current_page] if args.key?(:current_page)
  @diagnostic_info = args[:diagnostic_info] if args.key?(:diagnostic_info)
  @dtmf = args[:dtmf] if args.key?(:dtmf)
  @intent = args[:intent] if args.key?(:intent)
  @intent_detection_confidence = args[:intent_detection_confidence] if args.key?(:intent_detection_confidence)
  @language_code = args[:language_code] if args.key?(:language_code)
  @match = args[:match] if args.key?(:match)
  @parameters = args[:parameters] if args.key?(:parameters)
  @response_messages = args[:response_messages] if args.key?(:response_messages)
  @sentiment_analysis_result = args[:sentiment_analysis_result] if args.key?(:sentiment_analysis_result)
  @text = args[:text] if args.key?(:text)
  @transcript = args[:transcript] if args.key?(:transcript)
  @trigger_event = args[:trigger_event] if args.key?(:trigger_event)
  @trigger_intent = args[:trigger_intent] if args.key?(:trigger_intent)
  @webhook_display_names = args[:webhook_display_names] if args.key?(:webhook_display_names)
  @webhook_ids = args[:webhook_ids] if args.key?(:webhook_ids)
  @webhook_latencies = args[:webhook_latencies] if args.key?(:webhook_latencies)
  @webhook_payloads = args[:webhook_payloads] if args.key?(:webhook_payloads)
  @webhook_statuses = args[:webhook_statuses] if args.key?(:webhook_statuses)
  @webhook_tags = args[:webhook_tags] if args.key?(:webhook_tags)
end