Class: MistApi::UiSettingsTile

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/ui_settings_tile.rb

Overview

UiSettingsTile Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(chart_band = SKIP, chart_color = SKIP, chart_direction = SKIP, chart_rank_by = SKIP, chart_type = SKIP, colspan = SKIP, column = SKIP, hide_empty_rows = SKIP, id = SKIP, metric = SKIP, name = SKIP, row = SKIP, rowspan = SKIP, scope_id = SKIP, scope_type = SKIP, sorted_column_ids = SKIP, time_range = SKIP, trend_type = SKIP, viz_type = SKIP) ⇒ UiSettingsTile

Returns a new instance of UiSettingsTile.



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
# File 'lib/mist_api/models/ui_settings_tile.rb', line 143

def initialize(chart_band = SKIP, chart_color = SKIP,
               chart_direction = SKIP, chart_rank_by = SKIP,
               chart_type = SKIP, colspan = SKIP, column = SKIP,
               hide_empty_rows = SKIP, id = SKIP, metric = SKIP,
               name = SKIP, row = SKIP, rowspan = SKIP, scope_id = SKIP,
               scope_type = SKIP, sorted_column_ids = SKIP,
               time_range = SKIP, trend_type = SKIP, viz_type = SKIP)
  @chart_band = chart_band unless chart_band == SKIP
  @chart_color = chart_color unless chart_color == SKIP
  @chart_direction = chart_direction unless chart_direction == SKIP
  @chart_rank_by = chart_rank_by unless chart_rank_by == SKIP
  @chart_type = chart_type unless chart_type == SKIP
  @colspan = colspan unless colspan == SKIP
  @column = column unless column == SKIP
  @hide_empty_rows = hide_empty_rows unless hide_empty_rows == SKIP
  @id = id unless id == SKIP
  @metric = metric unless metric == SKIP
  @name = name unless name == SKIP
  @row = row unless row == SKIP
  @rowspan = rowspan unless rowspan == SKIP
  @scope_id = scope_id unless scope_id == SKIP
  @scope_type = scope_type unless scope_type == SKIP
  @sorted_column_ids = sorted_column_ids unless sorted_column_ids == SKIP
  @time_range = time_range unless time_range == SKIP
  @trend_type = trend_type unless trend_type == SKIP
  @viz_type = viz_type unless viz_type == SKIP
end

Instance Attribute Details

#chart_bandString

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/mist_api/models/ui_settings_tile.rb', line 14

def chart_band
  @chart_band
end

#chart_colorString

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/mist_api/models/ui_settings_tile.rb', line 18

def chart_color
  @chart_color
end

#chart_directionString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/mist_api/models/ui_settings_tile.rb', line 22

def chart_direction
  @chart_direction
end

#chart_rank_byString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/mist_api/models/ui_settings_tile.rb', line 26

def chart_rank_by
  @chart_rank_by
end

#chart_typeString

TODO: Write general description for this method

Returns:

  • (String)


30
31
32
# File 'lib/mist_api/models/ui_settings_tile.rb', line 30

def chart_type
  @chart_type
end

#colspanInteger

TODO: Write general description for this method

Returns:

  • (Integer)


34
35
36
# File 'lib/mist_api/models/ui_settings_tile.rb', line 34

def colspan
  @colspan
end

#columnInteger

TODO: Write general description for this method

Returns:

  • (Integer)


38
39
40
# File 'lib/mist_api/models/ui_settings_tile.rb', line 38

def column
  @column
end

#hide_empty_rowsTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


42
43
44
# File 'lib/mist_api/models/ui_settings_tile.rb', line 42

def hide_empty_rows
  @hide_empty_rows
end

#idUUID | String

Unique ID of the object instance in the Mist Organization

Returns:

  • (UUID | String)


46
47
48
# File 'lib/mist_api/models/ui_settings_tile.rb', line 46

def id
  @id
end

#metricUiSettingsTileMetric

Unique ID of the object instance in the Mist Organization



