Class: MistApi::ResponseMapImportAp

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

Overview

ResponseMapImportAp 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(action = nil, floorplan_id = nil, mac = nil, map_id = nil, orientation = nil, height = SKIP, reason = SKIP) ⇒ ResponseMapImportAp

Returns a new instance of ResponseMapImportAp.



73
74
75
76
77
78
79
80
81
82
# File 'lib/mist_api/models/response_map_import_ap.rb', line 73

def initialize(action = nil, floorplan_id = nil, mac = nil, map_id = nil,
               orientation = nil, height = SKIP, reason = SKIP)
  @action = action
  @floorplan_id = floorplan_id
  @height = height unless height == SKIP
  @mac = mac
  @map_id = map_id
  @orientation = orientation
  @reason = reason unless reason == SKIP
end

Instance Attribute Details

#actionResponseMapImportApActionEnum

enum: ‘assigned-named-placed`, `assigned-placed`, `ignored`, `named-placed`, `placed`



15
16
17
# File 'lib/mist_api/models/response_map_import_ap.rb', line 15

def action
  @action
end

#floorplan_idUUID | String

enum: ‘assigned-named-placed`, `assigned-placed`, `ignored`, `named-placed`, `placed`

Returns:

  • (UUID | String)


20
21
22
# File 'lib/mist_api/models/response_map_import_ap.rb', line 20

def floorplan_id
  @floorplan_id
end

#heightFloat

enum: ‘assigned-named-placed`, `assigned-placed`, `ignored`, `named-placed`, `placed`

Returns:

  • (Float)


25
26
27
# File 'lib/mist_api/models/response_map_import_ap.rb', line 25

def height
  @height
end

#macString

enum: ‘assigned-named-placed`, `assigned-placed`, `ignored`, `named-placed`, `placed`

Returns:

  • (String)


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

def mac
  @mac
end

#map_idUUID | String

enum: ‘assigned-named-placed`, `assigned-placed`, `ignored`, `named-placed`, `placed`

Returns:

  • (UUID | String)


35
36
37
# File 'lib/mist_api/models/response_map_import_ap.rb', line 35

def map_id
  @map_id
end

#orientationInteger

enum: ‘assigned-named-placed`, `assigned-placed`, `ignored`, `named-placed`, `placed`

Returns:

  • (Integer)


40
41
42
# File 'lib/mist_api/models/response_map_import_ap.rb', line 40

def orientation
  @orientation
end

#reasonString

enum: ‘assigned-named-placed`, `assigned-placed`, `ignored`, `named-placed`, `placed`

Returns:

  • (String)


45
46
47
# File 'lib/mist_api/models/response_map_import_ap.rb', line 45

def reason
  @reason
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# File 'lib/mist_api/models/response_map_import_ap.rb', line 85

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  action = hash.key?('action') ? hash['action'] : nil
  floorplan_id = hash.key?('floorplan_id') ? hash['floorplan_id'] : nil
  mac = hash.key?('mac') ? hash['mac'] : nil
  map_id = hash.key?('map_id') ? hash['map_id'] : nil
  orientation = hash.key?('orientation') ? hash['orientation'] : nil
  height = hash.key?('height') ? hash['height'] : SKIP
  reason = hash.key?('reason') ? hash['reason'] : SKIP

  # Create object from extracted values.
  ResponseMapImportAp.new(action,
                          floorplan_id,
                          mac,
                          map_id,
                          orientation,
                          height,
                          reason)
end

.namesObject

A mapping from model property names to API property names.



48
49
50
51
52
53
54
55
56
57
58
# File 'lib/mist_api/models/response_map_import_ap.rb', line 48

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['action'] = 'action'
  @_hash['floorplan_id'] = 'floorplan_id'
  @_hash['height'] = 'height'
  @_hash['mac'] = 'mac'
  @_hash['map_id'] = 'map_id'
  @_hash['orientation'] = 'orientation'
  @_hash['reason'] = 'reason'
  @_hash
end

.nullablesObject

An array for nullable fields



69
70
71
# File 'lib/mist_api/models/response_map_import_ap.rb', line 69

def self.nullables
  []
end

.optionalsObject

An array for optional fields



61
62
63
64
65
66
# File 'lib/mist_api/models/response_map_import_ap.rb', line 61

def self.optionals
  %w[
    height
    reason
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



115
116
117
118
119
120
# File 'lib/mist_api/models/response_map_import_ap.rb', line 115

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} action: #{@action.inspect}, floorplan_id: #{@floorplan_id.inspect}, height:"\
  " #{@height.inspect}, mac: #{@mac.inspect}, map_id: #{@map_id.inspect}, orientation:"\
  " #{@orientation.inspect}, reason: #{@reason.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



108
109
110
111
112
# File 'lib/mist_api/models/response_map_import_ap.rb', line 108

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} action: #{@action}, floorplan_id: #{@floorplan_id}, height: #{@height},"\
  " mac: #{@mac}, map_id: #{@map_id}, orientation: #{@orientation}, reason: #{@reason}>"
end