View Source GoogleApi.Chat.V1.Model.GoogleAppsCardV1SelectionInput (google_api_chat v0.34.0)

A widget that creates one or more UI items that users can select. For example, a dropdown menu or checkboxes. You can use this widget to collect data that can be predicted or enumerated. For an example in Google Chat apps, see Selection input. Chat apps can process the value of items that users select or input. For details about working with form inputs, see Receive form data. To collect undefined or abstract data from users, use the TextInput widget. Google Workspace Add-ons and Chat apps:

Attributes

  • externalDataSource (type: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action.t, default: nil) - An external data source, such as a relational data base.
  • items (type: list(GoogleApi.Chat.V1.Model.GoogleAppsCardV1SelectionItem.t), default: nil) - An array of selectable items. For example, an array of radio buttons or checkboxes. Supports up to 100 items.
  • label (type: String.t, default: nil) - The text that appears above the selection input field in the user interface. Specify text that helps the user enter the information your app needs. For example, if users are selecting the urgency of a work ticket from a drop-down menu, the label might be "Urgency" or "Select urgency".
  • multiSelectMaxSelectedItems (type: integer(), default: nil) - For multiselect menus, the maximum number of items that a user can select. Minimum value is 1 item. If unspecified, defaults to 3 items.
  • multiSelectMinQueryLength (type: integer(), default: nil) - For multiselect menus, the number of text characters that a user inputs before the Chat app queries autocomplete and displays suggested items in the menu. If unspecified, defaults to 0 characters for static data sources and 3 characters for external data sources.
  • name (type: String.t, default: nil) - The name that identifies the selection input in a form input event. For details about working with form inputs, see Receive form data.
  • onChangeAction (type: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action.t, default: nil) - If specified, the form is submitted when the selection changes. If not specified, you must specify a separate button that submits the form. For details about working with form inputs, see Receive form data.
  • platformDataSource (type: GoogleApi.Chat.V1.Model.GoogleAppsCardV1PlatformDataSource.t, default: nil) - A data source from Google Workspace.
  • type (type: String.t, default: nil) - The type of items that are displayed to users in a SelectionInput widget. Selection types support different types of interactions. For example, users can select one or more checkboxes, but they can only select one value from a dropdown menu.

Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Types

@type t() :: %GoogleApi.Chat.V1.Model.GoogleAppsCardV1SelectionInput{
  externalDataSource: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action.t() | nil,
  items: [GoogleApi.Chat.V1.Model.GoogleAppsCardV1SelectionItem.t()] | nil,
  label: String.t() | nil,
  multiSelectMaxSelectedItems: integer() | nil,
  multiSelectMinQueryLength: integer() | nil,
  name: String.t() | nil,
  onChangeAction: GoogleApi.Chat.V1.Model.GoogleAppsCardV1Action.t() | nil,
  platformDataSource:
    GoogleApi.Chat.V1.Model.GoogleAppsCardV1PlatformDataSource.t() | nil,
  type: String.t() | nil
}

Functions

@spec decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.