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

An item that users can select in a selection input, such as a checkbox or switch.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1SelectionItem

Returns a new instance of GoogleAppsCardV1SelectionItem.



2322
2323
2324
# File 'lib/google/apis/chat_v1/classes.rb', line 2322

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

Instance Attribute Details

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

Returns:

  • (Boolean)


2306
2307
2308
# File 'lib/google/apis/chat_v1/classes.rb', line 2306

def selected
  @selected
end

#textString

The text that identifies or describes the item to users. Corresponds to the JSON property text

Returns:

  • (String)


2312
2313
2314
# File 'lib/google/apis/chat_v1/classes.rb', line 2312

def text
  @text
end

#valueString

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

Returns:

  • (String)


2320
2321
2322
# File 'lib/google/apis/chat_v1/classes.rb', line 2320

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2327
2328
2329
2330
2331
# File 'lib/google/apis/chat_v1/classes.rb', line 2327

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