Class: MistApi::GatewaySearch

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

Overview

GatewaySearch 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(clustered = SKIP, evpn_missing_links = SKIP, evpntopo_id = SKIP, ext_ip = SKIP, hostname = SKIP, ip = SKIP, last_config_status = SKIP, last_hostname = SKIP, last_trouble_code = SKIP, last_trouble_timestamp = SKIP, mac = SKIP, managed = SKIP, mist_configured = SKIP, model = SKIP, node = SKIP, node0_mac = SKIP, node1_mac = SKIP, num_members = SKIP, org_id = SKIP, role = SKIP, site_id = SKIP, t128agent_version = SKIP, time_drifted = SKIP, timestamp = SKIP, uptime = SKIP, version = SKIP) ⇒ GatewaySearch

Returns a new instance of GatewaySearch.



212
213
214
215
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
# File 'lib/mist_api/models/gateway_search.rb', line 212

def initialize(clustered = SKIP, evpn_missing_links = SKIP,
               evpntopo_id = SKIP, ext_ip = SKIP, hostname = SKIP,
               ip = SKIP, last_config_status = SKIP, last_hostname = SKIP,
               last_trouble_code = SKIP, last_trouble_timestamp = SKIP,
               mac = SKIP, managed = SKIP, mist_configured = SKIP,
               model = SKIP, node = SKIP, node0_mac = SKIP,
               node1_mac = SKIP, num_members = SKIP, org_id = SKIP,
               role = SKIP, site_id = SKIP, t128agent_version = SKIP,
               time_drifted = SKIP, timestamp = SKIP, uptime = SKIP,
               version = SKIP)
  @clustered = clustered unless clustered == SKIP
  @evpn_missing_links = evpn_missing_links unless evpn_missing_links == SKIP
  @evpntopo_id = evpntopo_id unless evpntopo_id == SKIP
  @ext_ip = ext_ip unless ext_ip == SKIP
  @hostname = hostname unless hostname == SKIP
  @ip = ip unless ip == SKIP
  @last_config_status = last_config_status unless last_config_status == SKIP
  @last_hostname = last_hostname unless last_hostname == SKIP
  @last_trouble_code = last_trouble_code unless last_trouble_code == SKIP
  @last_trouble_timestamp = last_trouble_timestamp unless last_trouble_timestamp == SKIP
  @mac = mac unless mac == SKIP
  @managed = managed unless managed == SKIP
  @mist_configured = mist_configured unless mist_configured == SKIP
  @model = model unless model == SKIP
  @node = node unless node == SKIP
  @node0_mac = node0_mac unless node0_mac == SKIP
  @node1_mac = node1_mac unless node1_mac == SKIP
  @num_members = num_members unless num_members == SKIP
  @org_id = org_id unless org_id == SKIP
  @role = role unless role == SKIP
  @site_id = site_id unless site_id == SKIP
  @t128agent_version = t128agent_version unless t128agent_version == SKIP
  @time_drifted = time_drifted unless time_drifted == SKIP
  @timestamp = timestamp unless timestamp == SKIP
  @type = 'gateway'
  @uptime = uptime unless uptime == SKIP
  @version = version unless version == SKIP
end

Instance Attribute Details

#clusteredTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


14
15
16
# File 'lib/mist_api/models/gateway_search.rb', line 14

def clustered
  @clustered
end

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


18
19
20
# File 'lib/mist_api/models/gateway_search.rb', line 18

def evpn_missing_links
  @evpn_missing_links
end

#evpntopo_idString

TODO: Write general description for this method

Returns:

  • (String)


22
23
24
# File 'lib/mist_api/models/gateway_search.rb', line 22

def evpntopo_id
  @evpntopo_id
end

#ext_ipString

TODO: Write general description for this method

Returns:

  • (String)


26
27
28
# File 'lib/mist_api/models/gateway_search.rb', line 26

def ext_ip
  @ext_ip
end

#hostnameArray[String]

TODO: Write general description for this method

Returns:

  • (Array[String])


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

def hostname
  @hostname
end

#ipString

TODO: Write general description for this method

Returns:

  • (String)


34
35
36
# File 'lib/mist_api/models/gateway_search.rb', line 34

def ip
  @ip
end

#last_config_statusString

TODO: Write general description for this method

Returns:

  • (String)


38
39
40
# File 'lib/mist_api/models/gateway_search.rb', line 38

def last_config_status
  @last_config_status
end

#last_hostnameString

TODO: Write general description for this method

