Class: MistApi::StatsGatewayWanTunnel
- Defined in:
- lib/mist_api/models/stats_gateway_wan_tunnel.rb
Overview
StatsGatewayWanTunnel Model.
Instance Attribute Summary collapse
-
#auth_algo ⇒ String
Authentication algorithm.
-
#encrypt_algo ⇒ String
Encryption algorithm.
-
#ike_version ⇒ String
IKE version.
-
#ip ⇒ String
IP Address.
-
#last_event ⇒ String
Reason of why the tunnel is down.
-
#last_flapped ⇒ Float
Indicates when the port was last flapped.
-
#node ⇒ String
Node0/node1.
-
#peer_host ⇒ String
Peer host.
-
#peer_ip ⇒ String
Peer ip address.
-
#priority ⇒ TunnelPriorityEnum
enum: ‘primary`, `secondary`.
-
#protocol ⇒ WanTunnelProtocolEnum
enum: ‘gre`, `ipsec`.
-
#rx_bytes ⇒ Integer
Amount of traffic received since connection.
-
#rx_pkts ⇒ Integer
Amount of packets received since connection.
-
#tunnel_name ⇒ String
Mist Tunnel Name.
-
#tx_bytes ⇒ Integer
Amount of traffic sent since connection.
-
#tx_pkts ⇒ Integer
Amount of packets sent since connection.
-
#up ⇒ TrueClass | FalseClass
Amount of packets sent since connection.
-
#uptime ⇒ Integer
Duration from first (or last) SA was established.
-
#wan_name ⇒ String
WAN interface name.
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(auth_algo = SKIP, encrypt_algo = SKIP, ike_version = SKIP, ip = SKIP, last_event = SKIP, last_flapped = SKIP, node = SKIP, peer_host = SKIP, peer_ip = SKIP, priority = SKIP, protocol = SKIP, rx_bytes = SKIP, rx_pkts = SKIP, tunnel_name = SKIP, tx_bytes = SKIP, tx_pkts = SKIP, up = SKIP, uptime = SKIP, wan_name = SKIP) ⇒ StatsGatewayWanTunnel
constructor
A new instance of StatsGatewayWanTunnel.
-
#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(auth_algo = SKIP, encrypt_algo = SKIP, ike_version = SKIP, ip = SKIP, last_event = SKIP, last_flapped = SKIP, node = SKIP, peer_host = SKIP, peer_ip = SKIP, priority = SKIP, protocol = SKIP, rx_bytes = SKIP, rx_pkts = SKIP, tunnel_name = SKIP, tx_bytes = SKIP, tx_pkts = SKIP, up = SKIP, uptime = SKIP, wan_name = SKIP) ⇒ StatsGatewayWanTunnel
Returns a new instance of StatsGatewayWanTunnel.
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 148 def initialize(auth_algo = SKIP, encrypt_algo = SKIP, ike_version = SKIP, ip = SKIP, last_event = SKIP, last_flapped = SKIP, node = SKIP, peer_host = SKIP, peer_ip = SKIP, priority = SKIP, protocol = SKIP, rx_bytes = SKIP, rx_pkts = SKIP, tunnel_name = SKIP, tx_bytes = SKIP, tx_pkts = SKIP, up = SKIP, uptime = SKIP, wan_name = SKIP) @auth_algo = auth_algo unless auth_algo == SKIP @encrypt_algo = encrypt_algo unless encrypt_algo == SKIP @ike_version = ike_version unless ike_version == SKIP @ip = ip unless ip == SKIP @last_event = last_event unless last_event == SKIP @last_flapped = last_flapped unless last_flapped == SKIP @node = node unless node == SKIP @peer_host = peer_host unless peer_host == SKIP @peer_ip = peer_ip unless peer_ip == SKIP @priority = priority unless priority == SKIP @protocol = protocol unless protocol == SKIP @rx_bytes = rx_bytes unless rx_bytes == SKIP @rx_pkts = rx_pkts unless rx_pkts == SKIP @tunnel_name = tunnel_name unless tunnel_name == SKIP @tx_bytes = tx_bytes unless tx_bytes == SKIP @tx_pkts = tx_pkts unless tx_pkts == SKIP @up = up unless up == SKIP @uptime = uptime unless uptime == SKIP @wan_name = wan_name unless wan_name == SKIP end |
Instance Attribute Details
#auth_algo ⇒ String
Authentication algorithm
14 15 16 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 14 def auth_algo @auth_algo end |
#encrypt_algo ⇒ String
Encryption algorithm
18 19 20 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 18 def encrypt_algo @encrypt_algo end |
#ike_version ⇒ String
IKE version
22 23 24 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 22 def ike_version @ike_version end |
#ip ⇒ String
IP Address
26 27 28 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 26 def ip @ip end |
#last_event ⇒ String
Reason of why the tunnel is down
30 31 32 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 30 def last_event @last_event end |
#last_flapped ⇒ Float
Indicates when the port was last flapped
34 35 36 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 34 def last_flapped @last_flapped end |
#node ⇒ String
Node0/node1
38 39 40 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 38 def node @node end |
#peer_host ⇒ String
Peer host
42 43 44 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 42 def peer_host @peer_host end |
#peer_ip ⇒ String
Peer ip address
46 47 48 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 46 def peer_ip @peer_ip end |
#priority ⇒ TunnelPriorityEnum
enum: ‘primary`, `secondary`
50 51 52 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 50 def priority @priority end |
#protocol ⇒ WanTunnelProtocolEnum
enum: ‘gre`, `ipsec`
54 55 56 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 54 def protocol @protocol end |
#rx_bytes ⇒ Integer
Amount of traffic received since connection
58 59 60 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 58 def rx_bytes @rx_bytes end |
#rx_pkts ⇒ Integer
Amount of packets received since connection
62 63 64 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 62 def rx_pkts @rx_pkts end |
#tunnel_name ⇒ String
Mist Tunnel Name
66 67 68 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 66 def tunnel_name @tunnel_name end |
#tx_bytes ⇒ Integer
Amount of traffic sent since connection
70 71 72 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 70 def tx_bytes @tx_bytes end |
#tx_pkts ⇒ Integer
Amount of packets sent since connection
74 75 76 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 74 def tx_pkts @tx_pkts end |
#up ⇒ TrueClass | FalseClass
Amount of packets sent since connection
78 79 80 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 78 def up @up end |
#uptime ⇒ Integer
Duration from first (or last) SA was established
82 83 84 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 82 def uptime @uptime end |
#wan_name ⇒ String
WAN interface name
86 87 88 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 86 def wan_name @wan_name end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 219 220 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 176 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. auth_algo = hash.key?('auth_algo') ? hash['auth_algo'] : SKIP encrypt_algo = hash.key?('encrypt_algo') ? hash['encrypt_algo'] : SKIP ike_version = hash.key?('ike_version') ? hash['ike_version'] : SKIP ip = hash.key?('ip') ? hash['ip'] : SKIP last_event = hash.key?('last_event') ? hash['last_event'] : SKIP last_flapped = hash.key?('last_flapped') ? hash['last_flapped'] : SKIP node = hash.key?('node') ? hash['node'] : SKIP peer_host = hash.key?('peer_host') ? hash['peer_host'] : SKIP peer_ip = hash.key?('peer_ip') ? hash['peer_ip'] : SKIP priority = hash.key?('priority') ? hash['priority'] : SKIP protocol = hash.key?('protocol') ? hash['protocol'] : SKIP rx_bytes = hash.key?('rx_bytes') ? hash['rx_bytes'] : SKIP rx_pkts = hash.key?('rx_pkts') ? hash['rx_pkts'] : SKIP tunnel_name = hash.key?('tunnel_name') ? hash['tunnel_name'] : SKIP tx_bytes = hash.key?('tx_bytes') ? hash['tx_bytes'] : SKIP tx_pkts = hash.key?('tx_pkts') ? hash['tx_pkts'] : SKIP up = hash.key?('up') ? hash['up'] : SKIP uptime = hash.key?('uptime') ? hash['uptime'] : SKIP wan_name = hash.key?('wan_name') ? hash['wan_name'] : SKIP # Create object from extracted values. StatsGatewayWanTunnel.new(auth_algo, encrypt_algo, ike_version, ip, last_event, last_flapped, node, peer_host, peer_ip, priority, protocol, rx_bytes, rx_pkts, tunnel_name, tx_bytes, tx_pkts, up, uptime, wan_name) 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/stats_gateway_wan_tunnel.rb', line 89 def self.names @_hash = {} if @_hash.nil? @_hash['auth_algo'] = 'auth_algo' @_hash['encrypt_algo'] = 'encrypt_algo' @_hash['ike_version'] = 'ike_version' @_hash['ip'] = 'ip' @_hash['last_event'] = 'last_event' @_hash['last_flapped'] = 'last_flapped' @_hash['node'] = 'node' @_hash['peer_host'] = 'peer_host' @_hash['peer_ip'] = 'peer_ip' @_hash['priority'] = 'priority' @_hash['protocol'] = 'protocol' @_hash['rx_bytes'] = 'rx_bytes' @_hash['rx_pkts'] = 'rx_pkts' @_hash['tunnel_name'] = 'tunnel_name' @_hash['tx_bytes'] = 'tx_bytes' @_hash['tx_pkts'] = 'tx_pkts' @_hash['up'] = 'up' @_hash['uptime'] = 'uptime' @_hash['wan_name'] = 'wan_name' @_hash end |
.nullables ⇒ Object
An array for nullable fields
139 140 141 142 143 144 145 146 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 139 def self.nullables %w[ rx_bytes rx_pkts tx_bytes tx_pkts ] 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/stats_gateway_wan_tunnel.rb', line 114 def self.optionals %w[ auth_algo encrypt_algo ike_version ip last_event last_flapped node peer_host peer_ip priority protocol rx_bytes rx_pkts tunnel_name tx_bytes tx_pkts up uptime wan_name ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 234 def inspect class_name = self.class.name.split('::').last "<#{class_name} auth_algo: #{@auth_algo.inspect}, encrypt_algo: #{@encrypt_algo.inspect},"\ " ike_version: #{@ike_version.inspect}, ip: #{@ip.inspect}, last_event:"\ " #{@last_event.inspect}, last_flapped: #{@last_flapped.inspect}, node: #{@node.inspect},"\ " peer_host: #{@peer_host.inspect}, peer_ip: #{@peer_ip.inspect}, priority:"\ " #{@priority.inspect}, protocol: #{@protocol.inspect}, rx_bytes: #{@rx_bytes.inspect},"\ " rx_pkts: #{@rx_pkts.inspect}, tunnel_name: #{@tunnel_name.inspect}, tx_bytes:"\ " #{@tx_bytes.inspect}, tx_pkts: #{@tx_pkts.inspect}, up: #{@up.inspect}, uptime:"\ " #{@uptime.inspect}, wan_name: #{@wan_name.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
223 224 225 226 227 228 229 230 231 |
# File 'lib/mist_api/models/stats_gateway_wan_tunnel.rb', line 223 def to_s class_name = self.class.name.split('::').last "<#{class_name} auth_algo: #{@auth_algo}, encrypt_algo: #{@encrypt_algo}, ike_version:"\ " #{@ike_version}, ip: #{@ip}, last_event: #{@last_event}, last_flapped: #{@last_flapped},"\ " node: #{@node}, peer_host: #{@peer_host}, peer_ip: #{@peer_ip}, priority: #{@priority},"\ " protocol: #{@protocol}, rx_bytes: #{@rx_bytes}, rx_pkts: #{@rx_pkts}, tunnel_name:"\ " #{@tunnel_name}, tx_bytes: #{@tx_bytes}, tx_pkts: #{@tx_pkts}, up: #{@up}, uptime:"\ " #{@uptime}, wan_name: #{@wan_name}>" end |