Class: Google::Apis::ChatV1::GoogleAppsCardV1SelectionInput

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 widget that creates a UI item with options for users to select. For example, a dropdown menu.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleAppsCardV1SelectionInput

Returns a new instance of GoogleAppsCardV1SelectionInput.



1932
1933
1934
# File 'lib/google/apis/chat_v1/classes.rb', line 1932

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

Instance Attribute Details

#itemsArray<Google::Apis::ChatV1::GoogleAppsCardV1SelectionItem>

An array of the selected items. Corresponds to the JSON property items



1909
1910
1911
# File 'lib/google/apis/chat_v1/classes.rb', line 1909

def items
  @items
end

#labelString

The label displayed ahead of the switch control. Corresponds to the JSON property label

Returns:

  • (String)


1914
1915
1916
# File 'lib/google/apis/chat_v1/classes.rb', line 1914

def label
  @label
end

#nameString

The name of the text input which is used in formInput. Corresponds to the JSON property name

Returns:

  • (String)


1919
1920
1921
# File 'lib/google/apis/chat_v1/classes.rb', line 1919

def name
  @name
end

#on_change_actionGoogle::Apis::ChatV1::GoogleAppsCardV1Action

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



1925
1926
1927
# File 'lib/google/apis/chat_v1/classes.rb', line 1925

def on_change_action
  @on_change_action
end

#typeString

The type of the selection. Corresponds to the JSON property type

Returns:

  • (String)


1930
1931
1932
# File 'lib/google/apis/chat_v1/classes.rb', line 1930

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1937
1938
1939
1940
1941
1942
1943
# File 'lib/google/apis/chat_v1/classes.rb', line 1937

def update!(**args)
  @items = args[:items] if args.key?(:items)
  @label = args[:label] if args.key?(:label)
  @name = args[:name] if args.key?(:name)
  @on_change_action = args[:on_change_action] if args.key?(:on_change_action)
  @type = args[:type] if args.key?(:type)
end