Enum SelectionInputType
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
選択入力タイプ
ユーザーが選択できる項目の形式。オプションによって、サポートされるインタラクションの種類が異なります。たとえば、ユーザーは複数のチェックボックスを選択できますが、プルダウン メニューから選択できるのは 1 つの項目のみです。
各選択入力は 1 種類の選択をサポートします。たとえば、チェックボックスとスイッチを組み合わせることはできません。
Google Chat アプリと Google Workspace アドオンで利用できます。
列挙型を呼び出すには、その親クラス、名前、プロパティを呼び出します。例:
CardService.SelectionInput.CHECK_BOX
プロパティ
プロパティ | タイプ | 説明 |
CHECK_BOX | Enum | チェックボックスの入力スタイル。デフォルトです。 |
RADIO_BUTTON | Enum | ラジオボタンの入力スタイル。グループ内のアイテムは 1 つまで選択できます。 |
DROPDOWN | Enum | プルダウン メニュー選択入力スタイル。 |
SWITCH | Enum | スイッチのセット。ユーザーは 1 つ以上のスイッチをオンにできます。 |
MULTI_SELECT | Enum | 静的データまたは動的データの複数選択メニュー。 |
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
[null,null,["最終更新日 2025-07-26 UTC。"],[[["\u003cp\u003e\u003ccode\u003eSelectionInputType\u003c/code\u003e dictates how users interact with selectable items, such as choosing single or multiple options through checkboxes, radio buttons, dropdowns, switches, or multi-select menus.\u003c/p\u003e\n"],["\u003cp\u003eEach selection input element supports a single selection type, and combining different types like checkboxes and switches within the same element is not allowed.\u003c/p\u003e\n"],["\u003cp\u003eThis feature is available for use in Google Chat apps and Google Workspace Add-ons.\u003c/p\u003e\n"],["\u003cp\u003eTo specify a selection type, use the \u003ccode\u003eCardService.SelectionInput\u003c/code\u003e enum followed by the desired property, for instance, \u003ccode\u003eCardService.SelectionInput.CHECK_BOX\u003c/code\u003e for checkboxes.\u003c/p\u003e\n"]]],["Users can select items in various formats, including `CHECK_BOX`, `RADIO_BUTTON`, `DROPDOWN`, `SWITCH`, and `MULTI_SELECT`. Each selection input supports only one style, and mixing styles is unsupported. Checkboxes and switches allow multiple selections, while radio buttons and dropdowns are limited to single selections. `MULTI_SELECT` is used for multiselect options. This is applicable to Google Chat apps and Google Workspace add-ons. Each selection style can be called by it's parent class, name and property.\n"],null,["# Enum SelectionInputType\n\nSelectionInputType\n\nThe format of the items that users can select. Different options support different types of\ninteractions. For example, users can select multiple checkboxes, but can only select one item\nfrom a dropdown menu.\n\nEach selection input supports one type of selection. Mixing checkboxes and switches, for\nexample, isn't supported.\n\nAvailable for Google Chat apps and Google Workspace add-ons.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCardService.SelectionInput.CHECK_BOX`. \n\n### Properties\n\n| Property | Type | Description |\n|----------------|--------|--------------------------------------------------------------------------|\n| `CHECK_BOX` | `Enum` | Checkbox input style. Default. |\n| `RADIO_BUTTON` | `Enum` | Radio button input style. At most one item in the group can be selected. |\n| `DROPDOWN` | `Enum` | Dropdown menu selection input style. |\n| `SWITCH` | `Enum` | A set of switches. Users can turn on one or more switches. |\n| `MULTI_SELECT` | `Enum` | A multiselect menu for static or dynamic data. |"]]