class Google::Apis::ChatV1::GoogleAppsCardV1SwitchControl

Attributes

control_type[RW]

The control type, either switch or checkbox. Corresponds to the JSON property `controlType` @return [String]

name[RW]

The name of the switch widget that's used in formInput. Corresponds to the JSON property `name` @return [String]

on_change_action[RW]

An action that describes the behavior when the form is submitted. For example, an Apps Script can be invoked to handle the form. Corresponds to the JSON property `onChangeAction` @return [Google::Apis::ChatV1::GoogleAppsCardV1Action]

selected[RW]

If the switch is selected. Corresponds to the JSON property `selected` @return [Boolean]

selected?[RW]

If the switch is selected. Corresponds to the JSON property `selected` @return [Boolean]

value[RW]

The value is what is passed back in the callback. Corresponds to the JSON property `value` @return [String]

Public Class Methods

new(**args) click to toggle source
# File lib/google/apis/chat_v1/classes.rb, line 1907
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File lib/google/apis/chat_v1/classes.rb, line 1912
def update!(**args)
  @control_type = args[:control_type] if args.key?(:control_type)
  @name = args[:name] if args.key?(:name)
  @on_change_action = args[:on_change_action] if args.key?(:on_change_action)
  @selected = args[:selected] if args.key?(:selected)
  @value = args[:value] if args.key?(:value)
end