Google Chat V1 API - Class Google::Apps::Card::V1::SelectionInput (v0.1.1)

Reference documentation and code samples for the Google Chat V1 API class Google::Apps::Card::V1::SelectionInput.

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 Add selectable UI elements.

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:

Inherits

  • Object

Extended By

  • Google::Protobuf::MessageExts::ClassMethods

Includes

  • Google::Protobuf::MessageExts

Methods

#external_data_source

def external_data_source() -> ::Google::Apps::Card::V1::Action
Returns

#external_data_source=

def external_data_source=(value) -> ::Google::Apps::Card::V1::Action
Parameter
Returns

#items

def items() -> ::Array<::Google::Apps::Card::V1::SelectionInput::SelectionItem>
Returns

#items=

def items=(value) -> ::Array<::Google::Apps::Card::V1::SelectionInput::SelectionItem>
Parameter
Returns

#label

def label() -> ::String
Returns
  • (::String) — 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".

#label=

def label=(value) -> ::String
Parameter
  • value (::String) — 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".

Returns
  • (::String) — 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".

#multi_select_max_selected_items

def multi_select_max_selected_items() -> ::Integer
Returns
  • (::Integer) — For multiselect menus, the maximum number of items that a user can select. Minimum value is 1 item. If unspecified, defaults to 3 items.

#multi_select_max_selected_items=

def multi_select_max_selected_items=(value) -> ::Integer
Parameter
  • value (::Integer) — For multiselect menus, the maximum number of items that a user can select. Minimum value is 1 item. If unspecified, defaults to 3 items.
Returns
  • (::Integer) — For multiselect menus, the maximum number of items that a user can select. Minimum value is 1 item. If unspecified, defaults to 3 items.

#multi_select_min_query_length

def multi_select_min_query_length() -> ::Integer
Returns
  • (::Integer) — For multiselect menus, the number of text characters that a user inputs before the 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.

#multi_select_min_query_length=

def multi_select_min_query_length=(value) -> ::Integer
Parameter
  • value (::Integer) — For multiselect menus, the number of text characters that a user inputs before the 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.

Returns
  • (::Integer) — For multiselect menus, the number of text characters that a user inputs before the 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

def name() -> ::String
Returns
  • (::String) — The name that identifies the selection input in a form input event.

    For details about working with form inputs, see Receive form data.

#name=

def name=(value) -> ::String
Parameter
  • value (::String) — The name that identifies the selection input in a form input event.

    For details about working with form inputs, see Receive form data.

Returns
  • (::String) — The name that identifies the selection input in a form input event.

    For details about working with form inputs, see Receive form data.

#on_change_action

def on_change_action() -> ::Google::Apps::Card::V1::Action
Returns
  • (::Google::Apps::Card::V1::Action) — 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.

#on_change_action=

def on_change_action=(value) -> ::Google::Apps::Card::V1::Action
Parameter
  • value (::Google::Apps::Card::V1::Action) — 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.

Returns
  • (::Google::Apps::Card::V1::Action) — 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.

#platform_data_source

def platform_data_source() -> ::Google::Apps::Card::V1::SelectionInput::PlatformDataSource
Returns

#platform_data_source=

def platform_data_source=(value) -> ::Google::Apps::Card::V1::SelectionInput::PlatformDataSource
Parameter
Returns

#type

def type() -> ::Google::Apps::Card::V1::SelectionInput::SelectionType
Returns
  • (::Google::Apps::Card::V1::SelectionInput::SelectionType) — 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.

#type=

def type=(value) -> ::Google::Apps::Card::V1::SelectionInput::SelectionType
Parameter
  • value (::Google::Apps::Card::V1::SelectionInput::SelectionType) — 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.
Returns
  • (::Google::Apps::Card::V1::SelectionInput::SelectionType) — 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.