UpdateVisibilityAction

Updates the visibility of a card widget to make it display or to hide it.

Only available for Google Workspace add-ons that extend Google Workspace Studio.

```javascript
const updateVisibilityAction = CardService.newUpdateVisibilityAction()
.setVisibility(CardService.Visibility.VISIBLE);
```

### Methods

| Method | Return type | Brief description |
|---|---|---|
| `https://developers.google.com/apps-script/reference/card-service/update-visibility-action#setVisibility(Visibility)` | `https://developers.google.com/apps-script/reference/card-service/update-visibility-action#` | Sets the visibility of widgets to visible or hidden. |

## Detailed documentation

### `setVisibility(visibility)`

Sets the visibility of widgets to visible or hidden.

#### Parameters

| Name | Type | Description |
|---|---|---|
| `visibility` | `https://developers.google.com/apps-script/reference/card-service/visibility` | The visibility of the widgets. |

#### Return


`https://developers.google.com/apps-script/reference/card-service/update-visibility-action#` --- The UpdateVisibilityAction, for chaining.