Class: MistApi::CaptureRadiotap
- Defined in:
- lib/mist_api/models/capture_radiotap.rb
Overview
Initiate a Radiotap Packet Capture
Instance Attribute Summary collapse
-
#ap_mac ⇒ String
TODO: Write general description for this method.
-
#band ⇒ CaptureRadiotapBandEnum
enum: ‘24`, `24,5,6`, `5`, `6`.
-
#client_mac ⇒ String
enum: ‘24`, `24,5,6`, `5`, `6`.
-
#duration ⇒ Integer
Duration of the capture, in seconds.
-
#format ⇒ CaptureRadiotapFormatEnum
enum: ‘pcap`, `stream`.
-
#max_pkt_len ⇒ Integer
enum: ‘pcap`, `stream`.
-
#num_packets ⇒ Integer
number of packets to capture, 0 for unlimited, default is 1024, maximum is 10000.
-
#ssid ⇒ String
number of packets to capture, 0 for unlimited, default is 1024, maximum is 10000.
-
#tcpdump_expression ⇒ String
tcpdump expression.
-
#type ⇒ String
readonly
enum: ‘radiotap`.
-
#wlan_id ⇒ UUID | String
WLAN id associated with the respective ssid.
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_mac = SKIP, band = CaptureRadiotapBandEnum::ENUM_24, client_mac = SKIP, duration = 600, format = CaptureRadiotapFormatEnum::PCAP, max_pkt_len = 512, num_packets = 1024, ssid = SKIP, tcpdump_expression = SKIP, wlan_id = SKIP) ⇒ CaptureRadiotap
constructor
A new instance of CaptureRadiotap.
-
#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_mac = SKIP, band = CaptureRadiotapBandEnum::ENUM_24, client_mac = SKIP, duration = 600, format = CaptureRadiotapFormatEnum::PCAP, max_pkt_len = 512, num_packets = 1024, ssid = SKIP, tcpdump_expression = SKIP, wlan_id = SKIP) ⇒ CaptureRadiotap
Returns a new instance of CaptureRadiotap.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 101 def initialize(ap_mac = SKIP, band = CaptureRadiotapBandEnum::ENUM_24, client_mac = SKIP, duration = 600, format = CaptureRadiotapFormatEnum::PCAP, max_pkt_len = 512, num_packets = 1024, ssid = SKIP, tcpdump_expression = SKIP, wlan_id = SKIP) @ap_mac = ap_mac unless ap_mac == SKIP @band = band unless band == SKIP @client_mac = client_mac unless client_mac == SKIP @duration = duration unless duration == SKIP @format = format unless format == SKIP @max_pkt_len = max_pkt_len unless max_pkt_len == SKIP @num_packets = num_packets unless num_packets == SKIP @ssid = ssid unless ssid == SKIP @tcpdump_expression = tcpdump_expression unless tcpdump_expression == SKIP @type = 'radiotap' @wlan_id = wlan_id unless wlan_id == SKIP end |
Instance Attribute Details
#ap_mac ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 14 def ap_mac @ap_mac end |
#band ⇒ CaptureRadiotapBandEnum
enum: ‘24`, `24,5,6`, `5`, `6`
18 19 20 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 18 def band @band end |
#client_mac ⇒ String
enum: ‘24`, `24,5,6`, `5`, `6`
22 23 24 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 22 def client_mac @client_mac end |
#duration ⇒ Integer
Duration of the capture, in seconds
26 27 28 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 26 def duration @duration end |
#format ⇒ CaptureRadiotapFormatEnum
enum: ‘pcap`, `stream`
30 31 32 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 30 def format @format end |
#max_pkt_len ⇒ Integer
enum: ‘pcap`, `stream`
34 35 36 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 34 def max_pkt_len @max_pkt_len end |
#num_packets ⇒ Integer
number of packets to capture, 0 for unlimited, default is 1024, maximum is 10000
39 40 41 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 39 def num_packets @num_packets end |
#ssid ⇒ String
number of packets to capture, 0 for unlimited, default is 1024, maximum is 10000
44 45 46 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 44 def ssid @ssid end |
#tcpdump_expression ⇒ String
tcpdump expression
48 49 50 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 48 def tcpdump_expression @tcpdump_expression end |
#type ⇒ String (readonly)
enum: ‘radiotap`
52 53 54 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 52 def type @type end |
#wlan_id ⇒ UUID | String
WLAN id associated with the respective ssid.
56 57 58 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 56 def wlan_id @wlan_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
120 121 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 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 120 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ap_mac = hash.key?('ap_mac') ? hash['ap_mac'] : SKIP band = hash['band'] ||= CaptureRadiotapBandEnum::ENUM_24 client_mac = hash.key?('client_mac') ? hash['client_mac'] : SKIP duration = hash['duration'] ||= 600 format = hash['format'] ||= CaptureRadiotapFormatEnum::PCAP max_pkt_len = hash['max_pkt_len'] ||= 512 num_packets = hash['num_packets'] ||= 1024 ssid = hash.key?('ssid') ? hash['ssid'] : SKIP tcpdump_expression = hash.key?('tcpdump_expression') ? hash['tcpdump_expression'] : SKIP wlan_id = hash.key?('wlan_id') ? hash['wlan_id'] : SKIP # Create object from extracted values. CaptureRadiotap.new(ap_mac, band, client_mac, duration, format, max_pkt_len, num_packets, ssid, tcpdump_expression, wlan_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 59 def self.names @_hash = {} if @_hash.nil? @_hash['ap_mac'] = 'ap_mac' @_hash['band'] = 'band' @_hash['client_mac'] = 'client_mac' @_hash['duration'] = 'duration' @_hash['format'] = 'format' @_hash['max_pkt_len'] = 'max_pkt_len' @_hash['num_packets'] = 'num_packets' @_hash['ssid'] = 'ssid' @_hash['tcpdump_expression'] = 'tcpdump_expression' @_hash['type'] = 'type' @_hash['wlan_id'] = 'wlan_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
92 93 94 95 96 97 98 99 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 92 def self.nullables %w[ duration max_pkt_len num_packets tcpdump_expression ] end |
.optionals ⇒ Object
An array for optional fields
76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 76 def self.optionals %w[ ap_mac band client_mac duration format max_pkt_len num_packets ssid tcpdump_expression wlan_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
159 160 161 162 163 164 165 166 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 159 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap_mac: #{@ap_mac.inspect}, band: #{@band.inspect}, client_mac:"\ " #{@client_mac.inspect}, duration: #{@duration.inspect}, format: #{@format.inspect},"\ " max_pkt_len: #{@max_pkt_len.inspect}, num_packets: #{@num_packets.inspect}, ssid:"\ " #{@ssid.inspect}, tcpdump_expression: #{@tcpdump_expression.inspect}, type:"\ " #{@type.inspect}, wlan_id: #{@wlan_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
150 151 152 153 154 155 156 |
# File 'lib/mist_api/models/capture_radiotap.rb', line 150 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap_mac: #{@ap_mac}, band: #{@band}, client_mac: #{@client_mac}, duration:"\ " #{@duration}, format: #{@format}, max_pkt_len: #{@max_pkt_len}, num_packets:"\ " #{@num_packets}, ssid: #{@ssid}, tcpdump_expression: #{@tcpdump_expression}, type:"\ " #{@type}, wlan_id: #{@wlan_id}>" end |