Class: Google::Apis::ChatV1::GoogleAppsCardV1SelectionItem

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 selectable item in the switch control.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1SelectionItem

Returns a new instance of GoogleAppsCardV1SelectionItem.



1968
1969
1970
# File 'lib/google/apis/chat_v1/classes.rb', line 1968

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

Instance Attribute Details

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

Returns:

  • (Boolean)


1954
1955
1956
# File 'lib/google/apis/chat_v1/classes.rb', line 1954

def selected
  @selected
end

#textString

The text to be displayed. Corresponds to the JSON property text

Returns:

  • (String)


1960
1961
1962
# File 'lib/google/apis/chat_v1/classes.rb', line 1960

def text
  @text
end

#valueString

The value associated with this item. The client should use this as a form input value. Corresponds to the JSON property value

Returns:

  • (String)


1966
1967
1968
# File 'lib/google/apis/chat_v1/classes.rb', line 1966

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1973
1974
1975
1976
1977
# File 'lib/google/apis/chat_v1/classes.rb', line 1973

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