Class: MistApi::WebhookMinisApplicationEvent
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::WebhookMinisApplicationEvent
- Defined in:
- lib/mist_api/models/webhook_minis_application_event.rb
Overview
WebhookMinisApplicationEvent Model.
Instance Attribute Summary collapse
-
#device_mac ⇒ String
MAC address of the device.
-
#ip ⇒ String
IP address test was performed to.
-
#latency ⇒ Integer
latency in milliseconds.
-
#org_id ⇒ UUID | String
latency in milliseconds.
-
#probe_name ⇒ String
Name of the probe.
-
#probe_type ⇒ String
Type of probe.
-
#site_id ⇒ UUID | String
Type of probe.
-
#src_ip ⇒ String
Source IP address of the test.
-
#success ⇒ TrueClass | FalseClass
Whether the test was successful.
-
#test_type ⇒ SynthetictestConfigCustomProbeTypeEnum
enum: ‘application`, `curl`, `icmp`, `reachability`, `tcp`.
-
#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(device_mac = SKIP, ip = SKIP, latency = SKIP, org_id = SKIP, probe_name = SKIP, probe_type = SKIP, site_id = SKIP, src_ip = SKIP, success = SKIP, test_type = SynthetictestConfigCustomProbeTypeEnum::ICMP, timestamp = SKIP, vlan = SKIP) ⇒ WebhookMinisApplicationEvent
constructor
A new instance of WebhookMinisApplicationEvent.
-
#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(device_mac = SKIP, ip = SKIP, latency = SKIP, org_id = SKIP, probe_name = SKIP, probe_type = SKIP, site_id = SKIP, src_ip = SKIP, success = SKIP, test_type = SynthetictestConfigCustomProbeTypeEnum::ICMP, timestamp = SKIP, vlan = SKIP) ⇒ WebhookMinisApplicationEvent
Returns a new instance of WebhookMinisApplicationEvent.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 101 def initialize(device_mac = SKIP, ip = SKIP, latency = SKIP, org_id = SKIP, probe_name = SKIP, probe_type = SKIP, site_id = SKIP, src_ip = SKIP, success = SKIP, test_type = SynthetictestConfigCustomProbeTypeEnum::ICMP, = SKIP, vlan = SKIP) @device_mac = device_mac unless device_mac == SKIP @ip = ip unless ip == SKIP @latency = latency unless latency == SKIP @org_id = org_id unless org_id == SKIP @probe_name = probe_name unless probe_name == SKIP @probe_type = probe_type unless probe_type == SKIP @site_id = site_id unless site_id == SKIP @src_ip = src_ip unless src_ip == SKIP @success = success unless success == SKIP @test_type = test_type unless test_type == SKIP @timestamp = unless == SKIP @vlan = vlan unless vlan == SKIP end |
Instance Attribute Details
#device_mac ⇒ String
MAC address of the device
14 15 16 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 14 def device_mac @device_mac end |
#ip ⇒ String
IP address test was performed to
18 19 20 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 18 def ip @ip end |
#latency ⇒ Integer
latency in milliseconds
22 23 24 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 22 def latency @latency end |
#org_id ⇒ UUID | String
latency in milliseconds
26 27 28 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 26 def org_id @org_id end |
#probe_name ⇒ String
Name of the probe
30 31 32 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 30 def probe_name @probe_name end |
#probe_type ⇒ String
Type of probe
34 35 36 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 34 def probe_type @probe_type end |
#site_id ⇒ UUID | String
Type of probe
38 39 40 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 38 def site_id @site_id end |
#src_ip ⇒ String
Source IP address of the test
42 43 44 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 42 def src_ip @src_ip end |
#success ⇒ TrueClass | FalseClass
Whether the test was successful
46 47 48 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 46 def success @success end |
#test_type ⇒ SynthetictestConfigCustomProbeTypeEnum
enum: ‘application`, `curl`, `icmp`, `reachability`, `tcp`
50 51 52 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 50 def test_type @test_type end |
#timestamp ⇒ Float
Epoch (seconds)
54 55 56 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 54 def @timestamp end |
#vlan ⇒ Integer
VLAN ID used for the test
58 59 60 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 58 def vlan @vlan end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 148 149 150 151 152 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 121 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. device_mac = hash.key?('device_mac') ? hash['device_mac'] : SKIP ip = hash.key?('ip') ? hash['ip'] : SKIP latency = hash.key?('latency') ? hash['latency'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP probe_name = hash.key?('probe_name') ? hash['probe_name'] : SKIP probe_type = hash.key?('probe_type') ? hash['probe_type'] : SKIP site_id = hash.key?('site_id') ? hash['site_id'] : SKIP src_ip = hash.key?('src_ip') ? hash['src_ip'] : SKIP success = hash.key?('success') ? hash['success'] : SKIP test_type = hash['test_type'] ||= SynthetictestConfigCustomProbeTypeEnum::ICMP = hash.key?('timestamp') ? hash['timestamp'] : SKIP vlan = hash.key?('vlan') ? hash['vlan'] : SKIP # Create object from extracted values. WebhookMinisApplicationEvent.new(device_mac, ip, latency, org_id, probe_name, probe_type, site_id, src_ip, success, test_type, , vlan) end |
.names ⇒ Object
A mapping from model property names to API property names.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 61 def self.names @_hash = {} if @_hash.nil? @_hash['device_mac'] = 'device_mac' @_hash['ip'] = 'ip' @_hash['latency'] = 'latency' @_hash['org_id'] = 'org_id' @_hash['probe_name'] = 'probe_name' @_hash['probe_type'] = 'probe_type' @_hash['site_id'] = 'site_id' @_hash['src_ip'] = 'src_ip' @_hash['success'] = 'success' @_hash['test_type'] = 'test_type' @_hash['timestamp'] = 'timestamp' @_hash['vlan'] = 'vlan' @_hash end |
.nullables ⇒ Object
An array for nullable fields
97 98 99 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 97 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 79 def self.optionals %w[ device_mac ip latency org_id probe_name probe_type site_id src_ip success test_type timestamp vlan ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
156 157 158 159 160 161 162 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 156 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.
174 175 176 177 178 179 180 181 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 174 def inspect class_name = self.class.name.split('::').last "<#{class_name} device_mac: #{@device_mac.inspect}, ip: #{@ip.inspect}, latency:"\ " #{@latency.inspect}, org_id: #{@org_id.inspect}, probe_name: #{@probe_name.inspect},"\ " probe_type: #{@probe_type.inspect}, site_id: #{@site_id.inspect}, src_ip:"\ " #{@src_ip.inspect}, success: #{@success.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.
165 166 167 168 169 170 171 |
# File 'lib/mist_api/models/webhook_minis_application_event.rb', line 165 def to_s class_name = self.class.name.split('::').last "<#{class_name} device_mac: #{@device_mac}, ip: #{@ip}, latency: #{@latency}, org_id:"\ " #{@org_id}, probe_name: #{@probe_name}, probe_type: #{@probe_type}, site_id: #{@site_id},"\ " src_ip: #{@src_ip}, success: #{@success}, test_type: #{@test_type}, timestamp:"\ " #{@timestamp}, vlan: #{@vlan}>" end |