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 a UI item with options for users to select. For example, a dropdown menu or check list. Chat apps receive and can process the value of entered text during form input events. For details about working with form inputs, see Receive form data. When you need to collect data from users that matches options you set, use a selection input. To collect abstract data from users, use the text input widget instead.
Instance Attribute Summary collapse
-
#items ⇒ Array<Google::Apis::ChatV1::GoogleAppsCardV1SelectionItem>
An array of the selected items.
-
#label ⇒ String
The text that appears above the selection input field in the user interface.
-
#name ⇒ String
The name by which the selection input is identified in a form input event.
-
#on_change_action ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Action
An action that describes the behavior when the form is submitted.
-
#type ⇒ String
The way that an option appears to users.
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.
2040 2041 2042 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2040 def initialize(**args) update!(**args) end |
Instance Attribute Details
#items ⇒ Array<Google::Apis::ChatV1::GoogleAppsCardV1SelectionItem>
An array of the selected items. For example, all the selected check boxes.
Corresponds to the JSON property items
2007 2008 2009 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2007 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
2015 2016 2017 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2015 def label @label end |
#name ⇒ String
The name by which the selection input is identified in a form input event. For
details about working with form inputs, see Receive form data.
Corresponds to the JSON property name
2022 2023 2024 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2022 def name @name end |
#on_change_action ⇒ Google::Apis::ChatV1::GoogleAppsCardV1Action
An action that describes the behavior when the form is submitted. For example,
an Apps Script can be invoked to handle the form. If the action is triggered,
the form values are sent to the server.
Corresponds to the JSON property onChangeAction
2029 2030 2031 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2029 def on_change_action @on_change_action end |
#type ⇒ String
The way that an option appears to users. Different options support different
types of interactions. For example, users can enable multiple check boxes, but
can only select one value from a dropdown menu. Each selection input supports
one type of selection. Mixing check boxes and switches, for example, is not
supported.
Corresponds to the JSON property type
2038 2039 2040 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2038 def type @type end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2045 2046 2047 2048 2049 2050 2051 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2045 def update!(**args) @items = args[:items] if args.key?(:items) @label = args[:label] if args.key?(:label) @name = args[:name] if args.key?(:name) @on_change_action = args[:on_change_action] if args.key?(:on_change_action) @type = args[:type] if args.key?(:type) end |