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
An item that users can select in a selection input, such as a checkbox or switch.
Instance Attribute Summary collapse
-
#selected ⇒ Boolean
(also: #selected?)
Whether the item is selected by default.
-
#text ⇒ String
The text that identifies or describes the item 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.
2253 2254 2255 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2253 def initialize(**args) update!(**args) end |
Instance Attribute Details
#selected ⇒ Boolean Also known as: selected?
Whether the item is selected by default. If the selection input only accepts
one value (such as for radio buttons or a dropdown menu), only set this field
for one item.
Corresponds to the JSON property selected
2237 2238 2239 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2237 def selected @selected end |
#text ⇒ String
The text that identifies or describes the item to users.
Corresponds to the JSON property text
2243 2244 2245 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2243 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
2251 2252 2253 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2251 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
2258 2259 2260 2261 2262 |
# File 'lib/google/apis/chat_v1/classes.rb', line 2258 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 |