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



126
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
# File 'lib/oci/management_dashboard/models/management_dashboard_tile_details.rb', line 126

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)


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

def column
  @column
end

#data_configArray<Object>

**[Required]** Array of JSON that contain data source options.

Returns:

  • (Array<Object>)


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

def data_config
  @data_config
end

#display_nameString

**[Required]** Display name of the saved search.

Returns:

  • (String)


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

def display_name
  @display_name
end

#drilldown_configObject

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

Returns:

  • (Object)


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

def drilldown_config
  @drilldown_config
end

#heightInteger

**[Required]** The number of rows the tile occupies.

Returns:

  • (Integer)


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

def height
  @height
end

#nlsObject

**[Required]** JSON that contains internationalization options.

Returns:

  • (Object)


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

def nls
  @nls
end

#parameters_mapObject

Specifies the saved search parameters values

Returns:

  • (Object)


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

def parameters_map
  @parameters_map
end

#rowInteger

**[Required]** Tile's row number.

Returns:

  • (Integer)


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

def row
  @row
end

#saved_search_idString

**[Required]** ID of the saved search.

Returns:

  • (String)


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

def saved_search_id
  @saved_search_id
end

#stateString

**[Required]** Current state of the saved search.

Returns:

  • (String)


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

def state
  @state
end

#ui_configObject

**[Required]** JSON that contains user interface options.

Returns:

  • (Object)


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

def ui_config
  @ui_config
end

#widthInteger

**[Required]** The number of columns the tile occupies.

Returns:

  • (Integer)


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

def width
  @width
end

Class Method Details

.attribute_mapObject

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



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

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.



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

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



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

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



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

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


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

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



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

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



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

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



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

def to_s
  to_hash.to_s
end