Class ComposeActionResponseBuilder Stay organized with collections Save and categorize content based on your preferences.
Page Summary
The
ComposeActionResponseBuilderis used to buildComposeActionResponseobjects, which are responses to Actions that compose draft messages.This builder is not related to compose actions used for extending the Gmail compose UI.
The
build()method validates and returns the constructedComposeActionResponse.The
setGmailDraft(draft)method sets the Gmail draft to be used in the response.
A builder forCompose objects.
Note: This object isn't related tocompose actions that areused toextend the compose UI. Rather,this builder creates responses to anAction that composes draft messages when a specificUI element is selected.
Methods
| Method | Return type | Brief description |
|---|---|---|
build() | Compose | Builds the current compose action response and validates it. |
set | Compose | Sets the draftGmail createdusingGmail orsimilar functions. |
Detailed documentation
build()
Builds the current compose action response and validates it.
Return
Compose — A validatedCompose.
Throws
Error — if the constructed compose action response isn't valid.
setGmailDraft(draft)
Sets the draftGmail createdusingGmail orsimilar functions.
Parameters
| Name | Type | Description |
|---|---|---|
draft | Gmail | TheGmail to use. |
Return
Compose — This object, for chaining.
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 2025-12-11 UTC.