Class UpdateDraftActionResponse

更新下書きアクションレスポンス

ユーザーが現在編集しているメールの下書きを更新するアクションを表します。

// An UpdateDraftActionResponse that inserts a list of To recipients into an // email draft let updateDraftActionResponse =     CardService.newUpdateDraftActionResponseBuilder()         .setUpdateToRecipientsAction(             CardService.newUpdateToRecipientsAction().addUpdateToRecipients([               '[email protected]',               '[email protected]',             ]),             )         .build();  // An UpdateDraftActionResponse that inserts a list of Cc recipients into an // email draft updateDraftActionResponse =     CardService.newUpdateDraftActionResponseBuilder()         .setUpdateCcRecipientsAction(             CardService.newUpdateCcRecipientsAction().addUpdateCcRecipients([               '[email protected]',               '[email protected]',             ]),             )         .build()          // An UpdateDraftActionResponse that inserts a list of Bcc recipients         // into an email draft         .setUpdateCcRecipientsAction(             CardService.newUpdateBccRecipientsAction().addUpdateBccRecipients([               '[email protected]',               '[email protected]',             ]),         );  // An UpdateDraftActionResponse that inserts a subject line into an email draft updateDraftActionResponse =     CardService.newUpdateDraftActionResponseBuilder()         .setUpdateDraftSubjectAction(             CardService.newUpdateDraftSubjectAction().addUpdateSubject(                 'example subject',                 ),             )         .build();  // An UpdateDraftActionResponse that inserts non-editable content (a link in // this case) into an email draft. updateDraftActionResponse =     CardService.newUpdateDraftActionResponseBuilder()         .setUpdateDraftBodyAction(             CardService.newUpdateDraftBodyAction()                 .addUpdateContent(                     '<a href="https://www.google.com">Google</a>',                     CardService.ContentType.IMMUTABLE_HTML,                     )                 .setUpdateType(CardService.UpdateDraftBodyType.IN_PLACE_INSERT),             )         .build();  // An UpdateDraftActionResponse that inserts a link into an email draft. The // added content can be edited further. updateDraftActionResponse =     CardService.newUpdateDraftActionResponseBuilder()         .setUpdateDraftBodyAction(             CardService.newUpdateDraftBodyAction()                 .addUpdateContent(                     '<a href="https://www.google.com">Google</a>',                     CardService.ContentType.MUTABLE_HTML,                     )                 .setUpdateType(CardService.UpdateDraftBodyType.IN_PLACE_INSERT),             )         .build();  // An UpdateDraftActionResponse that inserts multiple values of different types. // The example action response inserts two lines next to each other in the email // draft, at the cursor position. Each line contains the content added by // {@link UpdateDraftActionResponseBuilder#addUpdateContent}. updateDraftActionResponse =     CardService.newUpdateDraftActionResponseBuilder()         .setUpdateDraftBodyAction(             CardService.newUpdateDraftBodyAction()                 .addUpdateContent(                     '<a href="https://www.google.com">Google</a>',                     CardService.ContentType.MUTABLE_HTML,                     )                 .addUpdateContent(                     'Above is a google link.', CardService.ContentType.PLAIN_TEXT)                 .setUpdateType(CardService.UpdateDraftBodyType.IN_PLACE_INSERT),             )         .build();

メソッド

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

詳細なドキュメント

printJson()

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

戻る

String