Class: MistApi::WebhookClientJoinEvent
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::WebhookClientJoinEvent
- Defined in:
- lib/mist_api/models/webhook_client_join_event.rb
Overview
WebhookClientJoinEvent Model.
Instance Attribute Summary collapse
-
#ap ⇒ String
MAC address of the AP the client connected to.
-
#ap_name ⇒ String
user-friendly name of the AP the client connected to.
-
#band ⇒ String
5GHz or 2.4GHz band.
-
#bssid ⇒ String
5GHz or 2.4GHz band.
-
#connect ⇒ Integer
Time when the user connects.
-
#connect_float ⇒ Float
floating point connect timestamp with millisecond precision.
-
#mac ⇒ String
Client’s MAC Address.
-
#org_id ⇒ UUID | String
Client’s MAC Address.
-
#rssi ⇒ Float
RSSI when the client associated.
-
#site_id ⇒ UUID | String
RSSI when the client associated.
-
#site_name ⇒ String
RSSI when the client associated.
-
#ssid ⇒ String
ESSID.
-
#timestamp ⇒ Float
Epoch (seconds).
-
#version ⇒ Float
schema version of this message.
-
#wlan_id ⇒ UUID | String
schema version of this message.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(ap = nil, ap_name = nil, band = nil, bssid = nil, connect = nil, connect_float = nil, mac = nil, org_id = nil, rssi = nil, site_id = nil, site_name = nil, ssid = nil, timestamp = nil, version = nil, wlan_id = nil) ⇒ WebhookClientJoinEvent
constructor
A new instance of WebhookClientJoinEvent.
-
#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, ap_name = nil, band = nil, bssid = nil, connect = nil, connect_float = nil, mac = nil, org_id = nil, rssi = nil, site_id = nil, site_name = nil, ssid = nil, timestamp = nil, version = nil, wlan_id = nil) ⇒ WebhookClientJoinEvent
Returns a new instance of WebhookClientJoinEvent.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 103 def initialize(ap = nil, ap_name = nil, band = nil, bssid = nil, connect = nil, connect_float = nil, mac = nil, org_id = nil, rssi = nil, site_id = nil, site_name = nil, ssid = nil, = nil, version = nil, wlan_id = nil) @ap = ap @ap_name = ap_name @band = band @bssid = bssid @connect = connect @connect_float = connect_float @mac = mac @org_id = org_id @rssi = rssi @site_id = site_id @site_name = site_name @ssid = ssid @timestamp = @version = version @wlan_id = wlan_id end |
Instance Attribute Details
#ap ⇒ String
MAC address of the AP the client connected to
14 15 16 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 14 def ap @ap end |
#ap_name ⇒ String
user-friendly name of the AP the client connected to.
18 19 20 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 18 def ap_name @ap_name end |
#band ⇒ String
5GHz or 2.4GHz band
22 23 24 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 22 def band @band end |
#bssid ⇒ String
5GHz or 2.4GHz band
26 27 28 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 26 def bssid @bssid end |
#connect ⇒ Integer
Time when the user connects
30 31 32 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 30 def connect @connect end |
#connect_float ⇒ Float
floating point connect timestamp with millisecond precision
34 35 36 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 34 def connect_float @connect_float end |
#mac ⇒ String
Client’s MAC Address
38 39 40 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 38 def mac @mac end |
#org_id ⇒ UUID | String
Client’s MAC Address
42 43 44 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 42 def org_id @org_id end |
#rssi ⇒ Float
RSSI when the client associated
46 47 48 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 46 def rssi @rssi end |
#site_id ⇒ UUID | String
RSSI when the client associated
50 51 52 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 50 def site_id @site_id end |
#site_name ⇒ String
RSSI when the client associated
54 55 56 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 54 def site_name @site_name end |
#ssid ⇒ String
ESSID
58 59 60 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 58 def ssid @ssid end |
#timestamp ⇒ Float
Epoch (seconds)
62 63 64 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 62 def @timestamp end |
#version ⇒ Float
schema version of this message
66 67 68 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 66 def version @version end |
#wlan_id ⇒ UUID | String
schema version of this message
70 71 72 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 70 def wlan_id @wlan_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 153 154 155 156 157 158 159 160 161 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 125 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ap = hash.key?('ap') ? hash['ap'] : nil ap_name = hash.key?('ap_name') ? hash['ap_name'] : nil band = hash.key?('band') ? hash['band'] : nil bssid = hash.key?('bssid') ? hash['bssid'] : nil connect = hash.key?('connect') ? hash['connect'] : nil connect_float = hash.key?('connect_float') ? hash['connect_float'] : nil mac = hash.key?('mac') ? hash['mac'] : nil org_id = hash.key?('org_id') ? hash['org_id'] : nil rssi = hash.key?('rssi') ? hash['rssi'] : nil site_id = hash.key?('site_id') ? hash['site_id'] : nil site_name = hash.key?('site_name') ? hash['site_name'] : nil ssid = hash.key?('ssid') ? hash['ssid'] : nil = hash.key?('timestamp') ? hash['timestamp'] : nil version = hash.key?('version') ? hash['version'] : nil wlan_id = hash.key?('wlan_id') ? hash['wlan_id'] : nil # Create object from extracted values. WebhookClientJoinEvent.new(ap, ap_name, band, bssid, connect, connect_float, mac, org_id, rssi, site_id, site_name, ssid, , version, wlan_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 73 def self.names @_hash = {} if @_hash.nil? @_hash['ap'] = 'ap' @_hash['ap_name'] = 'ap_name' @_hash['band'] = 'band' @_hash['bssid'] = 'bssid' @_hash['connect'] = 'connect' @_hash['connect_float'] = 'connect_float' @_hash['mac'] = 'mac' @_hash['org_id'] = 'org_id' @_hash['rssi'] = 'rssi' @_hash['site_id'] = 'site_id' @_hash['site_name'] = 'site_name' @_hash['ssid'] = 'ssid' @_hash['timestamp'] = 'timestamp' @_hash['version'] = 'version' @_hash['wlan_id'] = 'wlan_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
99 100 101 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 99 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
94 95 96 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 94 def self.optionals [] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
165 166 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 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 165 def self.validate(value) if value.instance_of? self return ( APIHelper.valid_type?(value.ap, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.ap_name, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.band, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.bssid, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.connect, ->(val) { val.instance_of? Integer }) and APIHelper.valid_type?(value.connect_float, ->(val) { val.instance_of? Float }) and APIHelper.valid_type?(value.mac, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.org_id, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.rssi, ->(val) { val.instance_of? Float }) and APIHelper.valid_type?(value.site_id, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.site_name, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.ssid, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value., ->(val) { val.instance_of? Float }) and APIHelper.valid_type?(value.version, ->(val) { val.instance_of? Float }) and APIHelper.valid_type?(value.wlan_id, ->(val) { val.instance_of? String }) ) end return false unless value.instance_of? Hash ( APIHelper.valid_type?(value['ap'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['ap_name'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['band'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['bssid'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['connect'], ->(val) { val.instance_of? Integer }) and APIHelper.valid_type?(value['connect_float'], ->(val) { val.instance_of? Float }) and APIHelper.valid_type?(value['mac'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['org_id'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['rssi'], ->(val) { val.instance_of? Float }) and APIHelper.valid_type?(value['site_id'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['site_name'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['ssid'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['timestamp'], ->(val) { val.instance_of? Float }) and APIHelper.valid_type?(value['version'], ->(val) { val.instance_of? Float }) and APIHelper.valid_type?(value['wlan_id'], ->(val) { val.instance_of? String }) ) end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
247 248 249 250 251 252 253 254 255 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 247 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap.inspect}, ap_name: #{@ap_name.inspect}, band: #{@band.inspect},"\ " bssid: #{@bssid.inspect}, connect: #{@connect.inspect}, connect_float:"\ " #{@connect_float.inspect}, mac: #{@mac.inspect}, org_id: #{@org_id.inspect}, rssi:"\ " #{@rssi.inspect}, site_id: #{@site_id.inspect}, site_name: #{@site_name.inspect}, ssid:"\ " #{@ssid.inspect}, timestamp: #{@timestamp.inspect}, version: #{@version.inspect}, wlan_id:"\ " #{@wlan_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
238 239 240 241 242 243 244 |
# File 'lib/mist_api/models/webhook_client_join_event.rb', line 238 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap}, ap_name: #{@ap_name}, band: #{@band}, bssid: #{@bssid},"\ " connect: #{@connect}, connect_float: #{@connect_float}, mac: #{@mac}, org_id: #{@org_id},"\ " rssi: #{@rssi}, site_id: #{@site_id}, site_name: #{@site_name}, ssid: #{@ssid}, timestamp:"\ " #{@timestamp}, version: #{@version}, wlan_id: #{@wlan_id}>" end |