Class: Google::Apis::ChatV1::GoogleAppsCardV1SelectionInput
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::GoogleAppsCardV1SelectionInput
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/chat_v1/classes.rb,
lib/google/apis/chat_v1/representations.rb,
lib/google/apis/chat_v1/representations.rb
Overview
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.
Instance Attribute Summary collapse
-
#external_data_source ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Action
An action that describes the behavior when the form is submitted.
-
#items ⇒ Array<Google::Apis::ChatV1::GoogleAppsCardV1SelectionItem>
An array of selectable items.
-
#label ⇒ String
The text that appears above the selection input field in the user interface.
-
#multi_select_max_selected_items ⇒ Fixnum
For multi-select menus, the maximum number of items that a user can select.
-
#multi_select_min_query_length ⇒ Fixnum
For multi-select menus, the number of text characters that a user inputs before the Chat app queries autocomplete and displays suggested items on the card.
-
#name ⇒ String
The name that identifies the selection input in a form input event.
-
#on_change_action ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Action
An action that describes the behavior when the form is submitted.
-
#platform_data_source ⇒ Google::Apis::ChatV1::GoogleAppsCardV1PlatformDataSource
Chat apps only.
-
#type ⇒ String
The type of items that are displayed to users in a
SelectionInputwidget.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleAppsCardV1SelectionInput
constructor
A new instance of GoogleAppsCardV1SelectionInput.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleAppsCardV1SelectionInput
Returns a new instance of GoogleAppsCardV1SelectionInput.
2368 2369 2370 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2368 def initialize(**args) update!(**args) end |
Instance Attribute Details
#external_data_source ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Action
An action that describes the behavior when the form is submitted. For example,
you can invoke an Apps Script script to handle the form. If the action is
triggered, the form values are sent to the server.
Corresponds to the JSON property externalDataSource
2305 2306 2307 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2305 def external_data_source @external_data_source end |
#items ⇒ Array<Google::Apis::ChatV1::GoogleAppsCardV1SelectionItem>
An array of selectable items. For example, an array of radio buttons or
checkboxes. Supports up to 100 items.
Corresponds to the JSON property items
2311 2312 2313 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2311 def items @items end |
#label ⇒ 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".
Corresponds to the JSON property label
2319 2320 2321 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2319 def label @label end |
#multi_select_max_selected_items ⇒ Fixnum
For multi-select menus, the maximum number of items that a user can select.
Minimum value is 1 item. If unspecified, set to 3 items. Developer Preview.
Corresponds to the JSON property multiSelectMaxSelectedItems
2326 2327 2328 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2326 def multi_select_max_selected_items @multi_select_max_selected_items end |
#multi_select_min_query_length ⇒ Fixnum
For multi-select menus, the number of text characters that a user inputs
before the Chat app queries autocomplete and displays suggested items on the
card. If unspecified, set to 0 characters for static data sources and 3
characters for external data sources. Developer Preview.
Corresponds to the JSON property multiSelectMinQueryLength
2335 2336 2337 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2335 def multi_select_min_query_length @multi_select_min_query_length end |
#name ⇒ String
The name that identifies the selection input in a form input event. For
details about working with form inputs, see Receive form data.
Corresponds to the JSON property name
2342 2343 2344 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2342 def name @name end |
#on_change_action ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Action
An action that describes the behavior when the form is submitted. For example,
you can invoke an Apps Script script to handle the form. If the action is
triggered, the form values are sent to the server.
Corresponds to the JSON property onChangeAction
2349 2350 2351 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2349 def on_change_action @on_change_action end |
#platform_data_source ⇒ Google::Apis::ChatV1::GoogleAppsCardV1PlatformDataSource
Chat apps only. For a SelectionInput widget that uses a multi-select menu,
the data from a Google Workspace host application. Used to populate the items in the
multi-select menu. Developer Preview.
Corresponds to the JSON property platformDataSource
2358 2359 2360 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2358 def platform_data_source @platform_data_source end |
#type ⇒ String
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.
Corresponds to the JSON property type
2366 2367 2368 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2366 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2373 def update!(**args) @external_data_source = args[:external_data_source] if args.key?(:external_data_source) @items = args[:items] if args.key?(:items) @label = args[:label] if args.key?(:label) @multi_select_max_selected_items = args[:multi_select_max_selected_items] if args.key?(:multi_select_max_selected_items) @multi_select_min_query_length = args[:multi_select_min_query_length] if args.key?(:multi_select_min_query_length) @name = args[:name] if args.key?(:name) @on_change_action = args[:on_change_action] if args.key?(:on_change_action) @platform_data_source = args[:platform_data_source] if args.key?(:platform_data_source) @type = args[:type] if args.key?(:type) end |