Class: MistApi::EventsClient
- Defined in:
- lib/mist_api/models/events_client.rb
Overview
Client events
Instance Attribute Summary collapse
-
#ap ⇒ String
TODO: Write general description for this method.
-
#band ⇒ Dot11BandEnum
enum: ‘24`, `5`, `5-dedicated`, `5-selectable`, `6`, `6-dedicated`, `6-selectable`.
-
#bssid ⇒ String
enum: ‘24`, `5`, `5-dedicated`, `5-selectable`, `6`, `6-dedicated`, `6-selectable`.
-
#channel ⇒ Integer
enum: ‘24`, `5`, `5-dedicated`, `5-selectable`, `6`, `6-dedicated`, `6-selectable`.
-
#key_mgmt ⇒ ClientKeyMgmtEnum
Key management protocol used for the latest authentication.
-
#proto ⇒ Dot11ProtoEnum
enum: ‘a`, `ac`, `ax`, `b`, `be`, `g`, `n`.
-
#ssid ⇒ String
enum: ‘a`, `ac`, `ax`, `b`, `be`, `g`, `n`.
-
#text ⇒ String
enum: ‘a`, `ac`, `ax`, `b`, `be`, `g`, `n`.
-
#timestamp ⇒ Float
Epoch (seconds).
-
#type ⇒ String
Event type, e.g.
-
#type_code ⇒ Integer
For assoc/disassoc events.
-
#wlan_id ⇒ UUID | String
For assoc/disassoc events.
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(band = nil, timestamp = nil, ap = SKIP, bssid = SKIP, channel = SKIP, key_mgmt = SKIP, proto = SKIP, ssid = SKIP, text = SKIP, type = SKIP, type_code = SKIP, wlan_id = SKIP) ⇒ EventsClient
constructor
A new instance of EventsClient.
-
#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(band = nil, timestamp = nil, ap = SKIP, bssid = SKIP, channel = SKIP, key_mgmt = SKIP, proto = SKIP, ssid = SKIP, text = SKIP, type = SKIP, type_code = SKIP, wlan_id = SKIP) ⇒ EventsClient
Returns a new instance of EventsClient.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
# File 'lib/mist_api/models/events_client.rb', line 104 def initialize(band = nil, = nil, ap = SKIP, bssid = SKIP, channel = SKIP, key_mgmt = SKIP, proto = SKIP, ssid = SKIP, text = SKIP, type = SKIP, type_code = SKIP, wlan_id = SKIP) @ap = ap unless ap == SKIP @band = band @bssid = bssid unless bssid == SKIP @channel = channel unless channel == SKIP @key_mgmt = key_mgmt unless key_mgmt == SKIP @proto = proto unless proto == SKIP @ssid = ssid unless ssid == SKIP @text = text unless text == SKIP @timestamp = @type = type unless type == SKIP @type_code = type_code unless type_code == SKIP @wlan_id = wlan_id unless wlan_id == SKIP end |
Instance Attribute Details
#ap ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/events_client.rb', line 14 def ap @ap end |
#band ⇒ Dot11BandEnum
enum: ‘24`, `5`, `5-dedicated`, `5-selectable`, `6`, `6-dedicated`, `6-selectable`
19 20 21 |
# File 'lib/mist_api/models/events_client.rb', line 19 def band @band end |
#bssid ⇒ String
enum: ‘24`, `5`, `5-dedicated`, `5-selectable`, `6`, `6-dedicated`, `6-selectable`
24 25 26 |
# File 'lib/mist_api/models/events_client.rb', line 24 def bssid @bssid end |
#channel ⇒ Integer
enum: ‘24`, `5`, `5-dedicated`, `5-selectable`, `6`, `6-dedicated`, `6-selectable`
29 30 31 |
# File 'lib/mist_api/models/events_client.rb', line 29 def channel @channel end |
#key_mgmt ⇒ ClientKeyMgmtEnum
Key management protocol used for the latest authentication. enum: ‘WPA2-PSK`, `WPA2-PSK-FT`, `WPA2-PSK-SHA256`, `WPA3-EAP-SHA256`, `WPA3-SAE-FT`, `WPA3-SAE-PSK`
35 36 37 |
# File 'lib/mist_api/models/events_client.rb', line 35 def key_mgmt @key_mgmt end |
#proto ⇒ Dot11ProtoEnum
enum: ‘a`, `ac`, `ax`, `b`, `be`, `g`, `n`
39 40 41 |
# File 'lib/mist_api/models/events_client.rb', line 39 def proto @proto end |
#ssid ⇒ String
enum: ‘a`, `ac`, `ax`, `b`, `be`, `g`, `n`
43 44 45 |
# File 'lib/mist_api/models/events_client.rb', line 43 def ssid @ssid end |
#text ⇒ String
enum: ‘a`, `ac`, `ax`, `b`, `be`, `g`, `n`
47 48 49 |
# File 'lib/mist_api/models/events_client.rb', line 47 def text @text end |
#timestamp ⇒ Float
Epoch (seconds)
51 52 53 |
# File 'lib/mist_api/models/events_client.rb', line 51 def @timestamp end |
#type ⇒ String
Event type, e.g. MARVIS_EVENT_CLIENT_FBT_FAILURE
55 56 57 |
# File 'lib/mist_api/models/events_client.rb', line 55 def type @type end |
#type_code ⇒ Integer
For assoc/disassoc events
59 60 61 |
# File 'lib/mist_api/models/events_client.rb', line 59 def type_code @type_code end |
#wlan_id ⇒ UUID | String
For assoc/disassoc events
63 64 65 |
# File 'lib/mist_api/models/events_client.rb', line 63 def wlan_id @wlan_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
122 123 124 125 126 127 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 |
# File 'lib/mist_api/models/events_client.rb', line 122 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. band = hash.key?('band') ? hash['band'] : nil = hash.key?('timestamp') ? hash['timestamp'] : nil ap = hash.key?('ap') ? hash['ap'] : SKIP bssid = hash.key?('bssid') ? hash['bssid'] : SKIP channel = hash.key?('channel') ? hash['channel'] : SKIP key_mgmt = hash.key?('key_mgmt') ? hash['key_mgmt'] : SKIP proto = hash.key?('proto') ? hash['proto'] : SKIP ssid = hash.key?('ssid') ? hash['ssid'] : SKIP text = hash.key?('text') ? hash['text'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP type_code = hash.key?('type_code') ? hash['type_code'] : SKIP wlan_id = hash.key?('wlan_id') ? hash['wlan_id'] : SKIP # Create object from extracted values. EventsClient.new(band, , ap, bssid, channel, key_mgmt, proto, ssid, text, type, type_code, wlan_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/mist_api/models/events_client.rb', line 66 def self.names @_hash = {} if @_hash.nil? @_hash['ap'] = 'ap' @_hash['band'] = 'band' @_hash['bssid'] = 'bssid' @_hash['channel'] = 'channel' @_hash['key_mgmt'] = 'key_mgmt' @_hash['proto'] = 'proto' @_hash['ssid'] = 'ssid' @_hash['text'] = 'text' @_hash['timestamp'] = 'timestamp' @_hash['type'] = 'type' @_hash['type_code'] = 'type_code' @_hash['wlan_id'] = 'wlan_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
100 101 102 |
# File 'lib/mist_api/models/events_client.rb', line 100 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
# File 'lib/mist_api/models/events_client.rb', line 84 def self.optionals %w[ ap bssid channel key_mgmt proto ssid text type type_code wlan_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
163 164 165 166 167 168 169 |
# File 'lib/mist_api/models/events_client.rb', line 163 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap.inspect}, band: #{@band.inspect}, bssid: #{@bssid.inspect},"\ " channel: #{@channel.inspect}, key_mgmt: #{@key_mgmt.inspect}, proto: #{@proto.inspect},"\ " ssid: #{@ssid.inspect}, text: #{@text.inspect}, timestamp: #{@timestamp.inspect}, type:"\ " #{@type.inspect}, type_code: #{@type_code.inspect}, wlan_id: #{@wlan_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
155 156 157 158 159 160 |
# File 'lib/mist_api/models/events_client.rb', line 155 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap}, band: #{@band}, bssid: #{@bssid}, channel: #{@channel},"\ " key_mgmt: #{@key_mgmt}, proto: #{@proto}, ssid: #{@ssid}, text: #{@text}, timestamp:"\ " #{@timestamp}, type: #{@type}, type_code: #{@type_code}, wlan_id: #{@wlan_id}>" end |