Reference documentation and code samples for the Google Apps Chat V1 Client class OnClick.
Represents how to respond when users click an interactive element on a card, such as a button.
Google Workspace Add-ons and Chat apps:
Generated from protobuf message google.apps.card.v1.OnClick
Namespace
Google \ Apps \ Card \ V1Methods
__construct
Constructor.
Parameters | |
---|---|
Name | Description |
data |
array
Optional. Data for populating the Message object. |
↳ action |
Google\Apps\Card\V1\Action
If specified, an action is triggered by this |
↳ open_link |
Google\Apps\Card\V1\OpenLink
If specified, this |
↳ open_dynamic_link_action |
Google\Apps\Card\V1\Action
An add-on triggers this action when the action needs to open a link. This differs from the |
↳ card |
Google\Apps\Card\V1\Card
A new card is pushed to the card stack after clicking if specified. Google Workspace Add-ons: |
getAction
If specified, an action is triggered by this onClick
.
Returns | |
---|---|
Type | Description |
Google\Apps\Card\V1\Action|null |
hasAction
setAction
If specified, an action is triggered by this onClick
.
Parameter | |
---|---|
Name | Description |
var |
Google\Apps\Card\V1\Action
|
Returns | |
---|---|
Type | Description |
$this |
getOpenLink
If specified, this onClick
triggers an open link action.
Returns | |
---|---|
Type | Description |
Google\Apps\Card\V1\OpenLink|null |
hasOpenLink
setOpenLink
If specified, this onClick
triggers an open link action.
Parameter | |
---|---|
Name | Description |
var |
Google\Apps\Card\V1\OpenLink
|
Returns | |
---|---|
Type | Description |
$this |
getOpenDynamicLinkAction
An add-on triggers this action when the action needs to open a
link. This differs from the open_link
above in that this needs to talk
to server to get the link. Thus some preparation work is required for
web client to do before the open link action response comes back.
Returns | |
---|---|
Type | Description |
Google\Apps\Card\V1\Action|null |
hasOpenDynamicLinkAction
setOpenDynamicLinkAction
An add-on triggers this action when the action needs to open a
link. This differs from the open_link
above in that this needs to talk
to server to get the link. Thus some preparation work is required for
web client to do before the open link action response comes back.
Parameter | |
---|---|
Name | Description |
var |
Google\Apps\Card\V1\Action
|
Returns | |
---|---|
Type | Description |
$this |
getCard
A new card is pushed to the card stack after clicking if specified.
Returns | |
---|---|
Type | Description |
Google\Apps\Card\V1\Card|null |
hasCard
setCard
A new card is pushed to the card stack after clicking if specified.
Parameter | |
---|---|
Name | Description |
var |
Google\Apps\Card\V1\Card
|
Returns | |
---|---|
Type | Description |
$this |
getData
Returns | |
---|---|
Type | Description |
string |