# AddOns Response Service

This service allows scripts to configure and build Google Workspace add-ons.

## Classes

| Name | Brief description |
|---|---|
| `AccessoryWidget` | A builder for Chat `AccessoryWidget` objects. |
| `Action` | An action that Google Workspace add-ons that extend Google Workspace Studio can use to render a new card. |
| `ActionResponse` | The actions that add-ons can use in cards or the host application. |
| `ActionResponseBuilder` | A builder for `ActionResponse` objects. |
| `AddOnsResponseService` | `AddOnsResponseService` provides the ability to create responses for Google Workspace add-ons. |
| `AddonComposeUiActionResponse` | Represents an action on the addon compose ui. |
| `AddonComposeUiActionResponseBuilder` | A builder for `AddonComposeUiActionResponse` objects. |
| `AddonComposeUiActionType` | An enum value that specifies the type of an `AddonComposeUiActionResponse`. |
| `Attachment` | Represents an attachment created by an add-on. |
| `BasicDataType` | An enum that represents the basic generic data types. |
| `CalendarEventActionResponse` | Represents a response that makes changes to the calendar event that the user is currently editing in reaction to an action taken in the UI, such as a button click. |
| `CalendarEventActionResponseBuilder` | A builder for `CalendarEventActionResponse` objects. |
| `ChatDataActionsResponseBuilder` | A builder for Chat `DataAction` objects. |
| `ChatMessage` | A Google Chat [message](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.md.txt). |
| `Color` | A Color object which represents a color in the RGBA color space. |
| `ComposeActionResponse` | The response object that may be returned from a callback method for compose action in a [Gmail add-on](https://developers.google.com/gmail/add-ons). |
| `ComposeActionResponseBuilder` | A builder for `ComposeActionResponse` objects. |
| `ComposedEmailType` | An enum value that specifies whether the composed email is a standalone or reply draft. |
| `ContentType` | An enum value that specifies the content type of the content generated by a `UpdateDraftActionResponse`. |
| `CreateMessageAction` | A builder for Chat `CreateMessageAction` objects. |
| `DataActionsResponse` | Creates or updates a message in Google Chat. |
| `DataType` | A DataType is used to set the type of a variable. |
| `DriveItemsSelectedActionResponse` | Represents a response that makes changes to Drive while Drive items are selected and in reaction to an action taken in the UI, such as a button click. |
| `DriveItemsSelectedActionResponseBuilder` | A builder for `DriveItemsSelectedActionResponse` objects. |
| `DynamicResourceDefinition` | A DynamicResourceDefinition is a building block for a `ResourceFieldsDefinitionRetrievedAction`, it can contain one or more numbers of `ResourceField` to dynamically define the number of output variables provided by a step in Google Workspace Studio. |
| `EditorFileScopeActionResponse` | Makes changes to an Editor, such as Google Docs, Sheets, or Slides in reaction to an action taken in the UI. |
| `EditorFileScopeActionResponseBuilder` | A builder for `EditorFileScopeActionResponse` objects. |
| `EndNavigation` | An enum that specifies the action during navigation. |
| `ErrorActionability` | A Enum that represents the error actionability. |
| `ErrorRetryability` | A Enum that represents the retry-ability of action invocation when having an error. |
| `FontWeight` | An enum that represents the font weight of the styled text. |
| `HostAppAction` | A HostAppAction is a type of Action that is handled by individual host apps. |
| `Hyperlink` | A Hyperlink element used in `TextFormatElement`. |
| `InsertSection` | A builder for InsertSection objects. |
| `InsertWidget` | A builder for InsertWidget objects. |
| `Link` | The link object from a third-party resource which gets converted it to a smart chip in the host application. |
| `LinkPreview` | Card action that displays a link preview card and smart chip in the host app. |
| `ListContainer` | Container for list items, where each list item can contain multiple `TextFormatElement`. |
| `ListItem` | A list item, where each list item can contain multiple `TextFormatElement`. |
| `ListType` | An enum that represents the type of the list. |
| `ModifyCard` | A builder for `ModifyCard` objects that changes and updates an existing card's interface by passing the `ModifyCard` object to a `Action`. |
| `Navigation` | A helper object that controls card navigation. |
| `Notification` | Displays a notification when users submit and close a dialog. |
| `OnClose` | An enum that specifies what to do when a URL opened through an `OpenLink` is closed. |
| `OpenAs` | An enum that specifies how to open a URL. |
| `OpenLink` | Represents an action to open a link with some options. |
| `RemoveSection` | A builder for `RemoveSection` objects. |
| `RemoveWidget` | A builder for RemoveWidget objects. |
| `RenderAction` | Renders or updates a card by performing an `Action` in response to a user interaction. |
| `RenderActionBuilder` | A builder for `RenderAction` objects. |
| `ResourceData` | Represents a application specific resource data, a resource data contains a collection of key-value pairs of variable names and `VariableData`. |
| `ResourceField` | A ResourceField is a basic building block of a `DynamicResourceDefinition`, each resource field corresponds to a output variable of the current step. |
| `ResourceFieldsDefinitionRetrievedAction` | A `ResourceFieldsDefinitionRetrievedAction` is a type of `ResourceFieldsDefinitionRetrievedAction` that is used to retrieve the definition of a list of resource fields through the `dynamicResourceDefinitionProvider` function specified in the manifest. |
| `ResourceRetrievedAction` | A ResourceRetrievedAction is used to retrieve custom resource content when needed, where the custom resource field is defined in the ResourceData. |
| `ResourceType` | An application specific resource type, the unique identifier of the resource type should have a corresponding WorkflowResourceDefinition. |
| `ReturnElementErrorAction` | A ReturnElementErrorAction indicates that an error occurred during element invocation. |
| `ReturnOutputVariablesAction` | Contains output variables generated by the executed action in Google Workspace Studio. |
| `SaveWorkflowAction` | This action indicates that the host app (Google Workspace Studio) should save the agent. |
| `SendStatus` | An enum value that specifies the send status of an `UpdateDraftActionResponse`. |
| `StyledText` | Text element with styles such as bold, italic and color. |
| `TextFormatChip` | A clickable chip in the text format. |
| `TextFormatElement` | A text format element, which can be a `TextFormatChip`, `StyledText`, `Hyperlink`, or `ListContainer`. |
| `TextFormatIcon` | An icon that is displayed in a `TextFormatChip`. |
| `TextStyle` | An enum that represents the style of the styled text. |
| `TimeStamp` | Represents a timestamp object which is can be added to a `VariableData`. |
| `UniversalActionResponse` | The response object that may be returned from a method that creates universal action. |
| `UniversalActionResponseBuilder` | A builder for the `UniversalActionResponse` objects. |
| `UpdateDraftActionResponse` | Represents an action that updates the email draft that the user is currently editing. |
| `UpdateDraftActionResponseBuilder` | A builder for `UpdateDraftActionResponse` objects. |
| `UpdateDraftBccRecipientsAction` | Updates the Bcc recipients of an email draft. |
| `UpdateDraftBodyAction` | Updates the email draft body. |
| `UpdateDraftBodyType` | An enum value that specifies the type of an `UpdateDraftBodyAction`. |
| `UpdateDraftCcRecipientsAction` | Updates the Cc recipients of an email draft. |
| `UpdateDraftSubjectAction` | Updates the subject line of an email draft. |
| `UpdateDraftToRecipientsAction` | Updates the To recipients of an email draft. |
| `UpdateInlinePreviewAction` | The Chat app previews a link in a message by adding or updating one or more cards. |
| `UpdateMessageAction` | The Chat app updates text or cards in a message. |
| `UpdateWidget` | A builder for `UpdateWidget` objects. |
| `ValidationErrorSeverity` | An enum that represents the severity of the validation error. |
| `ValueMetadata` | A valueMetadata contains information about the potential values of a variable. |
| `VariableData` | Represents a variable data which can contain a collection of values in various types. |
| `WorkflowAction` | A WorkflowAction is a type of `HostAppAction` that is used to perform a specific action in Google Workspace Studio. |
| `WorkflowTextFormat` | A block of text with rich formatting options including styles, hyperlinks, and interactive elements defined in `TextFormatElement`. |
| `WorkflowValidationErrorAction` | This action indicates that the host app (Google Workspace Studio) should display a validation error. |

## `AccessoryWidget`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addWidget(widget)` | `AccessoryWidget` | Sets the widget for this action. |

## `Action`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addModifyCard(modifyCard)` | `Action` | Adds a ModifyCard operation to the action. |
| `addNavigation(navigation)` | `Action` | Adds a card navigation to the action. |

## `ActionResponse`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `printJson()` | `String` | Prints the JSON representation of this object. |

## `ActionResponseBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addModifyCard(modifyCard)` | `ActionResponseBuilder` | Sets the modify card operation to the action. |
| `build()` | `ActionResponse` | Builds the current action response and validates it. |
| `setLinkPreview(linkPreview)` | `ActionResponseBuilder` | Sets the LinkPreview to the action. |
| `setNavigation(navigation)` | `ActionResponseBuilder` | Sets the response to a `Navigation` action. |
| `setNotification(notification)` | `ActionResponseBuilder` | Sets the notification to display when the action is activated. |
| `setOpenLink(openLink)` | `ActionResponseBuilder` | Sets the URL to navigate to when the action is activated. |
| `setStateChanged(stateChanged)` | `ActionResponseBuilder` | Sets a flag to indicate that this action changed the existing data state. |

## `AddOnsResponseService`

### Properties

| Property | Type | Description |
|---|---|---|
| `AddonComposeUiActionType` | `AddonComposeUiActionType` | The `AddonComposeUiActionType` enumeration. |
| `ComposedEmailType` | `ComposedEmailType` | The `ComposedEmailType` enumeration. |
| `ContentType` | `ContentType` | The `ContentType` enumeration. |
| `EndNavigation` | `EndNavigation` | The `EndNavigation` enumeration. |
| `OnClose` | `OnClose` | The `OnClose` enumeration. |
| `OpenAs` | `OpenAs` | The `OpenAs` enumeration. |
| `SendStatus` | `SendStatus` | The `SendStatus` enumeration. |
| `UpdateDraftBodyType` | `UpdateDraftBodyType` | The `UpdateDraftBodyType` enumeration. |

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `newAccessoryWidget()` | `AccessoryWidget` | Creates a new `AccessoryWidget`. |
| `newAction()` | `Action` | Creates a new `Action`. |
| `newActionResponseBuilder()` | `ActionResponseBuilder` | Creates a `ActionResponseBuilder`. |
| `newAddonComposeUiActionResponseBuilder()` | `AddonComposeUiActionResponseBuilder` | Creates a `AddonComposeUiActionResponseBuilder`. |
| `newAttachment()` | `Attachment` | Creates a `Attachment`. |
| `newCalendarEventActionResponseBuilder()` | `CalendarEventActionResponseBuilder` | Creates a `CalendarEventActionResponseBuilder`. |
| `newChatDataActionBuilder()` | `ChatDataActionsResponseBuilder` | Creates a `ChatDataActionsResponseBuilder`. |
| `newChatMessage()` | `ChatMessage` | Creates a `ChatMessage`. |
| `newComposeActionResponseBuilder()` | `ComposeActionResponseBuilder` | Creates a `ComposeActionResponseBuilder`. |
| `newCreateMessageAction()` | `CreateMessageAction` | Creates a `CreateMessageAction`. |
| `newDriveItemsSelectedActionResponseBuilder()` | `DriveItemsSelectedActionResponseBuilder` | Creates a `DriveItemsSelectedActionResponseBuilder`. |
| `newEditorFileScopeActionResponseBuilder()` | `EditorFileScopeActionResponseBuilder` | Creates a `EditorFileScopeActionResponseBuilder`. |
| `newLinkPreview()` | `LinkPreview` | Creates a `LinkPreview`. |
| `newNavigation()` | `Navigation` | Creates a `Navigation`. |
| `newNotification()` | `Notification` | Creates a `Notification`. |
| `newOpenLink()` | `OpenLink` | Creates a `OpenLink`. |
| `newRenderActionBuilder()` | `RenderActionBuilder` | Creates a new `RenderActionBuilder`. |
| `newUniversalActionResponseBuilder()` | `UniversalActionResponseBuilder` | Creates a `UniversalActionResponseBuilder`. |
| `newUpdateDraftActionResponseBuilder()` | `UpdateDraftActionResponseBuilder` | Creates a `UpdateDraftActionResponseBuilder`. |
| `newUpdateDraftBccRecipientsAction()` | `UpdateDraftBccRecipientsAction` | Creates a `UpdateDraftBccRecipientsAction`; |
| `newUpdateDraftBodyAction()` | `UpdateDraftBodyAction` | Creates a `UpdateDraftBodyAction`. |
| `newUpdateDraftCcRecipientsAction()` | `UpdateDraftCcRecipientsAction` | Creates a `UpdateDraftCcRecipientsAction`. |
| `newUpdateDraftSubjectAction()` | `UpdateDraftSubjectAction` | Creates a `UpdateDraftSubjectAction`. |
| `newUpdateDraftToRecipientsAction()` | `UpdateDraftToRecipientsAction` | Creates a `UpdateDraftToRecipientsAction`. |
| `newUpdateInlinePreviewAction()` | `UpdateInlinePreviewAction` | Creates a `UpdateInlinePreviewAction`. |
| `newUpdateMessageAction()` | `UpdateMessageAction` | Creates a `UpdateMessageAction`. |

## `AddonComposeUiActionResponse`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `printJson()` | `String` | Prints the JSON representation of this object. |

## `AddonComposeUiActionResponseBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `build()` | `AddonComposeUiActionResponse` | Builds the current addon compose ui action response and validates it. |
| `setType(type)` | `AddonComposeUiActionResponseBuilder` | Sets the enum field that determines the addon compose ui action. |

## `AddonComposeUiActionType`

### Properties

| Property | Type | Description |
|---|---|---|
| `DISMISS` | `Enum` | Default. |

## `Attachment`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setIconUrl(iconUrl)` | `Attachment` | Sets the icon URL for the attachment. |
| `setMimeType(mimeType)` | `Attachment` | Sets the MIME type for the attachment. |
| `setResourceUrl(resourceUrl)` | `Attachment` | Sets the resource URL for the attachment. |
| `setTitle(title)` | `Attachment` | Sets the title for the attachment. |

## `BasicDataType`

### Properties

| Property | Type | Description |
|---|---|---|
| `BASIC_TYPE_UNSPECIFIED` | `Enum` | Default value. |
| `STRING` | `Enum` | A string of characters. |
| `INTEGER` | `Enum` | An integer value. |
| `FLOAT` | `Enum` | A floating point number. |
| `TIMESTAMP` | `Enum` | A timestamp in ISO 8601 format. |
| `BOOLEAN` | `Enum` | A boolean value. |
| `EMAIL_ADDRESS` | `Enum` | A string in the format of an email address. |
| `GOOGLE_USER` | `Enum` | A user of the Google services, in the format of "users/encoded_GAIA_ID" |
| `FILE` | `Enum` | A file type. |
| `FORMATTED_TEXT` | `Enum` | A text with rich formatting. |

## `CalendarEventActionResponse`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `printJson()` | `String` | Prints the JSON representation of this object. |

## `CalendarEventActionResponseBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addAttachments(attachments)` | `CalendarEventActionResponseBuilder` | Specifies that the response should add the attachments to the Calendar event when the associated UI action is taken. |
| `addAttendees(emails)` | `CalendarEventActionResponseBuilder` | Specifies that the response should add the indicated attendees to the Calendar event when the associated UI action is taken. |
| `build()` | `CalendarEventActionResponse` | Builds the current Calendar event action response and validates it. |
| `setConferenceData(conferenceData)` | `CalendarEventActionResponseBuilder` | Specifies that the response should set the indicated conference data to the Calendar event when the associated UI action is taken. |

## `ChatDataActionsResponseBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `build()` | `DataActionsResponse` | Builds the current action response. |
| `setCreateChatMessageAction(createMessageAction)` | `ChatDataActionsResponseBuilder` | Sets the `CreateMessageAction` for this `DataActionsResponse`. |
| `setUpdateChatMessageAction(updateMessageAction)` | `ChatDataActionsResponseBuilder` | Sets the `UpdateMessageAction` for this `DataActionsResponse`. |
| `setUpdateInlinePreviewAction(updateInlinePreviewAction)` | `ChatDataActionsResponseBuilder` | Sets the `UpdateInlinePreviewAction` for this `DataActionsResponse`. |

## `ChatMessage`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addAccessoryWidget(accessoryWidget)` | `ChatMessage` | Sets the accessoryWidget for this action. |
| `addCardWithId(cardWithId)` | `ChatMessage` | Sets the card of the message. |
| `setText(text)` | `ChatMessage` | Sets the text of the message. |

## `Color`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setAlpha(alpha)` | `Color` | Sets the alpha component of the color. |
| `setBlue(blue)` | `Color` | Sets the blue component of the color. |
| `setGreen(green)` | `Color` | Sets the green component of the color. |
| `setRed(red)` | `Color` | Sets the red component of the color. |

## `ComposeActionResponse`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `printJson()` | `String` | Prints the JSON representation of this object. |

## `ComposeActionResponseBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `build()` | `ComposeActionResponse` | Builds the current compose action response and validates it. |
| `setGmailDraft(draft)` | `ComposeActionResponseBuilder` | Sets the draft `GmailMessage` created using `GmailMessage.createDraftReply(body)` or similar functions. |

## `ComposedEmailType`

### Properties

| Property | Type | Description |
|---|---|---|
| `REPLY_AS_DRAFT` | `Enum` | A draft that is a reply to another message. |
| `STANDALONE_DRAFT` | `Enum` | A draft that is a standalone message. |

## `ContentType`

### Properties

| Property | Type | Description |
|---|---|---|
| `TEXT` | `Enum` | Indicates that the generated content is plain text. |
| `MUTABLE_HTML` | `Enum` | Indicates that the generated content is formatted as HTML. |
| `IMMUTABLE_HTML` | `Enum` | Indicates that the generated content is formatted as HTML, but this content cannot be edited after it is generated. |

## `CreateMessageAction`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setMessage(message)` | `CreateMessageAction` | Sets the message for this action. |

## `DataActionsResponse`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `printJson()` | `String` | Prints the JSON representation of this object. |

## `DataType`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setBasicDataType(basicDataType)` | `DataType` | Sets the data type to one of the supported `BasicDataType`s. |
| `setResourceType(resourceType)` | `DataType` | Sets the data type to a custom defined `ResourceType`. |
| `setValueMetadata(valueMetadata)` | `DataType` | Sets the `ValueMetadata`, which contains type-related information related to the variable. |

## `DriveItemsSelectedActionResponse`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `printJson()` | `String` | Prints the JSON representation of this object. |

## `DriveItemsSelectedActionResponseBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `build()` | `DriveItemsSelectedActionResponse` | Builds the current Drive action response. |
| `requestFileScope(itemId)` | `DriveItemsSelectedActionResponseBuilder` | Specifies that the response requests file scope for the contextually-relevant item in Drive. |

## `DynamicResourceDefinition`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addResourceField(resourceField)` | `DynamicResourceDefinition` | Adds a resource field to the dynamic resource definition. |
| `setResourceId(resourceId)` | `DynamicResourceDefinition` | Sets the ID for the dynamic resource definition, this ID corresponds to the `workflowResourceDefinitionId` in the manifest. |

## `EditorFileScopeActionResponse`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `printJson()` | `String` | Prints the JSON representation of this object. |

## `EditorFileScopeActionResponseBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `build()` | `EditorFileScopeActionResponse` | Builds the current Editor action response. |
| `requestFileScopeForActiveDocument()` | `EditorFileScopeActionResponseBuilder` | Requests the `drive.file` scope for the current active Editor document. |

## `EndNavigation`

### Properties

| Property | Type | Description |
|---|---|---|
| `ACTION_UNSPECIFIED` | `Enum` | Action unspecified. |
| `CLOSE_DIALOG` | `Enum` | Closes a [dialog](https://developers.google.com/workspace/add-ons/chat/dialogs). |
| `CLOSE_DIALOG_AND_EXECUTE` | `Enum` | Closes a [dialog](https://developers.google.com/workspace/add-ons/chat/dialogs) and refreshes the card that opened the dialog. |

## `ErrorActionability`

### Properties

| Property | Type | Description |
|---|---|---|
| `ERROR_ACTIONABILITY_UNSPECIFIED` | `Enum` | Unspecified. |
| `NOT_ACTIONABLE` | `Enum` | The error is not fixable by the user through the configuration card. |
| `ACTIONABLE` | `Enum` | The error is fixable by the user through the configuration card. |

## `ErrorRetryability`

### Properties

| Property | Type | Description |
|---|---|---|
| `RETRYABILITY_UNSPECIFIED` | `Enum` | Unspecified. |
| `NOT_RETRYABLE` | `Enum` | The error is not retryable, the flow terminates after the first try. |
| `RETRYABLE` | `Enum` | The error is retryable, Workflow is going to try to execute the Step for up to 5 times. |

## `FontWeight`

### Properties

| Property | Type | Description |
|---|---|---|
| `FONT_WEIGHT_UNSPECIFIED` | `Enum` | Standard weight with normal thickness. |
| `LIGHT` | `Enum` | Lighter weight with reduced thickness. |
| `MEDIUM` | `Enum` | Intermediate weight between light and bold. |
| `BOLD` | `Enum` | Heavier weight with increased thickness. |

## `HostAppAction`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setWorkflowAction(workflowAction)` | `HostAppAction` | Sets the host app action to Workflow action. |

## `Hyperlink`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setLink(link)` | `Hyperlink` | Sets the destination URL of the hyperlink. |
| `setText(text)` | `Hyperlink` | Sets the text of the hyperlink. |

## `InsertSection`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `insertAtTop(onCardTop)` | `InsertSection` | Sets the onCardTop flag, which indicates whether the new section should be inserted at the top of the card. |
| `insertBelowSection(sectionId)` | `InsertSection` | Sets the section ID, and the new section is inserted below it. |
| `setSection(section)` | `InsertSection` | Sets the card section to be inserted. |

## `InsertWidget`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `insertAboveWidget(widgetId)` | `InsertWidget` | Sets the widget ID, and the new widget is inserted above the widget with the given ID. |
| `insertBelowWidget(widgetId)` | `InsertWidget` | Sets the widget ID, and the new widget is inserted below the widget with the given ID. |
| `setWidget(widget)` | `InsertWidget` | Sets the `Widget` to be inserted. |

## `Link`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setTitle(title)` | `Link` | Sets the title of the link. |
| `setUrl(url)` | `Link` | Sets the URL of the link. |

## `LinkPreview`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `printJson()` | `String` | Prints the JSON representation of this object. |
| `setLinkPreviewTitle(title)` | `LinkPreview` | Sets the title that displays in the link preview above the preview card. |
| `setPreviewCard(previewCard)` | `LinkPreview` | Sets the card that displays information about a link from a third-party or non-Google service. |
| `setTitle(title)` | `LinkPreview` | Sets the title that displays in the smart chip for the link preview. |

## `ListContainer`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addListItem(listItem)` | `ListContainer` | Adds a list item to the list container. |
| `setListNestLevel(listLevel)` | `ListContainer` | Sets the level of the list, starts from 0 for the top level, and increases by 1 for each nested list. |
| `setListType(listType)` | `ListContainer` | Sets the type of the list to be ordered or unordered. |

## `ListItem`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addTextFormatElement(textFormatElement)` | `ListItem` | Adds a `TextFormatElement` to the list item. |

## `ListType`

### Properties

| Property | Type | Description |
|---|---|---|
| `LIST_TYPE_UNSPECIFIED` | `Enum` | Default value. |
| `ORDERED` | `Enum` | Ordered list. |
| `UNORDERED` | `Enum` | Unordered list. |

## `ModifyCard`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setInsertSection(insertSection)` | `ModifyCard` | Sets the `InsertSection` for this modify card object. |
| `setInsertWidget(insertWidget)` | `ModifyCard` | Sets the `InsertWidget` for this modify card object. |
| `setRemoveSection(removeSection)` | `ModifyCard` | Sets the `RemoveSection` for this modify card object. |
| `setRemoveWidget(removeWidget)` | `ModifyCard` | Sets the `RemoveWidget` for this modify card object. |
| `setReplaceSection(replacementSection)` | `ModifyCard` | Sets the replacement `CardSection` for this modify card object, the replacement section should have the same id as an existing card section. |
| `setReplaceWidget(replacementWidget)` | `ModifyCard` | Sets the replacement widget for this modify card object, the replacement widget should have the same id as an existing widget. |
| `setUpdateWidget(updateWidget)` | `ModifyCard` | Sets the `UpdateWidget` for this modify card object. |

## `Navigation`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `popCard()` | `Navigation` | > [!WARNING] > **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview.md.txt), which grants early access to certain features. |
| `popToNamedCard(cardName)` | `Navigation` | > [!WARNING] > **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview.md.txt), which grants early access to certain features. |
| `popToRoot()` | `Navigation` | > [!WARNING] > **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview.md.txt), which grants early access to certain features. |
| `printJson()` | `String` | Prints the JSON representation of this object. |
| `pushCard(card)` | `Navigation` | Pushes the given card onto the stack. |
| `setEndNavigation(endNavigation)` | `Navigation` | Sets the end navigation action. |
| `updateCard(card)` | `Navigation` | Does an in-place replacement of the current card. |

## `Notification`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setText(text)` | `Notification` | Sets the text to show in the notification. |

## `OnClose`

### Properties

| Property | Type | Description |
|---|---|---|
| `NOTHING` | `Enum` | Do nothing on close. |
| `RELOAD` | `Enum` | Reloads the add-on on when the window closes. |

## `OpenAs`

### Properties

| Property | Type | Description |
|---|---|---|
| `FULL_SIZE` | `Enum` | Open in a full window or tab. |
| `OVERLAY` | `Enum` | Open as an overlay such as a pop-up. |

## `OpenLink`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setOnClose(onClose)` | `OpenLink` | Sets the behavior of the URL action when the URL window or tab is closed. |
| `setOpenAs(openAs)` | `OpenLink` | Sets the behavior of URL when it is opened. |
| `setUrl(url)` | `OpenLink` | Sets the URL to be opened. |

## `RemoveSection`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setSectionId(sectionId)` | `RemoveSection` | Sets the section ID of the section to be removed. |

## `RemoveWidget`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setWidgetId(widgetId)` | `RemoveWidget` | Sets the widget ID of the widget to be removed. |

## `RenderAction`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `printJson()` | `String` | Prints the JSON representation of this object. |

## `RenderActionBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `build()` | `RenderAction` | Builds the current render action and validates it. |
| `setAction(action)` | `RenderActionBuilder` | Sets the action that add-ons can use to update the UI to the render action. |
| `setHostAppAction(hostAppAction)` | `RenderActionBuilder` | Sets the `HostAppAction` handled by individual host apps to the render action. |

## `ResourceData`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addVariableData(key, value)` | `ResourceData` | Adds a `VariableData` keyed by its variable name, a value is overwritten if the key already exists. |
| `setVariableDataMap(fields)` | `ResourceData` | Sets the map of the variable data keyed by variable names. |

## `ResourceField`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setDataType(dataType)` | `ResourceField` | Sets the data type of the field, allows other steps to filter the variables by type at selection. |
| `setDisplayText(displayText)` | `ResourceField` | Sets the description of the field that is displayed to the end user during variable selection in subsequent steps. |
| `setSelector(selector)` | `ResourceField` | Sets a key for the provider function to provide the value to during the step's execution. |

## `ResourceFieldsDefinitionRetrievedAction`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addDynamicResourceDefinition(dynamicResourceDefinition)` | `ResourceFieldsDefinitionRetrievedAction` | Adds a `DynamicResourceDefinition` to the resource fields definition retrieved action. |

## `ResourceRetrievedAction`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setResourceData(resourceData)` | `ResourceRetrievedAction` | Sets the `ResourceData` to the resource retrieved action to provide values to the dynamic resource fields or custom resource fields. |

## `ResourceType`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setWorkflowResourceDefinitionId(resourceType)` | `ResourceType` | Sets the workflow resource definition id. |

## `ReturnElementErrorAction`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setErrorActionability(errorActionability)` | `ReturnElementErrorAction` | Sets the error actionability, an error should be actionable if it can be resolved by re-configuring the step. |
| `setErrorLog(log)` | `ReturnElementErrorAction` | Sets the error log to be displayed to the end user at Workflow's activity feed. |
| `setErrorRetryability(errorRetryability)` | `ReturnElementErrorAction` | Sets the error retry-ability, the flow terminates after the first try if an error is not retryable. |

## `ReturnOutputVariablesAction`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addVariableData(key, value)` | `ReturnOutputVariablesAction` | Adds a variable data keyed by its variable name, a value is overwritten if the key already exists. |
| `setLog(log)` | `ReturnOutputVariablesAction` | Sets the Log of the executed workflow action to the end user at Workflow's activity feed. |
| `setVariableDataMap(variables)` | `ReturnOutputVariablesAction` | Sets the map of the variable data keyed by variable name, a value is overwritten if the key already exists. |

## `SaveWorkflowAction`

## `SendStatus`

### Properties

| Property | Type | Description |
|---|---|---|
| `NOT_SEND` | `Enum` | Default. |
| `CONTINUE_SEND` | `Enum` | Continue sending the email after updating the draft. |

## `StyledText`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addStyle(style)` | `StyledText` | Sets the style of the styled text, can apply multiple styles to a single styled text. |
| `setColor(color)` | `StyledText` | Sets the color of the styled text. |
| `setFontWeight(fontWeight)` | `StyledText` | Sets the font weight of the styled text. |
| `setText(text)` | `StyledText` | Sets the main content of the styled text. |

## `TextFormatChip`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setLabel(label)` | `TextFormatChip` | Sets the text displayed in the chip. |
| `setTextFormatIcon(icon)` | `TextFormatChip` | Sets the icon displayed in the chip. |
| `setUrl(url)` | `TextFormatChip` | Sets the URL to navigate to when the chip is clicked. |

## `TextFormatElement`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setHyperlink(hyperlink)` | `TextFormatElement` | Sets the text format element as a `Hyperlink`. |
| `setListContainer(listContainer)` | `TextFormatElement` | Sets the text format element as a `ListContainer`. |
| `setStyledText(styledText)` | `TextFormatElement` | Sets the text format element as a `StyledText`. |
| `setText(text)` | `TextFormatElement` | Sets the text format element as a text string. |
| `setTextFormatChip(chip)` | `TextFormatElement` | Sets the text format element as a `TextFormatChip`. |

## `TextFormatIcon`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setIconUrl(iconUrl)` | `TextFormatIcon` | Sets the icon URL. |
| `setMaterialIconName(materialIconName)` | `TextFormatIcon` | Sets the material icon name defined in Google Material Icons. |

## `TextStyle`

### Properties

| Property | Type | Description |
|---|---|---|
| `STYLE_UNSPECIFIED` | `Enum` | No style applied. |
| `ITALIC` | `Enum` | Italic style. |
| `UNDERLINE` | `Enum` | Underline style. |
| `STRIKETHROUGH` | `Enum` | Strikethrough style. |
| `LINE_BREAK` | `Enum` | Line break. |
| `UPPERCASE` | `Enum` | Uppercase style. |
| `CODE` | `Enum` | Code style. |
| `CODE_BLOCK` | `Enum` | Code block style. |

## `TimeStamp`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setNanos(nanos)` | `TimeStamp` | Sets the nanos of the timestamp, it represents the number of nanoseconds within the current second. |
| `setSeconds(seconds)` | `TimeStamp` | Sets the seconds of the timestamp, it represents the number of seconds since the Unix epoch(January 1, 1970, 00:00:00 UTC). |

## `UniversalActionResponse`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `printJson()` | `String` | Prints the JSON representation of this object. |

## `UniversalActionResponseBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `build()` | `UniversalActionResponse` | Builds the current universal action response and validates it. |
| `displayAddOnCards(cardObjects)` | `UniversalActionResponseBuilder` | Displays the add-on with the specified cards. |
| `setOpenLink(openLink)` | `UniversalActionResponseBuilder` | Sets the URL to open when the universal action is selected. |

## `UpdateDraftActionResponse`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `printJson()` | `String` | Prints the JSON representation of this object. |

## `UpdateDraftActionResponseBuilder`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `build()` | `UpdateDraftActionResponse` | Builds the current update draft action response and validates it. |
| `setSendStatus(sendStatus)` | `UpdateDraftActionResponseBuilder` | Sets the enum field that determines whether or not the email sends after the update action. |
| `setUpdateDraftBccRecipientsAction(updateDraftBccRecipientsAction)` | `UpdateDraftActionResponseBuilder` | Sets an action that updates the email Bcc recipients of a draft. |
| `setUpdateDraftBodyAction(updateDraftBodyAction)` | `UpdateDraftActionResponseBuilder` | Set an action that updates the email body of a draft. |
| `setUpdateDraftCcRecipientsAction(updateDraftCcRecipientsAction)` | `UpdateDraftActionResponseBuilder` | Sets an action that updates the Cc recipients of a draft. |
| `setUpdateDraftSubjectAction(updateDraftSubjectAction)` | `UpdateDraftActionResponseBuilder` | Sets an action that updates the subject line of a draft. |
| `setUpdateDraftToRecipientsAction(updateDraftToRecipientsAction)` | `UpdateDraftActionResponseBuilder` | Sets an action that updates the To recipients of a draft. |

## `UpdateDraftBccRecipientsAction`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addUpdateBccRecipients(bccRecipientEmails)` | `UpdateDraftBccRecipientsAction` | Updates the Bcc recipients of an email draft. |

## `UpdateDraftBodyAction`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addUpdateContent(content, contentType)` | `UpdateDraftBodyAction` | Adds the specified content to the draft body. |
| `setUpdateType(updateType)` | `UpdateDraftBodyAction` | Sets the `UpdateDraftBodyType` of this update action on the draft body. |

## `UpdateDraftBodyType`

### Properties

| Property | Type | Description |
|---|---|---|
| `IN_PLACE_INSERT` | `Enum` | Default. |
| `INSERT_AT_START` | `Enum` | Update actions insert content at the start of message body. |
| `INSERT_AT_END` | `Enum` | Update actions insert content at the end of the message body. |

## `UpdateDraftCcRecipientsAction`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addUpdateCcRecipients(ccRecipientEmails)` | `UpdateDraftCcRecipientsAction` | Updates the Cc recipients of an email draft. |

## `UpdateDraftSubjectAction`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addUpdateSubject(subject)` | `UpdateDraftSubjectAction` | Updates the subject line of an email draft. |

## `UpdateDraftToRecipientsAction`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addUpdateToRecipients(toRecipientEmails)` | `UpdateDraftToRecipientsAction` | Updates the To recipients of an email draft. |

## `UpdateInlinePreviewAction`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addCardWithId(cardWithId)` | `UpdateInlinePreviewAction` | Adds the card for this action. |
| `addExpiration(ttl)` | `UpdateInlinePreviewAction` | Adds the expiration for this action. |

## `UpdateMessageAction`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setMessage(message)` | `UpdateMessageAction` | Sets the message for this action. |

## `UpdateWidget`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addSuggestion(text, value, selected, startIconUri, bottomText)` | `UpdateWidget` | Adds a new item that can be selected, for multi-select menus. |

## `ValidationErrorSeverity`

### Properties

| Property | Type | Description |
|---|---|---|
| `SEVERITY_UNSPECIFIED` | `Enum` | Unspecified. |
| `CRITICAL` | `Enum` | Critical, the error is critical and must be fixed before publish. |
| `WARNING` | `Enum` | Warning, the error is non-critical and is not blocking publish. |

## `ValueMetadata`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addCastableType(dataType)` | `ValueMetadata` | Adds a optional allowed types that can be dynamically casted for a variable data to this value metadata. |
| `addEnumValue(enumValue)` | `ValueMetadata` | Adds an optional string value to the allowed enum values of a variable, this field can only be set if the `DataType` is set to String type. |
| `setDefaultValue(defaultValue)` | `ValueMetadata` | Sets the optional default value of the variable, example, if the variable type is boolean, defaultValue may be set to "`true`" or "`false`". |

## `VariableData`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addBooleanValue(value)` | `VariableData` | Adds a boolean value to the variable data. |
| `addEmailAddress(emailAddress)` | `VariableData` | Adds an email address to the variable data. |
| `addFloatValue(value)` | `VariableData` | Adds a float value to the variable data. |
| `addGoogleUser(googleUser)` | `VariableData` | Adds a google user to the variable data. |
| `addIntegerValue(value)` | `VariableData` | Adds an integer value to the variable data. |
| `addResourceData(resourceData)` | `VariableData` | Adds a `ResourceData` value to the variable data. |
| `addResourceReference(resourceReference)` | `VariableData` | Adds a resource reference ID to the variable data. |
| `addStringValue(value)` | `VariableData` | Adds a string value to the variable data. |
| `addTimestampValue(value)` | `VariableData` | Adds a `TimeStamp` value to the variable data. |
| `addWorkflowTextFormat(workflowTextFormat)` | `VariableData` | Adds a `WorkflowTextFormat` value to the variable data. |

## `WorkflowAction`

## `WorkflowTextFormat`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `addTextFormatElement(textFormatElement)` | `WorkflowTextFormat` | Adds a `TextFormatElement` to the workflow text format. |

## `WorkflowValidationErrorAction`

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `setSeverity(severity)` | `WorkflowValidationErrorAction` | Sets the severity of the validation error. |