Class: MistApi::EventFastroam
- Defined in:
- lib/mist_api/models/event_fastroam.rb
Overview
EventFastroam Model.
Instance Attribute Summary collapse
-
#ap_mac ⇒ String
TODO: Write general description for this method.
-
#client_mac ⇒ String
TODO: Write general description for this method.
-
#fromap ⇒ String
TODO: Write general description for this method.
-
#latency ⇒ Float
TODO: Write general description for this method.
-
#ssid ⇒ String
TODO: Write general description for this method.
-
#subtype ⇒ String
TODO: Write general description for this method.
-
#timestamp ⇒ Float
Epoch (seconds).
-
#type ⇒ EventFastroamTypeEnum
enum: ‘fail`, `none`, `pingpong`, `poor`, `slow`, `success`.
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 = nil, client_mac = nil, fromap = nil, latency = nil, ssid = nil, timestamp = nil, subtype = SKIP, type = SKIP) ⇒ EventFastroam
constructor
A new instance of EventFastroam.
-
#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 = nil, client_mac = nil, fromap = nil, latency = nil, ssid = nil, timestamp = nil, subtype = SKIP, type = SKIP) ⇒ EventFastroam
Returns a new instance of EventFastroam.
71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/mist_api/models/event_fastroam.rb', line 71 def initialize(ap_mac = nil, client_mac = nil, fromap = nil, latency = nil, ssid = nil, = nil, subtype = SKIP, type = SKIP) @ap_mac = ap_mac @client_mac = client_mac @fromap = fromap @latency = latency @ssid = ssid @subtype = subtype unless subtype == SKIP @timestamp = @type = type unless type == SKIP end |
Instance Attribute Details
#ap_mac ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/event_fastroam.rb', line 14 def ap_mac @ap_mac end |
#client_mac ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/event_fastroam.rb', line 18 def client_mac @client_mac end |
#fromap ⇒ String
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/event_fastroam.rb', line 22 def fromap @fromap end |
#latency ⇒ Float
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/event_fastroam.rb', line 26 def latency @latency end |
#ssid ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/event_fastroam.rb', line 30 def ssid @ssid end |
#subtype ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/event_fastroam.rb', line 34 def subtype @subtype end |
#timestamp ⇒ Float
Epoch (seconds)
38 39 40 |
# File 'lib/mist_api/models/event_fastroam.rb', line 38 def @timestamp end |
#type ⇒ EventFastroamTypeEnum
enum: ‘fail`, `none`, `pingpong`, `poor`, `slow`, `success`
42 43 44 |
# File 'lib/mist_api/models/event_fastroam.rb', line 42 def type @type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/mist_api/models/event_fastroam.rb', line 84 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ap_mac = hash.key?('ap_mac') ? hash['ap_mac'] : nil client_mac = hash.key?('client_mac') ? hash['client_mac'] : nil fromap = hash.key?('fromap') ? hash['fromap'] : nil latency = hash.key?('latency') ? hash['latency'] : nil ssid = hash.key?('ssid') ? hash['ssid'] : nil = hash.key?('timestamp') ? hash['timestamp'] : nil subtype = hash.key?('subtype') ? hash['subtype'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP # Create object from extracted values. EventFastroam.new(ap_mac, client_mac, fromap, latency, ssid, , subtype, type) end |
.names ⇒ Object
A mapping from model property names to API property names.
45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/mist_api/models/event_fastroam.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['ap_mac'] = 'ap_mac' @_hash['client_mac'] = 'client_mac' @_hash['fromap'] = 'fromap' @_hash['latency'] = 'latency' @_hash['ssid'] = 'ssid' @_hash['subtype'] = 'subtype' @_hash['timestamp'] = 'timestamp' @_hash['type'] = 'type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
67 68 69 |
# File 'lib/mist_api/models/event_fastroam.rb', line 67 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
59 60 61 62 63 64 |
# File 'lib/mist_api/models/event_fastroam.rb', line 59 def self.optionals %w[ subtype type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
117 118 119 120 121 122 |
# File 'lib/mist_api/models/event_fastroam.rb', line 117 def inspect class_name = self.class.name.split('::').last "<#{class_name} ap_mac: #{@ap_mac.inspect}, client_mac: #{@client_mac.inspect}, fromap:"\ " #{@fromap.inspect}, latency: #{@latency.inspect}, ssid: #{@ssid.inspect}, subtype:"\ " #{@subtype.inspect}, timestamp: #{@timestamp.inspect}, type: #{@type.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
109 110 111 112 113 114 |
# File 'lib/mist_api/models/event_fastroam.rb', line 109 def to_s class_name = self.class.name.split('::').last "<#{class_name} ap_mac: #{@ap_mac}, client_mac: #{@client_mac}, fromap: #{@fromap},"\ " latency: #{@latency}, ssid: #{@ssid}, subtype: #{@subtype}, timestamp: #{@timestamp},"\ " type: #{@type}>" end |