Class: Google::Apis::ChatV1::FormAction

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

Overview

A form action describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ FormAction

Returns a new instance of FormAction.



841
842
843
# File 'lib/google/apis/chat_v1/classes.rb', line 841

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

Instance Attribute Details

#action_method_nameString

The method name is used to identify which part of the form triggered the form submission. This information is echoed back to the bot as part of the card click event. The same method name can be used for several elements that trigger a common behavior if desired. Corresponds to the JSON property actionMethodName

Returns:

  • (String)


834
835
836
# File 'lib/google/apis/chat_v1/classes.rb', line 834

def action_method_name
  @action_method_name
end

#parametersArray<Google::Apis::ChatV1::ActionParameter>

List of action parameters. Corresponds to the JSON property parameters



839
840
841
# File 'lib/google/apis/chat_v1/classes.rb', line 839

def parameters
  @parameters
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



846
847
848
849
# File 'lib/google/apis/chat_v1/classes.rb', line 846

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