Reference documentation and code samples for the Google Apps Chat V1 Client class Chip.
A text, icon, or text and icon chip that users can click.
Google Workspace add-ons and Chat apps :
Generated from protobuf message google.apps.card.v1.Chip
Namespace
Google \ Apps \ Card \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ icon
↳ label
string
The text displayed inside the chip.
↳ on_click
OnClick
Optional. The action to perform when a user clicks the chip, such as opening a hyperlink or running a custom function.
↳ enabled
bool
Whether the chip is in an active state and responds to user actions. Defaults to true
. Deprecated. Use disabled
instead.
↳ disabled
bool
Whether the chip is in an inactive state and ignores user actions. Defaults to false
.
↳ alt_text
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 ".
getIcon
The icon image. If both icon
and text
are set, then the icon appears
before the text.
hasIcon
clearIcon
setIcon
The icon image. If both icon
and text
are set, then the icon appears
before the text.
$this
getLabel
The text displayed inside the chip.
string
setLabel
The text displayed inside the chip.
var
string
$this
getOnClick
Optional. The action to perform when a user clicks the chip, such as opening a hyperlink or running a custom function.
hasOnClick
clearOnClick
setOnClick
Optional. The action to perform when a user clicks the chip, such as opening a hyperlink or running a custom function.
$this
getEnabled
Whether the chip is in an active state and responds to user actions.
Defaults to true
.
Deprecated. Use disabled
instead.
bool
setEnabled
Whether the chip is in an active state and responds to user actions.
Defaults to true
.
Deprecated. Use disabled
instead.
var
bool
$this
getDisabled
Whether the chip is in an inactive state and ignores user actions.
Defaults to false
.
bool
setDisabled
Whether the chip is in an inactive state and ignores user actions.
Defaults to false
.
var
bool
$this
getAltText
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 ".
string
setAltText
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 ".
var
string
$this

