Class: OCI::ManagementDashboard::Models::ManagementDashboardTileDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/management_dashboard/models/management_dashboard_tile_details.rb

Overview

Properties of the dashboard tile representing a saved search. Tiles are laid out in a twelve column grid system with (0,0) at upper left corner.

Constant Summary collapse

STATE_ENUM =
[
  STATE_DELETED = 'DELETED'.freeze,
  STATE_UNAUTHORIZED = 'UNAUTHORIZED'.freeze,
  STATE_DEFAULT = 'DEFAULT'.freeze,
  STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ManagementDashboardTileDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :display_name (String)

    The value to assign to the #display_name property

  • :saved_search_id (String)

    The value to assign to the #saved_search_id property

  • :row (Integer)

    The value to assign to the #row property

  • :column (Integer)

    The value to assign to the #column property

  • :height (Integer)

    The value to assign to the #height property

  • :width (Integer)

    The value to assign to the #width property

  • :nls (Object)

    The value to assign to the #nls property

  • :ui_config (Object)

    The value to assign to the #ui_config property

  • :data_config (Array<Object>)

    The value to assign to the #data_config property

  • :state (String)

    The value to assign to the #state property

  • :drilldown_config (Object)

    The value to assign to the #drilldown_config property

  • :parameters_map (Object)

    The value to assign to the #parameters_map property



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 127

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

  raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')

  self.display_name = attributes[:'display_name'] if attributes[:'display_name']

  self.saved_search_id = attributes[:'savedSearchId'] if attributes[:'savedSearchId']

  raise 'You cannot provide both :savedSearchId and :saved_search_id' if attributes.key?(:'savedSearchId') && attributes.key?(:'saved_search_id')

  self.saved_search_id = attributes[:'saved_search_id'] if attributes[:'saved_search_id']

  self.row = attributes[:'row'] if attributes[:'row']

  self.column = attributes[:'column'] if attributes[:'column']

  self.height = attributes[:'height'] if attributes[:'height']

  self.width = attributes[:'width'] if attributes[:'width']

  self.nls = attributes[:'nls'] if attributes[:'nls']

  self.ui_config = attributes[:'uiConfig'] if attributes[:'uiConfig']

  raise 'You cannot provide both :uiConfig and :ui_config' if attributes.key?(:'uiConfig') && attributes.key?(:'ui_config')

  self.ui_config = attributes[:'ui_config'] if attributes[:'ui_config']

  self.data_config = attributes[:'dataConfig'] if attributes[:'dataConfig']

  raise 'You cannot provide both :dataConfig and :data_config' if attributes.key?(:'dataConfig') && attributes.key?(:'data_config')

  self.data_config = attributes[:'data_config'] if attributes[:'data_config']

  self.state = attributes[:'state'] if attributes[:'state']

  self.drilldown_config = attributes[:'drilldownConfig'] if attributes[:'drilldownConfig']

  raise 'You cannot provide both :drilldownConfig and :drilldown_config' if attributes.key?(:'drilldownConfig') && attributes.key?(:'drilldown_config')

  self.drilldown_config = attributes[:'drilldown_config'] if attributes[:'drilldown_config']

  self.parameters_map = attributes[:'parametersMap'] if attributes[:'parametersMap']

  raise 'You cannot provide both :parametersMap and :parameters_map' if attributes.key?(:'parametersMap') && attributes.key?(:'parameters_map')

  self.parameters_map = attributes[:'parameters_map'] if attributes[:'parameters_map']
end

Instance Attribute Details

#columnInteger

[Required] Tile's column number.

Returns:

  • (Integer)


35
36
37
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 35

def column
  @column
end

#data_configArray<Object>

[Required] It defines how data is fetched. A functional saved search needs a valid dataConfig. See examples on how it can be constructed for various data sources.

Returns:

  • (Array<Object>)


55
56
57
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 55

def data_config
  @data_config
end

#display_nameString

[Required] Display name of the saved search.

Returns:

  • (String)


23
24
25
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 23

def display_name
  @display_name
end

#drilldown_configObject

[Required] Drill-down configuration to define the destination of a drill-down action.

Returns:

  • (Object)


63
64
65
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 63

def drilldown_config
  @drilldown_config
end

#heightInteger

[Required] The number of rows the tile occupies.

Returns:

  • (Integer)


39
40
41
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 39

def height
  @height
end

#nlsObject

[Required] JSON that contains internationalization options.

Returns:

  • (Object)


47
48
49
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 47

def nls
  @nls
end

#parameters_mapObject

Specifies the saved search parameters values

Returns:

  • (Object)


67
68
69
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 67

def parameters_map
  @parameters_map
end

#rowInteger

[Required] Tile's row number.

Returns:

  • (Integer)


31
32
33
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 31

def row
  @row
end

#saved_search_idString

[Required] ID of the saved search.

Returns:

  • (String)


27
28
29
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 27

def saved_search_id
  @saved_search_id
end

#stateString

[Required] Current state of the saved search.

Returns:

  • (String)


59
60
61
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 59

def state
  @state
end

#ui_configObject

[Required] It defines the visualization type of the widget saved search, the UI options of that visualization type, the binding of data to the visualization.

Returns:

  • (Object)


51
52
53
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 51

def ui_config
  @ui_config
end

#widthInteger

[Required] The number of columns the tile occupies.

Returns:

  • (Integer)


43
44
45
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 43

def width
  @width
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 70

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'displayName',
    'saved_search_id': :'savedSearchId',
    'row': :'row',
    'column': :'column',
    'height': :'height',
    'width': :'width',
    'nls': :'nls',
    'ui_config': :'uiConfig',
    'data_config': :'dataConfig',
    'state': :'state',
    'drilldown_config': :'drilldownConfig',
    'parameters_map': :'parametersMap'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 90

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'String',
    'saved_search_id': :'String',
    'row': :'Integer',
    'column': :'Integer',
    'height': :'Integer',
    'width': :'Integer',
    'nls': :'Object',
    'ui_config': :'Object',
    'data_config': :'Array<Object>',
    'state': :'String',
    'drilldown_config': :'Object',
    'parameters_map': :'Object'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 202

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    display_name == other.display_name &&
    saved_search_id == other.saved_search_id &&
    row == other.row &&
    column == other.column &&
    height == other.height &&
    width == other.width &&
    nls == other.nls &&
    ui_config == other.ui_config &&
    data_config == other.data_config &&
    state == other.state &&
    drilldown_config == other.drilldown_config &&
    parameters_map == other.parameters_map
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 243

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


223
224
225
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 223

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



232
233
234
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 232

def hash
  [display_name, saved_search_id, row, column, height, width, nls, ui_config, data_config, state, drilldown_config, parameters_map].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



276
277
278
279
280
281
282
283
284
285
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 276

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



270
271
272
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 270

def to_s
  to_hash.to_s
end