Class: MistApi::CaptureScanAps

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/capture_scan_aps.rb

Overview

Property key is the AP MAC address (e.g. “5c5b35000001”). All optionals, parent parameters will be used if not defined

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(band = CaptureScanApsBandEnum::ENUM_24, channel = SKIP, tcpdump_expression = SKIP, width = SKIP) ⇒ CaptureScanAps

Returns a new instance of CaptureScanAps.



56
57
58
59
60
61
62
# File 'lib/mist_api/models/capture_scan_aps.rb', line 56

def initialize(band = CaptureScanApsBandEnum::ENUM_24, channel = SKIP,
               tcpdump_expression = SKIP, width = SKIP)
  @band = band unless band == SKIP
  @channel = channel unless channel == SKIP
  @tcpdump_expression = tcpdump_expression unless tcpdump_expression == SKIP
  @width = width unless width == SKIP
end

Instance Attribute Details

#bandCaptureScanApsBandEnum

Only Single value allowed. enum: ‘24`, `5`, `6`



15
16
17
# File 'lib/mist_api/models/capture_scan_aps.rb', line 15

def band
  @band
end

#channelString

Specify the channel value where scan PCAP has to be started

Returns:

  • (String)


19
20
21
# File 'lib/mist_api/models/capture_scan_aps.rb', line 19

def channel
  @channel
end

#tcpdump_expressionString

tcpdump expression, port specific if specified under ports dict, otherwise applicable across ports if specified at top level of payload. Port specific value overrides top level value when both exist.

Returns:

  • (String)


25
26
27
# File 'lib/mist_api/models/capture_scan_aps.rb', line 25

def tcpdump_expression
  @tcpdump_expression
end

#widthString

Specify the bandwidth value with respect to the channel.

Returns:

  • (String)


29
30
31
# File 'lib/mist_api/models/capture_scan_aps.rb', line 29

def width
  @width
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/mist_api/models/capture_scan_aps.rb', line 65

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  band = hash['band'] ||= CaptureScanApsBandEnum::ENUM_24
  channel = hash.key?('channel') ? hash['channel'] : SKIP
  tcpdump_expression =
    hash.key?('tcpdump_expression') ? hash['tcpdump_expression'] : SKIP
  width = hash.key?('width') ? hash['width'] : SKIP

  # Create object from extracted values.
  CaptureScanAps.new(band,
                     channel,
                     tcpdump_expression,
                     width)
end

.namesObject

A mapping from model property names to API property names.



32
33
34
35
36
37
38
39
# File 'lib/mist_api/models/capture_scan_aps.rb', line 32

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['band'] = 'band'
  @_hash['channel'] = 'channel'
  @_hash['tcpdump_expression'] = 'tcpdump_expression'
  @_hash['width'] = 'width'
  @_hash
end

.nullablesObject

An array for nullable fields



52
53
54
# File 'lib/mist_api/models/capture_scan_aps.rb', line 52

def self.nullables
  []
end

.optionalsObject

An array for optional fields



42
43
44
45
46
47
48
49
# File 'lib/mist_api/models/capture_scan_aps.rb', line 42

def self.optionals
  %w[
    band
    channel
    tcpdump_expression
    width
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



90
91
92
93
94
# File 'lib/mist_api/models/capture_scan_aps.rb', line 90

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} band: #{@band.inspect}, channel: #{@channel.inspect}, tcpdump_expression:"\
  " #{@tcpdump_expression.inspect}, width: #{@width.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



83
84
85
86
87
# File 'lib/mist_api/models/capture_scan_aps.rb', line 83

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} band: #{@band}, channel: #{@channel}, tcpdump_expression:"\
  " #{@tcpdump_expression}, width: #{@width}>"
end