Class: Google::Apis::ChatV1::ImageButton
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::ImageButton
- 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
An image button with an onclick action.
Instance Attribute Summary collapse
-
#icon ⇒ String
The icon specified by an
enumthat indices to an icon provided by Chat API. -
#icon_url ⇒ String
The icon specified by a URL.
-
#name ⇒ String
The name of this
image_buttonthat's used for accessibility. -
#on_click ⇒ Google::Apis::ChatV1::OnClick
An
onclickaction (for example, open a link).
Instance Method Summary collapse
-
#initialize(**args) ⇒ ImageButton
constructor
A new instance of ImageButton.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ImageButton
Returns a new instance of ImageButton.
3619 3620 3621 |
# File 'lib/google/apis/chat_v1/classes.rb', line 3619 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
3601 3602 3603 |
# File 'lib/google/apis/chat_v1/classes.rb', line 3601 def icon @icon end |
#icon_url ⇒ String
The icon specified by a URL.
Corresponds to the JSON property iconUrl
3606 3607 3608 |
# File 'lib/google/apis/chat_v1/classes.rb', line 3606 def icon_url @icon_url end |
#name ⇒ String
The name of this image_button that's used for accessibility. Default value
is provided if this name isn't specified.
Corresponds to the JSON property name
3612 3613 3614 |
# File 'lib/google/apis/chat_v1/classes.rb', line 3612 def name @name end |
#on_click ⇒ Google::Apis::ChatV1::OnClick
An onclick action (for example, open a link).
Corresponds to the JSON property onClick
3617 3618 3619 |
# File 'lib/google/apis/chat_v1/classes.rb', line 3617 def on_click @on_click end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3624 3625 3626 3627 3628 3629 |
# File 'lib/google/apis/chat_v1/classes.rb', line 3624 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 |