Class: Google::Apis::DialogflowV2::GoogleCloudDialogflowV2EventInput

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

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?”.

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) ⇒ GoogleCloudDialogflowV2EventInput

Returns a new instance of GoogleCloudDialogflowV2EventInput



653
654
655
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 653

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

Instance Attribute Details

#language_codeString

Required. The language of this query. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. Corresponds to the JSON property languageCode

Returns:

  • (String)


641
642
643
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 641

def language_code
  @language_code
end

#nameString

Required. The unique identifier of the event. Corresponds to the JSON property name

Returns:

  • (String)


646
647
648
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 646

def name
  @name
end

#parametersHash<String,Object>

Optional. The collection of parameters associated with the event. Corresponds to the JSON property parameters

Returns:

  • (Hash<String,Object>)


651
652
653
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 651

def parameters
  @parameters
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



658
659
660
661
662
# File 'generated/google/apis/dialogflow_v2/classes.rb', line 658

def update!(**args)
  @language_code = args[:language_code] if args.key?(:language_code)
  @name = args[:name] if args.key?(:name)
  @parameters = args[:parameters] if args.key?(:parameters)
end