Class: Google::Apis::ChatV1::CommonEventObject
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::CommonEventObject
- 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
-
#form_inputs ⇒ Hash<String,Google::Apis::ChatV1::Inputs>
A map containing the current values of the widgets in a card.
-
#host_app ⇒ String
The hostApp enum which indicates the app the add-on is invoked from.
-
#invoked_function ⇒ String
Name of the invoked function associated with the widget.
-
#parameters ⇒ Hash<String,String>
Custom parameters passed to the invoked function.
-
#platform ⇒ String
The platform enum which indicates the platform where the event originates (
WEB,IOS, orANDROID). -
#time_zone ⇒ Google::Apis::ChatV1::TimeZone
The timezone ID and offset from Coordinated Universal Time (UTC).
-
#user_locale ⇒ String
The full
locale.displayNamein the format of [ISO 639 language code]-[ISO 3166 country/region code] such as "en-US".
Instance Method Summary collapse
-
#initialize(**args) ⇒ CommonEventObject
constructor
A new instance of CommonEventObject.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ CommonEventObject
Returns a new instance of CommonEventObject.
603 604 605 |
# File 'lib/google/apis/chat_v1/classes.rb', line 603 def initialize(**args) update!(**args) end |
Instance Attribute Details
#form_inputs ⇒ Hash<String,Google::Apis::ChatV1::Inputs>
A map containing the current values of the widgets in a card. The map keys are
the string IDs assigned to each widget, and the values represent inputs to the
widget. Depending on the input data type, a different object represents each
input: For single-value widgets, StringInput. For multi-value widgets, an
array of StringInput objects. For a date-time picker, a DateTimeInput. For
a date-only picker, a DateInput. For a time-only picker, a TimeInput.
Corresponds with the data entered by a user on a card in a dialog.
Corresponds to the JSON property formInputs
565 566 567 |
# File 'lib/google/apis/chat_v1/classes.rb', line 565 def form_inputs @form_inputs end |
#host_app ⇒ String
The hostApp enum which indicates the app the add-on is invoked from. Always
CHAT for Chat apps.
Corresponds to the JSON property hostApp
571 572 573 |
# File 'lib/google/apis/chat_v1/classes.rb', line 571 def host_app @host_app end |
#invoked_function ⇒ String
Name of the invoked function associated with the widget. Only set for Chat
apps.
Corresponds to the JSON property invokedFunction
577 578 579 |
# File 'lib/google/apis/chat_v1/classes.rb', line 577 def invoked_function @invoked_function end |
#parameters ⇒ Hash<String,String>
Custom parameters passed
to the invoked function. Both keys and values must be strings.
Corresponds to the JSON property parameters
583 584 585 |
# File 'lib/google/apis/chat_v1/classes.rb', line 583 def parameters @parameters end |
#platform ⇒ String
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
589 590 591 |
# File 'lib/google/apis/chat_v1/classes.rb', line 589 def platform @platform end |
#time_zone ⇒ Google::Apis::ChatV1::TimeZone
The timezone ID and offset from Coordinated Universal Time (UTC). Not
supported by Chat apps.
Corresponds to the JSON property timeZone
595 596 597 |
# File 'lib/google/apis/chat_v1/classes.rb', line 595 def time_zone @time_zone end |
#user_locale ⇒ String
The full locale.displayName in the format of [ISO 639 language code]-[ISO
3166 country/region code] such as "en-US". Not supported by Chat apps.
Corresponds to the JSON property userLocale
601 602 603 |
# File 'lib/google/apis/chat_v1/classes.rb', line 601 def user_locale @user_locale end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
608 609 610 611 612 613 614 615 616 |
# File 'lib/google/apis/chat_v1/classes.rb', line 608 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 |