Class: MistApi::SynthetictestInfo
- Defined in:
- lib/mist_api/models/synthetictest_info.rb
Overview
SynthetictestInfo Model.
Instance Attribute Summary collapse
-
#by ⇒ String
TODO: Write general description for this method.
-
#device_type ⇒ DeviceTypeEnum
enum: ‘ap`, `gateway`, `switch`.
-
#failed ⇒ TrueClass | FalseClass
enum: ‘ap`, `gateway`, `switch`.
-
#latency ⇒ Integer
enum: ‘ap`, `gateway`, `switch`.
-
#mac ⇒ String
enum: ‘ap`, `gateway`, `switch`.
-
#port_id ⇒ String
enum: ‘ap`, `gateway`, `switch`.
-
#reason ⇒ String
enum: ‘ap`, `gateway`, `switch`.
-
#rx_mbps ⇒ Integer
enum: ‘ap`, `gateway`, `switch`.
-
#start_time ⇒ Integer
enum: ‘ap`, `gateway`, `switch`.
-
#status ⇒ String
enum: ‘ap`, `gateway`, `switch`.
-
#timestamp ⇒ Float
Epoch (seconds).
-
#tx_mbps ⇒ Integer
Epoch (seconds).
-
#type ⇒ SynthetictestTypeEnum
enum: ‘arp`, `curl`, `dhcp`, `dhcp6`, `dns`, `lan_connectivity`, `radius`, `speedtest`.
-
#vlan_id ⇒ Integer
enum: ‘arp`, `curl`, `dhcp`, `dhcp6`, `dns`, `lan_connectivity`, `radius`, `speedtest`.
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(by = SKIP, device_type = SKIP, failed = SKIP, latency = SKIP, mac = SKIP, port_id = SKIP, reason = SKIP, rx_mbps = SKIP, start_time = SKIP, status = SKIP, timestamp = SKIP, tx_mbps = SKIP, type = SKIP, vlan_id = SKIP) ⇒ SynthetictestInfo
constructor
A new instance of SynthetictestInfo.
-
#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(by = SKIP, device_type = SKIP, failed = SKIP, latency = SKIP, mac = SKIP, port_id = SKIP, reason = SKIP, rx_mbps = SKIP, start_time = SKIP, status = SKIP, timestamp = SKIP, tx_mbps = SKIP, type = SKIP, vlan_id = SKIP) ⇒ SynthetictestInfo
Returns a new instance of SynthetictestInfo.
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 115 def initialize(by = SKIP, device_type = SKIP, failed = SKIP, latency = SKIP, mac = SKIP, port_id = SKIP, reason = SKIP, rx_mbps = SKIP, start_time = SKIP, status = SKIP, = SKIP, tx_mbps = SKIP, type = SKIP, vlan_id = SKIP) @by = by unless by == SKIP @device_type = device_type unless device_type == SKIP @failed = failed unless failed == SKIP @latency = latency unless latency == SKIP @mac = mac unless mac == SKIP @port_id = port_id unless port_id == SKIP @reason = reason unless reason == SKIP @rx_mbps = rx_mbps unless rx_mbps == SKIP @start_time = start_time unless start_time == SKIP @status = status unless status == SKIP @timestamp = unless == SKIP @tx_mbps = tx_mbps unless tx_mbps == SKIP @type = type unless type == SKIP @vlan_id = vlan_id unless vlan_id == SKIP end |
Instance Attribute Details
#by ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 14 def by @by end |
#device_type ⇒ DeviceTypeEnum
enum: ‘ap`, `gateway`, `switch`
18 19 20 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 18 def device_type @device_type end |
#failed ⇒ TrueClass | FalseClass
enum: ‘ap`, `gateway`, `switch`
22 23 24 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 22 def failed @failed end |
#latency ⇒ Integer
enum: ‘ap`, `gateway`, `switch`
26 27 28 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 26 def latency @latency end |
#mac ⇒ String
enum: ‘ap`, `gateway`, `switch`
30 31 32 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 30 def mac @mac end |
#port_id ⇒ String
enum: ‘ap`, `gateway`, `switch`
34 35 36 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 34 def port_id @port_id end |
#reason ⇒ String
enum: ‘ap`, `gateway`, `switch`
38 39 40 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 38 def reason @reason end |
#rx_mbps ⇒ Integer
enum: ‘ap`, `gateway`, `switch`
42 43 44 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 42 def rx_mbps @rx_mbps end |
#start_time ⇒ Integer
enum: ‘ap`, `gateway`, `switch`
46 47 48 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 46 def start_time @start_time end |
#status ⇒ String
enum: ‘ap`, `gateway`, `switch`
50 51 52 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 50 def status @status end |
#timestamp ⇒ Float
Epoch (seconds)
54 55 56 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 54 def @timestamp end |
#tx_mbps ⇒ Integer
Epoch (seconds)
58 59 60 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 58 def tx_mbps @tx_mbps end |
#type ⇒ SynthetictestTypeEnum
enum: ‘arp`, `curl`, `dhcp`, `dhcp6`, `dns`, `lan_connectivity`, `radius`, `speedtest`
63 64 65 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 63 def type @type end |
#vlan_id ⇒ Integer
enum: ‘arp`, `curl`, `dhcp`, `dhcp6`, `dns`, `lan_connectivity`, `radius`, `speedtest`
68 69 70 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 68 def vlan_id @vlan_id 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 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 136 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. by = hash.key?('by') ? hash['by'] : SKIP device_type = hash.key?('device_type') ? hash['device_type'] : SKIP failed = hash.key?('failed') ? hash['failed'] : SKIP latency = hash.key?('latency') ? hash['latency'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP port_id = hash.key?('port_id') ? hash['port_id'] : SKIP reason = hash.key?('reason') ? hash['reason'] : SKIP rx_mbps = hash.key?('rx_mbps') ? hash['rx_mbps'] : SKIP start_time = hash.key?('start_time') ? hash['start_time'] : SKIP status = hash.key?('status') ? hash['status'] : SKIP = hash.key?('timestamp') ? hash['timestamp'] : SKIP tx_mbps = hash.key?('tx_mbps') ? hash['tx_mbps'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP vlan_id = hash.key?('vlan_id') ? hash['vlan_id'] : SKIP # Create object from extracted values. SynthetictestInfo.new(by, device_type, failed, latency, mac, port_id, reason, rx_mbps, start_time, status, , tx_mbps, type, vlan_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 71 def self.names @_hash = {} if @_hash.nil? @_hash['by'] = 'by' @_hash['device_type'] = 'device_type' @_hash['failed'] = 'failed' @_hash['latency'] = 'latency' @_hash['mac'] = 'mac' @_hash['port_id'] = 'port_id' @_hash['reason'] = 'reason' @_hash['rx_mbps'] = 'rx_mbps' @_hash['start_time'] = 'start_time' @_hash['status'] = 'status' @_hash['timestamp'] = 'timestamp' @_hash['tx_mbps'] = 'tx_mbps' @_hash['type'] = 'type' @_hash['vlan_id'] = 'vlan_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
111 112 113 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 111 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 91 def self.optionals %w[ by device_type failed latency mac port_id reason rx_mbps start_time status timestamp tx_mbps type vlan_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
182 183 184 185 186 187 188 189 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 182 def inspect class_name = self.class.name.split('::').last "<#{class_name} by: #{@by.inspect}, device_type: #{@device_type.inspect}, failed:"\ " #{@failed.inspect}, latency: #{@latency.inspect}, mac: #{@mac.inspect}, port_id:"\ " #{@port_id.inspect}, reason: #{@reason.inspect}, rx_mbps: #{@rx_mbps.inspect}, start_time:"\ " #{@start_time.inspect}, status: #{@status.inspect}, timestamp: #{@timestamp.inspect},"\ " tx_mbps: #{@tx_mbps.inspect}, type: #{@type.inspect}, vlan_id: #{@vlan_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
173 174 175 176 177 178 179 |
# File 'lib/mist_api/models/synthetictest_info.rb', line 173 def to_s class_name = self.class.name.split('::').last "<#{class_name} by: #{@by}, device_type: #{@device_type}, failed: #{@failed}, latency:"\ " #{@latency}, mac: #{@mac}, port_id: #{@port_id}, reason: #{@reason}, rx_mbps: #{@rx_mbps},"\ " start_time: #{@start_time}, status: #{@status}, timestamp: #{@timestamp}, tx_mbps:"\ " #{@tx_mbps}, type: #{@type}, vlan_id: #{@vlan_id}>" end |