Class: MistApi::WebhookNacAccountingEvent
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::WebhookNacAccountingEvent
- Defined in:
- lib/mist_api/models/webhook_nac_accounting_event.rb
Overview
WebhookNacAccountingEvent Model.
Instance Attribute Summary collapse
-
#ap ⇒ String
MAC address of the AP the client roamed or disconnected from.
-
#auth_type ⇒ NacAuthTypeEnum
enum: ‘cert`, `device-auth`, `eap-teap`, `eap-tls`, `eap-ttls`, `idp`, `mab`, `eap-peap`.
-
#bssid ⇒ String
MAC physical address of the access point.
-
#client_ip ⇒ String
IP Address of client.
-
#client_type ⇒ String
Client type E.g.
-
#mac ⇒ String
Client’s MAC Address.
-
#nas_vendor ⇒ String
NAS Device vendor name E.g.
-
#org_id ⇒ UUID | String
NAS Device vendor name E.g.
-
#rx_pkts ⇒ Integer
Amount of packets received since connection.
-
#site_id ⇒ UUID | String
Amount of packets received since connection.
-
#ssid ⇒ String
ESSID.
-
#timestamp ⇒ Float
Epoch (seconds).
-
#tx_pkts ⇒ Integer
Amount of packets sent since connection.
-
#type ⇒ String
Type of event.
-
#username ⇒ String
Username authenticated with.
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 = SKIP, auth_type = SKIP, bssid = SKIP, client_ip = SKIP, client_type = SKIP, mac = SKIP, nas_vendor = SKIP, org_id = SKIP, rx_pkts = SKIP, site_id = SKIP, ssid = SKIP, timestamp = SKIP, tx_pkts = SKIP, type = SKIP, username = SKIP) ⇒ WebhookNacAccountingEvent
constructor
A new instance of WebhookNacAccountingEvent.
-
#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 = SKIP, auth_type = SKIP, bssid = SKIP, client_ip = SKIP, client_type = SKIP, mac = SKIP, nas_vendor = SKIP, org_id = SKIP, rx_pkts = SKIP, site_id = SKIP, ssid = SKIP, timestamp = SKIP, tx_pkts = SKIP, type = SKIP, username = SKIP) ⇒ WebhookNacAccountingEvent
Returns a new instance of WebhookNacAccountingEvent.
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 124 def initialize(ap = SKIP, auth_type = SKIP, bssid = SKIP, client_ip = SKIP, client_type = SKIP, mac = SKIP, nas_vendor = SKIP, org_id = SKIP, rx_pkts = SKIP, site_id = SKIP, ssid = SKIP, = SKIP, tx_pkts = SKIP, type = SKIP, username = SKIP) @ap = ap unless ap == SKIP @auth_type = auth_type unless auth_type == SKIP @bssid = bssid unless bssid == SKIP @client_ip = client_ip unless client_ip == SKIP @client_type = client_type unless client_type == SKIP @mac = mac unless mac == SKIP @nas_vendor = nas_vendor unless nas_vendor == SKIP @org_id = org_id unless org_id == SKIP @rx_pkts = rx_pkts unless rx_pkts == SKIP @site_id = site_id unless site_id == SKIP @ssid = ssid unless ssid == SKIP @timestamp = unless == SKIP @tx_pkts = tx_pkts unless tx_pkts == SKIP @type = type unless type == SKIP @username = username unless username == SKIP end |
Instance Attribute Details
#ap ⇒ String
MAC address of the AP the client roamed or disconnected from
14 15 16 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 14 def ap @ap end |
#auth_type ⇒ NacAuthTypeEnum
enum: ‘cert`, `device-auth`, `eap-teap`, `eap-tls`, `eap-ttls`, `idp`, `mab`, `eap-peap`
19 20 21 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 19 def auth_type @auth_type end |
#bssid ⇒ String
MAC physical address of the access point
23 24 25 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 23 def bssid @bssid end |
#client_ip ⇒ String
IP Address of client
27 28 29 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 27 def client_ip @client_ip end |
#client_type ⇒ String
Client type E.g. “wired”, “wireless”, “vty”
31 32 33 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 31 def client_type @client_type end |
#mac ⇒ String
Client’s MAC Address
35 36 37 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 35 def mac @mac end |
#nas_vendor ⇒ String
NAS Device vendor name E.g. “Juniper”, “Cisco”
39 40 41 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 39 def nas_vendor @nas_vendor end |
#org_id ⇒ UUID | String
NAS Device vendor name E.g. “Juniper”, “Cisco”
43 44 45 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 43 def org_id @org_id end |
#rx_pkts ⇒ Integer
Amount of packets received since connection
47 48 49 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 47 def rx_pkts @rx_pkts end |
#site_id ⇒ UUID | String
Amount of packets received since connection
51 52 53 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 51 def site_id @site_id end |
#ssid ⇒ String
ESSID
55 56 57 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 55 def ssid @ssid end |
#timestamp ⇒ Float
Epoch (seconds)
59 60 61 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 59 def @timestamp end |
#tx_pkts ⇒ Integer
Amount of packets sent since connection
63 64 65 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 63 def tx_pkts @tx_pkts end |
#type ⇒ String
Type of event. E.g. “ACCOUNTING_START”, “ACCOUNTING_UPDATE”, “ACCOUNTING_STOP”
68 69 70 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 68 def type @type end |
#username ⇒ String
Username authenticated with
72 73 74 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 72 def username @username end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 174 175 176 177 178 179 180 181 182 183 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 147 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ap = hash.key?('ap') ? hash['ap'] : SKIP auth_type = hash.key?('auth_type') ? hash['auth_type'] : SKIP bssid = hash.key?('bssid') ? hash['bssid'] : SKIP client_ip = hash.key?('client_ip') ? hash['client_ip'] : SKIP client_type = hash.key?('client_type') ? hash['client_type'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP nas_vendor = hash.key?('nas_vendor') ? hash['nas_vendor'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP rx_pkts = hash.key?('rx_pkts') ? hash['rx_pkts'] : SKIP site_id = hash.key?('site_id') ? hash['site_id'] : SKIP ssid = hash.key?('ssid') ? hash['ssid'] : SKIP = hash.key?('timestamp') ? hash['timestamp'] : SKIP tx_pkts = hash.key?('tx_pkts') ? hash['tx_pkts'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP username = hash.key?('username') ? hash['username'] : SKIP # Create object from extracted values. WebhookNacAccountingEvent.new(ap, auth_type, bssid, client_ip, client_type, mac, nas_vendor, org_id, rx_pkts, site_id, ssid, , tx_pkts, type, username) end |
.names ⇒ Object
A mapping from model property names to API property names.
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 75 def self.names @_hash = {} if @_hash.nil? @_hash['ap'] = 'ap' @_hash['auth_type'] = 'auth_type' @_hash['bssid'] = 'bssid' @_hash['client_ip'] = 'client_ip' @_hash['client_type'] = 'client_type' @_hash['mac'] = 'mac' @_hash['nas_vendor'] = 'nas_vendor' @_hash['org_id'] = 'org_id' @_hash['rx_pkts'] = 'rx_pkts' @_hash['site_id'] = 'site_id' @_hash['ssid'] = 'ssid' @_hash['timestamp'] = 'timestamp' @_hash['tx_pkts'] = 'tx_pkts' @_hash['type'] = 'type' @_hash['username'] = 'username' @_hash end |
.nullables ⇒ Object
An array for nullable fields
117 118 119 120 121 122 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 117 def self.nullables %w[ rx_pkts tx_pkts ] end |
.optionals ⇒ Object
An array for optional fields
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 96 def self.optionals %w[ ap auth_type bssid client_ip client_type mac nas_vendor org_id rx_pkts site_id ssid timestamp tx_pkts type username ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
187 188 189 190 191 192 193 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 187 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
205 206 207 208 209 210 211 212 213 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 205 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap.inspect}, auth_type: #{@auth_type.inspect}, bssid:"\ " #{@bssid.inspect}, client_ip: #{@client_ip.inspect}, client_type: #{@client_type.inspect},"\ " mac: #{@mac.inspect}, nas_vendor: #{@nas_vendor.inspect}, org_id: #{@org_id.inspect},"\ " rx_pkts: #{@rx_pkts.inspect}, site_id: #{@site_id.inspect}, ssid: #{@ssid.inspect},"\ " timestamp: #{@timestamp.inspect}, tx_pkts: #{@tx_pkts.inspect}, type: #{@type.inspect},"\ " username: #{@username.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
196 197 198 199 200 201 202 |
# File 'lib/mist_api/models/webhook_nac_accounting_event.rb', line 196 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap}, auth_type: #{@auth_type}, bssid: #{@bssid}, client_ip:"\ " #{@client_ip}, client_type: #{@client_type}, mac: #{@mac}, nas_vendor: #{@nas_vendor},"\ " org_id: #{@org_id}, rx_pkts: #{@rx_pkts}, site_id: #{@site_id}, ssid: #{@ssid}, timestamp:"\ " #{@timestamp}, tx_pkts: #{@tx_pkts}, type: #{@type}, username: #{@username}>" end |