Class: MistApi::UiSettings
- Defined in:
- lib/mist_api/models/ui_settings.rb
Overview
UI Settings
Instance Attribute Summary collapse
-
#created_time ⇒ Float
When the object has been created, in epoch.
-
#default_scope_id ⇒ String
When the object has been created, in epoch.
-
#default_scope_type ⇒ String
When the object has been created, in epoch.
-
#default_time_range ⇒ UiSettingsDefaultTimeRange
When the object has been created, in epoch.
-
#description ⇒ String
When the object has been created, in epoch.
-
#for_site ⇒ TrueClass | FalseClass
When the object has been created, in epoch.
-
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#is_custom_databoard ⇒ TrueClass | FalseClass
Unique ID of the object instance in the Mist Organization.
-
#is_scope_linked ⇒ TrueClass | FalseClass
Unique ID of the object instance in the Mist Organization.
-
#is_time_range_linked ⇒ TrueClass | FalseClass
Unique ID of the object instance in the Mist Organization.
-
#modified_time ⇒ Float
When the object has been modified for the last time, in epoch.
-
#name ⇒ String
When the object has been modified for the last time, in epoch.
-
#org_id ⇒ UUID | String
When the object has been modified for the last time, in epoch.
-
#purpose ⇒ String
When the object has been modified for the last time, in epoch.
-
#site_id ⇒ UUID | String
When the object has been modified for the last time, in epoch.
-
#tiles ⇒ Array[UiSettingsTile]
When the object has been modified for the last time, in epoch.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(description = nil, purpose = nil, created_time = SKIP, default_scope_id = SKIP, default_scope_type = SKIP, default_time_range = SKIP, for_site = SKIP, id = SKIP, is_custom_databoard = SKIP, is_scope_linked = SKIP, is_time_range_linked = SKIP, modified_time = SKIP, name = SKIP, org_id = SKIP, site_id = SKIP, tiles = SKIP, additional_properties = nil) ⇒ UiSettings
constructor
A new instance of UiSettings.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(description = nil, purpose = nil, created_time = SKIP, default_scope_id = SKIP, default_scope_type = SKIP, default_time_range = SKIP, for_site = SKIP, id = SKIP, is_custom_databoard = SKIP, is_scope_linked = SKIP, is_time_range_linked = SKIP, modified_time = SKIP, name = SKIP, org_id = SKIP, site_id = SKIP, tiles = SKIP, additional_properties = nil) ⇒ UiSettings
Returns a new instance of UiSettings.
123 124 125 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 |
# File 'lib/mist_api/models/ui_settings.rb', line 123 def initialize(description = nil, purpose = nil, created_time = SKIP, default_scope_id = SKIP, default_scope_type = SKIP, default_time_range = SKIP, for_site = SKIP, id = SKIP, is_custom_databoard = SKIP, is_scope_linked = SKIP, is_time_range_linked = SKIP, modified_time = SKIP, name = SKIP, org_id = SKIP, site_id = SKIP, tiles = SKIP, additional_properties = nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @created_time = created_time unless created_time == SKIP @default_scope_id = default_scope_id unless default_scope_id == SKIP @default_scope_type = default_scope_type unless default_scope_type == SKIP @default_time_range = default_time_range unless default_time_range == SKIP @description = description @for_site = for_site unless for_site == SKIP @id = id unless id == SKIP @is_custom_databoard = is_custom_databoard unless is_custom_databoard == SKIP @is_scope_linked = is_scope_linked unless is_scope_linked == SKIP @is_time_range_linked = is_time_range_linked unless is_time_range_linked == SKIP @modified_time = modified_time unless modified_time == SKIP @name = name unless name == SKIP @org_id = org_id unless org_id == SKIP @purpose = purpose @site_id = site_id unless site_id == SKIP @tiles = tiles unless tiles == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#created_time ⇒ Float
When the object has been created, in epoch
14 15 16 |
# File 'lib/mist_api/models/ui_settings.rb', line 14 def created_time @created_time end |
#default_scope_id ⇒ String
When the object has been created, in epoch
18 19 20 |
# File 'lib/mist_api/models/ui_settings.rb', line 18 def default_scope_id @default_scope_id end |
#default_scope_type ⇒ String
When the object has been created, in epoch
22 23 24 |
# File 'lib/mist_api/models/ui_settings.rb', line 22 def default_scope_type @default_scope_type end |
#default_time_range ⇒ UiSettingsDefaultTimeRange
When the object has been created, in epoch
26 27 28 |
# File 'lib/mist_api/models/ui_settings.rb', line 26 def default_time_range @default_time_range end |
#description ⇒ String
When the object has been created, in epoch
30 31 32 |
# File 'lib/mist_api/models/ui_settings.rb', line 30 def description @description end |
#for_site ⇒ TrueClass | FalseClass
When the object has been created, in epoch
34 35 36 |
# File 'lib/mist_api/models/ui_settings.rb', line 34 def for_site @for_site end |
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
38 39 40 |
# File 'lib/mist_api/models/ui_settings.rb', line 38 def id @id end |
#is_custom_databoard ⇒ TrueClass | FalseClass
Unique ID of the object instance in the Mist Organization
42 43 44 |
# File 'lib/mist_api/models/ui_settings.rb', line 42 def is_custom_databoard @is_custom_databoard end |
#is_scope_linked ⇒ TrueClass | FalseClass
Unique ID of the object instance in the Mist Organization
46 47 48 |
# File 'lib/mist_api/models/ui_settings.rb', line 46 def is_scope_linked @is_scope_linked end |
#is_time_range_linked ⇒ TrueClass | FalseClass
Unique ID of the object instance in the Mist Organization
50 51 52 |
# File 'lib/mist_api/models/ui_settings.rb', line 50 def is_time_range_linked @is_time_range_linked end |
#modified_time ⇒ Float
When the object has been modified for the last time, in epoch
54 55 56 |
# File 'lib/mist_api/models/ui_settings.rb', line 54 def modified_time @modified_time end |
#name ⇒ String
When the object has been modified for the last time, in epoch
58 59 60 |
# File 'lib/mist_api/models/ui_settings.rb', line 58 def name @name end |
#org_id ⇒ UUID | String
When the object has been modified for the last time, in epoch
62 63 64 |
# File 'lib/mist_api/models/ui_settings.rb', line 62 def org_id @org_id end |
#purpose ⇒ String
When the object has been modified for the last time, in epoch
66 67 68 |
# File 'lib/mist_api/models/ui_settings.rb', line 66 def purpose @purpose end |
#site_id ⇒ UUID | String
When the object has been modified for the last time, in epoch
70 71 72 |
# File 'lib/mist_api/models/ui_settings.rb', line 70 def site_id @site_id end |
#tiles ⇒ Array[UiSettingsTile]
When the object has been modified for the last time, in epoch
74 75 76 |
# File 'lib/mist_api/models/ui_settings.rb', line 74 def tiles @tiles end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 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 |
# File 'lib/mist_api/models/ui_settings.rb', line 153 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. description = hash.key?('description') ? hash['description'] : nil purpose = hash.key?('purpose') ? hash['purpose'] : nil created_time = hash.key?('created_time') ? hash['created_time'] : SKIP default_scope_id = hash.key?('defaultScopeId') ? hash['defaultScopeId'] : SKIP default_scope_type = hash.key?('defaultScopeType') ? hash['defaultScopeType'] : SKIP default_time_range = UiSettingsDefaultTimeRange.from_hash(hash['defaultTimeRange']) if hash['defaultTimeRange'] for_site = hash.key?('for_site') ? hash['for_site'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP is_custom_databoard = hash.key?('isCustomDataboard') ? hash['isCustomDataboard'] : SKIP is_scope_linked = hash.key?('isScopeLinked') ? hash['isScopeLinked'] : SKIP is_time_range_linked = hash.key?('isTimeRangeLinked') ? hash['isTimeRangeLinked'] : SKIP modified_time = hash.key?('modified_time') ? hash['modified_time'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP site_id = hash.key?('site_id') ? hash['site_id'] : SKIP # Parameter is an array, so we need to iterate through it tiles = nil unless hash['tiles'].nil? tiles = [] hash['tiles'].each do |structure| tiles << (UiSettingsTile.from_hash(structure) if structure) end end tiles = SKIP unless hash.key?('tiles') # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. UiSettings.new(description, purpose, created_time, default_scope_id, default_scope_type, default_time_range, for_site, id, is_custom_databoard, is_scope_linked, is_time_range_linked, modified_time, name, org_id, site_id, tiles, additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/mist_api/models/ui_settings.rb', line 77 def self.names @_hash = {} if @_hash.nil? @_hash['created_time'] = 'created_time' @_hash['default_scope_id'] = 'defaultScopeId' @_hash['default_scope_type'] = 'defaultScopeType' @_hash['default_time_range'] = 'defaultTimeRange' @_hash['description'] = 'description' @_hash['for_site'] = 'for_site' @_hash['id'] = 'id' @_hash['is_custom_databoard'] = 'isCustomDataboard' @_hash['is_scope_linked'] = 'isScopeLinked' @_hash['is_time_range_linked'] = 'isTimeRangeLinked' @_hash['modified_time'] = 'modified_time' @_hash['name'] = 'name' @_hash['org_id'] = 'org_id' @_hash['purpose'] = 'purpose' @_hash['site_id'] = 'site_id' @_hash['tiles'] = 'tiles' @_hash end |
.nullables ⇒ Object
An array for nullable fields
119 120 121 |
# File 'lib/mist_api/models/ui_settings.rb', line 119 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 |
# File 'lib/mist_api/models/ui_settings.rb', line 99 def self.optionals %w[ created_time default_scope_id default_scope_type default_time_range for_site id is_custom_databoard is_scope_linked is_time_range_linked modified_time name org_id site_id tiles ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/mist_api/models/ui_settings.rb', line 229 def inspect class_name = self.class.name.split('::').last "<#{class_name} created_time: #{@created_time.inspect}, default_scope_id:"\ " #{@default_scope_id.inspect}, default_scope_type: #{@default_scope_type.inspect},"\ " default_time_range: #{@default_time_range.inspect}, description: #{@description.inspect},"\ " for_site: #{@for_site.inspect}, id: #{@id.inspect}, is_custom_databoard:"\ " #{@is_custom_databoard.inspect}, is_scope_linked: #{@is_scope_linked.inspect},"\ " is_time_range_linked: #{@is_time_range_linked.inspect}, modified_time:"\ " #{@modified_time.inspect}, name: #{@name.inspect}, org_id: #{@org_id.inspect}, purpose:"\ " #{@purpose.inspect}, site_id: #{@site_id.inspect}, tiles: #{@tiles.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
217 218 219 220 221 222 223 224 225 226 |
# File 'lib/mist_api/models/ui_settings.rb', line 217 def to_s class_name = self.class.name.split('::').last "<#{class_name} created_time: #{@created_time}, default_scope_id: #{@default_scope_id},"\ " default_scope_type: #{@default_scope_type}, default_time_range: #{@default_time_range},"\ " description: #{@description}, for_site: #{@for_site}, id: #{@id}, is_custom_databoard:"\ " #{@is_custom_databoard}, is_scope_linked: #{@is_scope_linked}, is_time_range_linked:"\ " #{@is_time_range_linked}, modified_time: #{@modified_time}, name: #{@name}, org_id:"\ " #{@org_id}, purpose: #{@purpose}, site_id: #{@site_id}, tiles: #{@tiles},"\ " additional_properties: #{@additional_properties}>" end |