Class: MistApi::IfStatProperty
- Defined in:
- lib/mist_api/models/if_stat_property.rb
Overview
IfStatProperty Model.
Instance Attribute Summary collapse
-
#address_mode ⇒ String
TODO: Write general description for this method.
-
#ips ⇒ Array[String]
TODO: Write general description for this method.
-
#nat_addresses ⇒ Array[String]
TODO: Write general description for this method.
-
#network_name ⇒ String
TODO: Write general description for this method.
-
#port_id ⇒ String
TODO: Write general description for this method.
-
#port_usage ⇒ String
TODO: Write general description for this method.
-
#redundancy_state ⇒ String
TODO: Write general description for this method.
-
#rx_bytes ⇒ Integer
Amount of traffic received since connection.
-
#rx_pkts ⇒ Integer
Amount of packets received since connection.
-
#servp_info ⇒ IfStatPropertyServpInfo
Amount of packets received since connection.
-
#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.
-
#vlan ⇒ Integer
Amount of packets sent since connection.
-
#wan_name ⇒ String
Amount of packets sent since connection.
-
#wan_type ⇒ String
Amount of packets sent since connection.
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(address_mode = SKIP, ips = SKIP, nat_addresses = SKIP, network_name = SKIP, port_id = SKIP, port_usage = SKIP, redundancy_state = SKIP, rx_bytes = SKIP, rx_pkts = SKIP, servp_info = SKIP, tx_bytes = SKIP, tx_pkts = SKIP, up = SKIP, vlan = SKIP, wan_name = SKIP, wan_type = SKIP) ⇒ IfStatProperty
constructor
A new instance of IfStatProperty.
-
#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(address_mode = SKIP, ips = SKIP, nat_addresses = SKIP, network_name = SKIP, port_id = SKIP, port_usage = SKIP, redundancy_state = SKIP, rx_bytes = SKIP, rx_pkts = SKIP, servp_info = SKIP, tx_bytes = SKIP, tx_pkts = SKIP, up = SKIP, vlan = SKIP, wan_name = SKIP, wan_type = SKIP) ⇒ IfStatProperty
Returns a new instance of IfStatProperty.
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/mist_api/models/if_stat_property.rb', line 130 def initialize(address_mode = SKIP, ips = SKIP, nat_addresses = SKIP, network_name = SKIP, port_id = SKIP, port_usage = SKIP, redundancy_state = SKIP, rx_bytes = SKIP, rx_pkts = SKIP, servp_info = SKIP, tx_bytes = SKIP, tx_pkts = SKIP, up = SKIP, vlan = SKIP, wan_name = SKIP, wan_type = SKIP) @address_mode = address_mode unless address_mode == SKIP @ips = ips unless ips == SKIP @nat_addresses = nat_addresses unless nat_addresses == SKIP @network_name = network_name unless network_name == SKIP @port_id = port_id unless port_id == SKIP @port_usage = port_usage unless port_usage == SKIP @redundancy_state = redundancy_state unless redundancy_state == SKIP @rx_bytes = rx_bytes unless rx_bytes == SKIP @rx_pkts = rx_pkts unless rx_pkts == SKIP @servp_info = servp_info unless servp_info == SKIP @tx_bytes = tx_bytes unless tx_bytes == SKIP @tx_pkts = tx_pkts unless tx_pkts == SKIP @up = up unless up == SKIP @vlan = vlan unless vlan == SKIP @wan_name = wan_name unless wan_name == SKIP @wan_type = wan_type unless wan_type == SKIP end |
Instance Attribute Details
#address_mode ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/if_stat_property.rb', line 14 def address_mode @address_mode end |
#ips ⇒ Array[String]
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/if_stat_property.rb', line 18 def ips @ips end |
#nat_addresses ⇒ Array[String]
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/if_stat_property.rb', line 22 def nat_addresses @nat_addresses end |
#network_name ⇒ String
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/if_stat_property.rb', line 26 def network_name @network_name end |
#port_id ⇒ String
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/if_stat_property.rb', line 30 def port_id @port_id end |
#port_usage ⇒ String
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/if_stat_property.rb', line 34 def port_usage @port_usage end |
#redundancy_state ⇒ String
TODO: Write general description for this method
38 39 40 |
# File 'lib/mist_api/models/if_stat_property.rb', line 38 def redundancy_state @redundancy_state end |
#rx_bytes ⇒ Integer
Amount of traffic received since connection
42 43 44 |
# File 'lib/mist_api/models/if_stat_property.rb', line 42 def rx_bytes @rx_bytes end |
#rx_pkts ⇒ Integer
Amount of packets received since connection
46 47 48 |
# File 'lib/mist_api/models/if_stat_property.rb', line 46 def rx_pkts @rx_pkts end |
#servp_info ⇒ IfStatPropertyServpInfo
Amount of packets received since connection
50 51 52 |
# File 'lib/mist_api/models/if_stat_property.rb', line 50 def servp_info @servp_info end |
#tx_bytes ⇒ Integer
Amount of traffic sent since connection
54 55 56 |
# File 'lib/mist_api/models/if_stat_property.rb', line 54 def tx_bytes @tx_bytes end |
#tx_pkts ⇒ Integer
Amount of packets sent since connection
58 59 60 |
# File 'lib/mist_api/models/if_stat_property.rb', line 58 def tx_pkts @tx_pkts end |
#up ⇒ TrueClass | FalseClass
Amount of packets sent since connection
62 63 64 |
# File 'lib/mist_api/models/if_stat_property.rb', line 62 def up @up end |
#vlan ⇒ Integer
Amount of packets sent since connection
66 67 68 |
# File 'lib/mist_api/models/if_stat_property.rb', line 66 def vlan @vlan end |
#wan_name ⇒ String
Amount of packets sent since connection
70 71 72 |
# File 'lib/mist_api/models/if_stat_property.rb', line 70 def wan_name @wan_name end |
#wan_type ⇒ String
Amount of packets sent since connection
74 75 76 |
# File 'lib/mist_api/models/if_stat_property.rb', line 74 def wan_type @wan_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 191 192 193 |
# File 'lib/mist_api/models/if_stat_property.rb', line 154 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. address_mode = hash.key?('address_mode') ? hash['address_mode'] : SKIP ips = hash.key?('ips') ? hash['ips'] : SKIP nat_addresses = hash.key?('nat_addresses') ? hash['nat_addresses'] : SKIP network_name = hash.key?('network_name') ? hash['network_name'] : SKIP port_id = hash.key?('port_id') ? hash['port_id'] : SKIP port_usage = hash.key?('port_usage') ? hash['port_usage'] : SKIP redundancy_state = hash.key?('redundancy_state') ? hash['redundancy_state'] : SKIP rx_bytes = hash.key?('rx_bytes') ? hash['rx_bytes'] : SKIP rx_pkts = hash.key?('rx_pkts') ? hash['rx_pkts'] : SKIP servp_info = IfStatPropertyServpInfo.from_hash(hash['servp_info']) if hash['servp_info'] 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 vlan = hash.key?('vlan') ? hash['vlan'] : SKIP wan_name = hash.key?('wan_name') ? hash['wan_name'] : SKIP wan_type = hash.key?('wan_type') ? hash['wan_type'] : SKIP # Create object from extracted values. IfStatProperty.new(address_mode, ips, nat_addresses, network_name, port_id, port_usage, redundancy_state, rx_bytes, rx_pkts, servp_info, tx_bytes, tx_pkts, up, vlan, wan_name, wan_type) 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/if_stat_property.rb', line 77 def self.names @_hash = {} if @_hash.nil? @_hash['address_mode'] = 'address_mode' @_hash['ips'] = 'ips' @_hash['nat_addresses'] = 'nat_addresses' @_hash['network_name'] = 'network_name' @_hash['port_id'] = 'port_id' @_hash['port_usage'] = 'port_usage' @_hash['redundancy_state'] = 'redundancy_state' @_hash['rx_bytes'] = 'rx_bytes' @_hash['rx_pkts'] = 'rx_pkts' @_hash['servp_info'] = 'servp_info' @_hash['tx_bytes'] = 'tx_bytes' @_hash['tx_pkts'] = 'tx_pkts' @_hash['up'] = 'up' @_hash['vlan'] = 'vlan' @_hash['wan_name'] = 'wan_name' @_hash['wan_type'] = 'wan_type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
121 122 123 124 125 126 127 128 |
# File 'lib/mist_api/models/if_stat_property.rb', line 121 def self.nullables %w[ rx_bytes rx_pkts tx_bytes tx_pkts ] 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/if_stat_property.rb', line 99 def self.optionals %w[ address_mode ips nat_addresses network_name port_id port_usage redundancy_state rx_bytes rx_pkts servp_info tx_bytes tx_pkts up vlan wan_name wan_type ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
206 207 208 209 210 211 212 213 214 215 |
# File 'lib/mist_api/models/if_stat_property.rb', line 206 def inspect class_name = self.class.name.split('::').last "<#{class_name} address_mode: #{@address_mode.inspect}, ips: #{@ips.inspect},"\ " nat_addresses: #{@nat_addresses.inspect}, network_name: #{@network_name.inspect}, port_id:"\ " #{@port_id.inspect}, port_usage: #{@port_usage.inspect}, redundancy_state:"\ " #{@redundancy_state.inspect}, rx_bytes: #{@rx_bytes.inspect}, rx_pkts:"\ " #{@rx_pkts.inspect}, servp_info: #{@servp_info.inspect}, tx_bytes: #{@tx_bytes.inspect},"\ " tx_pkts: #{@tx_pkts.inspect}, up: #{@up.inspect}, vlan: #{@vlan.inspect}, wan_name:"\ " #{@wan_name.inspect}, wan_type: #{@wan_type.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
196 197 198 199 200 201 202 203 |
# File 'lib/mist_api/models/if_stat_property.rb', line 196 def to_s class_name = self.class.name.split('::').last "<#{class_name} address_mode: #{@address_mode}, ips: #{@ips}, nat_addresses:"\ " #{@nat_addresses}, network_name: #{@network_name}, port_id: #{@port_id}, port_usage:"\ " #{@port_usage}, redundancy_state: #{@redundancy_state}, rx_bytes: #{@rx_bytes}, rx_pkts:"\ " #{@rx_pkts}, servp_info: #{@servp_info}, tx_bytes: #{@tx_bytes}, tx_pkts: #{@tx_pkts}, up:"\ " #{@up}, vlan: #{@vlan}, wan_name: #{@wan_name}, wan_type: #{@wan_type}>" end |