Class ModifyCard

ModifyCard

A builder for ModifyCard objects that changes and updates an existing card's interface by passing the ModifyCard 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

MethodReturn typeBrief description
setInsertSection(insertSection)ModifyCardSets the InsertSection for this modify card object.
setInsertWidget(insertWidget)ModifyCardSets the InsertWidget for this modify card object.
setRemoveSection(removeSection)ModifyCardSets the RemoveSection for this modify card object.
setRemoveWidget(removeWidget)ModifyCardSets the RemoveWidget for this modify card object.
setReplaceSection(replacementSection)ModifyCardSets the replacement CardSection for this modify card object, the replacement section should have the same id as an existing card section.
setReplaceWidget(replacementWidget)ModifyCardSets the replacement widget for this modify card object, the replacement widget should have the same id as an existing widget.
setUpdateWidget(updateWidget)ModifyCardSets the UpdateWidget for this modify card object.

Detailed documentation

setInsertSection(insertSection)

Sets the InsertSection for this modify card object.

Parameters

NameTypeDescription
insertSectionInsertSectionThe insert section to apply to the card.

Return

ModifyCard — This modify card object, for chaining.


setInsertWidget(insertWidget)

Sets the InsertWidget for this modify card object.

Parameters

NameTypeDescription
insertWidgetInsertWidgetThe InsertWidget to apply to the card.

Return

ModifyCard — This modify card object, for chaining.


setRemoveSection(removeSection)

Sets the RemoveSection for this modify card object.

Parameters

NameTypeDescription
removeSectionRemoveSectionThe RemoveSection to apply to the card.

Return

ModifyCard — This modify card object, for chaining.


setRemoveWidget(removeWidget)

Sets the RemoveWidget for this modify card object.

Parameters

NameTypeDescription
removeWidgetRemoveWidgetThe RemoveWidget to apply to the card.

Return

ModifyCard — This modify card object, for chaining.


setReplaceSection(replacementSection)

Sets the replacement CardSection for this modify card object, the replacement section should have the same id as an existing card section.

Parameters

NameTypeDescription
replacementSectionCardSectionThe replacement section to overwrite an existing card section.

Return

ModifyCard — 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

NameTypeDescription
replacementWidgetWidgetThe replacement widget to overwrite an existing widget.

Return

ModifyCard — This modify card object, for chaining.


setUpdateWidget(updateWidget)

Sets the UpdateWidget for this modify card object.

Parameters

NameTypeDescription
updateWidgetUpdateWidgetThe UpdateWidget to apply to the card.

Return

ModifyCard — This modify card object, for chaining.