Class: Google::Apis::ChatV1::Button
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::Button
- 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 button. Can be a text button or an image button.
Instance Attribute Summary collapse
-
#image_button ⇒ Google::Apis::ChatV1::ImageButton
An image button with an
onclick
action. -
#text_button ⇒ Google::Apis::ChatV1::TextButton
A button with text and
onclick
action.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Button
constructor
A new instance of Button.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Button
Returns a new instance of Button.
364 365 366 |
# File 'lib/google/apis/chat_v1/classes.rb', line 364 def initialize(**args) update!(**args) end |
Instance Attribute Details
#image_button ⇒ Google::Apis::ChatV1::ImageButton
An image button with an onclick
action.
Corresponds to the JSON property imageButton
357 358 359 |
# File 'lib/google/apis/chat_v1/classes.rb', line 357 def @image_button end |
#text_button ⇒ Google::Apis::ChatV1::TextButton
A button with text and onclick
action.
Corresponds to the JSON property textButton
362 363 364 |
# File 'lib/google/apis/chat_v1/classes.rb', line 362 def @text_button end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
369 370 371 372 |
# File 'lib/google/apis/chat_v1/classes.rb', line 369 def update!(**args) @image_button = args[:image_button] if args.key?(:image_button) @text_button = args[:text_button] if args.key?(:text_button) end |