Class: Google::Apis::CloudsearchV1::Grid

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) ⇒ Grid

Returns a new instance of Grid.



10743
10744
10745
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 10743

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

Instance Attribute Details

#border_styleGoogle::Apis::CloudsearchV1::BorderStyle

Represents a complete border style that can be applied to widgets. Corresponds to the JSON property borderStyle



10718
10719
10720
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 10718

def border_style
  @border_style
end

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

The items to display in the grid. Corresponds to the JSON property items



10723
10724
10725
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 10723

def items
  @items
end

#num_columnsFixnum

The number of columns to display in the grid. Note that a default value will be used if this field is not specified, and that default value will be different depending on where the grid is shown (dialog vs companion). Corresponds to the JSON property numColumns

Returns:

  • (Fixnum)


10730
10731
10732
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 10730

def num_columns
  @num_columns
end

#on_clickGoogle::Apis::CloudsearchV1::OnClick

This callback will be reused by each individual GridItem, but with the item's identifier and index in the items list added to the callback's parameters. Corresponds to the JSON property onClick



10736
10737
10738
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 10736

def on_click
  @on_click
end

#titleString

The text to display in the grid header. Corresponds to the JSON property title

Returns:

  • (String)


10741
10742
10743
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 10741

def title
  @title
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10748
10749
10750
10751
10752
10753
10754
# File 'lib/google/apis/cloudsearch_v1/classes.rb', line 10748

def update!(**args)
  @border_style = args[:border_style] if args.key?(:border_style)
  @items = args[:items] if args.key?(:items)
  @num_columns = args[:num_columns] if args.key?(:num_columns)
  @on_click = args[:on_click] if args.key?(:on_click)
  @title = args[:title] if args.key?(:title)
end