Class: Google::Apis::DialogflowV2beta1::QueryInput

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

Overview

Represents the query input. It can contain either:

  1. an audio config which instructs the speech recognizer how to process the speech audio,
  2. a conversational query in the form of text, or
  3. an event that specifies which intent to trigger.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ QueryInput

Returns a new instance of QueryInput



2032
2033
2034
# File 'generated/google/apis/dialogflow_v2beta1/classes.rb', line 2032

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

Instance Attribute Details

#audio_configGoogle::Apis::DialogflowV2beta1::InputAudioConfig

Instructs the speech recognizer how to process the audio content. Corresponds to the JSON property audioConfig



2016
2017
2018
# File 'generated/google/apis/dialogflow_v2beta1/classes.rb', line 2016

def audio_config
  @audio_config
end

#eventGoogle::Apis::DialogflowV2beta1::EventInput

Events allow for matching intents by event name instead of the natural language input. For instance, input <event: name: “welcome_event”, parameters: name: “Sam” > can trigger a personalized welcome response. The parameter name may be used by the agent in the response: “Hello #welcome_event.name! What can I do for you today?”. Corresponds to the JSON property event



2025
2026
2027
# File 'generated/google/apis/dialogflow_v2beta1/classes.rb', line 2025

def event
  @event
end

#textGoogle::Apis::DialogflowV2beta1::TextInput

Represents the natural language text to be processed. Corresponds to the JSON property text



2030
2031
2032
# File 'generated/google/apis/dialogflow_v2beta1/classes.rb', line 2030

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2037
2038
2039
2040
2041
# File 'generated/google/apis/dialogflow_v2beta1/classes.rb', line 2037

def update!(**args)
  @audio_config = args[:audio_config] if args.key?(:audio_config)
  @event = args[:event] if args.key?(:event)
  @text = args[:text] if args.key?(:text)
end