Class: UntitledApi::ApiV1SitesStatsDevicesResponse3

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

Overview

ApiV1SitesStatsDevicesResponse3 Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(id = SKIP, org_id = SKIP, site_id = SKIP, mac = SKIP, hostname = SKIP, model = SKIP, interfaces = SKIP, last_seen = SKIP, ttl = SKIP, status = SKIP, module_stat = SKIP, auto_upgrade_stat = SKIP, name = SKIP, created_time = SKIP, modified_time = SKIP, map_id = SKIP, serial = SKIP, hw_rev = SKIP, type = SKIP, tag_uuid = SKIP, tag_id = SKIP, evpntopo_id = SKIP, deviceprofile_id = SKIP) ⇒ ApiV1SitesStatsDevicesResponse3

Returns a new instance of ApiV1SitesStatsDevicesResponse3.



167
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
210
211
212
213
# File 'lib/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 167

def initialize(id = SKIP,
               org_id = SKIP,
               site_id = SKIP,
               mac = SKIP,
               hostname = SKIP,
               model = SKIP,
               interfaces = SKIP,
               last_seen = SKIP,
               ttl = SKIP,
               status = SKIP,
               module_stat = SKIP,
               auto_upgrade_stat = SKIP,
               name = SKIP,
               created_time = SKIP,
               modified_time = SKIP,
               map_id = SKIP,
               serial = SKIP,
               hw_rev = SKIP,
               type = SKIP,
               tag_uuid = SKIP,
               tag_id = SKIP,
               evpntopo_id = SKIP,
               deviceprofile_id = SKIP)
  @id = id unless id == SKIP
  @org_id = org_id unless org_id == SKIP
  @site_id = site_id unless site_id == SKIP
  @mac = mac unless mac == SKIP
  @hostname = hostname unless hostname == SKIP
  @model = model unless model == SKIP
  @interfaces = interfaces unless interfaces == SKIP
  @last_seen = last_seen unless last_seen == SKIP
  @ttl = ttl unless ttl == SKIP
  @status = status unless status == SKIP
  @module_stat = module_stat unless module_stat == SKIP
  @auto_upgrade_stat = auto_upgrade_stat unless auto_upgrade_stat == SKIP
  @name = name unless name == SKIP
  @created_time = created_time unless created_time == SKIP
  @modified_time = modified_time unless modified_time == SKIP
  @map_id = map_id unless map_id == SKIP
  @serial = serial unless serial == SKIP
  @hw_rev = hw_rev unless hw_rev == SKIP
  @type = type unless type == SKIP
  @tag_uuid = tag_uuid unless tag_uuid == SKIP
  @tag_id = tag_id unless tag_id == SKIP
  @evpntopo_id = evpntopo_id unless evpntopo_id == SKIP
  @deviceprofile_id = deviceprofile_id unless deviceprofile_id == SKIP
end

Instance Attribute Details

#auto_upgrade_statObject

TODO: Write general description for this method

Returns:

  • (Object)


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

def auto_upgrade_stat
  @auto_upgrade_stat
end

#created_timeFloat

TODO: Write general description for this method

Returns:

  • (Float)


66
67
68
# File 'lib/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 66

def created_time
  @created_time
end

#deviceprofile_idObject

TODO: Write general description for this method

Returns:

  • (Object)


102
103
104
# File 'lib/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 102

def deviceprofile_id
  @deviceprofile_id
end

#evpntopo_idObject

TODO: Write general description for this method

Returns:

  • (Object)


98
99
100
# File 'lib/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 98

def evpntopo_id
  @evpntopo_id
end

#hostnameString

TODO: Write general description for this method

Returns:

  • (String)


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

def hostname
  @hostname
end

#hw_revString

TODO: Write general description for this method

Returns:

  • (String)


82
83
84
# File 'lib/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 82

def hw_rev
  @hw_rev
end

#idString

TODO: Write general description for this method

Returns:

  • (String)


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

def id
  @id
end

#interfacesObject

TODO: Write general description for this method

Returns:

  • (Object)


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

def interfaces
  @interfaces
end

#last_seenFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def last_seen
  @last_seen
end

#macString

TODO: Write general description for this method

Returns:

  • (String)


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

def mac
  @mac
end

#map_idObject

TODO: Write general description for this method

Returns:

  • (Object)


74
75
76
# File 'lib/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 74

def map_id
  @map_id
end

#modelString

TODO: Write general description for this method

Returns:

  • (String)


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

def model
  @model
end

#modified_timeFloat

TODO: Write general description for this method

Returns:

  • (Float)


70
71
72
# File 'lib/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 70

def modified_time
  @modified_time
end

#module_statObject

TODO: Write general description for this method

Returns:

  • (Object)


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

def module_stat
  @module_stat
end

#nameString

TODO: Write general description for this method

Returns:

  • (String)


62
63
64
# File 'lib/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 62

def name
  @name
end

#org_idString

TODO: Write general description for this method

Returns:

  • (String)


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

def org_id
  @org_id
end

#serialString

TODO: Write general description for this method

Returns:

  • (String)


