ChatSpaceDataSource

A data source that populates Google Chat spaces as selection items for a multiselect menu. Only
populates spaces that the user is a member of.

```javascript
const chatSpaceDataSource =
    CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
```

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

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/card-service/chat-space-data-source#setDefaultToCurrentSpace(Boolean)` | `https://developers.google.com/apps-script/reference/card-service/chat-space-data-source#` | If set to `true`, the multi select menu selects the current Google Chat space as an item by default. |

## Detailed documentation

### `setDefaultToCurrentSpace(defaultToCurrentSpace)`

If set to `true`, the multi select menu selects the current Google Chat space as an item
by default.

```javascript
const chatSpaceDataSource =
    CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
```
Only available for Google Chat apps. Not available for Google Workspace add-ons.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `defaultToCurrentSpace` | `Boolean` | The boolean to be set. |

#### Return


`https://developers.google.com/apps-script/reference/card-service/chat-space-data-source#` --- This object, for chaining.