Reference documentation and code samples for the Google Apps Chat V1 Client class KeyValue.
A UI element contains a key (label) and a value (content). This
element can also contain some actions such as onclick
button.
Generated from protobuf message google.chat.v1.WidgetMarkup.KeyValue
Namespace
Google \ Apps \ Chat \ V1 \ WidgetMarkupMethods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ icon
int
An enum value that's replaced by the Chat API with the corresponding icon image.
↳ icon_url
string
The icon specified by a URL.
↳ top_label
string
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 .
↳ content
string
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 .
↳ content_multiline
bool
If the content should be multiline.
↳ bottom_label
string
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 .
↳ on_click
↳ button
getIcon
An enum value that's replaced by the Chat API with the corresponding icon image.
int
hasIcon
setIcon
An enum value that's replaced by the Chat API with the corresponding icon image.
var
int
$this
getIconUrl
The icon specified by a URL.
string
hasIconUrl
setIconUrl
The icon specified by a URL.
var
string
$this
getTopLabel
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 .
string
setTopLabel
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 .
var
string
$this
getContent
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 .
string
setContent
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 .
var
string
$this
getContentMultiline
If the content should be multiline.
bool
setContentMultiline
If the content should be multiline.
var
bool
$this
getBottomLabel
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 .
string
setBottomLabel
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 .
var
string
$this
getOnClick
The onclick
action. Only the top label, bottom label, and content
region are clickable.
hasOnClick
clearOnClick
setOnClick
The onclick
action. Only the top label, bottom label, and content
region are clickable.
$this
getButton
A button that can be clicked to trigger an action.
hasButton
setButton
A button that can be clicked to trigger an action.
$this
getIcons
string
getControl
string