Class: XbimAim::Model
- Inherits:
-
Object
- Object
- XbimAim::Model
- Defined in:
- lib/xbim_aim/models/model.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#applications ⇒ Object
Returns the value of attribute applications.
-
#asset ⇒ Object
See #/definitions/Asset.
-
#asset_id ⇒ Object
Returns the value of attribute asset_id.
-
#asset_model_id ⇒ Object
Returns the value of attribute asset_model_id.
-
#asset_name ⇒ Object
Returns the value of attribute asset_name.
-
#attribute_definitions ⇒ Object
Returns the value of attribute attribute_definitions.
-
#component_types ⇒ Object
Returns the value of attribute component_types.
-
#components ⇒ Object
Returns the value of attribute components.
-
#contacts ⇒ Object
Returns the value of attribute contacts.
-
#date_processed ⇒ Object
Returns the value of attribute date_processed.
-
#date_uploaded ⇒ Object
Returns the value of attribute date_uploaded.
-
#documents ⇒ Object
Returns the value of attribute documents.
-
#entities ⇒ Object
Returns the value of attribute entities.
-
#facilities ⇒ Object
Returns the value of attribute facilities.
-
#forward_mappings ⇒ Object
Returns the value of attribute forward_mappings.
-
#is_current ⇒ Object
Returns the value of attribute is_current.
-
#last_entity_id ⇒ Object
Returns the value of attribute last_entity_id.
-
#levels ⇒ Object
Returns the value of attribute levels.
-
#model_path ⇒ Object
Returns the value of attribute model_path.
-
#model_size ⇒ Object
Returns the value of attribute model_size.
-
#name ⇒ Object
Returns the value of attribute name.
-
#one_meter ⇒ Object
Returns the value of attribute one_meter.
-
#original_author_id ⇒ Object
Returns the value of attribute original_author_id.
-
#permissions ⇒ Object
Returns the value of attribute permissions.
-
#processing_stage ⇒ Object
Returns the value of attribute processing_stage.
-
#processing_status ⇒ Object
Returns the value of attribute processing_status.
-
#reverse_mappings ⇒ Object
Returns the value of attribute reverse_mappings.
-
#revision ⇒ Object
Returns the value of attribute revision.
-
#roles ⇒ Object
Returns the value of attribute roles.
-
#segment ⇒ Object
See #/definitions/AssetSegment.
-
#segment_id ⇒ Object
Returns the value of attribute segment_id.
-
#segment_name ⇒ Object
Returns the value of attribute segment_name.
-
#sites ⇒ Object
Returns the value of attribute sites.
-
#spaces ⇒ Object
Returns the value of attribute spaces.
-
#state ⇒ Object
Returns the value of attribute state.
-
#status ⇒ Object
Returns the value of attribute status.
-
#uploaded_by_id ⇒ Object
Returns the value of attribute uploaded_by_id.
-
#zones ⇒ Object
Returns the value of attribute zones.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Model
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ Model
Initializes the object
219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/xbim_aim/models/model.rb', line 219 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `XbimAim::Model` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `XbimAim::Model`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'entities') if (value = attributes[:'entities']).is_a?(Array) self.entities = value end end if attributes.key?(:'asset') self.asset = attributes[:'asset'] end if attributes.key?(:'segment') self.segment = attributes[:'segment'] end if attributes.key?(:'attribute_definitions') if (value = attributes[:'attribute_definitions']).is_a?(Array) self.attribute_definitions = value end end if attributes.key?(:'spaces') if (value = attributes[:'spaces']).is_a?(Array) self.spaces = value end end if attributes.key?(:'components') if (value = attributes[:'components']).is_a?(Array) self.components = value end end if attributes.key?(:'component_types') if (value = attributes[:'component_types']).is_a?(Array) self.component_types = value end end if attributes.key?(:'levels') if (value = attributes[:'levels']).is_a?(Array) self.levels = value end end if attributes.key?(:'zones') if (value = attributes[:'zones']).is_a?(Array) self.zones = value end end if attributes.key?(:'facilities') if (value = attributes[:'facilities']).is_a?(Array) self.facilities = value end end if attributes.key?(:'documents') if (value = attributes[:'documents']).is_a?(Array) self.documents = value end end if attributes.key?(:'contacts') if (value = attributes[:'contacts']).is_a?(Array) self.contacts = value end end if attributes.key?(:'sites') if (value = attributes[:'sites']).is_a?(Array) self.sites = value end end if attributes.key?(:'applications') if (value = attributes[:'applications']).is_a?(Array) self.applications = value end end if attributes.key?(:'forward_mappings') if (value = attributes[:'forward_mappings']).is_a?(Array) self.forward_mappings = value end end if attributes.key?(:'reverse_mappings') if (value = attributes[:'reverse_mappings']).is_a?(Array) self.reverse_mappings = value end end if attributes.key?(:'roles') if (value = attributes[:'roles']).is_a?(Array) self.roles = value end end if attributes.key?(:'permissions') self. = attributes[:'permissions'] end if attributes.key?(:'state') self.state = attributes[:'state'] end if attributes.key?(:'asset_model_id') self.asset_model_id = attributes[:'asset_model_id'] end if attributes.key?(:'asset_id') self.asset_id = attributes[:'asset_id'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'revision') self.revision = attributes[:'revision'] end if attributes.key?(:'status') self.status = attributes[:'status'] end if attributes.key?(:'is_current') self.is_current = attributes[:'is_current'] end if attributes.key?(:'uploaded_by_id') self.uploaded_by_id = attributes[:'uploaded_by_id'] end if attributes.key?(:'segment_name') self.segment_name = attributes[:'segment_name'] end if attributes.key?(:'segment_id') self.segment_id = attributes[:'segment_id'] end if attributes.key?(:'asset_name') self.asset_name = attributes[:'asset_name'] end if attributes.key?(:'model_path') self.model_path = attributes[:'model_path'] end if attributes.key?(:'model_size') self.model_size = attributes[:'model_size'] end if attributes.key?(:'one_meter') self.one_meter = attributes[:'one_meter'] end if attributes.key?(:'original_author_id') self. = attributes[:'original_author_id'] end if attributes.key?(:'date_uploaded') self.date_uploaded = attributes[:'date_uploaded'] end if attributes.key?(:'date_processed') self.date_processed = attributes[:'date_processed'] end if attributes.key?(:'last_entity_id') self.last_entity_id = attributes[:'last_entity_id'] end if attributes.key?(:'processing_stage') self.processing_stage = attributes[:'processing_stage'] end if attributes.key?(:'processing_status') self.processing_status = attributes[:'processing_status'] end end |
Instance Attribute Details
#applications ⇒ Object
Returns the value of attribute applications.
46 47 48 |
# File 'lib/xbim_aim/models/model.rb', line 46 def applications @applications end |
#asset ⇒ Object
See #/definitions/Asset
21 22 23 |
# File 'lib/xbim_aim/models/model.rb', line 21 def asset @asset end |
#asset_id ⇒ Object
Returns the value of attribute asset_id.
60 61 62 |
# File 'lib/xbim_aim/models/model.rb', line 60 def asset_id @asset_id end |
#asset_model_id ⇒ Object
Returns the value of attribute asset_model_id.
58 59 60 |
# File 'lib/xbim_aim/models/model.rb', line 58 def asset_model_id @asset_model_id end |
#asset_name ⇒ Object
Returns the value of attribute asset_name.
76 77 78 |
# File 'lib/xbim_aim/models/model.rb', line 76 def asset_name @asset_name end |
#attribute_definitions ⇒ Object
Returns the value of attribute attribute_definitions.
26 27 28 |
# File 'lib/xbim_aim/models/model.rb', line 26 def attribute_definitions @attribute_definitions end |
#component_types ⇒ Object
Returns the value of attribute component_types.
32 33 34 |
# File 'lib/xbim_aim/models/model.rb', line 32 def component_types @component_types end |
#components ⇒ Object
Returns the value of attribute components.
30 31 32 |
# File 'lib/xbim_aim/models/model.rb', line 30 def components @components end |
#contacts ⇒ Object
Returns the value of attribute contacts.
42 43 44 |
# File 'lib/xbim_aim/models/model.rb', line 42 def contacts @contacts end |
#date_processed ⇒ Object
Returns the value of attribute date_processed.
88 89 90 |
# File 'lib/xbim_aim/models/model.rb', line 88 def date_processed @date_processed end |
#date_uploaded ⇒ Object
Returns the value of attribute date_uploaded.
86 87 88 |
# File 'lib/xbim_aim/models/model.rb', line 86 def date_uploaded @date_uploaded end |
#documents ⇒ Object
Returns the value of attribute documents.
40 41 42 |
# File 'lib/xbim_aim/models/model.rb', line 40 def documents @documents end |
#entities ⇒ Object
Returns the value of attribute entities.
18 19 20 |
# File 'lib/xbim_aim/models/model.rb', line 18 def entities @entities end |
#facilities ⇒ Object
Returns the value of attribute facilities.
38 39 40 |
# File 'lib/xbim_aim/models/model.rb', line 38 def facilities @facilities end |
#forward_mappings ⇒ Object
Returns the value of attribute forward_mappings.
48 49 50 |
# File 'lib/xbim_aim/models/model.rb', line 48 def forward_mappings @forward_mappings end |
#is_current ⇒ Object
Returns the value of attribute is_current.
68 69 70 |
# File 'lib/xbim_aim/models/model.rb', line 68 def is_current @is_current end |
#last_entity_id ⇒ Object
Returns the value of attribute last_entity_id.
90 91 92 |
# File 'lib/xbim_aim/models/model.rb', line 90 def last_entity_id @last_entity_id end |
#levels ⇒ Object
Returns the value of attribute levels.
34 35 36 |
# File 'lib/xbim_aim/models/model.rb', line 34 def levels @levels end |
#model_path ⇒ Object
Returns the value of attribute model_path.
78 79 80 |
# File 'lib/xbim_aim/models/model.rb', line 78 def model_path @model_path end |
#model_size ⇒ Object
Returns the value of attribute model_size.
80 81 82 |
# File 'lib/xbim_aim/models/model.rb', line 80 def model_size @model_size end |
#name ⇒ Object
Returns the value of attribute name.
62 63 64 |
# File 'lib/xbim_aim/models/model.rb', line 62 def name @name end |
#one_meter ⇒ Object
Returns the value of attribute one_meter.
82 83 84 |
# File 'lib/xbim_aim/models/model.rb', line 82 def one_meter @one_meter end |
#original_author_id ⇒ Object
Returns the value of attribute original_author_id.
84 85 86 |
# File 'lib/xbim_aim/models/model.rb', line 84 def @original_author_id end |
#permissions ⇒ Object
Returns the value of attribute permissions.
54 55 56 |
# File 'lib/xbim_aim/models/model.rb', line 54 def @permissions end |
#processing_stage ⇒ Object
Returns the value of attribute processing_stage.
92 93 94 |
# File 'lib/xbim_aim/models/model.rb', line 92 def processing_stage @processing_stage end |
#processing_status ⇒ Object
Returns the value of attribute processing_status.
94 95 96 |
# File 'lib/xbim_aim/models/model.rb', line 94 def processing_status @processing_status end |
#reverse_mappings ⇒ Object
Returns the value of attribute reverse_mappings.
50 51 52 |
# File 'lib/xbim_aim/models/model.rb', line 50 def reverse_mappings @reverse_mappings end |
#revision ⇒ Object
Returns the value of attribute revision.
64 65 66 |
# File 'lib/xbim_aim/models/model.rb', line 64 def revision @revision end |
#roles ⇒ Object
Returns the value of attribute roles.
52 53 54 |
# File 'lib/xbim_aim/models/model.rb', line 52 def roles @roles end |
#segment ⇒ Object
See #/definitions/AssetSegment
24 25 26 |
# File 'lib/xbim_aim/models/model.rb', line 24 def segment @segment end |
#segment_id ⇒ Object
Returns the value of attribute segment_id.
74 75 76 |
# File 'lib/xbim_aim/models/model.rb', line 74 def segment_id @segment_id end |
#segment_name ⇒ Object
Returns the value of attribute segment_name.
72 73 74 |
# File 'lib/xbim_aim/models/model.rb', line 72 def segment_name @segment_name end |
#sites ⇒ Object
Returns the value of attribute sites.
44 45 46 |
# File 'lib/xbim_aim/models/model.rb', line 44 def sites @sites end |
#spaces ⇒ Object
Returns the value of attribute spaces.
28 29 30 |
# File 'lib/xbim_aim/models/model.rb', line 28 def spaces @spaces end |
#state ⇒ Object
Returns the value of attribute state.
56 57 58 |
# File 'lib/xbim_aim/models/model.rb', line 56 def state @state end |
#status ⇒ Object
Returns the value of attribute status.
66 67 68 |
# File 'lib/xbim_aim/models/model.rb', line 66 def status @status end |
#uploaded_by_id ⇒ Object
Returns the value of attribute uploaded_by_id.
70 71 72 |
# File 'lib/xbim_aim/models/model.rb', line 70 def uploaded_by_id @uploaded_by_id end |
#zones ⇒ Object
Returns the value of attribute zones.
36 37 38 |
# File 'lib/xbim_aim/models/model.rb', line 36 def zones @zones end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
163 164 165 |
# File 'lib/xbim_aim/models/model.rb', line 163 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
119 120 121 122 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 151 152 153 154 155 156 157 158 159 160 |
# File 'lib/xbim_aim/models/model.rb', line 119 def self.attribute_map { :'entities' => :'Entities', :'asset' => :'Asset', :'segment' => :'Segment', :'attribute_definitions' => :'AttributeDefinitions', :'spaces' => :'Spaces', :'components' => :'Components', :'component_types' => :'ComponentTypes', :'levels' => :'Levels', :'zones' => :'Zones', :'facilities' => :'Facilities', :'documents' => :'Documents', :'contacts' => :'Contacts', :'sites' => :'Sites', :'applications' => :'Applications', :'forward_mappings' => :'ForwardMappings', :'reverse_mappings' => :'ReverseMappings', :'roles' => :'Roles', :'permissions' => :'Permissions', :'state' => :'State', :'asset_model_id' => :'AssetModelId', :'asset_id' => :'AssetId', :'name' => :'Name', :'revision' => :'Revision', :'status' => :'Status', :'is_current' => :'IsCurrent', :'uploaded_by_id' => :'UploadedById', :'segment_name' => :'SegmentName', :'segment_id' => :'SegmentId', :'asset_name' => :'AssetName', :'model_path' => :'ModelPath', :'model_size' => :'ModelSize', :'one_meter' => :'OneMeter', :'original_author_id' => :'OriginalAuthorId', :'date_uploaded' => :'DateUploaded', :'date_processed' => :'DateProcessed', :'last_entity_id' => :'LastEntityId', :'processing_stage' => :'ProcessingStage', :'processing_status' => :'ProcessingStatus' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
500 501 502 |
# File 'lib/xbim_aim/models/model.rb', line 500 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
212 213 214 215 |
# File 'lib/xbim_aim/models/model.rb', line 212 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/xbim_aim/models/model.rb', line 168 def self.openapi_types { :'entities' => :'Array<Object>', :'asset' => :'Object', :'segment' => :'Object', :'attribute_definitions' => :'Array<AttributeDefinitionEntity>', :'spaces' => :'Array<Object>', :'components' => :'Array<Object>', :'component_types' => :'Array<Object>', :'levels' => :'Array<Object>', :'zones' => :'Array<Object>', :'facilities' => :'Array<Object>', :'documents' => :'Array<Object>', :'contacts' => :'Array<Object>', :'sites' => :'Array<Object>', :'applications' => :'Array<Application>', :'forward_mappings' => :'Array<ModelMapping>', :'reverse_mappings' => :'Array<ModelMapping>', :'roles' => :'Array<Role>', :'permissions' => :'UserPermissions', :'state' => :'String', :'asset_model_id' => :'Integer', :'asset_id' => :'Integer', :'name' => :'String', :'revision' => :'String', :'status' => :'String', :'is_current' => :'Boolean', :'uploaded_by_id' => :'String', :'segment_name' => :'String', :'segment_id' => :'String', :'asset_name' => :'String', :'model_path' => :'String', :'model_size' => :'Integer', :'one_meter' => :'Float', :'original_author_id' => :'Integer', :'date_uploaded' => :'Time', :'date_processed' => :'Time', :'last_entity_id' => :'Integer', :'processing_stage' => :'String', :'processing_status' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 |
# File 'lib/xbim_aim/models/model.rb', line 442 def ==(o) return true if self.equal?(o) self.class == o.class && entities == o.entities && asset == o.asset && segment == o.segment && attribute_definitions == o.attribute_definitions && spaces == o.spaces && components == o.components && component_types == o.component_types && levels == o.levels && zones == o.zones && facilities == o.facilities && documents == o.documents && contacts == o.contacts && sites == o.sites && applications == o.applications && forward_mappings == o.forward_mappings && reverse_mappings == o.reverse_mappings && roles == o.roles && == o. && state == o.state && asset_model_id == o.asset_model_id && asset_id == o.asset_id && name == o.name && revision == o.revision && status == o.status && is_current == o.is_current && uploaded_by_id == o.uploaded_by_id && segment_name == o.segment_name && segment_id == o.segment_id && asset_name == o.asset_name && model_path == o.model_path && model_size == o.model_size && one_meter == o.one_meter && == o. && date_uploaded == o.date_uploaded && date_processed == o.date_processed && last_entity_id == o.last_entity_id && processing_stage == o.processing_stage && processing_status == o.processing_status end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 |
# File 'lib/xbim_aim/models/model.rb', line 530 def _deserialize(type, value) case type.to_sym when :Time Time.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model # models (e.g. Pet) or oneOf klass = XbimAim.const_get(type) klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
601 602 603 604 605 606 607 608 609 610 611 612 613 |
# File 'lib/xbim_aim/models/model.rb', line 601 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/xbim_aim/models/model.rb', line 507 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) self.send("#{key}=", nil) elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end end self end |
#eql?(o) ⇒ Boolean
487 488 489 |
# File 'lib/xbim_aim/models/model.rb', line 487 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
493 494 495 |
# File 'lib/xbim_aim/models/model.rb', line 493 def hash [entities, asset, segment, attribute_definitions, spaces, components, component_types, levels, zones, facilities, documents, contacts, sites, applications, forward_mappings, reverse_mappings, roles, , state, asset_model_id, asset_id, name, revision, status, is_current, uploaded_by_id, segment_name, segment_id, asset_name, model_path, model_size, one_meter, , date_uploaded, date_processed, last_entity_id, processing_stage, processing_status].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
417 418 419 420 |
# File 'lib/xbim_aim/models/model.rb', line 417 def list_invalid_properties invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
577 578 579 |
# File 'lib/xbim_aim/models/model.rb', line 577 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
583 584 585 586 587 588 589 590 591 592 593 594 595 |
# File 'lib/xbim_aim/models/model.rb', line 583 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
571 572 573 |
# File 'lib/xbim_aim/models/model.rb', line 571 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
424 425 426 427 428 |
# File 'lib/xbim_aim/models/model.rb', line 424 def valid? state_validator = EnumAttributeValidator.new('String', ["Active", "Hidden", "Archived"]) return false unless state_validator.valid?(@state) true end |