Class: MistApi::CaptureNewAssoc
- Defined in:
- lib/mist_api/models/capture_new_assoc.rb
Overview
Initiate a packet Capture for New Wireless Client Associations
Instance Attribute Summary collapse
-
#ap_mac ⇒ String
TODO: Write general description for this method.
-
#client_mac ⇒ String
Client mac, required if ‘type`==`client`; optional otherwise.
-
#duration ⇒ Integer
Duration of the capture, in seconds.
-
#includes_mcast ⇒ TrueClass | FalseClass
Duration of the capture, in seconds.
-
#max_pkt_len ⇒ Integer
Duration of the capture, in seconds.
-
#num_packets ⇒ Integer
number of packets to capture, 0 for unlimited, default is 1024, maximum is 10000.
-
#ssid ⇒ String
Optional filter by ssid.
-
#type ⇒ String
readonly
enum: ‘new_assoc`.
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, client_mac = SKIP, duration = 600, includes_mcast = false, max_pkt_len = 512, num_packets = 1024, ssid = SKIP) ⇒ CaptureNewAssoc
constructor
A new instance of CaptureNewAssoc.
-
#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, client_mac = SKIP, duration = 600, includes_mcast = false, max_pkt_len = 512, num_packets = 1024, ssid = SKIP) ⇒ CaptureNewAssoc
Returns a new instance of CaptureNewAssoc.
81 82 83 84 85 86 87 88 89 90 91 92 |
# File 'lib/mist_api/models/capture_new_assoc.rb', line 81 def initialize(ap_mac = SKIP, client_mac = SKIP, duration = 600, includes_mcast = false, max_pkt_len = 512, num_packets = 1024, ssid = SKIP) @ap_mac = ap_mac unless ap_mac == SKIP @client_mac = client_mac unless client_mac == SKIP @duration = duration unless duration == SKIP @includes_mcast = includes_mcast unless includes_mcast == 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 @type = 'new_assoc' end |
Instance Attribute Details
#ap_mac ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/capture_new_assoc.rb', line 14 def ap_mac @ap_mac end |
#client_mac ⇒ String
Client mac, required if ‘type`==`client`; optional otherwise
18 19 20 |
# File 'lib/mist_api/models/capture_new_assoc.rb', line 18 def client_mac @client_mac end |
#duration ⇒ Integer
Duration of the capture, in seconds
22 23 24 |
# File 'lib/mist_api/models/capture_new_assoc.rb', line 22 def duration @duration end |
#includes_mcast ⇒ TrueClass | FalseClass
Duration of the capture, in seconds
26 27 28 |
# File 'lib/mist_api/models/capture_new_assoc.rb', line 26 def includes_mcast @includes_mcast end |
#max_pkt_len ⇒ Integer
Duration of the capture, in seconds
30 31 32 |
# File 'lib/mist_api/models/capture_new_assoc.rb', line 30 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
35 36 37 |
# File 'lib/mist_api/models/capture_new_assoc.rb', line 35 def num_packets @num_packets end |
#ssid ⇒ String
Optional filter by ssid
39 40 41 |
# File 'lib/mist_api/models/capture_new_assoc.rb', line 39 def ssid @ssid end |
#type ⇒ String (readonly)
enum: ‘new_assoc`
43 44 45 |
# File 'lib/mist_api/models/capture_new_assoc.rb', line 43 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/mist_api/models/capture_new_assoc.rb', line 95 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ap_mac = hash.key?('ap_mac') ? hash['ap_mac'] : SKIP client_mac = hash.key?('client_mac') ? hash['client_mac'] : SKIP duration = hash['duration'] ||= 600 includes_mcast = hash['includes_mcast'] ||= false max_pkt_len = hash['max_pkt_len'] ||= 512 num_packets = hash['num_packets'] ||= 1024 ssid = hash.key?('ssid') ? hash['ssid'] : SKIP # Create object from extracted values. CaptureNewAssoc.new(ap_mac, client_mac, duration, includes_mcast, max_pkt_len, num_packets, ssid) end |
.names ⇒ Object
A mapping from model property names to API property names.
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/mist_api/models/capture_new_assoc.rb', line 46 def self.names @_hash = {} if @_hash.nil? @_hash['ap_mac'] = 'ap_mac' @_hash['client_mac'] = 'client_mac' @_hash['duration'] = 'duration' @_hash['includes_mcast'] = 'includes_mcast' @_hash['max_pkt_len'] = 'max_pkt_len' @_hash['num_packets'] = 'num_packets' @_hash['ssid'] = 'ssid' @_hash['type'] = 'type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
73 74 75 76 77 78 79 |
# File 'lib/mist_api/models/capture_new_assoc.rb', line 73 def self.nullables %w[ duration max_pkt_len num_packets ] end |
.optionals ⇒ Object
An array for optional fields
60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/mist_api/models/capture_new_assoc.rb', line 60 def self.optionals %w[ ap_mac client_mac duration includes_mcast max_pkt_len num_packets ssid ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
126 127 128 129 130 131 132 |
# File 'lib/mist_api/models/capture_new_assoc.rb', line 126 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap_mac: #{@ap_mac.inspect}, client_mac: #{@client_mac.inspect}, duration:"\ " #{@duration.inspect}, includes_mcast: #{@includes_mcast.inspect}, max_pkt_len:"\ " #{@max_pkt_len.inspect}, num_packets: #{@num_packets.inspect}, ssid: #{@ssid.inspect},"\ " type: #{@type.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
118 119 120 121 122 123 |
# File 'lib/mist_api/models/capture_new_assoc.rb', line 118 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap_mac: #{@ap_mac}, client_mac: #{@client_mac}, duration: #{@duration},"\ " includes_mcast: #{@includes_mcast}, max_pkt_len: #{@max_pkt_len}, num_packets:"\ " #{@num_packets}, ssid: #{@ssid}, type: #{@type}>" end |