AI-generated Key Takeaways
-
ComposeActionResponseBuilder helps create responses for actions that generate draft emails when a UI element is interacted with.
-
It's important to understand that this is distinct from compose actions used to extend the Gmail compose UI.
-
Developers can use this builder to set a Gmail draft created using methods like GmailMessage.createDraftReply().
-
The build() method finalizes the response and ensures it's valid before use.
A builder for Compose
objects.
Methods
Method | Return type | Brief description |
---|---|---|
build() | Compose | Builds the current compose action response and validates it. |
set | Compose | Sets the draft Gmail created
using Gmail or
similar functions. |
Detailed documentation
build()
Builds the current compose action response and validates it.
Return
Compose
— A validated Compose
.
Throws
Error
— if the constructed compose action response isn't valid.
setGmailDraft(draft)
Sets the draft Gmail
created
using Gmail
or
similar functions.
Parameters
Name | Type | Description |
---|---|---|
draft | Gmail | The Gmail to use. |
Return
Compose
— This object, for chaining.