ব্যবহারকারী বর্তমানে সম্পাদনা করছেন এমন একটি ইমেল খসড়া আপডেট করে এমন একটি ক্রিয়াকে প্রতিনিধিত্ব করে৷
// An UpdateDraftActionResponse that inserts a list of To recipients into an email draft
var updateDraftActionResponse = CardService.newUpdateDraftActionResponseBuilder()
.setUpdateToRecipientsAction(CardService.newUpdateToRecipientsAction()
.addUpdateToRecipients(["joe@example.com", "wen@example.com"]))
.build()
// An UpdateDraftActionResponse that inserts a list of Cc recipients into an email draft
var updateDraftActionResponse = CardService.newUpdateDraftActionResponseBuilder()
.setUpdateCcRecipientsAction(CardService.newUpdateCcRecipientsAction()
.addUpdateCcRecipients(["joe@example.com", "wen@example.com"]))
.build()
// An UpdateDraftActionResponse that inserts a list of Bcc recipients into an email draft
.setUpdateCcRecipientsAction(CardService.newUpdateBccRecipientsAction()
.addUpdateBccRecipients(["joe@example.com", "wen@example.com"]))
// An UpdateDraftActionResponse that inserts a subject line into an email draft
var updateDraftActionResponse = CARD_SERVICE.newUpdateDraftActionResponseBuilder()
.setUpdateDraftSubjectAction(CARD_SERVICE.newUpdateDraftSubjectAction()
.addUpdateSubject("example subject"))
.build();
// An UpdateDraftActionResponse that inserts non-editable content (a link in this case) into an
// email draft.
var updateDraftActionResponse = CardService.newUpdateDraftActionResponseBuilder()
.setUpdateDraftBodyAction(CardService.newUpdateDraftBodyAction()
.addUpdateContent(
"<a href=\"https://www.google.com\">Google</a>",
ContentType.IMMUTABLE_HTML)
.setUpdateType(UpdateDraftBodyType.IN_PLACE_INSERT))
.build();
// An UpdateDraftActionResponse that inserts a link into an email draft. The added content can be
// edited further.
var updateDraftActionResponse = CardService.newUpdateDraftActionResponseBuilder()
.setUpdateDraftBodyAction(CardService.newUpdateDraftBodyAction()
.addUpdateContent(
"<a href=\"https://www.google.com\">Google</a>",
ContentType.MUTABLE_HTML)
.setUpdateType(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}.
var updateDraftActionResponse = CardService.newUpdateDraftActionResponseBuilder()
.setUpdateDraftBodyAction(CardService.newUpdateDraftBodyAction()
.addUpdateContent(
"<a href=\"https://www.google.com\">Google</a>",
ContentType.MUTABLE_HTML)
.addUpdateContent("Above is a google link.", ContentType.PLAIN_TEXT)
.setUpdateType(UpdateDraftBodyType.IN_PLACE_INSERT))
.build();
পদ্ধতি
পদ্ধতি | রিটার্ন টাইপ | সংক্ষিপ্ত বিবরণ |
---|---|---|
printJson() | String | এই বস্তুর JSON উপস্থাপনা প্রিন্ট করে। |
বিস্তারিত ডকুমেন্টেশন
printJson()
এই বস্তুর JSON উপস্থাপনা প্রিন্ট করে। এটি শুধুমাত্র ডিবাগ করার জন্য।
প্রত্যাবর্তন
String