Class ActionResponse
অ্যাকশন রেসপন্স ক্লায়েন্টের উপর এক বা একাধিক ক্রিয়া সম্পাদন করার জন্য একটি কলব্যাক ফাংশন (যেমন, একটি ফর্ম প্রতিক্রিয়া হ্যান্ডলার) থেকে প্রতিক্রিয়া বস্তুটি ফেরত দেওয়া যেতে পারে। কর্মের কিছু সমন্বয় সমর্থিত নয়।
// 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();
পদ্ধতি
পদ্ধতি | রিটার্ন টাইপ | সংক্ষিপ্ত বিবরণ |
---|
printJson() | String | এই বস্তুর JSON উপস্থাপনা প্রিন্ট করে। |
বিস্তারিত ডকুমেন্টেশন
printJson()
এই বস্তুর JSON উপস্থাপনা প্রিন্ট করে। এটি শুধুমাত্র ডিবাগ করার জন্য।
প্রত্যাবর্তন
String
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-01-15 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-01-15 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["`ActionResponse` enables callback functions to trigger actions like opening links, displaying notifications, and navigating between cards within Google Workspace add-ons."],["Developers can use `ActionResponseBuilder` methods to define these actions and control client-side behavior based on user interactions."],["The `printJson()` method helps with debugging by providing the JSON representation of the `ActionResponse` object."]]],["The `ActionResponse` object enables client-side actions from callback functions. It supports actions like opening a link, displaying a notification, or showing a new card. `setOpenLink` opens a specified URL, `setNotification` displays text to the user, and `setNavigation` pushes a new card. `setStateChanged` indicates changes in original data. `printJson()` provides a JSON representation of the object for debugging. Certain action combinations may be unsupported.\n"]]