Class: Google::Apis::ChatV1::GoogleAppsCardV1SelectionItem
- Inherits:
-
Object
- Object
- Google::Apis::ChatV1::GoogleAppsCardV1SelectionItem
- 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 selectable item in a selection input, such as a check box or a switch.
Instance Attribute Summary collapse
-
#selected ⇒ Boolean
(also: #selected?)
When
true, more than one item is selected. -
#text ⇒ String
The text displayed to users.
-
#value ⇒ String
The value associated with this item.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleAppsCardV1SelectionItem
constructor
A new instance of GoogleAppsCardV1SelectionItem.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleAppsCardV1SelectionItem
Returns a new instance of GoogleAppsCardV1SelectionItem.
2083 2084 2085 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2083 def initialize(**args) update!(**args) end |
Instance Attribute Details
#selected ⇒ Boolean Also known as: selected?
When true, more than one item is selected. If more than one item is selected
for radio buttons and dropdown menus, the first selected item is received and
the ones after are ignored.
Corresponds to the JSON property selected
2067 2068 2069 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2067 def selected @selected end |
#text ⇒ String
The text displayed to users.
Corresponds to the JSON property text
2073 2074 2075 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2073 def text @text end |
#value ⇒ String
The value associated with this item. The client should use this as a form
input value. For details about working with form inputs, see Receive form
data.
Corresponds to the JSON property value
2081 2082 2083 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2081 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2088 2089 2090 2091 2092 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2088 def update!(**args) @selected = args[:selected] if args.key?(:selected) @text = args[:text] if args.key?(:text) @value = args[:value] if args.key?(:value) end |