Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2QueryInput

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/dialogflow_v2/classes.rb,
generated/google/apis/dialogflow_v2/representations.rb,
generated/google/apis/dialogflow_v2/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,. 3. An event that specifies which intent to trigger.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudDialogflowV2QueryInput

Returns a new instance of GoogleCloudDialogflowV2QueryInput.



7346
7347
7348
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 7346

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

Instance Attribute Details

#audio_configGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2InputAudioConfig

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



7331
7332
7333
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 7331

def audio_config
  @audio_config
end

#eventGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2EventInput

Events allow for matching intents by event name instead of the natural language input. For instance, input `can trigger a personalized welcome response. The parameternamemay be used by the agent in the response:" Hello #welcome_event.name! What can I do for you today?". Corresponds to the JSON propertyevent`



7339
7340
7341
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 7339

def event
  @event
end

#textGoogle::Apis::DialogflowV2::GoogleCloudDialogflowV2TextInput

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



7344
7345
7346
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 7344

def text
  @text
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



7351
7352
7353
7354
7355
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 7351

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