// A button that opens as a link in an overlay and
// requires a reload when closed.
var button = CardService.newTextButton()
.setText("This button opens a link in an overlay window")
.setOpenLink(CardService.newOpenLink()
.setUrl("https://www.google.com")
.setOpenAs(CardService.OpenAs.OVERLAY)
.setOnClose(CardService.OnClose.RELOAD_ADD_ON));
// An action response that opens a link in full screen and
// requires no action when closed.
var actionResponse = CardService.newActionResponseBuilder()
.setOpenLink(CardService.newOpenLink()
.setUrl("https://www.google.com")
.setOpenAs(CardService.OpenAs.FULL_SIZE)
.setOnClose(CardService.OnClose.NOTHING))
.build();