Class: Google::Apis::ChatV1::ImageButton

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

An image button with an onclick action.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ImageButton

Returns a new instance of ImageButton.



3358
3359
3360
# File 'lib/google/apis/chat_v1/classes.rb', line 3358

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

Instance Attribute Details

#iconString

The icon specified by an enum that indices to an icon provided by Chat API. Corresponds to the JSON property icon

Returns:

  • (String)


3340
3341
3342
# File 'lib/google/apis/chat_v1/classes.rb', line 3340

def icon
  @icon
end

#icon_urlString

The icon specified by a URL. Corresponds to the JSON property iconUrl

Returns:

  • (String)


3345
3346
3347
# File 'lib/google/apis/chat_v1/classes.rb', line 3345

def icon_url
  @icon_url
end

#nameString

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

Returns:

  • (String)


3351
3352
3353
# File 'lib/google/apis/chat_v1/classes.rb', line 3351

def name
  @name
end

#on_clickGoogle::Apis::ChatV1::OnClick

An onclick action (for example, open a link). Corresponds to the JSON property onClick



3356
3357
3358
# File 'lib/google/apis/chat_v1/classes.rb', line 3356

def on_click
  @on_click
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3363
3364
3365
3366
3367
3368
# File 'lib/google/apis/chat_v1/classes.rb', line 3363

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