Class: Google::Apis::ChatV1::GoogleAppsCardV1SelectionInput

Inherits:
Object
  • Object
show all
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. 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

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1SelectionInput

Returns a new instance of GoogleAppsCardV1SelectionInput.



2276
2277
2278
# File 'lib/google/apis/chat_v1/classes.rb', line 2276

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#itemsArray<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



2244
2245
2246
# File 'lib/google/apis/chat_v1/classes.rb', line 2244

def items
  @items
end

#labelString

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

Returns:

  • (String)


2252
2253
2254
# File 'lib/google/apis/chat_v1/classes.rb', line 2252

def label
  @label
end

#nameString

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

Returns:

  • (String)


2259
2260
2261
# File 'lib/google/apis/chat_v1/classes.rb', line 2259

def name
  @name
end

#on_change_actionGoogle::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



2266
2267
2268
# File 'lib/google/apis/chat_v1/classes.rb', line 2266

def on_change_action
  @on_change_action
end

#typeString

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

Returns:

  • (String)


2274
2275
2276
# File 'lib/google/apis/chat_v1/classes.rb', line 2274

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2281
2282
2283
2284
2285
2286
2287
# File 'lib/google/apis/chat_v1/classes.rb', line 2281

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