50
51
52
# File 'lib/mist_api/models/ui_settings_tile.rb', line 50

def metric
  @metric
end

#nameString

Unique ID of the object instance in the Mist Organization

Returns:

  • (String)


54
55
56
# File 'lib/mist_api/models/ui_settings_tile.rb', line 54

def name
  @name
end

#rowInteger

Unique ID of the object instance in the Mist Organization

Returns:

  • (Integer)


58
59
60
# File 'lib/mist_api/models/ui_settings_tile.rb', line 58

def row
  @row
end

#rowspanInteger

Unique ID of the object instance in the Mist Organization

Returns:

  • (Integer)


62
63
64
# File 'lib/mist_api/models/ui_settings_tile.rb', line 62

def rowspan
  @rowspan
end

#scope_idString

Unique ID of the object instance in the Mist Organization

Returns:

  • (String)


66
67
68
# File 'lib/mist_api/models/ui_settings_tile.rb', line 66

def scope_id
  @scope_id
end

#scope_typeString

Unique ID of the object instance in the Mist Organization

Returns:

  • (String)


70
71
72
# File 'lib/mist_api/models/ui_settings_tile.rb', line 70

def scope_type
  @scope_type
end

#sorted_column_idsArray[String]

Unique ID of the object instance in the Mist Organization

Returns:

  • (Array[String])


74
75
76
# File 'lib/mist_api/models/ui_settings_tile.rb', line 74

def sorted_column_ids
  @sorted_column_ids
end

#time_rangeUiSettingsTileTimeRange

Unique ID of the object instance in the Mist Organization



78
79
80
# File 'lib/mist_api/models/ui_settings_tile.rb', line 78

def time_range
  @time_range
end

#trend_typeString

Unique ID of the object instance in the Mist Organization

Returns:

  • (String)


82
83
84
# File 'lib/mist_api/models/ui_settings_tile.rb', line 82

def trend_type
  @trend_type
end

#viz_typeString

Unique ID of the object instance in the Mist Organization

Returns:

  • (String)


86
87
88
# File 'lib/mist_api/models/ui_settings_tile.rb', line 86

def viz_type
  @viz_type
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/mist_api/models/ui_settings_tile.rb', line 172

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  chart_band = hash.key?('chartBand') ? hash['chartBand'] : SKIP
  chart_color = hash.key?('chartColor') ? hash['chartColor'] : SKIP
  chart_direction =
    hash.key?('chartDirection') ? hash['chartDirection'] : SKIP
  chart_rank_by = hash.key?('chartRankBy') ? hash['chartRankBy'] : SKIP
  chart_type = hash.key?('chartType') ? hash['chartType'] : SKIP
  colspan = hash.key?('colspan') ? hash['colspan'] : SKIP
  column = hash.key?('column') ? hash['column'] : SKIP
  hide_empty_rows =
    hash.key?('hideEmptyRows') ? hash['hideEmptyRows'] : SKIP
  id = hash.key?('id') ? hash['id'] : SKIP
  metric = UiSettingsTileMetric.from_hash(hash['metric']) if hash['metric']
  name = hash.key?('name') ? hash['name'] : SKIP
  row = hash.key?('row') ? hash['row'] : SKIP
  rowspan = hash.key?('rowspan') ? hash['rowspan'] : SKIP
  scope_id = hash.key?('scopeId') ? hash['scopeId'] : SKIP
  scope_type = hash.key?('scopeType') ? hash['scopeType'] : SKIP
  sorted_column_ids =
    hash.key?('sortedColumnIds') ? hash['sortedColumnIds'] : SKIP
  time_range = UiSettingsTileTimeRange.from_hash(hash['timeRange']) if hash['timeRange']
  trend_type = hash.key?('trendType') ? hash['trendType'] : SKIP
  viz_type = hash.key?('vizType') ? hash['vizType'] : SKIP

  # Create object from extracted values.
  UiSettingsTile.new(chart_band,
                     chart_color,
                     chart_direction,
                     chart_rank_by,
                     chart_type,
                     colspan,
                     column,
                     hide_empty_rows,
                     id,
                     metric,
                     name,
                     row,
                     rowspan,
                     scope_id,
                     scope_type,
                     sorted_column_ids,
                     time_range,
                     trend_type,
                     viz_type)
