Class UpdateDraftBodyAction
UpdateDraftBodyAction
Updates the email draft body.
Detailed documentation
addUpdateContent(content, contentType)
Adds the specified content to the draft body. The type of the content
is specified by
ContentType
.
Parameters
Name | Type | Description |
content | String | The content to insert to the email draft. |
contentType | ContentType | The content type of the content to be inserted. |
Return
UpdateDraftBodyAction
— This object, for chaining.
setUpdateType(updateType)
Sets the UpdateDraftBodyType
of this update action on the draft body. For example,
inserting content at the start, end, or cursor position of the draft body.
Parameters
Name | Type | Description |
updateType | UpdateDraftBodyType | The type of update to be performed on an email draft. |
Return
UpdateDraftBodyAction
— This object, for chaining.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-02 UTC.
[null,null,["Last updated 2024-12-02 UTC."],[[["`UpdateDraftBodyAction` updates the body of an email draft."],["It provides methods to add content (`addUpdateContent`) and set the update type (`setUpdateType`)."],["`addUpdateContent` inserts specified content, determined by `ContentType`, into the email draft."],["`setUpdateType` defines how the content is inserted, such as at the beginning, end, or cursor position, using `UpdateDraftBodyType`."]]],["`UpdateDraftBodyAction` modifies an email draft's body. It provides two key methods: `addUpdateContent` and `setUpdateType`. `addUpdateContent` inserts specified content, defined by a string and content type, into the draft. `setUpdateType` determines where the content is inserted, such as the start, end, or cursor position, using `UpdateDraftBodyType`. Both methods return the `UpdateDraftBodyAction` object, enabling method chaining.\n"]]