DialogAction

A builder for `https://developers.google.com/apps-script/reference/card-service/dialog-action#` objects.

Only available for Google Chat apps. Not available for Google Workspace add-ons.

```javascript
const card = CardService.newCardBuilder()
                 .setHeader(CardService.newCardHeader().setTitle('Card title'))
                 .build();
const dialog = CardService.newDialog().setBody(card);

const dialogAction = CardService.newDialogAction().setDialog(dialog);
```

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/card-service/dialog-action#setActionStatus(ActionStatus)` | `https://developers.google.com/apps-script/reference/card-service/dialog-action#` | Sets the action status of `DialogAction`. |
| `https://developers.google.com/apps-script/reference/card-service/dialog-action#setDialog(Dialog)` | `https://developers.google.com/apps-script/reference/card-service/dialog-action#` | Sets the dialog of the `DialogAction`. |

## Detailed documentation

### `setActionStatus(actionStatus)`

Sets the action status of `DialogAction`.

```javascript
const actionStatus = CardService.newActionStatus().setStatusCode(
    CardService.Status.OK,
);

const dialogAction =
    CardService.newDialogAction().setActionStatus(actionStatus);
```

#### Parameters

| Name | Type | Description |
|---|---|---|
| `actionStatus` | `https://developers.google.com/apps-script/reference/card-service/action-status` | The `https://developers.google.com/apps-script/reference/card-service/action-status` to use. |

#### Return


`https://developers.google.com/apps-script/reference/card-service/dialog-action#` --- This object, for chaining.

*** ** * ** ***

### `setDialog(dialog)`

Sets the dialog of the `DialogAction`.

```javascript
const card = CardService.newCardBuilder()
                 .setHeader(CardService.newCardHeader().setTitle('card title'))
                 .build();

// Sets the card of the dialog.
const dialog = CardService.newDialog().setBody(card);

const dialogAction = CardService.newDialogAction().setDialog(dialog);
```

#### Parameters

| Name | Type | Description |
|---|---|---|
| `dialog` | `https://developers.google.com/apps-script/reference/card-service/dialog` | The `https://developers.google.com/apps-script/reference/card-service/dialog` to use. |

#### Return


`https://developers.google.com/apps-script/reference/card-service/dialog-action#` --- This object, for chaining.