Class: Google::Apis::CloudsearchV1::Section
- Inherits:
-
Object
- Object
- Google::Apis::CloudsearchV1::Section
- 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
Sections are separated by a line divider. They contain a collection of widgets that are rendered (vertically) in the order that they are specified. Across all platforms, AddOns have a narrow fixed width, so there is currently no need for layout properties (e.g. float).
Instance Attribute Summary collapse
-
#collapsable ⇒ Boolean
(also: #collapsable?)
Indicating whether this section is collapsable.
-
#description ⇒ String
The header of the section, text formatted supported.
-
#num_uncollapsable_widgets ⇒ Fixnum
The number of uncollapsable widgets.
-
#widgets ⇒ Array<Google::Apis::CloudsearchV1::WidgetMarkup>
A section must contain at least 1 widget.
Instance Method Summary collapse
-
#initialize(**args) ⇒ Section
constructor
A new instance of Section.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Section
Returns a new instance of Section.
18333 18334 18335 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 18333 def initialize(**args) update!(**args) end |
Instance Attribute Details
#collapsable ⇒ Boolean Also known as: collapsable?
Indicating whether this section is collapsable. If a section is collapsable,
the description must be given.
Corresponds to the JSON property collapsable
18311 18312 18313 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 18311 def collapsable @collapsable end |
#description ⇒ String
The header of the section, text formatted supported.
Corresponds to the JSON property description
18317 18318 18319 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 18317 def description @description end |
#num_uncollapsable_widgets ⇒ Fixnum
The number of uncollapsable widgets. For example, when a section contains 5
widgets and the num_uncollapsable_widget are set to be 2, The first 2 widgets
will always shown and the last 3 is collapsed as default. Only when
collapsable is set to be true, the num_uncollapsable_widget will be taken into
account.
Corresponds to the JSON property numUncollapsableWidgets
18326 18327 18328 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 18326 def @num_uncollapsable_widgets end |
#widgets ⇒ Array<Google::Apis::CloudsearchV1::WidgetMarkup>
A section must contain at least 1 widget.
Corresponds to the JSON property widgets
18331 18332 18333 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 18331 def @widgets end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
18338 18339 18340 18341 18342 18343 |
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 18338 def update!(**args) @collapsable = args[:collapsable] if args.key?(:collapsable) @description = args[:description] if args.key?(:description) @num_uncollapsable_widgets = args[:num_uncollapsable_widgets] if args.key?(:num_uncollapsable_widgets) @widgets = args[:widgets] if args.key?(:widgets) end |