Class: Google::Apis::CloudsearchV1::GoogleChatV1WidgetMarkup

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudsearch_v1/classes.rb,
lib/google/apis/cloudsearch_v1/representations.rb,
lib/google/apis/cloudsearch_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) ⇒ GoogleChatV1WidgetMarkup

Returns a new instance of GoogleChatV1WidgetMarkup.



8489
8490
8491
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8489

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

Instance Attribute Details

#buttonsArray<Google::Apis::CloudsearchV1::GoogleChatV1WidgetMarkupButton>

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



8471
8472
8473
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8471

def buttons
  @buttons
end

#imageGoogle::Apis::CloudsearchV1::GoogleChatV1WidgetMarkupImage

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



8476
8477
8478
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8476

def image
  @image
end

#key_valueGoogle::Apis::CloudsearchV1::GoogleChatV1WidgetMarkupKeyValue

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



8482
8483
8484
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8482

def key_value
  @key_value
end

#text_paragraphGoogle::Apis::CloudsearchV1::GoogleChatV1WidgetMarkupTextParagraph

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



8487
8488
8489
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8487

def text_paragraph
  @text_paragraph
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



8494
8495
8496
8497
8498
8499
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 8494

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