Class: Google::Apis::CloudsearchV1::Menu

Inherits:
Object
  • Object
show all
Includes:
Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
Defined in:
lib/google/apis/cloudsearch_v1/classes.rb,
lib/google/apis/cloudsearch_v1/representations.rb,
lib/google/apis/cloudsearch_v1/representations.rb

Overview

This is deprecated and please use SelectionControl by setting type to DROPDOWN.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ Menu

Returns a new instance of Menu.



13132
13133
13134
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 13132

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

Instance Attribute Details

#itemsArray<Google::Apis::CloudsearchV1::MenuItem>

Corresponds to the JSON property items



13114
13115
13116
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 13114

def items
  @items
end

#labelString

Label used to be displayed ahead of the menu. It is optional. Corresponds to the JSON property label

Returns:

  • (String)


13119
13120
13121
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 13119

def label
  @label
end

#nameString

The name of the text field which is will be used in FormInput. Corresponds to the JSON property name

Returns:

  • (String)


13124
13125
13126
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 13124

def name
  @name
end

#on_changeGoogle::Apis::CloudsearchV1::FormAction

If specified, form is submitted when selection changed. If not specified, developer will need to specify a separate button. Corresponds to the JSON property onChange



13130
13131
13132
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 13130

def on_change
  @on_change
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



13137
13138
13139
13140
13141
13142
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 13137

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 = args[:on_change] if args.key?(:on_change)
end