Class: MistApi::VpnPeerStat
- Defined in:
- lib/mist_api/models/vpn_peer_stat.rb
Overview
VpnPeerStat Model.
Instance Attribute Summary collapse
-
#is_active ⇒ TrueClass | FalseClass
Redundancy status of the associated interface.
-
#jitter ⇒ Float
Jitter in milliseconds.
-
#last_seen ⇒ Float
Last seen timestamp.
-
#latency ⇒ Float
Latency in milliseconds.
-
#loss ⇒ Float
Packet loss in percentage.
-
#mac ⇒ String
Router mac address.
-
#mos ⇒ Float
Mean Opinion Score, a measure of the quality of the VPN link.
-
#mtu ⇒ Integer
Mean Opinion Score, a measure of the quality of the VPN link.
-
#org_id ⇒ UUID | String
Mean Opinion Score, a measure of the quality of the VPN link.
-
#peer_mac ⇒ String
Peer router mac address.
-
#peer_port_id ⇒ String
Peer router device interface.
-
#peer_router_name ⇒ String
Peer router device interface.
-
#peer_site_id ⇒ UUID | String
Peer router device interface.
-
#port_id ⇒ String
Router device interface.
-
#router_name ⇒ String
Router device interface.
-
#site_id ⇒ UUID | String
Router device interface.
-
#type ⇒ String
‘ipsec`for SRX, `svr` for 128T.
-
#up ⇒ TrueClass | FalseClass
‘ipsec`for SRX, `svr` for 128T.
-
#uptime ⇒ Integer
‘ipsec`for SRX, `svr` for 128T.
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(is_active = SKIP, jitter = SKIP, last_seen = SKIP, latency = SKIP, loss = SKIP, mac = SKIP, mos = SKIP, mtu = SKIP, org_id = SKIP, peer_mac = SKIP, peer_port_id = SKIP, peer_router_name = SKIP, peer_site_id = SKIP, port_id = SKIP, router_name = SKIP, site_id = SKIP, type = SKIP, up = SKIP, uptime = SKIP) ⇒ VpnPeerStat
constructor
A new instance of VpnPeerStat.
-
#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(is_active = SKIP, jitter = SKIP, last_seen = SKIP, latency = SKIP, loss = SKIP, mac = SKIP, mos = SKIP, mtu = SKIP, org_id = SKIP, peer_mac = SKIP, peer_port_id = SKIP, peer_router_name = SKIP, peer_site_id = SKIP, port_id = SKIP, router_name = SKIP, site_id = SKIP, type = SKIP, up = SKIP, uptime = SKIP) ⇒ VpnPeerStat
Returns a new instance of VpnPeerStat.
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/vpn_peer_stat.rb', line 145 def initialize(is_active = SKIP, jitter = SKIP, last_seen = SKIP, latency = SKIP, loss = SKIP, mac = SKIP, mos = SKIP, mtu = SKIP, org_id = SKIP, peer_mac = SKIP, peer_port_id = SKIP, peer_router_name = SKIP, peer_site_id = SKIP, port_id = SKIP, router_name = SKIP, site_id = SKIP, type = SKIP, up = SKIP, uptime = SKIP) @is_active = is_active unless is_active == SKIP @jitter = jitter unless jitter == SKIP @last_seen = last_seen unless last_seen == SKIP @latency = latency unless latency == SKIP @loss = loss unless loss == SKIP @mac = mac unless mac == SKIP @mos = mos unless mos == SKIP @mtu = mtu unless mtu == SKIP @org_id = org_id unless org_id == SKIP @peer_mac = peer_mac unless peer_mac == SKIP @peer_port_id = peer_port_id unless peer_port_id == SKIP @peer_router_name = peer_router_name unless peer_router_name == SKIP @peer_site_id = peer_site_id unless peer_site_id == SKIP @port_id = port_id unless port_id == SKIP @router_name = router_name unless router_name == SKIP @site_id = site_id unless site_id == SKIP @type = type unless type == SKIP @up = up unless up == SKIP @uptime = uptime unless uptime == SKIP end |
Instance Attribute Details
#is_active ⇒ TrueClass | FalseClass
Redundancy status of the associated interface
14 15 16 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 14 def is_active @is_active end |
#jitter ⇒ Float
Jitter in milliseconds
18 19 20 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 18 def jitter @jitter end |
#last_seen ⇒ Float
Last seen timestamp
22 23 24 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 22 def last_seen @last_seen end |
#latency ⇒ Float
Latency in milliseconds
26 27 28 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 26 def latency @latency end |
#loss ⇒ Float
Packet loss in percentage
30 31 32 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 30 def loss @loss end |
#mac ⇒ String
Router mac address
34 35 36 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 34 def mac @mac end |
#mos ⇒ Float
Mean Opinion Score, a measure of the quality of the VPN link
38 39 40 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 38 def mos @mos end |
#mtu ⇒ Integer
Mean Opinion Score, a measure of the quality of the VPN link
42 43 44 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 42 def mtu @mtu end |
#org_id ⇒ UUID | String
Mean Opinion Score, a measure of the quality of the VPN link
46 47 48 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 46 def org_id @org_id end |
#peer_mac ⇒ String
Peer router mac address
50 51 52 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 50 def peer_mac @peer_mac end |
#peer_port_id ⇒ String
Peer router device interface
54 55 56 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 54 def peer_port_id @peer_port_id end |
#peer_router_name ⇒ String
Peer router device interface
58 59 60 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 58 def peer_router_name @peer_router_name end |
#peer_site_id ⇒ UUID | String
Peer router device interface
62 63 64 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 62 def peer_site_id @peer_site_id end |
#port_id ⇒ String
Router device interface
66 67 68 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 66 def port_id @port_id end |
#router_name ⇒ String
Router device interface
70 71 72 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 70 def router_name @router_name end |
#site_id ⇒ UUID | String
Router device interface
74 75 76 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 74 def site_id @site_id end |
#type ⇒ String
‘ipsec`for SRX, `svr` for 128T
78 79 80 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 78 def type @type end |
#up ⇒ TrueClass | FalseClass
‘ipsec`for SRX, `svr` for 128T
82 83 84 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 82 def up @up end |
#uptime ⇒ Integer
‘ipsec`for SRX, `svr` for 128T
86 87 88 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 86 def uptime @uptime end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 173 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. is_active = hash.key?('is_active') ? hash['is_active'] : SKIP jitter = hash.key?('jitter') ? hash['jitter'] : SKIP last_seen = hash.key?('last_seen') ? hash['last_seen'] : SKIP latency = hash.key?('latency') ? hash['latency'] : SKIP loss = hash.key?('loss') ? hash['loss'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP mos = hash.key?('mos') ? hash['mos'] : SKIP mtu = hash.key?('mtu') ? hash['mtu'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP peer_mac = hash.key?('peer_mac') ? hash['peer_mac'] : SKIP peer_port_id = hash.key?('peer_port_id') ? hash['peer_port_id'] : SKIP peer_router_name = hash.key?('peer_router_name') ? hash['peer_router_name'] : SKIP peer_site_id = hash.key?('peer_site_id') ? hash['peer_site_id'] : SKIP port_id = hash.key?('port_id') ? hash['port_id'] : SKIP router_name = hash.key?('router_name') ? hash['router_name'] : SKIP site_id = hash.key?('site_id') ? hash['site_id'] : SKIP type = hash.key?('type') ? hash['type'] : SKIP up = hash.key?('up') ? hash['up'] : SKIP uptime = hash.key?('uptime') ? hash['uptime'] : SKIP # Create object from extracted values. VpnPeerStat.new(is_active, jitter, last_seen, latency, loss, mac, mos, mtu, org_id, peer_mac, peer_port_id, peer_router_name, peer_site_id, port_id, router_name, site_id, type, up, uptime) end |
.names ⇒ Object
A mapping from model property names to API property names.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 89 def self.names @_hash = {} if @_hash.nil? @_hash['is_active'] = 'is_active' @_hash['jitter'] = 'jitter' @_hash['last_seen'] = 'last_seen' @_hash['latency'] = 'latency' @_hash['loss'] = 'loss' @_hash['mac'] = 'mac' @_hash['mos'] = 'mos' @_hash['mtu'] = 'mtu' @_hash['org_id'] = 'org_id' @_hash['peer_mac'] = 'peer_mac' @_hash['peer_port_id'] = 'peer_port_id' @_hash['peer_router_name'] = 'peer_router_name' @_hash['peer_site_id'] = 'peer_site_id' @_hash['port_id'] = 'port_id' @_hash['router_name'] = 'router_name' @_hash['site_id'] = 'site_id' @_hash['type'] = 'type' @_hash['up'] = 'up' @_hash['uptime'] = 'uptime' @_hash end |
.nullables ⇒ Object
An array for nullable fields
139 140 141 142 143 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 139 def self.nullables %w[ last_seen ] end |
.optionals ⇒ Object
An array for optional fields
114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 114 def self.optionals %w[ is_active jitter last_seen latency loss mac mos mtu org_id peer_mac peer_port_id peer_router_name peer_site_id port_id router_name site_id type up uptime ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
231 232 233 234 235 236 237 238 239 240 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 231 def inspect class_name = self.class.name.split('::').last "<#{class_name} is_active: #{@is_active.inspect}, jitter: #{@jitter.inspect}, last_seen:"\ " #{@last_seen.inspect}, latency: #{@latency.inspect}, loss: #{@loss.inspect}, mac:"\ " #{@mac.inspect}, mos: #{@mos.inspect}, mtu: #{@mtu.inspect}, org_id: #{@org_id.inspect},"\ " peer_mac: #{@peer_mac.inspect}, peer_port_id: #{@peer_port_id.inspect}, peer_router_name:"\ " #{@peer_router_name.inspect}, peer_site_id: #{@peer_site_id.inspect}, port_id:"\ " #{@port_id.inspect}, router_name: #{@router_name.inspect}, site_id: #{@site_id.inspect},"\ " type: #{@type.inspect}, up: #{@up.inspect}, uptime: #{@uptime.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
221 222 223 224 225 226 227 228 |
# File 'lib/mist_api/models/vpn_peer_stat.rb', line 221 def to_s class_name = self.class.name.split('::').last "<#{class_name} is_active: #{@is_active}, jitter: #{@jitter}, last_seen: #{@last_seen},"\ " latency: #{@latency}, loss: #{@loss}, mac: #{@mac}, mos: #{@mos}, mtu: #{@mtu}, org_id:"\ " #{@org_id}, peer_mac: #{@peer_mac}, peer_port_id: #{@peer_port_id}, peer_router_name:"\ " #{@peer_router_name}, peer_site_id: #{@peer_site_id}, port_id: #{@port_id}, router_name:"\ " #{@router_name}, site_id: #{@site_id}, type: #{@type}, up: #{@up}, uptime: #{@uptime}>" end |