Class: Google::Apis::ChatV1::KeyValue

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 UI element contains a key (label) and a value (content). This element can also contain some actions such as onclick button.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ KeyValue

Returns a new instance of KeyValue.



2851
2852
2853
# File 'lib/google/apis/chat_v1/classes.rb', line 2851

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

Instance Attribute Details

#bottom_labelString

The text of the bottom label. 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 bottomLabel

Returns:

  • (String)


2804
2805
2806
# File 'lib/google/apis/chat_v1/classes.rb', line 2804

def bottom_label
  @bottom_label
end

#buttonGoogle::Apis::ChatV1::Button

A button. Can be a text button or an image button. Corresponds to the JSON property button



2809
2810
2811
# File 'lib/google/apis/chat_v1/classes.rb', line 2809

def button
  @button
end

#contentString

The text of the content. Formatted text supported and always required. 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 content

Returns:

  • (String)


2818
2819
2820
# File 'lib/google/apis/chat_v1/classes.rb', line 2818

def content
  @content
end

#content_multilineBoolean Also known as: content_multiline?

If the content should be multiline. Corresponds to the JSON property contentMultiline

Returns:

  • (Boolean)


2823
2824
2825
# File 'lib/google/apis/chat_v1/classes.rb', line 2823

def content_multiline
  @content_multiline
end

#iconString

An enum value that's replaced by the Chat API with the corresponding icon image. Corresponds to the JSON property icon

Returns:

  • (String)


2830
2831
2832
# File 'lib/google/apis/chat_v1/classes.rb', line 2830

def icon
  @icon
end

#icon_urlString

The icon specified by a URL. Corresponds to the JSON property iconUrl

Returns:

  • (String)


2835
2836
2837
# File 'lib/google/apis/chat_v1/classes.rb', line 2835

def icon_url
  @icon_url
end

#on_clickGoogle::Apis::ChatV1::OnClick

An onclick action (for example, open a link). Corresponds to the JSON property onClick



2840
2841
2842
# File 'lib/google/apis/chat_v1/classes.rb', line 2840

def on_click
  @on_click
end

#top_labelString

The text of the top label. 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 topLabel

Returns:

  • (String)


2849
2850
2851
# File 'lib/google/apis/chat_v1/classes.rb', line 2849

def top_label
  @top_label
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
# File 'lib/google/apis/chat_v1/classes.rb', line 2856

def update!(**args)
  @bottom_label = args[:bottom_label] if args.key?(:bottom_label)
  @button = args[:button] if args.key?(:button)
  @content = args[:content] if args.key?(:content)
  @content_multiline = args[:content_multiline] if args.key?(:content_multiline)
  @icon = args[:icon] if args.key?(:icon)
  @icon_url = args[:icon_url] if args.key?(:icon_url)
  @on_click = args[:on_click] if args.key?(:on_click)
  @top_label = args[:top_label] if args.key?(:top_label)
end