A builder for Modify objects that changes and updates an existing card's
interface by passing the Modify object to a Action. For usage, see Update configuration cards.
Only available for Google Workspace add-ons that extend Google Workspace Studio.
Sample usage:
const insertSection = AddOnsResponseService.newInsertSection().insertBelowSection('sample_id') .setSection(CardService.newCardSection().setHeader('New Section')); const modifyCard = AddOnsResponseService.newModifyCard().setInsertSection(insertSection); const navigation = AddOnsResponseService.newNavigation().addModifyCard(modifyCard);
Methods
| Method | Return type | Brief description |
|---|---|---|
set | Modify | Sets the Insert for this modify card object. |
set | Modify | Sets the Insert for this modify card object. |
set | Modify | Sets the Remove for this modify card object. |
set | Modify | Sets the Remove for this modify card object. |
set | Modify | Sets the replacement Card for this modify card object, the replacement section
should have the same id as an existing card section. |
set | Modify | Sets the replacement widget for this modify card object, the replacement widget should have the same id as an existing widget. |
set | Modify | Sets the Update for this modify card object. |
Detailed documentation
setInsertSection(insertSection)
Sets the Insert for this modify card object.
Parameters
| Name | Type | Description |
|---|---|---|
insert | Insert | The insert section to apply to the card. |
Return
Modify — This modify card object, for chaining.
setInsertWidget(insertWidget)
Sets the Insert for this modify card object.
Parameters
| Name | Type | Description |
|---|---|---|
insert | Insert | The Insert to apply to the card. |
Return
Modify — This modify card object, for chaining.
setRemoveSection(removeSection)
Sets the Remove for this modify card object.
Parameters
| Name | Type | Description |
|---|---|---|
remove | Remove | The Remove to apply to the card. |
Return
Modify — This modify card object, for chaining.
setRemoveWidget(removeWidget)
Sets the Remove for this modify card object.
Parameters
| Name | Type | Description |
|---|---|---|
remove | Remove | The Remove to apply to the card. |
Return
Modify — This modify card object, for chaining.
setReplaceSection(replacementSection)
Sets the replacement Card for this modify card object, the replacement section
should have the same id as an existing card section.
Parameters
| Name | Type | Description |
|---|---|---|
replacement | Card | The replacement section to overwrite an existing card section. |
Return
Modify — This modify card object, for chaining.
setReplaceWidget(replacementWidget)
Sets the replacement widget for this modify card object, the replacement widget should have the same id as an existing widget.
Parameters
| Name | Type | Description |
|---|---|---|
replacement | Widget | The replacement widget to overwrite an existing widget. |
Return
Modify — This modify card object, for chaining.
setUpdateWidget(updateWidget)
Sets the Update for this modify card object.
Parameters
| Name | Type | Description |
|---|---|---|
update | Update | The Update to apply to the card. |
Return
Modify — This modify card object, for chaining.