78
79
80
# File 'lib/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 78

def serial
  @serial
end

#site_idString

TODO: Write general description for this method

Returns:

  • (String)


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

def site_id
  @site_id
end

#statusString

TODO: Write general description for this method

Returns:

  • (String)


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

def status
  @status
end

#tag_idFloat

TODO: Write general description for this method

Returns:

  • (Float)


94
95
96
# File 'lib/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 94

def tag_id
  @tag_id
end

#tag_uuidString

TODO: Write general description for this method

Returns:

  • (String)


90
91
92
# File 'lib/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 90

def tag_uuid
  @tag_uuid
end

#ttlFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def ttl
  @ttl
end

#typeString

TODO: Write general description for this method

Returns:

  • (String)


86
87
88
# File 'lib/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 86

def type
  @type
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



216
217
218
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
# File 'lib/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 216

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  id = hash.key?('ID') ? hash['ID'] : SKIP
  org_id = hash.key?('org_id') ? hash['org_id'] : SKIP
  site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
  mac = hash.key?('mac') ? hash['mac'] : SKIP
  hostname = hash.key?('hostname') ? hash['hostname'] : SKIP
  model = hash.key?('model') ? hash['model'] : SKIP
  interfaces = hash.key?('interfaces') ? hash['interfaces'] : SKIP
  last_seen = hash.key?('last_seen') ? hash['last_seen'] : SKIP
  ttl = hash.key?('_ttl') ? hash['_ttl'] : SKIP
  status = hash.key?('status') ? hash['status'] : SKIP
  module_stat = hash.key?('module_stat') ? hash['module_stat'] : SKIP
  auto_upgrade_stat =
    hash.key?('auto_upgrade_stat') ? hash['auto_upgrade_stat'] : SKIP
  name = hash.key?('name') ? hash['name'] : SKIP
  created_time = hash.key?('created_time') ? hash['created_time'] : SKIP
  modified_time = hash.key?('modified_time') ? hash['modified_time'] : SKIP
  map_id = hash.key?('map_id') ? hash['map_id'] : SKIP
  serial = hash.key?('serial') ? hash['serial'] : SKIP
  hw_rev = hash.key?('hw_rev') ? hash['hw_rev'] : SKIP
  type = hash.key?('type') ? hash['type'] : SKIP
  tag_uuid = hash.key?('tag_uuid') ? hash['tag_uuid'] : SKIP
  tag_id = hash.key?('tag_id') ? hash['tag_id'] : SKIP
  evpntopo_id = hash.key?('evpntopo_id') ? hash['evpntopo_id'] : SKIP
  deviceprofile_id =
    hash.key?('deviceprofile_id') ? hash['deviceprofile_id'] : SKIP

  # Create object from extracted values.
  ApiV1SitesStatsDevicesResponse3.new(id,
                                      org_id,
                                      site_id,
                                      mac,
                                      hostname,
                                      model,
                                      interfaces,
                                      last_seen,
                                      ttl,
                                      status,
                                      module_stat,
                                      auto_upgrade_stat,
                                      name,
                                      created_time,
                                      modified_time,
                                      map_id,
                                      serial,
                                      hw_rev,
                                      type,
                                      tag_uuid,
                                      tag_id,
                                      evpntopo_id,
                                      deviceprofile_id)
end

.namesObject

A mapping from model property names to API property names.



105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
# File 'lib/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 105

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['id'] = 'ID'
  @_hash['org_id'] = 'org_id'
  @_hash['site_id'] = 'site_id'
  @_hash['mac'] = 'mac'
  @_hash['hostname'] = 'hostname'
  @_hash['model'] = 'model'
  @_hash['interfaces'] = 'interfaces'
  @_hash['last_seen'] = 'last_seen'
  @_hash['ttl'] = '_ttl'
  @_hash['status'] = 'status'
  @_hash['module_stat'] = 'module_stat'
  @_hash['auto_upgrade_stat'] = 'auto_upgrade_stat'
  @_hash['name'] = 'name'
  @_hash['created_time'] = 'created_time'
  @_hash['modified_time'] = 'modified_time'
  @_hash['map_id'] = 'map_id'
  @_hash['serial'] = 'serial'
  @_hash['hw_rev'] = 'hw_rev'
  @_hash['type'] = 'type'
  @_hash['tag_uuid'] = 'tag_uuid'
  @_hash['tag_id'] = 'tag_id'
  @_hash['evpntopo_id'] = 'evpntopo_id'
  @_hash['deviceprofile_id'] = 'deviceprofile_id'
  @_hash
end

.nullablesObject

An array for nullable fields



163
164
165
# File 'lib/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 163

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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/untitled_api/models/api_v1_sites_stats_devices_response3.rb', line 134

def self.optionals
  %w[
    id
    org_id
    site_id
    mac
    hostname
    model
    interfaces
    last_seen
    ttl
    status
    module_stat
    auto_upgrade_stat
    name
    created_time
    modified_time
    map_id
    serial
    hw_rev
    type
    tag_uuid
    tag_id
    evpntopo_id
    deviceprofile_id
  ]
end