Class ComposeActionResponseBuilder
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
详细文档
setGmailDraft(draft)
设置使用 GmailMessage.createDraftReply(body) 或类似函数创建的草稿 GmailMessage。
参数
| 名称 | 类型 | 说明 |
draft | GmailDraft | 要使用的 GmailDraft。 |
返回
ComposeActionResponseBuilder - 此对象,用于链式调用。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-12-03。
[null,null,["最后更新时间 (UTC):2025-12-03。"],[],["The `ComposeActionResponseBuilder` creates responses to actions that compose draft messages. It has two key methods: `build()` and `setGmailDraft(draft)`. `build()` constructs and validates the `ComposeActionResponse`. If it is invalid an error is thrown. `setGmailDraft(draft)` sets the `GmailDraft` using functions such as `GmailMessage.createDraftReply(body)`, allowing for modification of the draft before composing. The builder itself is not directly related to compose actions but creates responses when UI elements are selected.\n"]]