Class: Google::Apis::CloudsearchV1::SelectionControl

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ SelectionControl

Returns a new instance of SelectionControl.



17763
17764
17765
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17763

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

Instance Attribute Details

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

For radio button, at most one of the items will be selected. Corresponds to the JSON property items



17740
17741
17742
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17740

def items
  @items
end

#labelString

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

Returns:

  • (String)


17745
17746
17747
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17745

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)


17750
17751
17752
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17750

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



17756
17757
17758
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17756

def on_change
  @on_change
end

#typeString

Corresponds to the JSON property type

Returns:

  • (String)


17761
17762
17763
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17761

def type
  @type
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



17768
17769
17770
17771
17772
17773
17774
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 17768

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