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 the switch control.
Instance Attribute Summary collapse
-
#selected ⇒ Boolean
(also: #selected?)
If more than one item is selected for
RADIO_BUTTONandDROPDOWN, the first selected item is treated as selected and the ones after are ignored. -
#text ⇒ String
The text to be displayed.
-
#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.
1877 1878 1879 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1877 def initialize(**args) update!(**args) end |
Instance Attribute Details
#selected ⇒ Boolean Also known as: selected?
If more than one item is selected for RADIO_BUTTON and DROPDOWN, the first
selected item is treated as selected and the ones after are ignored.
Corresponds to the JSON property selected
1863 1864 1865 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1863 def selected @selected end |
#text ⇒ String
The text to be displayed.
Corresponds to the JSON property text
1869 1870 1871 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1869 def text @text end |
#value ⇒ String
The value associated with this item. The client should use this as a form
input value.
Corresponds to the JSON property value
1875 1876 1877 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1875 def value @value end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1882 1883 1884 1885 1886 |
# File 'lib/google/apis/chat_v1/classes.rb', line 1882 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 |