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

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 widget is a UI element that presents texts, images, etc.

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

Returns a new instance of WidgetMarkup.


1091
1092
1093
# File 'generated/google/apis/chat_v1/classes.rb', line 1091

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:


1073
1074
1075
# File 'generated/google/apis/chat_v1/classes.rb', line 1073

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


1078
1079
1080
# File 'generated/google/apis/chat_v1/classes.rb', line 1078

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


1084
1085
1086
# File 'generated/google/apis/chat_v1/classes.rb', line 1084

def key_value
  @key_value
end

#text_paragraphGoogle::Apis::ChatV1::TextParagraph

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


1089
1090
1091
# File 'generated/google/apis/chat_v1/classes.rb', line 1089

def text_paragraph
  @text_paragraph
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


1096
1097
1098
1099
1100
1101
# File 'generated/google/apis/chat_v1/classes.rb', line 1096

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