Class UniversalActionResponse Stay organized with collections Save and categorize content based on your preferences.
AI-generated Key Takeaways
UniversalActionResponse is a response object used for creating universal actions.
Universal actions can open links or display add-on cards.
The
printJson()method provides a JSON representation of the UniversalActionResponse object for debugging purposes.
UniversalActionResponse
The response object that may be returned from a method that creates universal action.
// A universal action that opens a link.constopenLinkUniversalAction=CardService.newUniversalActionResponseBuilder().setOpenLink(CardService.newOpenLink().setUrl('https://www.google.com')).build();constcardBuilder1=CardService.newCardBuilder();constcardBuilder2=CardService.newCardBuilder();// Finish building the cards ...// A universal action that shows two static cards.constcardsUniversalAction=CardService.newUniversalActionResponseBuilder().displayAddOnCards([cardBuilder1.build(),cardBuilder2.build()]).build();
Methods
| Method | Return type | Brief description |
|---|---|---|
print | String | Prints the JSON representation of this object. |
Detailed documentation
printJson()
Prints the JSON representation of this object. This is for debugging only.
Return
String
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-02 UTC.