Class: MistApi::WebhookMinisReachabilityEvent
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::WebhookMinisReachabilityEvent
- Defined in:
- lib/mist_api/models/webhook_minis_reachability_event.rb
Overview
WebhookMinisReachabilityEvent Model.
Instance Attribute Summary collapse
-
#avg_latency ⇒ Float
Average latency in milliseconds.
-
#device_mac ⇒ String
MAC address of the device performing the test.
-
#loss_percentage ⇒ Float
Packet loss percentage.
-
#max_latency ⇒ Float
Maximum latency in milliseconds.
-
#min_latency ⇒ Float
Minimum latency in milliseconds.
-
#org_id ⇒ UUID | String
Minimum latency in milliseconds.
-
#probe_name ⇒ String
Name of the probe.
-
#probe_target ⇒ String
Target host or IP for the probe.
-
#probe_type ⇒ String
Type of probe.
-
#protocol ⇒ String
Protocol used for the test.
-
#site_id ⇒ UUID | String
Protocol used for the test.
-
#test_type ⇒ String
Type of test performed.
-
#timestamp ⇒ Float
Epoch (seconds).
-
#vlan ⇒ Integer
VLAN ID used for the test.
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(avg_latency = SKIP, device_mac = SKIP, loss_percentage = SKIP, max_latency = SKIP, min_latency = SKIP, org_id = SKIP, probe_name = SKIP, probe_target = SKIP, probe_type = SKIP, protocol = SKIP, site_id = SKIP, test_type = SKIP, timestamp = SKIP, vlan = SKIP) ⇒ WebhookMinisReachabilityEvent
constructor
A new instance of WebhookMinisReachabilityEvent.
-
#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(avg_latency = SKIP, device_mac = SKIP, loss_percentage = SKIP, max_latency = SKIP, min_latency = SKIP, org_id = SKIP, probe_name = SKIP, probe_target = SKIP, probe_type = SKIP, protocol = SKIP, site_id = SKIP, test_type = SKIP, timestamp = SKIP, vlan = SKIP) ⇒ WebhookMinisReachabilityEvent
Returns a new instance of WebhookMinisReachabilityEvent.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 113 def initialize(avg_latency = SKIP, device_mac = SKIP, loss_percentage = SKIP, max_latency = SKIP, min_latency = SKIP, org_id = SKIP, probe_name = SKIP, probe_target = SKIP, probe_type = SKIP, protocol = SKIP, site_id = SKIP, test_type = SKIP, = SKIP, vlan = SKIP) @avg_latency = avg_latency unless avg_latency == SKIP @device_mac = device_mac unless device_mac == SKIP @loss_percentage = loss_percentage unless loss_percentage == SKIP @max_latency = max_latency unless max_latency == SKIP @min_latency = min_latency unless min_latency == SKIP @org_id = org_id unless org_id == SKIP @probe_name = probe_name unless probe_name == SKIP @probe_target = probe_target unless probe_target == SKIP @probe_type = probe_type unless probe_type == SKIP @protocol = protocol unless protocol == SKIP @site_id = site_id unless site_id == SKIP @test_type = test_type unless test_type == SKIP @timestamp = unless == SKIP @vlan = vlan unless vlan == SKIP end |
Instance Attribute Details
#avg_latency ⇒ Float
Average latency in milliseconds
14 15 16 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 14 def avg_latency @avg_latency end |
#device_mac ⇒ String
MAC address of the device performing the test
18 19 20 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 18 def device_mac @device_mac end |
#loss_percentage ⇒ Float
Packet loss percentage
22 23 24 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 22 def loss_percentage @loss_percentage end |
#max_latency ⇒ Float
Maximum latency in milliseconds
26 27 28 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 26 def max_latency @max_latency end |
#min_latency ⇒ Float
Minimum latency in milliseconds
30 31 32 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 30 def min_latency @min_latency end |
#org_id ⇒ UUID | String
Minimum latency in milliseconds
34 35 36 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 34 def org_id @org_id end |
#probe_name ⇒ String
Name of the probe
38 39 40 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 38 def probe_name @probe_name end |
#probe_target ⇒ String
Target host or IP for the probe
42 43 44 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 42 def probe_target @probe_target end |
#probe_type ⇒ String
Type of probe
46 47 48 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 46 def probe_type @probe_type end |
#protocol ⇒ String
Protocol used for the test
50 51 52 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 50 def protocol @protocol end |
#site_id ⇒ UUID | String
Protocol used for the test
54 55 56 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 54 def site_id @site_id end |
#test_type ⇒ String
Type of test performed
58 59 60 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 58 def test_type @test_type end |
#timestamp ⇒ Float
Epoch (seconds)
62 63 64 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 62 def @timestamp end |
#vlan ⇒ Integer
VLAN ID used for the test
66 67 68 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 66 def vlan @vlan end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 136 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. avg_latency = hash.key?('avg_latency') ? hash['avg_latency'] : SKIP device_mac = hash.key?('device_mac') ? hash['device_mac'] : SKIP loss_percentage = hash.key?('loss_percentage') ? hash['loss_percentage'] : SKIP max_latency = hash.key?('max_latency') ? hash['max_latency'] : SKIP min_latency = hash.key?('min_latency') ? hash['min_latency'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP probe_name = hash.key?('probe_name') ? hash['probe_name'] : SKIP probe_target = hash.key?('probe_target') ? hash['probe_target'] : SKIP probe_type = hash.key?('probe_type') ? hash['probe_type'] : SKIP protocol = hash.key?('protocol') ? hash['protocol'] : SKIP site_id = hash.key?('site_id') ? hash['site_id'] : SKIP test_type = hash.key?('test_type') ? hash['test_type'] : SKIP = hash.key?('timestamp') ? hash['timestamp'] : SKIP vlan = hash.key?('vlan') ? hash['vlan'] : SKIP # Create object from extracted values. WebhookMinisReachabilityEvent.new(avg_latency, device_mac, loss_percentage, max_latency, min_latency, org_id, probe_name, probe_target, probe_type, protocol, site_id, test_type, , vlan) end |
.names ⇒ Object
A mapping from model property names to API property names.
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 69 def self.names @_hash = {} if @_hash.nil? @_hash['avg_latency'] = 'avg_latency' @_hash['device_mac'] = 'device_mac' @_hash['loss_percentage'] = 'loss_percentage' @_hash['max_latency'] = 'max_latency' @_hash['min_latency'] = 'min_latency' @_hash['org_id'] = 'org_id' @_hash['probe_name'] = 'probe_name' @_hash['probe_target'] = 'probe_target' @_hash['probe_type'] = 'probe_type' @_hash['protocol'] = 'protocol' @_hash['site_id'] = 'site_id' @_hash['test_type'] = 'test_type' @_hash['timestamp'] = 'timestamp' @_hash['vlan'] = 'vlan' @_hash end |
.nullables ⇒ Object
An array for nullable fields
109 110 111 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 109 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 89 def self.optionals %w[ avg_latency device_mac loss_percentage max_latency min_latency org_id probe_name probe_target probe_type protocol site_id test_type timestamp vlan ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
175 176 177 178 179 180 181 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 175 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
194 195 196 197 198 199 200 201 202 203 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 194 def inspect class_name = self.class.name.split('::').last "<#{class_name} avg_latency: #{@avg_latency.inspect}, device_mac: #{@device_mac.inspect},"\ " loss_percentage: #{@loss_percentage.inspect}, max_latency: #{@max_latency.inspect},"\ " min_latency: #{@min_latency.inspect}, org_id: #{@org_id.inspect}, probe_name:"\ " #{@probe_name.inspect}, probe_target: #{@probe_target.inspect}, probe_type:"\ " #{@probe_type.inspect}, protocol: #{@protocol.inspect}, site_id: #{@site_id.inspect},"\ " test_type: #{@test_type.inspect}, timestamp: #{@timestamp.inspect}, vlan:"\ " #{@vlan.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
184 185 186 187 188 189 190 191 |
# File 'lib/mist_api/models/webhook_minis_reachability_event.rb', line 184 def to_s class_name = self.class.name.split('::').last "<#{class_name} avg_latency: #{@avg_latency}, device_mac: #{@device_mac}, loss_percentage:"\ " #{@loss_percentage}, max_latency: #{@max_latency}, min_latency: #{@min_latency}, org_id:"\ " #{@org_id}, probe_name: #{@probe_name}, probe_target: #{@probe_target}, probe_type:"\ " #{@probe_type}, protocol: #{@protocol}, site_id: #{@site_id}, test_type: #{@test_type},"\ " timestamp: #{@timestamp}, vlan: #{@vlan}>" end |