end

.namesObject

A mapping from model property names to API property names.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/mist_api/models/ui_settings_tile.rb', line 89

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['chart_band'] = 'chartBand'
  @_hash['chart_color'] = 'chartColor'
  @_hash['chart_direction'] = 'chartDirection'
  @_hash['chart_rank_by'] = 'chartRankBy'
  @_hash['chart_type'] = 'chartType'
  @_hash['colspan'] = 'colspan'
  @_hash['column'] = 'column'
  @_hash['hide_empty_rows'] = 'hideEmptyRows'
  @_hash['id'] = 'id'
  @_hash['metric'] = 'metric'
  @_hash['name'] = 'name'
  @_hash['row'] = 'row'
  @_hash['rowspan'] = 'rowspan'
  @_hash['scope_id'] = 'scopeId'
  @_hash['scope_type'] = 'scopeType'
  @_hash['sorted_column_ids'] = 'sortedColumnIds'
  @_hash['time_range'] = 'timeRange'
  @_hash['trend_type'] = 'trendType'
  @_hash['viz_type'] = 'vizType'
  @_hash
end

.nullablesObject

An array for nullable fields



139
140
141
# File 'lib/mist_api/models/ui_settings_tile.rb', line 139

def self.nullables
  []
end

.optionalsObject

An array for optional fields



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/mist_api/models/ui_settings_tile.rb', line 114

def self.optionals
  %w[
    chart_band
    chart_color
    chart_direction
    chart_rank_by
    chart_type
    colspan
    column
    hide_empty_rows
    id
    metric
    name
    row
    rowspan
    scope_id
    scope_type
    sorted_column_ids
    time_range
    trend_type
    viz_type
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



233
234
235
236
237
238
239
240
241
242
243
# File 'lib/mist_api/models/ui_settings_tile.rb', line 233

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} chart_band: #{@chart_band.inspect}, chart_color: #{@chart_color.inspect},"\
  " chart_direction: #{@chart_direction.inspect}, chart_rank_by: #{@chart_rank_by.inspect},"\
  " chart_type: #{@chart_type.inspect}, colspan: #{@colspan.inspect}, column:"\
  " #{@column.inspect}, hide_empty_rows: #{@hide_empty_rows.inspect}, id: #{@id.inspect},"\
  " metric: #{@metric.inspect}, name: #{@name.inspect}, row: #{@row.inspect}, rowspan:"\
  " #{@rowspan.inspect}, scope_id: #{@scope_id.inspect}, scope_type: #{@scope_type.inspect},"\
  " sorted_column_ids: #{@sorted_column_ids.inspect}, time_range: #{@time_range.inspect},"\
  " trend_type: #{@trend_type.inspect}, viz_type: #{@viz_type.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



222
223
224
225
226
227
228
229
230
# File 'lib/mist_api/models/ui_settings_tile.rb', line 222

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} chart_band: #{@chart_band}, chart_color: #{@chart_color}, chart_direction:"\
  " #{@chart_direction}, chart_rank_by: #{@chart_rank_by}, chart_type: #{@chart_type},"\
  " colspan: #{@colspan}, column: #{@column}, hide_empty_rows: #{@hide_empty_rows}, id:"\
  " #{@id}, metric: #{@metric}, name: #{@name}, row: #{@row}, rowspan: #{@rowspan}, scope_id:"\
  " #{@scope_id}, scope_type: #{@scope_type}, sorted_column_ids: #{@sorted_column_ids},"\
  " time_range: #{@time_range}, trend_type: #{@trend_type}, viz_type: #{@viz_type}>"
end