Class: MistApi::StatsGatewayVpnPeer
- Defined in:
- lib/mist_api/models/stats_gateway_vpn_peer.rb
Overview
StatsGatewayVpnPeer 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.
-
#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.
-
#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.
-
#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, mos = SKIP, mtu = SKIP, peer_mac = SKIP, peer_port_id = SKIP, peer_router_name = SKIP, peer_site_id = SKIP, port_id = SKIP, router_name = SKIP, type = SKIP, up = SKIP, uptime = SKIP) ⇒ StatsGatewayVpnPeer
constructor
A new instance of StatsGatewayVpnPeer.
-
#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, mos = SKIP, mtu = SKIP, peer_mac = SKIP, peer_port_id = SKIP, peer_router_name = SKIP, peer_site_id = SKIP, port_id = SKIP, router_name = SKIP, type = SKIP, up = SKIP, uptime = SKIP) ⇒ StatsGatewayVpnPeer
Returns a new instance of StatsGatewayVpnPeer.
127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 127 def initialize(is_active = SKIP, jitter = SKIP, last_seen = SKIP, latency = SKIP, loss = SKIP, mos = SKIP, mtu = SKIP, peer_mac = SKIP, peer_port_id = SKIP, peer_router_name = SKIP, peer_site_id = SKIP, port_id = SKIP, router_name = 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 @mos = mos unless mos == SKIP @mtu = mtu unless mtu == 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 @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/stats_gateway_vpn_peer.rb', line 14 def is_active @is_active end |
#jitter ⇒ Float
Jitter in milliseconds
18 19 20 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 18 def jitter @jitter end |
#last_seen ⇒ Float
Last seen timestamp
22 23 24 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 22 def last_seen @last_seen end |
#latency ⇒ Float
Latency in milliseconds
26 27 28 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 26 def latency @latency end |
#loss ⇒ Float
Packet loss in percentage
30 31 32 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 30 def loss @loss end |
#mos ⇒ Float
Mean Opinion Score, a measure of the quality of the VPN link
34 35 36 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 34 def mos @mos end |
#mtu ⇒ Integer
Mean Opinion Score, a measure of the quality of the VPN link
38 39 40 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 38 def mtu @mtu end |
#peer_mac ⇒ String
Peer router mac address
42 43 44 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 42 def peer_mac @peer_mac end |
#peer_port_id ⇒ String
Peer router device interface
46 47 48 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 46 def peer_port_id @peer_port_id end |
#peer_router_name ⇒ String
Peer router device interface
50 51 52 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 50 def peer_router_name @peer_router_name end |
#peer_site_id ⇒ UUID | String
Peer router device interface
54 55 56 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 54 def peer_site_id @peer_site_id end |
#port_id ⇒ String
Router device interface
58 59 60 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 58 def port_id @port_id end |
#router_name ⇒ String
Router device interface
62 63 64 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 62 def router_name @router_name end |
#type ⇒ String
‘ipsec`for SRX, `svr` for 128T
66 67 68 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 66 def type @type end |
#up ⇒ TrueClass | FalseClass
‘ipsec`for SRX, `svr` for 128T
70 71 72 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 70 def up @up end |
#uptime ⇒ Integer
‘ipsec`for SRX, `svr` for 128T
74 75 76 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 74 def uptime @uptime end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 151 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 mos = hash.key?('mos') ? hash['mos'] : SKIP mtu = hash.key?('mtu') ? hash['mtu'] : 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 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. StatsGatewayVpnPeer.new(is_active, jitter, last_seen, latency, loss, mos, mtu, peer_mac, peer_port_id, peer_router_name, peer_site_id, port_id, router_name, type, up, uptime) end |
.names ⇒ Object
A mapping from model property names to API property names.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 77 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['mos'] = 'mos' @_hash['mtu'] = 'mtu' @_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['type'] = 'type' @_hash['up'] = 'up' @_hash['uptime'] = 'uptime' @_hash end |
.nullables ⇒ Object
An array for nullable fields
121 122 123 124 125 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 121 def self.nullables %w[ last_seen ] end |
.optionals ⇒ Object
An array for optional fields
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 99 def self.optionals %w[ is_active jitter last_seen latency loss mos mtu peer_mac peer_port_id peer_router_name peer_site_id port_id router_name type up uptime ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
203 204 205 206 207 208 209 210 211 212 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 203 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}, mos:"\ " #{@mos.inspect}, mtu: #{@mtu.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}, type: #{@type.inspect}, up: #{@up.inspect}, uptime:"\ " #{@uptime.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
193 194 195 196 197 198 199 200 |
# File 'lib/mist_api/models/stats_gateway_vpn_peer.rb', line 193 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}, mos: #{@mos}, mtu: #{@mtu}, 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}, type: #{@type}, up:"\ " #{@up}, uptime: #{@uptime}>" end |