Class: Google::Apis::ChatV1::Button

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

A button. Can be a text button or an image button.

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) ⇒ Button

Returns a new instance of Button.


221
222
223
# File 'generated/google/apis/chat_v1/classes.rb', line 221

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

Instance Attribute Details

#image_buttonGoogle::Apis::ChatV1::ImageButton

An image button with an onclick action. Corresponds to the JSON property imageButton


214
215
216
# File 'generated/google/apis/chat_v1/classes.rb', line 214

def image_button
  @image_button
end

#text_buttonGoogle::Apis::ChatV1::TextButton

A button with text and onclick action. Corresponds to the JSON property textButton


219
220
221
# File 'generated/google/apis/chat_v1/classes.rb', line 219

def text_button
  @text_button
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


226
227
228
229
# File 'generated/google/apis/chat_v1/classes.rb', line 226

def update!(**args)
  @image_button = args[:image_button] if args.key?(:image_button)
  @text_button = args[:text_button] if args.key?(:text_button)
end