Class: Google::Apis::ChatV1::CommonEventObject

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

Represents information about the user's client, such as locale, host app, and platform. For Chat apps, CommonEventObject includes data submitted by users interacting with cards, like data entered in dialogs.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CommonEventObject

Returns a new instance of CommonEventObject.



735
736
737
# File 'lib/google/apis/chat_v1/classes.rb', line 735

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

Instance Attribute Details

#form_inputsHash<String,Google::Apis::ChatV1::Inputs>

A map containing the values that a user inputs in a widget from a card or dialog. The map keys are the string IDs assigned to each widget, and the values represent inputs to the widget. For details, see Process information inputted by users. Corresponds to the JSON property formInputs

Returns:



694
695
696
# File 'lib/google/apis/chat_v1/classes.rb', line 694

def form_inputs
  @form_inputs
end

#host_appString

The hostApp enum which indicates the app the add-on is invoked from. Always CHAT for Chat apps. Corresponds to the JSON property hostApp

Returns:

  • (String)


700
701
702
# File 'lib/google/apis/chat_v1/classes.rb', line 700

def host_app
  @host_app
end

#invoked_functionString

Name of the invoked function associated with the widget. Only set for Chat apps. Corresponds to the JSON property invokedFunction

Returns:

  • (String)


706
707
708
# File 'lib/google/apis/chat_v1/classes.rb', line 706

def invoked_function
  @invoked_function
end

#parametersHash<String,String>

Custom parameters passed to the invoked function. Both keys and values must be strings. Corresponds to the JSON property parameters

Returns:

  • (Hash<String,String>)


712
713
714
# File 'lib/google/apis/chat_v1/classes.rb', line 712

def parameters
  @parameters
end

#platformString

The platform enum which indicates the platform where the event originates ( WEB, IOS, or ANDROID). Not supported by Chat apps. Corresponds to the JSON property platform

Returns:

  • (String)


718
719
720
# File 'lib/google/apis/chat_v1/classes.rb', line 718

def platform
  @platform
end

#time_zoneGoogle::Apis::ChatV1::TimeZone

The timezone ID and offset from Coordinated Universal Time (UTC). Only supported for the event types CARD_CLICKED and SUBMIT_DIALOG. Corresponds to the JSON property timeZone



727
728
729
# File 'lib/google/apis/chat_v1/classes.rb', line 727

def time_zone
  @time_zone
end

#user_localeString

The full locale.displayName in the format of [ISO 639 language code]-[ISO 3166 country/region code] such as "en-US". Corresponds to the JSON property userLocale

Returns:

  • (String)


733
734
735
# File 'lib/google/apis/chat_v1/classes.rb', line 733

def user_locale
  @user_locale
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



740
741
742
743
744
745
746
747
748
# File 'lib/google/apis/chat_v1/classes.rb', line 740

def update!(**args)
  @form_inputs = args[:form_inputs] if args.key?(:form_inputs)
  @host_app = args[:host_app] if args.key?(:host_app)
  @invoked_function = args[:invoked_function] if args.key?(:invoked_function)
  @parameters = args[:parameters] if args.key?(:parameters)
  @platform = args[:platform] if args.key?(:platform)
  @time_zone = args[:time_zone] if args.key?(:time_zone)
  @user_locale = args[:user_locale] if args.key?(:user_locale)
end