Class: UntitledApi::ApiV1SitesStatsMapsUnconnectedClientsResponse1

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb

Overview

ApiV1SitesStatsMapsUnconnectedClientsResponse1 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(mac = SKIP, ap_mac = SKIP, map_id = SKIP, x_m = SKIP, y_m = SKIP, x = SKIP, y = SKIP, num_locating_aps = SKIP, last_seen = SKIP, ttl = SKIP, id = SKIP, manufacture = SKIP) ⇒ ApiV1SitesStatsMapsUnconnectedClientsResponse1

Returns a new instance of ApiV1SitesStatsMapsUnconnectedClientsResponse1.



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 101

def initialize(mac = SKIP,
               ap_mac = SKIP,
               map_id = SKIP,
               x_m = SKIP,
               y_m = SKIP,
               x = SKIP,
               y = SKIP,
               num_locating_aps = SKIP,
               last_seen = SKIP,
               ttl = SKIP,
               id = SKIP,
               manufacture = SKIP)
  @mac = mac unless mac == SKIP
  @ap_mac = ap_mac unless ap_mac == SKIP
  @map_id = map_id unless map_id == SKIP
  @x_m = x_m unless x_m == SKIP
  @y_m = y_m unless y_m == SKIP
  @x = x unless x == SKIP
  @y = y unless y == SKIP
  @num_locating_aps = num_locating_aps unless num_locating_aps == SKIP
  @last_seen = last_seen unless last_seen == SKIP
  @ttl = ttl unless ttl == SKIP
  @id = id unless id == SKIP
  @manufacture = manufacture unless manufacture == SKIP
end

Instance Attribute Details

#ap_macString

TODO: Write general description for this method

Returns:

  • (String)


18
19
20
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 18

def ap_mac
  @ap_mac
end

#idString

TODO: Write general description for this method

Returns:

  • (String)


54
55
56
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 54

def id
  @id
end

#last_seenFloat

TODO: Write general description for this method

Returns:

  • (Float)


46
47
48
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 46

def last_seen
  @last_seen
end

#macString

TODO: Write general description for this method

Returns:

  • (String)


14
15
16
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 14

def mac
  @mac
end

#manufactureString

TODO: Write general description for this method

Returns:

  • (String)


58
59
60
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 58

def manufacture
  @manufacture
end

#map_idString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 22

def map_id
  @map_id
end

#num_locating_apsFloat

TODO: Write general description for this method

Returns:

  • (Float)


42
43
44
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 42

def num_locating_aps
  @num_locating_aps
end

#ttlFloat

TODO: Write general description for this method

Returns:

  • (Float)


50
51
52
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 50

def ttl
  @ttl
end

#xFloat

TODO: Write general description for this method

Returns:

  • (Float)


34
35
36
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 34

def x
  @x
end

#x_mFloat

TODO: Write general description for this method

Returns:

  • (Float)


26
27
28
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 26

def x_m
  @x_m
end

#yFloat

TODO: Write general description for this method

Returns:

  • (Float)


38
39
40
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 38

def y
  @y
end

#y_mFloat

TODO: Write general description for this method

Returns:

  • (Float)


30
31
32
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 30

def y_m
  @y_m
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 128

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.

  mac = hash.key?('mac') ? hash['mac'] : SKIP
  ap_mac = hash.key?('ap_mac') ? hash['ap_mac'] : SKIP
  map_id = hash.key?('map_id') ? hash['map_id'] : SKIP
  x_m = hash.key?('x_m') ? hash['x_m'] : SKIP
  y_m = hash.key?('y_m') ? hash['y_m'] : SKIP
  x = hash.key?('x') ? hash['x'] : SKIP
  y = hash.key?('y') ? hash['y'] : SKIP
  num_locating_aps =
    hash.key?('num_locating_aps') ? hash['num_locating_aps'] : SKIP
  last_seen = hash.key?('last_seen') ? hash['last_seen'] : SKIP
  ttl = hash.key?('_ttl') ? hash['_ttl'] : SKIP
  id = hash.key?('_id') ? hash['_id'] : SKIP
  manufacture = hash.key?('manufacture') ? hash['manufacture'] : SKIP

  # Create object from extracted values.

  ApiV1SitesStatsMapsUnconnectedClientsResponse1.new(mac,
                                                     ap_mac,
                                                     map_id,
                                                     x_m,
                                                     y_m,
                                                     x,
                                                     y,
                                                     num_locating_aps,
                                                     last_seen,
                                                     ttl,
                                                     id,
                                                     manufacture)
end

.namesObject

A mapping from model property names to API property names.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 61

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['mac'] = 'mac'
  @_hash['ap_mac'] = 'ap_mac'
  @_hash['map_id'] = 'map_id'
  @_hash['x_m'] = 'x_m'
  @_hash['y_m'] = 'y_m'
  @_hash['x'] = 'x'
  @_hash['y'] = 'y'
  @_hash['num_locating_aps'] = 'num_locating_aps'
  @_hash['last_seen'] = 'last_seen'
  @_hash['ttl'] = '_ttl'
  @_hash['id'] = '_id'
  @_hash['manufacture'] = 'manufacture'
  @_hash
end

.nullablesObject

An array for nullable fields



97
98
99
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 97

def self.nullables
  []
end

.optionalsObject

An array for optional fields



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/untitled_api/models/api_v1_sites_stats_maps_unconnected_clients_response1.rb', line 79

def self.optionals
  %w[
    mac
    ap_mac
    map_id
    x_m
    y_m
    x
    y
    num_locating_aps
    last_seen
    ttl
    id
    manufacture
  ]
end