Class: Google::Apis::ChatV1::WidgetMarkup

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

A widget is a UI element that presents texts, images, etc.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ WidgetMarkup

Returns a new instance of WidgetMarkup.



3388
3389
3390
# File 'lib/google/apis/chat_v1/classes.rb', line 3388

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

Instance Attribute Details

#buttonsArray<Google::Apis::ChatV1::Button>

A list of buttons. Buttons is also oneof data and only one of these fields should be set. Corresponds to the JSON property buttons

Returns:



3370
3371
3372
# File 'lib/google/apis/chat_v1/classes.rb', line 3370

def buttons
  @buttons
end

#imageGoogle::Apis::ChatV1::Image

An image that is specified by a URL and can have an onclick action. Corresponds to the JSON property image



3375
3376
3377
# File 'lib/google/apis/chat_v1/classes.rb', line 3375

def image
  @image
end

#key_valueGoogle::Apis::ChatV1::KeyValue

A UI element contains a key (label) and a value (content). And this element may also contain some actions such as onclick button. Corresponds to the JSON property keyValue



3381
3382
3383
# File 'lib/google/apis/chat_v1/classes.rb', line 3381

def key_value
  @key_value
end

#text_paragraphGoogle::Apis::ChatV1::TextParagraph

A paragraph of text. Formatted text supported. Corresponds to the JSON property textParagraph



3386
3387
3388
# File 'lib/google/apis/chat_v1/classes.rb', line 3386

def text_paragraph
  @text_paragraph
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3393
3394
3395
3396
3397
3398
# File 'lib/google/apis/chat_v1/classes.rb', line 3393

def update!(**args)
  @buttons = args[:buttons] if args.key?(:buttons)
  @image = args[:image] if args.key?(:image)
  @key_value = args[:key_value] if args.key?(:key_value)
  @text_paragraph = args[:text_paragraph] if args.key?(:text_paragraph)
end