Class: MistApi::ResponseMapImport
- Defined in:
- lib/mist_api/models/response_map_import.rb
Overview
ResponseMapImport Model.
Instance Attribute Summary collapse
-
#aps ⇒ Array[ResponseMapImportAp]
TODO: Write general description for this method.
-
#floorplans ⇒ Array[ResponseMapImportFloorplan]
TODO: Write general description for this method.
-
#for_site ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#site_id ⇒ UUID | String
TODO: Write general description for this method.
-
#summary ⇒ ResponseMapImportSummary
TODO: Write general description for this method.
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(aps = nil, floorplans = nil, site_id = nil, summary = nil, for_site = SKIP) ⇒ ResponseMapImport
constructor
A new instance of ResponseMapImport.
-
#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(aps = nil, floorplans = nil, site_id = nil, summary = nil, for_site = SKIP) ⇒ ResponseMapImport
Returns a new instance of ResponseMapImport.
55 56 57 58 59 60 61 62 |
# File 'lib/mist_api/models/response_map_import.rb', line 55 def initialize(aps = nil, floorplans = nil, site_id = nil, summary = nil, for_site = SKIP) @aps = aps @floorplans = floorplans @for_site = for_site unless for_site == SKIP @site_id = site_id @summary = summary end |
Instance Attribute Details
#aps ⇒ Array[ResponseMapImportAp]
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/response_map_import.rb', line 14 def aps @aps end |
#floorplans ⇒ Array[ResponseMapImportFloorplan]
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/response_map_import.rb', line 18 def floorplans @floorplans end |
#for_site ⇒ TrueClass | FalseClass
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/response_map_import.rb', line 22 def for_site @for_site end |
#site_id ⇒ UUID | String
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/response_map_import.rb', line 26 def site_id @site_id end |
#summary ⇒ ResponseMapImportSummary
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/response_map_import.rb', line 30 def summary @summary 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 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/mist_api/models/response_map_import.rb', line 65 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. # Parameter is an array, so we need to iterate through it aps = nil unless hash['aps'].nil? aps = [] hash['aps'].each do |structure| aps << (ResponseMapImportAp.from_hash(structure) if structure) end end aps = nil unless hash.key?('aps') # Parameter is an array, so we need to iterate through it floorplans = nil unless hash['floorplans'].nil? floorplans = [] hash['floorplans'].each do |structure| floorplans << (ResponseMapImportFloorplan.from_hash(structure) if structure) end end floorplans = nil unless hash.key?('floorplans') site_id = hash.key?('site_id') ? hash['site_id'] : nil summary = ResponseMapImportSummary.from_hash(hash['summary']) if hash['summary'] for_site = hash.key?('for_site') ? hash['for_site'] : SKIP # Create object from extracted values. ResponseMapImport.new(aps, floorplans, site_id, summary, for_site) 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.rb', line 33 def self.names @_hash = {} if @_hash.nil? @_hash['aps'] = 'aps' @_hash['floorplans'] = 'floorplans' @_hash['for_site'] = 'for_site' @_hash['site_id'] = 'site_id' @_hash['summary'] = 'summary' @_hash end |
.nullables ⇒ Object
An array for nullable fields
51 52 53 |
# File 'lib/mist_api/models/response_map_import.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.rb', line 44 def self.optionals %w[ for_site ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
109 110 111 112 113 |
# File 'lib/mist_api/models/response_map_import.rb', line 109 def inspect class_name = self.class.name.split('::').last "<#{class_name} aps: #{@aps.inspect}, floorplans: #{@floorplans.inspect}, for_site:"\ " #{@for_site.inspect}, site_id: #{@site_id.inspect}, summary: #{@summary.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
102 103 104 105 106 |
# File 'lib/mist_api/models/response_map_import.rb', line 102 def to_s class_name = self.class.name.split('::').last "<#{class_name} aps: #{@aps}, floorplans: #{@floorplans}, for_site: #{@for_site}, site_id:"\ " #{@site_id}, summary: #{@summary}>" end |