Google Chat V1 API - Class Google::Apps::Card::V1::Chip (v0.18.0)

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

A text, icon, or text and icon chip that users can click.

Google Workspace add-ons and Chat apps:

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#alt_text

def alt_text() -> ::String
Returns
  • (::String) — The alternative text that's used for accessibility.

    Set descriptive text that lets users know what the chip does. For example, if a chip opens a hyperlink, write: "Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat".

#alt_text=

def alt_text=(value) -> ::String
Parameter
  • value (::String) — The alternative text that's used for accessibility.

    Set descriptive text that lets users know what the chip does. For example, if a chip opens a hyperlink, write: "Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat".

Returns
  • (::String) — The alternative text that's used for accessibility.

    Set descriptive text that lets users know what the chip does. For example, if a chip opens a hyperlink, write: "Opens a new browser tab and navigates to the Google Chat developer documentation at https://developers.google.com/workspace/chat".

#disabled

def disabled() -> ::Boolean
Returns
  • (::Boolean) — Whether the chip is in an inactive state and ignores user actions. Defaults to false.

#disabled=

def disabled=(value) -> ::Boolean
Parameter
  • value (::Boolean) — Whether the chip is in an inactive state and ignores user actions. Defaults to false.
Returns
  • (::Boolean) — Whether the chip is in an inactive state and ignores user actions. Defaults to false.

#enabled

def enabled() -> ::Boolean
Returns
  • (::Boolean) — Whether the chip is in an active state and responds to user actions. Defaults to true. Deprecated. Use disabled instead.

#enabled=

def enabled=(value) -> ::Boolean
Parameter
  • value (::Boolean) — Whether the chip is in an active state and responds to user actions. Defaults to true. Deprecated. Use disabled instead.
Returns
  • (::Boolean) — Whether the chip is in an active state and responds to user actions. Defaults to true. Deprecated. Use disabled instead.

#icon

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

#icon=

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

#label

def label() -> ::String
Returns
  • (::String) — The text displayed inside the chip.

#label=

def label=(value) -> ::String
Parameter
  • value (::String) — The text displayed inside the chip.
Returns
  • (::String) — The text displayed inside the chip.

#on_click

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

#on_click=

def on_click=(value) -> ::Google::Apps::Card::V1::OnClick
Parameter
  • value (::Google::Apps::Card::V1::OnClick) — Optional. The action to perform when a user clicks the chip, such as opening a hyperlink or running a custom function.
Returns