Class ChatClientDataSource
ChatClientDataSource
複数選択メニューを使用する SelectionInput
ウィジェットの場合は、Google Chat のデータソース。データソースから、複数選択メニューの選択項目が入力されます。たとえば、ユーザーは自分がメンバーである Google Chat スペースを選択できます。
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
const chatClientDataSource =
CardService.newChatClientDataSource().setSpaceDataSource(
chatSpaceDataSource);
Google Chat アプリでのみ使用できます。Google Workspace アドオンには使用できません。
詳細なドキュメント
setSpaceDataSource(spaceDataSource)
Google Chat スペースを複数選択メニューの選択項目として入力するデータソース。ユーザーがメンバーであるスペースのみが入力されます。
const chatSpaceDataSource =
CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true);
const chatClientDataSource =
CardService.newChatClientDataSource().setSpaceDataSource(
chatSpaceDataSource);
Google Chat アプリでのみ使用できます。Google Workspace アドオンには使用できません。
パラメータ
戻る
ChatClientDataSource
- チェーン用のこのオブジェクト。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-01-30 UTC。
[null,null,["最終更新日 2025-01-30 UTC。"],[[["`ChatClientDataSource` is used for multiselect menus in Google Chat apps, allowing users to select items like Google Chat spaces they are members of."],["This data source relies on a `ChatSpaceDataSource` to populate the selectable spaces in the menu."],["It is exclusively available for Google Chat apps and cannot be utilized in Google Workspace Add-ons."],["The `setSpaceDataSource` method configures the data source for populating Google Chat spaces in the selection menu, limited to spaces where the user is a member."]]],["`ChatClientDataSource` is a data source for multiselect menus in Google Chat apps. It populates selection items with Google Chat spaces a user belongs to. The `setSpaceDataSource` method configures this behavior, taking a `ChatSpaceDataSource` as input. Using `CardService.newChatClientDataSource()` allows the setting up the data source and `CardService.newChatSpaceDataSource().setDefaultToCurrentSpace(true)` allows the default current space. The data is only available for Google Chat apps, not Google Workspace add-ons.\n"]]