Class: MistApi::InsightRogueClient

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

Overview

InsightRogueClient 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(annotation = nil, ap_mac = nil, avg_rssi = nil, band = nil, bssid = nil, client_mac = nil, num_aps = nil) ⇒ InsightRogueClient

Returns a new instance of InsightRogueClient.



63
64
65
66
67
68
69
70
71
72
# File 'lib/mist_api/models/insight_rogue_client.rb', line 63

def initialize(annotation = nil, ap_mac = nil, avg_rssi = nil, band = nil,
               bssid = nil, client_mac = nil, num_aps = nil)
  @annotation = annotation
  @ap_mac = ap_mac
  @avg_rssi = avg_rssi
  @band = band
  @bssid = bssid
  @client_mac = client_mac
  @num_aps = num_aps
end

Instance Attribute Details

#annotationString

TODO: Write general description for this method

Returns:

  • (String)


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

def annotation
  @annotation
end

#ap_macString

TODO: Write general description for this method

Returns:

  • (String)


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

def ap_mac
  @ap_mac
end

#avg_rssiFloat

TODO: Write general description for this method

Returns:

  • (Float)


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

def avg_rssi
  @avg_rssi
end

#bandString

TODO: Write general description for this method

Returns:

  • (String)


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

def band
  @band
end

#bssidString

TODO: Write general description for this method

Returns:

  • (String)


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

def bssid
  @bssid
end

#client_macString

TODO: Write general description for this method

Returns:

  • (String)


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

def client_mac
  @client_mac
end

#num_apsInteger

TODO: Write general description for this method

Returns:

  • (Integer)


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

def num_aps
  @num_aps
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# File 'lib/mist_api/models/insight_rogue_client.rb', line 75

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  annotation = hash.key?('annotation') ? hash['annotation'] : nil
  ap_mac = hash.key?('ap_mac') ? hash['ap_mac'] : nil
  avg_rssi = hash.key?('avg_rssi') ? hash['avg_rssi'] : nil
  band = hash.key?('band') ? hash['band'] : nil
  bssid = hash.key?('bssid') ? hash['bssid'] : nil
  client_mac = hash.key?('client_mac') ? hash['client_mac'] : nil
  num_aps = hash.key?('num_aps') ? hash['num_aps'] : nil

  # Create object from extracted values.
  InsightRogueClient.new(annotation,
                         ap_mac,
                         avg_rssi,
                         band,
                         bssid,
                         client_mac,
                         num_aps)
end

.namesObject

A mapping from model property names to API property names.



41
42
43
44
45
46
47
48
49
50
51
# File 'lib/mist_api/models/insight_rogue_client.rb', line 41

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['annotation'] = 'annotation'
  @_hash['ap_mac'] = 'ap_mac'
  @_hash['avg_rssi'] = 'avg_rssi'
  @_hash['band'] = 'band'
  @_hash['bssid'] = 'bssid'
  @_hash['client_mac'] = 'client_mac'
  @_hash['num_aps'] = 'num_aps'
  @_hash
end

.nullablesObject

An array for nullable fields



59
60
61
# File 'lib/mist_api/models/insight_rogue_client.rb', line 59

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



105
106
107
108
109
110
# File 'lib/mist_api/models/insight_rogue_client.rb', line 105

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} annotation: #{@annotation.inspect}, ap_mac: #{@ap_mac.inspect}, avg_rssi:"\
  " #{@avg_rssi.inspect}, band: #{@band.inspect}, bssid: #{@bssid.inspect}, client_mac:"\
  " #{@client_mac.inspect}, num_aps: #{@num_aps.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



98
99
100
101
102
# File 'lib/mist_api/models/insight_rogue_client.rb', line 98

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} annotation: #{@annotation}, ap_mac: #{@ap_mac}, avg_rssi: #{@avg_rssi},"\
  " band: #{@band}, bssid: #{@bssid}, client_mac: #{@client_mac}, num_aps: #{@num_aps}>"
end