Class: Google::Apis::ChatV1::ImageButton
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::ImageButton
- Defined in:
- generated/google/apis/chat_v1/classes.rb,
generated/google/apis/chat_v1/representations.rb,
generated/google/apis/chat_v1/representations.rb
Overview
An image button with an onclick action.
Instance Attribute Summary collapse
-
#icon ⇒ String
The icon specified by an enum that indices to an icon provided by Chat API.
-
#icon_url ⇒ String
The icon specified by a URL.
-
#name ⇒ String
The name of this image_button which will be used for accessibility.
-
#on_click ⇒ Google::Apis::ChatV1::OnClick
An onclick action (e.g. open a link).
Instance Method Summary collapse
-
#initialize(**args) ⇒ ImageButton
constructor
A new instance of ImageButton.
-
#update!(**args) ⇒ Object
Update properties of this object.
Methods included from Google::Apis::Core::JsonObjectSupport
Methods included from Google::Apis::Core::Hashable
Constructor Details
#initialize(**args) ⇒ ImageButton
Returns a new instance of ImageButton
370 371 372 |
# File 'generated/google/apis/chat_v1/classes.rb', line 370 def initialize(**args) update!(**args) end |
Instance Attribute Details
#icon ⇒ String
The icon specified by an enum that indices to an icon provided by Chat
API.
Corresponds to the JSON property icon
352 353 354 |
# File 'generated/google/apis/chat_v1/classes.rb', line 352 def icon @icon end |
#icon_url ⇒ String
The icon specified by a URL.
Corresponds to the JSON property iconUrl
357 358 359 |
# File 'generated/google/apis/chat_v1/classes.rb', line 357 def icon_url @icon_url end |
#name ⇒ String
The name of this image_button which will be used for accessibility.
Default value will be provided if developers don't specify.
Corresponds to the JSON property name
363 364 365 |
# File 'generated/google/apis/chat_v1/classes.rb', line 363 def name @name end |
#on_click ⇒ Google::Apis::ChatV1::OnClick
An onclick action (e.g. open a link).
Corresponds to the JSON property onClick
368 369 370 |
# File 'generated/google/apis/chat_v1/classes.rb', line 368 def on_click @on_click end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
375 376 377 378 379 380 |
# File 'generated/google/apis/chat_v1/classes.rb', line 375 def update!(**args) @icon = args[:icon] if args.key?(:icon) @icon_url = args[:icon_url] if args.key?(:icon_url) @name = args[:name] if args.key?(:name) @on_click = args[:on_click] if args.key?(:on_click) end |