Class ActionResponse

ActionResponse

クライアントで 1 つ以上のアクションを実行するためにコールバック関数(フォーム レスポンス ハンドラなど)から返されるレスポンス オブジェクト。一部の操作の組み合わせはサポートされていません。

// An action that opens a link
var actionResponse = CardService.newActionResponseBuilder()
    .setOpenLink(CardService.newOpenLink()
        .setUrl("https://www.google.com"))
    .build();

// An action that shows a notification.
var actionResponse = CardService.newActionResponseBuilder()
    .setNotification(CardService.newNotification()
        .setText("Some info to display to user"))
    .build();

// An action that shows an additional card. It also sets a flag to indicate that the original
// state data has changed.

var cardBuilder = CardService.newCardBuilder();
// Build card ...
var actionResponse = CardService.newActionResponseBuilder()
    .setNavigation(CardService.newNavigation()
        .pushCard(cardBuilder.build()))
    .setStateChanged(true)
    .build();

Methods

メソッド戻り値の型概要
printJson()Stringこのオブジェクトの JSON 表現を出力します。

詳細なドキュメント

printJson()

このオブジェクトの JSON 表現を出力します。これはデバッグ専用です。

リターン

String