Class UniversalActionResponseBuilder
详细文档
displayAddOnCards(cardObjects)
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-03。
[null,null,["最后更新时间 (UTC):2024-12-03。"],[[["UniversalActionResponseBuilder facilitates constructing UniversalActionResponse objects for handling user actions within Google Workspace add-ons."],["It provides methods to define the response behavior, including displaying add-on cards (`displayAddOnCards`) or opening URLs (`setOpenLink`)."],["The `build()` method finalizes and validates the response configuration."]]],["The `UniversalActionResponseBuilder` constructs `UniversalActionResponse` objects. Key actions include: `build()`, which creates and validates the response, returning a `UniversalActionResponse`. `displayAddOnCards(cardObjects)` presents the add-on with provided `Card` objects, and `setOpenLink(openLink)` defines a URL that opens upon universal action selection, using an `OpenLink` object. Both `displayAddOnCards` and `setOpenLink` allow for method chaining. The `build()` method can throw an `Error` if the created object is not valid.\n"]]