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 text and images.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ WidgetMarkup

Returns a new instance of WidgetMarkup.



5402
5403
5404
# File 'lib/google/apis/chat_v1/classes.rb', line 5402

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:



5380
5381
5382
# File 'lib/google/apis/chat_v1/classes.rb', line 5380

def buttons
  @buttons
end

#imageGoogle::Apis::ChatV1::Image

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



5385
5386
5387
# File 'lib/google/apis/chat_v1/classes.rb', line 5385

def image
  @image
end

#key_valueGoogle::Apis::ChatV1::KeyValue

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



5391
5392
5393
# File 'lib/google/apis/chat_v1/classes.rb', line 5391

def key_value
  @key_value
end

#text_paragraphGoogle::Apis::ChatV1::TextParagraph

A paragraph of text. Formatted text supported. For more information about formatting text, see Formatting text in Google Chat apps and Formatting text in Google Workspace Add-ons. Corresponds to the JSON property textParagraph



5400
5401
5402
# File 'lib/google/apis/chat_v1/classes.rb', line 5400

def text_paragraph
  @text_paragraph
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



5407
5408
5409
5410
5411
5412
# File 'lib/google/apis/chat_v1/classes.rb', line 5407

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