Google Chat V1 API - Class Google::Apps::Card::V1::DecoratedText (v0.8.0)

Reference documentation and code samples for the Google Chat V1 API class Google::Apps::Card::V1::DecoratedText.

A widget that displays text with optional decorations such as a label above or below the text, an icon in front of the text, a selection widget, or a button after the text. For an example in Google Chat apps, see Display text with decorative text.

Google Workspace Add-ons and Chat apps:

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#bottom_label

def bottom_label() -> ::String
Returns
  • (::String) — The text that appears below text. Always wraps.

#bottom_label=

def bottom_label=(value) -> ::String
Parameter
  • value (::String) — The text that appears below text. Always wraps.
Returns
  • (::String) — The text that appears below text. Always wraps.

#button

def button() -> ::Google::Apps::Card::V1::Button
Returns
  • (::Google::Apps::Card::V1::Button) — A button that a user can click to trigger an action.

    Note: The following fields are mutually exclusive: button, switch_control, end_icon. If a field in that set is populated, all other fields in the set will automatically be cleared.

#button=

def button=(value) -> ::Google::Apps::Card::V1::Button
Parameter
  • value (::Google::Apps::Card::V1::Button) — A button that a user can click to trigger an action.

    Note: The following fields are mutually exclusive: button, switch_control, end_icon. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Apps::Card::V1::Button) — A button that a user can click to trigger an action.

    Note: The following fields are mutually exclusive: button, switch_control, end_icon. If a field in that set is populated, all other fields in the set will automatically be cleared.

#end_icon

def end_icon() -> ::Google::Apps::Card::V1::Icon
Returns
  • (::Google::Apps::Card::V1::Icon) — An icon displayed after the text.

    Supports built-in and custom icons.

    Note: The following fields are mutually exclusive: end_icon, button, switch_control. If a field in that set is populated, all other fields in the set will automatically be cleared.

#end_icon=

def end_icon=(value) -> ::Google::Apps::Card::V1::Icon
Parameter
  • value (::Google::Apps::Card::V1::Icon) — An icon displayed after the text.

    Supports built-in and custom icons.

    Note: The following fields are mutually exclusive: end_icon, button, switch_control. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Apps::Card::V1::Icon) — An icon displayed after the text.

    Supports built-in and custom icons.

    Note: The following fields are mutually exclusive: end_icon, button, switch_control. If a field in that set is populated, all other fields in the set will automatically be cleared.

#icon

def icon() -> ::Google::Apps::Card::V1::Icon
Returns

#icon=

def icon=(value) -> ::Google::Apps::Card::V1::Icon
Parameter
Returns

#on_click

def on_click() -> ::Google::Apps::Card::V1::OnClick
Returns

#on_click=

def on_click=(value) -> ::Google::Apps::Card::V1::OnClick
Parameter
Returns

#start_icon

def start_icon() -> ::Google::Apps::Card::V1::Icon
Returns

#start_icon=

def start_icon=(value) -> ::Google::Apps::Card::V1::Icon
Parameter
Returns

#switch_control

def switch_control() -> ::Google::Apps::Card::V1::DecoratedText::SwitchControl
Returns
  • (::Google::Apps::Card::V1::DecoratedText::SwitchControl) — A switch widget that a user can click to change its state and trigger an action.

    Note: The following fields are mutually exclusive: switch_control, button, end_icon. If a field in that set is populated, all other fields in the set will automatically be cleared.

#switch_control=

def switch_control=(value) -> ::Google::Apps::Card::V1::DecoratedText::SwitchControl
Parameter
  • value (::Google::Apps::Card::V1::DecoratedText::SwitchControl) — A switch widget that a user can click to change its state and trigger an action.

    Note: The following fields are mutually exclusive: switch_control, button, end_icon. If a field in that set is populated, all other fields in the set will automatically be cleared.

Returns
  • (::Google::Apps::Card::V1::DecoratedText::SwitchControl) — A switch widget that a user can click to change its state and trigger an action.

    Note: The following fields are mutually exclusive: switch_control, button, end_icon. If a field in that set is populated, all other fields in the set will automatically be cleared.

#text

def text() -> ::String
Returns

#text=

def text=(value) -> ::String
Parameter
Returns

#top_label

def top_label() -> ::String
Returns
  • (::String) — The text that appears above text. Always truncates.

#top_label=

def top_label=(value) -> ::String
Parameter
  • value (::String) — The text that appears above text. Always truncates.
Returns
  • (::String) — The text that appears above text. Always truncates.

#wrap_text

def wrap_text() -> ::Boolean
Returns
  • (::Boolean) — The wrap text setting. If true, the text wraps and displays on multiple lines. Otherwise, the text is truncated.

    Only applies to text, not topLabel and bottomLabel.

#wrap_text=

def wrap_text=(value) -> ::Boolean
Parameter
  • value (::Boolean) — The wrap text setting. If true, the text wraps and displays on multiple lines. Otherwise, the text is truncated.

    Only applies to text, not topLabel and bottomLabel.

Returns
  • (::Boolean) — The wrap text setting. If true, the text wraps and displays on multiple lines. Otherwise, the text is truncated.

    Only applies to text, not topLabel and bottomLabel.