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

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
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

Instance Method Summary collapse

Methods included from Google::Apis::Core::JsonObjectSupport

#to_json

Methods included from Google::Apis::Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ImageButton

Returns a new instance of ImageButton



446
447
448
# File 'generated/google/apis/chat_v1/classes.rb', line 446

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)


428
429
430
# File 'generated/google/apis/chat_v1/classes.rb', line 428

def icon
  @icon
end

#icon_urlString

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

Returns:

  • (String)


433
434
435
# File 'generated/google/apis/chat_v1/classes.rb', line 433

def icon_url
  @icon_url
end

#nameString

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

Returns:

  • (String)


439
440
441
# File 'generated/google/apis/chat_v1/classes.rb', line 439

def name
  @name
end

#on_clickGoogle::Apis::ChatV1::OnClick

An onclick action (e.g. open a link). Corresponds to the JSON property onClick



444
445
446
# File 'generated/google/apis/chat_v1/classes.rb', line 444

def on_click
  @on_click
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



451
452
453
454
455
456
# File 'generated/google/apis/chat_v1/classes.rb', line 451

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