Returns:

  • (String)


42
43
44
# File 'lib/mist_api/models/gateway_search.rb', line 42

def last_hostname
  @last_hostname
end

#last_trouble_codeString

TODO: Write general description for this method

Returns:

  • (String)


46
47
48
# File 'lib/mist_api/models/gateway_search.rb', line 46

def last_trouble_code
  @last_trouble_code
end

#last_trouble_timestampInteger

TODO: Write general description for this method

Returns:

  • (Integer)


50
51
52
# File 'lib/mist_api/models/gateway_search.rb', line 50

def last_trouble_timestamp
  @last_trouble_timestamp
end

#macString

TODO: Write general description for this method

Returns:

  • (String)


54
55
56
# File 'lib/mist_api/models/gateway_search.rb', line 54

def mac
  @mac
end

#managedTrueClass | FalseClass

TODO: Write general description for this method

Returns:

  • (TrueClass | FalseClass)


58
59
60
# File 'lib/mist_api/models/gateway_search.rb', line 58

def managed
  @managed
end

#mist_configuredTrueClass | FalseClass

whether the device can be configured by Mist or not. This deprecates ‘managed` (for adopted device) and `disable_auto_config` for claimed device)

Returns:

  • (TrueClass | FalseClass)


64
65
66
# File 'lib/mist_api/models/gateway_search.rb', line 64

def mist_configured
  @mist_configured
end

#modelString

whether the device can be configured by Mist or not. This deprecates ‘managed` (for adopted device) and `disable_auto_config` for claimed device)

Returns:

  • (String)


70
71
72
# File 'lib/mist_api/models/gateway_search.rb', line 70

def model
  @model
end

#nodeString

whether the device can be configured by Mist or not. This deprecates ‘managed` (for adopted device) and `disable_auto_config` for claimed device)

Returns:

  • (String)


76
77
78
# File 'lib/mist_api/models/gateway_search.rb', line 76

def node
  @node
end

#node0_macString

whether the device can be configured by Mist or not. This deprecates ‘managed` (for adopted device) and `disable_auto_config` for claimed device)

Returns:

  • (String)


82
83
84
# File 'lib/mist_api/models/gateway_search.rb', line 82

def node0_mac
  @node0_mac
end

#node1_macString

whether the device can be configured by Mist or not. This deprecates ‘managed` (for adopted device) and `disable_auto_config` for claimed device)

Returns:

  • (String)


88
89
90
# File 'lib/mist_api/models/gateway_search.rb', line 88

def node1_mac
  @node1_mac
end

#num_membersInteger

whether the device can be configured by Mist or not. This deprecates ‘managed` (for adopted device) and `disable_auto_config` for claimed device)

Returns:

  • (Integer)


94
95
96
# File 'lib/mist_api/models/gateway_search.rb', line 94

def num_members
  @num_members
end

#org_idUUID | String

whether the device can be configured by Mist or not. This deprecates ‘managed` (for adopted device) and `disable_auto_config` for claimed device)

Returns:

  • (UUID | String)


100
101
102
# File 'lib/mist_api/models/gateway_search.rb', line 100

def org_id
  @org_id
end

#roleString

whether the device can be configured by Mist or not. This deprecates ‘managed` (for adopted device) and `disable_auto_config` for claimed device)

Returns:

  • (String)


106
107
108
# File 'lib/mist_api/models/gateway_search.rb', line 106

def role
  @role
end

#site_idUUID | String

whether the device can be configured by Mist or not. This deprecates ‘managed` (for adopted device) and `disable_auto_config` for claimed device)

Returns:

  • (UUID | String)


112
113
114
# File 'lib/mist_api/models/gateway_search.rb', line 112

def site_id
  @site_id
end

#t128agent_versionString

whether the device can be configured by Mist or not. This deprecates ‘managed` (for adopted device) and `disable_auto_config` for claimed device)

Returns:

  • (String)


118
119
120
# File 'lib/mist_api/models/gateway_search.rb', line 118

def t128agent_version
  @t128agent_version
end

#time_driftedTrueClass | FalseClass

whether the device can be configured by Mist or not. This deprecates ‘managed` (for adopted device) and `disable_auto_config` for claimed device)

Returns:

  • (TrueClass | FalseClass)


124
125
126
# File 'lib/mist_api/models/gateway_search.rb', line 124

def time_drifted
  @time_drifted
end

#timestampFloat

Epoch (seconds)

Returns:

  • (Float)


128
129
130
# File 'lib/mist_api/models/gateway_search.rb', line 128

def timestamp
  @timestamp
end

#typeString (readonly)

Device Type. enum: ‘gateway`

