Class: MistApi::ResponseMapImportFloorplan
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::ResponseMapImportFloorplan
- Defined in:
- lib/mist_api/models/response_map_import_floorplan.rb
Overview
ResponseMapImportFloorplan Model.
Instance Attribute Summary collapse
-
#action ⇒ String
TODO: Write general description for this method.
-
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#map_id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#name ⇒ String
Unique ID of the object instance in the Mist Organization.
-
#reason ⇒ String
Unique ID of the object instance in the Mist Organization.
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(action = nil, id = nil, map_id = nil, name = nil, reason = SKIP) ⇒ ResponseMapImportFloorplan
constructor
A new instance of ResponseMapImportFloorplan.
-
#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(action = nil, id = nil, map_id = nil, name = nil, reason = SKIP) ⇒ ResponseMapImportFloorplan
Returns a new instance of ResponseMapImportFloorplan.
55 56 57 58 59 60 61 62 |
# File 'lib/mist_api/models/response_map_import_floorplan.rb', line 55 def initialize(action = nil, id = nil, map_id = nil, name = nil, reason = SKIP) @action = action @id = id @map_id = map_id @name = name @reason = reason unless reason == SKIP end |
Instance Attribute Details
#action ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/response_map_import_floorplan.rb', line 14 def action @action end |
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
18 19 20 |
# File 'lib/mist_api/models/response_map_import_floorplan.rb', line 18 def id @id end |
#map_id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
22 23 24 |
# File 'lib/mist_api/models/response_map_import_floorplan.rb', line 22 def map_id @map_id end |
#name ⇒ String
Unique ID of the object instance in the Mist Organization
26 27 28 |
# File 'lib/mist_api/models/response_map_import_floorplan.rb', line 26 def name @name end |
#reason ⇒ String
Unique ID of the object instance in the Mist Organization
30 31 32 |
# File 'lib/mist_api/models/response_map_import_floorplan.rb', line 30 def reason @reason end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/mist_api/models/response_map_import_floorplan.rb', line 65 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. action = hash.key?('action') ? hash['action'] : nil id = hash.key?('id') ? hash['id'] : nil map_id = hash.key?('map_id') ? hash['map_id'] : nil name = hash.key?('name') ? hash['name'] : nil reason = hash.key?('reason') ? hash['reason'] : SKIP # Create object from extracted values. ResponseMapImportFloorplan.new(action, id, map_id, name, reason) end |
.names ⇒ Object
A mapping from model property names to API property names.
33 34 35 36 37 38 39 40 41 |
# File 'lib/mist_api/models/response_map_import_floorplan.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['action'] = 'action' @_hash['id'] = 'id' @_hash['map_id'] = 'map_id' @_hash['name'] = 'name' @_hash['reason'] = 'reason' @_hash end |
.nullables ⇒ Object
An array for nullable fields
51 52 53 |
# File 'lib/mist_api/models/response_map_import_floorplan.rb', line 51 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
44 45 46 47 48 |
# File 'lib/mist_api/models/response_map_import_floorplan.rb', line 44 def self.optionals %w[ reason ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
91 92 93 94 95 |
# File 'lib/mist_api/models/response_map_import_floorplan.rb', line 91 def inspect class_name = self.class.name.split('::').last "<#{class_name} action: #{@action.inspect}, id: #{@id.inspect}, map_id: #{@map_id.inspect},"\ " name: #{@name.inspect}, reason: #{@reason.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
84 85 86 87 88 |
# File 'lib/mist_api/models/response_map_import_floorplan.rb', line 84 def to_s class_name = self.class.name.split('::').last "<#{class_name} action: #{@action}, id: #{@id}, map_id: #{@map_id}, name: #{@name}, reason:"\ " #{@reason}>" end |