Enum Interaction
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
互动
枚举类型,用于指定如何响应与用户的互动,例如用户点击卡片消息中的按钮。
仅适用于 Google Chat 应用。不适用于 Google Workspace 插件。
如需调用枚举,您可以调用其父类、名称和属性。例如
CardService.Interaction.OPEN_DIALOG
。
属性
属性 | 类型 | 说明 |
INTERACTION_UNSPECIFIED | Enum | 默认值。action 会照常执行。 |
OPEN_DIALOG | Enum | 打开对话框,这是一种基于卡片的界面,Chat 应用会使用它与用户互动。 |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003e\u003ccode\u003eInteraction\u003c/code\u003e is an enum type used to define how a Google Chat app responds to user actions, like clicking a button.\u003c/p\u003e\n"],["\u003cp\u003eThis feature is exclusive to Google Chat apps and is not supported in Google Workspace Add-ons.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize an enum, you need to reference its parent class, name, and property, such as \u003ccode\u003eCardService.Interaction.OPEN_DIALOG\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eInteraction\u003c/code\u003e includes properties like \u003ccode\u003eOPEN_DIALOG\u003c/code\u003e for opening card-based interfaces and \u003ccode\u003eINTERACTION_UNSPECIFIED\u003c/code\u003e for default actions.\u003c/p\u003e\n"]]],["This content defines the `Interaction` enum for Google Chat apps, which dictates the app's response to user interactions. It's exclusive to Google Chat apps and unavailable for Google Workspace add-ons. The enum includes properties like `INTERACTION_UNSPECIFIED`, which executes the default action, and `OPEN_DIALOG`, which triggers a card-based dialog. To use these properties call it with its class name for example `CardService.Interaction.OPEN_DIALOG`.\n"],null,["# Enum Interaction\n\nInteraction\n\nAn enum type that specifies what to do in response to an interaction with a user, such as a user\nclicking a button in a card message.\n\nOnly available for Google Chat apps. Not available for Google Workspace add-ons.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.Interaction.OPEN_DIALOG`. \n\n### Properties\n\n| Property | Type | Description |\n|---------------------------|--------|-----------------------------------------------------------------------------------|\n| `INTERACTION_UNSPECIFIED` | `Enum` | Default value. The `action` executes as normal. |\n| `OPEN_DIALOG` | `Enum` | Opens a dialog, a card-based interface that Chat apps use to interact with users. |"]]