Returns:

  • (String)


132
133
134
# File 'lib/mist_api/models/gateway_search.rb', line 132

def type
  @type
end

#uptimeInteger

Device Type. enum: ‘gateway`

Returns:

  • (Integer)


136
137
138
# File 'lib/mist_api/models/gateway_search.rb', line 136

def uptime
  @uptime
end

#versionString

Device Type. enum: ‘gateway`

Returns:

  • (String)


140
141
142
# File 'lib/mist_api/models/gateway_search.rb', line 140

def version
  @version
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
# File 'lib/mist_api/models/gateway_search.rb', line 252

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  clustered = hash.key?('clustered') ? hash['clustered'] : SKIP
  evpn_missing_links =
    hash.key?('evpn_missing_links') ? hash['evpn_missing_links'] : SKIP
  evpntopo_id = hash.key?('evpntopo_id') ? hash['evpntopo_id'] : SKIP
  ext_ip = hash.key?('ext_ip') ? hash['ext_ip'] : SKIP
  hostname = hash.key?('hostname') ? hash['hostname'] : SKIP
  ip = hash.key?('ip') ? hash['ip'] : SKIP
  last_config_status =
    hash.key?('last_config_status') ? hash['last_config_status'] : SKIP
  last_hostname = hash.key?('last_hostname') ? hash['last_hostname'] : SKIP
  last_trouble_code =
    hash.key?('last_trouble_code') ? hash['last_trouble_code'] : SKIP
  last_trouble_timestamp =
    hash.key?('last_trouble_timestamp') ? hash['last_trouble_timestamp'] : SKIP
  mac = hash.key?('mac') ? hash['mac'] : SKIP
  managed = hash.key?('managed') ? hash['managed'] : SKIP
  mist_configured =
    hash.key?('mist_configured') ? hash['mist_configured'] : SKIP
  model = hash.key?('model') ? hash['model'] : SKIP
  node = hash.key?('node') ? hash['node'] : SKIP
  node0_mac = hash.key?('node0_mac') ? hash['node0_mac'] : SKIP
  node1_mac = hash.key?('node1_mac') ? hash['node1_mac'] : SKIP
  num_members = hash.key?('num_members') ? hash['num_members'] : SKIP
  org_id = hash.key?('org_id') ? hash['org_id'] : SKIP
  role = hash.key?('role') ? hash['role'] : SKIP
  site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
  t128agent_version =
    hash.key?('t128agent_version') ? hash['t128agent_version'] : SKIP
  time_drifted = hash.key?('time_drifted') ? hash['time_drifted'] : SKIP
  timestamp = hash.key?('timestamp') ? hash['timestamp'] : SKIP
  uptime = hash.key?('uptime') ? hash['uptime'] : SKIP
  version = hash.key?('version') ? hash['version'] : SKIP

  # Create object from extracted values.
  GatewaySearch.new(clustered,
                    evpn_missing_links,
                    evpntopo_id,
                    ext_ip,
                    hostname,
                    ip,
                    last_config_status,
                    last_hostname,
                    last_trouble_code,
                    last_trouble_timestamp,
                    mac,
                    managed,
                    mist_configured,
                    model,
                    node,
                    node0_mac,
                    node1_mac,
                    num_members,
                    org_id,
                    role,
                    site_id,
                    t128agent_version,
                    time_drifted,
                    timestamp,
                    uptime,
                    version)
end

.namesObject

A mapping from model property names to API property names.



143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# File 'lib/mist_api/models/gateway_search.rb', line 143

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['clustered'] = 'clustered'
  @_hash['evpn_missing_links'] = 'evpn_missing_links'
  @_hash['evpntopo_id'] = 'evpntopo_id'
  @_hash['ext_ip'] = 'ext_ip'
  @_hash['hostname'] = 'hostname'
  @_hash['ip'] = 'ip'
  @_hash['last_config_status'] = 'last_config_status'
  @_hash['last_hostname'] = 'last_hostname'
  @_hash['last_trouble_code'] = 'last_trouble_code'
  @_hash['last_trouble_timestamp'] = 'last_trouble_timestamp'
  @_hash['mac'] = 'mac'
  @_hash['managed'] = 'managed'
  @_hash['mist_configured'] = 'mist_configured'
  @_hash['model'] = 'model'
  @_hash['node'] = 'node'
  @_hash['node0_mac'] = 'node0_mac'
  @_hash['node1_mac'] = 'node1_mac'
  @_hash['num_members'] = 'num_members'
  @_hash['org_id'] = 'org_id'
  @_hash['role'] = 'role'
  @_hash['site_id'] = 'site_id'
  @_hash['t128agent_version'] = 't128agent_version'
  @_hash['time_drifted'] = 'time_drifted'
  @_hash['timestamp'] = 'timestamp'
  @_hash['type'] = 'type'
  @_hash['uptime'] = 'uptime'
  @_hash['version'] = 'version'
  @_hash
