Class: MistApi::EventsRogue
- Defined in:
- lib/mist_api/models/events_rogue.rb
Overview
Rogue events
Instance Attribute Summary collapse
-
#ap ⇒ String
TODO: Write general description for this method.
-
#bssid ⇒ String
TODO: Write general description for this method.
-
#channel ⇒ Integer
TODO: Write general description for this method.
-
#rssi ⇒ Integer
TODO: Write general description for this method.
-
#ssid ⇒ String
TODO: Write general description for this method.
-
#timestamp ⇒ Float
Epoch (seconds).
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(ap = nil, bssid = nil, channel = nil, rssi = nil, ssid = nil, timestamp = nil) ⇒ EventsRogue
constructor
A new instance of EventsRogue.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(ap = nil, bssid = nil, channel = nil, rssi = nil, ssid = nil, timestamp = nil) ⇒ EventsRogue
Returns a new instance of EventsRogue.
58 59 60 61 62 63 64 65 66 |
# File 'lib/mist_api/models/events_rogue.rb', line 58 def initialize(ap = nil, bssid = nil, channel = nil, rssi = nil, ssid = nil, = nil) @ap = ap @bssid = bssid @channel = channel @rssi = rssi @ssid = ssid @timestamp = end |
Instance Attribute Details
#ap ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/events_rogue.rb', line 14 def ap @ap end |
#bssid ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/events_rogue.rb', line 18 def bssid @bssid end |
#channel ⇒ Integer
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/events_rogue.rb', line 22 def channel @channel end |
#rssi ⇒ Integer
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/events_rogue.rb', line 26 def rssi @rssi end |
#ssid ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/events_rogue.rb', line 30 def ssid @ssid end |
#timestamp ⇒ Float
Epoch (seconds)
34 35 36 |
# File 'lib/mist_api/models/events_rogue.rb', line 34 def @timestamp end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/mist_api/models/events_rogue.rb', line 69 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ap = hash.key?('ap') ? hash['ap'] : nil bssid = hash.key?('bssid') ? hash['bssid'] : nil channel = hash.key?('channel') ? hash['channel'] : nil rssi = hash.key?('rssi') ? hash['rssi'] : nil ssid = hash.key?('ssid') ? hash['ssid'] : nil = hash.key?('timestamp') ? hash['timestamp'] : nil # Create object from extracted values. EventsRogue.new(ap, bssid, channel, rssi, ssid, ) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/events_rogue.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['ap'] = 'ap' @_hash['bssid'] = 'bssid' @_hash['channel'] = 'channel' @_hash['rssi'] = 'rssi' @_hash['ssid'] = 'ssid' @_hash['timestamp'] = 'timestamp' @_hash end |
.nullables ⇒ Object
An array for nullable fields
54 55 56 |
# File 'lib/mist_api/models/events_rogue.rb', line 54 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 |
# File 'lib/mist_api/models/events_rogue.rb', line 49 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
97 98 99 100 101 |
# File 'lib/mist_api/models/events_rogue.rb', line 97 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap.inspect}, bssid: #{@bssid.inspect}, channel: #{@channel.inspect},"\ " rssi: #{@rssi.inspect}, ssid: #{@ssid.inspect}, timestamp: #{@timestamp.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
90 91 92 93 94 |
# File 'lib/mist_api/models/events_rogue.rb', line 90 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap}, bssid: #{@bssid}, channel: #{@channel}, rssi: #{@rssi}, ssid:"\ " #{@ssid}, timestamp: #{@timestamp}>" end |