Class: MistApi::WebhookSdkclientScanDataEventScanDataItem
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::WebhookSdkclientScanDataEventScanDataItem
- Defined in:
- lib/mist_api/models/webhook_sdkclient_scan_data_event_scan_data_item.rb
Overview
WebhookSdkclientScanDataEventScanDataItem Model.
Instance Attribute Summary collapse
-
#ap ⇒ String
MAC address of the AP associated with the BSSID scanned.
-
#band ⇒ ScanDataItemBandEnum
5GHz or 2.4GHz band, associated with the BSSID scanned.
-
#bssid ⇒ String
BSSID found during client’s background scan for Wi-Fi.
-
#channel ⇒ Integer
Channel of the band found in the scan.
-
#rssi ⇒ Float
Client’s RSSI relative to the BSSID scanned.
-
#ssid ⇒ String
ESSID containing the BSSID scanned.
-
#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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(ap = nil, band = nil, bssid = nil, channel = nil, rssi = nil, ssid = nil, timestamp = nil) ⇒ WebhookSdkclientScanDataEventScanDataItem
constructor
A new instance of WebhookSdkclientScanDataEventScanDataItem.
-
#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, band = nil, bssid = nil, channel = nil, rssi = nil, ssid = nil, timestamp = nil) ⇒ WebhookSdkclientScanDataEventScanDataItem
Returns a new instance of WebhookSdkclientScanDataEventScanDataItem.
63 64 65 66 67 68 69 70 71 72 |
# File 'lib/mist_api/models/webhook_sdkclient_scan_data_event_scan_data_item.rb', line 63 def initialize(ap = nil, band = nil, bssid = nil, channel = nil, rssi = nil, ssid = nil, = nil) @ap = ap @band = band @bssid = bssid @channel = channel @rssi = rssi @ssid = ssid @timestamp = end |
Instance Attribute Details
#ap ⇒ String
MAC address of the AP associated with the BSSID scanned
14 15 16 |
# File 'lib/mist_api/models/webhook_sdkclient_scan_data_event_scan_data_item.rb', line 14 def ap @ap end |
#band ⇒ ScanDataItemBandEnum
5GHz or 2.4GHz band, associated with the BSSID scanned. enum: ‘2.4`, `5`
18 19 20 |
# File 'lib/mist_api/models/webhook_sdkclient_scan_data_event_scan_data_item.rb', line 18 def band @band end |
#bssid ⇒ String
BSSID found during client’s background scan for Wi-Fi
22 23 24 |
# File 'lib/mist_api/models/webhook_sdkclient_scan_data_event_scan_data_item.rb', line 22 def bssid @bssid end |
#channel ⇒ Integer
Channel of the band found in the scan
26 27 28 |
# File 'lib/mist_api/models/webhook_sdkclient_scan_data_event_scan_data_item.rb', line 26 def channel @channel end |
#rssi ⇒ Float
Client’s RSSI relative to the BSSID scanned
30 31 32 |
# File 'lib/mist_api/models/webhook_sdkclient_scan_data_event_scan_data_item.rb', line 30 def rssi @rssi end |
#ssid ⇒ String
ESSID containing the BSSID scanned
34 35 36 |
# File 'lib/mist_api/models/webhook_sdkclient_scan_data_event_scan_data_item.rb', line 34 def ssid @ssid end |
#timestamp ⇒ Float
Epoch (seconds)
38 39 40 |
# File 'lib/mist_api/models/webhook_sdkclient_scan_data_event_scan_data_item.rb', line 38 def @timestamp 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/webhook_sdkclient_scan_data_event_scan_data_item.rb', line 75 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ap = hash.key?('ap') ? hash['ap'] : nil band = hash.key?('band') ? hash['band'] : 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. WebhookSdkclientScanDataEventScanDataItem.new(ap, band, bssid, channel, rssi, ssid, ) end |
.names ⇒ Object
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/webhook_sdkclient_scan_data_event_scan_data_item.rb', line 41 def self.names @_hash = {} if @_hash.nil? @_hash['ap'] = 'ap' @_hash['band'] = 'band' @_hash['bssid'] = 'bssid' @_hash['channel'] = 'channel' @_hash['rssi'] = 'rssi' @_hash['ssid'] = 'ssid' @_hash['timestamp'] = 'timestamp' @_hash end |
.nullables ⇒ Object
An array for nullable fields
59 60 61 |
# File 'lib/mist_api/models/webhook_sdkclient_scan_data_event_scan_data_item.rb', line 59 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
54 55 56 |
# File 'lib/mist_api/models/webhook_sdkclient_scan_data_event_scan_data_item.rb', line 54 def self.optionals [] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/mist_api/models/webhook_sdkclient_scan_data_event_scan_data_item.rb', line 99 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.band, ->(val) { ScanDataItemBandEnum.validate(val) }) and APIHelper.valid_type?(value.bssid, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value.channel, ->(val) { val.instance_of? Integer }) and APIHelper.valid_type?(value.rssi, ->(val) { val.instance_of? Float }) and APIHelper.valid_type?(value.ssid, ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value., ->(val) { val.instance_of? Float }) ) end return false unless value.instance_of? Hash ( APIHelper.valid_type?(value['ap'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['band'], ->(val) { ScanDataItemBandEnum.validate(val) }) and APIHelper.valid_type?(value['bssid'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['channel'], ->(val) { val.instance_of? Integer }) and APIHelper.valid_type?(value['rssi'], ->(val) { val.instance_of? Float }) and APIHelper.valid_type?(value['ssid'], ->(val) { val.instance_of? String }) and APIHelper.valid_type?(value['timestamp'], ->(val) { val.instance_of? Float }) ) end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
147 148 149 150 151 152 |
# File 'lib/mist_api/models/webhook_sdkclient_scan_data_event_scan_data_item.rb', line 147 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap.inspect}, band: #{@band.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.
140 141 142 143 144 |
# File 'lib/mist_api/models/webhook_sdkclient_scan_data_event_scan_data_item.rb', line 140 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap: #{@ap}, band: #{@band}, bssid: #{@bssid}, channel: #{@channel}, rssi:"\ " #{@rssi}, ssid: #{@ssid}, timestamp: #{@timestamp}>" end |