end

.nullablesObject

An array for nullable fields



208
209
210
# File 'lib/mist_api/models/gateway_search.rb', line 208

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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
# File 'lib/mist_api/models/gateway_search.rb', line 176

def self.optionals
  %w[
    clustered
    evpn_missing_links
    evpntopo_id
    ext_ip
    hostname
    ip
    last_config_status
    last_hostname
    last_trouble_code
    last_trouble_timestamp
    mac
    managed
    mist_configured
    model
    node
    node0_mac
    node1_mac
    num_members
    org_id
    role
    site_id
    t128agent_version
    time_drifted
    timestamp
    uptime
    version
  ]
end

.validate(value) ⇒ Object

Validates an instance of the object from a given value.

Parameters:

  • The (GatewaySearch | Hash)

    value against the validation is performed.



320
321
322
323
324
325
326
327
328
329
330
# File 'lib/mist_api/models/gateway_search.rb', line 320

def self.validate(value)
  if value.instance_of? self
    return APIHelper.valid_type?(value.type,
                                 ->(val) { val.instance_of? String })
  end

  return false unless value.instance_of? Hash

  APIHelper.valid_type?(value['type'],
                        ->(val) { val.instance_of? String })
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
# File 'lib/mist_api/models/gateway_search.rb', line 348

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} clustered: #{@clustered.inspect}, evpn_missing_links:"\
  " #{@evpn_missing_links.inspect}, evpntopo_id: #{@evpntopo_id.inspect}, ext_ip:"\
  " #{@ext_ip.inspect}, hostname: #{@hostname.inspect}, ip: #{@ip.inspect},"\
  " last_config_status: #{@last_config_status.inspect}, last_hostname:"\
  " #{@last_hostname.inspect}, last_trouble_code: #{@last_trouble_code.inspect},"\
  " last_trouble_timestamp: #{@last_trouble_timestamp.inspect}, mac: #{@mac.inspect}, managed:"\
  " #{@managed.inspect}, mist_configured: #{@mist_configured.inspect}, model:"\
  " #{@model.inspect}, node: #{@node.inspect}, node0_mac: #{@node0_mac.inspect}, node1_mac:"\
  " #{@node1_mac.inspect}, num_members: #{@num_members.inspect}, org_id: #{@org_id.inspect},"\
  " role: #{@role.inspect}, site_id: #{@site_id.inspect}, t128agent_version:"\
  " #{@t128agent_version.inspect}, time_drifted: #{@time_drifted.inspect}, timestamp:"\
  " #{@timestamp.inspect}, type: #{@type.inspect}, uptime: #{@uptime.inspect}, version:"\
  " #{@version.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



333
334
335
336
337
338
339
340
341
342
343
344
345
# File 'lib/mist_api/models/gateway_search.rb', line 333

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} clustered: #{@clustered}, evpn_missing_links: #{@evpn_missing_links},"\
  " evpntopo_id: #{@evpntopo_id}, ext_ip: #{@ext_ip}, hostname: #{@hostname}, ip: #{@ip},"\
  " last_config_status: #{@last_config_status}, last_hostname: #{@last_hostname},"\
  " last_trouble_code: #{@last_trouble_code}, last_trouble_timestamp:"\
  " #{@last_trouble_timestamp}, mac: #{@mac}, managed: #{@managed}, mist_configured:"\
  " #{@mist_configured}, model: #{@model}, node: #{@node}, node0_mac: #{@node0_mac},"\
  " node1_mac: #{@node1_mac}, num_members: #{@num_members}, org_id: #{@org_id}, role:"\
  " #{@role}, site_id: #{@site_id}, t128agent_version: #{@t128agent_version}, time_drifted:"\
  " #{@time_drifted}, timestamp: #{@timestamp}, type: #{@type}, uptime: #{@uptime}, version:"\
  " #{@version}>"
end