Class: MistApi::WiredClientResponse
- Defined in:
- lib/mist_api/models/wired_client_response.rb
Overview
WiredClientResponse Model.
Instance Attribute Summary collapse
-
#auth_method ⇒ String
TODO: Write general description for this method.
-
#auth_state ⇒ String
TODO: Write general description for this method.
-
#device_mac ⇒ Array[String]
MAC Address of the switch the client is connected to.
-
#device_mac_port ⇒ Array[WiredClientResponseDeviceMacPortItem]
MAC Address of the switch the client is connected to.
-
#dhcp_client_identifier ⇒ String
MAC Address of the switch the client is connected to.
-
#dhcp_client_options ⇒ Array[DhcpClientOption]
MAC Address of the switch the client is connected to.
-
#dhcp_fqdn ⇒ String
MAC Address of the switch the client is connected to.
-
#dhcp_hostname ⇒ String
MAC Address of the switch the client is connected to.
-
#dhcp_request_params ⇒ String
MAC Address of the switch the client is connected to.
-
#dhcp_vendor_class_identifier ⇒ String
MAC Address of the switch the client is connected to.
-
#ip ⇒ Array[String]
MAC Address of the switch the client is connected to.
-
#mac ⇒ String
MAC Address of the switch the client is connected to.
-
#org_id ⇒ UUID | String
MAC Address of the switch the client is connected to.
-
#port_id ⇒ Array[String]
MAC Address of the switch the client is connected to.
-
#site_id ⇒ UUID | String
MAC Address of the switch the client is connected to.
-
#timestamp ⇒ Float
Epoch (seconds).
-
#vlan ⇒ Array[Integer]
Epoch (seconds).
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_method = SKIP, auth_state = SKIP, device_mac = SKIP, device_mac_port = SKIP, dhcp_client_identifier = SKIP, dhcp_client_options = SKIP, dhcp_fqdn = SKIP, dhcp_hostname = SKIP, dhcp_request_params = SKIP, dhcp_vendor_class_identifier = SKIP, ip = SKIP, mac = SKIP, org_id = SKIP, port_id = SKIP, site_id = SKIP, timestamp = SKIP, vlan = SKIP) ⇒ WiredClientResponse
constructor
A new instance of WiredClientResponse.
-
#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_method = SKIP, auth_state = SKIP, device_mac = SKIP, device_mac_port = SKIP, dhcp_client_identifier = SKIP, dhcp_client_options = SKIP, dhcp_fqdn = SKIP, dhcp_hostname = SKIP, dhcp_request_params = SKIP, dhcp_vendor_class_identifier = SKIP, ip = SKIP, mac = SKIP, org_id = SKIP, port_id = SKIP, site_id = SKIP, timestamp = SKIP, vlan = SKIP) ⇒ WiredClientResponse
Returns a new instance of WiredClientResponse.
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/mist_api/models/wired_client_response.rb', line 131 def initialize(auth_method = SKIP, auth_state = SKIP, device_mac = SKIP, device_mac_port = SKIP, dhcp_client_identifier = SKIP, = SKIP, dhcp_fqdn = SKIP, dhcp_hostname = SKIP, dhcp_request_params = SKIP, dhcp_vendor_class_identifier = SKIP, ip = SKIP, mac = SKIP, org_id = SKIP, port_id = SKIP, site_id = SKIP, = SKIP, vlan = SKIP) @auth_method = auth_method unless auth_method == SKIP @auth_state = auth_state unless auth_state == SKIP @device_mac = device_mac unless device_mac == SKIP @device_mac_port = device_mac_port unless device_mac_port == SKIP @dhcp_client_identifier = dhcp_client_identifier unless dhcp_client_identifier == SKIP @dhcp_client_options = unless == SKIP @dhcp_fqdn = dhcp_fqdn unless dhcp_fqdn == SKIP @dhcp_hostname = dhcp_hostname unless dhcp_hostname == SKIP @dhcp_request_params = dhcp_request_params unless dhcp_request_params == SKIP unless dhcp_vendor_class_identifier == SKIP @dhcp_vendor_class_identifier = dhcp_vendor_class_identifier end @ip = ip unless ip == SKIP @mac = mac unless mac == SKIP @org_id = org_id unless org_id == SKIP @port_id = port_id unless port_id == SKIP @site_id = site_id unless site_id == SKIP @timestamp = unless == SKIP @vlan = vlan unless vlan == SKIP end |
Instance Attribute Details
#auth_method ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/wired_client_response.rb', line 14 def auth_method @auth_method end |
#auth_state ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/wired_client_response.rb', line 18 def auth_state @auth_state end |
#device_mac ⇒ Array[String]
MAC Address of the switch the client is connected to
22 23 24 |
# File 'lib/mist_api/models/wired_client_response.rb', line 22 def device_mac @device_mac end |
#device_mac_port ⇒ Array[WiredClientResponseDeviceMacPortItem]
MAC Address of the switch the client is connected to
26 27 28 |
# File 'lib/mist_api/models/wired_client_response.rb', line 26 def device_mac_port @device_mac_port end |
#dhcp_client_identifier ⇒ String
MAC Address of the switch the client is connected to
30 31 32 |
# File 'lib/mist_api/models/wired_client_response.rb', line 30 def dhcp_client_identifier @dhcp_client_identifier end |
#dhcp_client_options ⇒ Array[DhcpClientOption]
MAC Address of the switch the client is connected to
34 35 36 |
# File 'lib/mist_api/models/wired_client_response.rb', line 34 def @dhcp_client_options end |
#dhcp_fqdn ⇒ String
MAC Address of the switch the client is connected to
38 39 40 |
# File 'lib/mist_api/models/wired_client_response.rb', line 38 def dhcp_fqdn @dhcp_fqdn end |
#dhcp_hostname ⇒ String
MAC Address of the switch the client is connected to
42 43 44 |
# File 'lib/mist_api/models/wired_client_response.rb', line 42 def dhcp_hostname @dhcp_hostname end |
#dhcp_request_params ⇒ String
MAC Address of the switch the client is connected to
46 47 48 |
# File 'lib/mist_api/models/wired_client_response.rb', line 46 def dhcp_request_params @dhcp_request_params end |
#dhcp_vendor_class_identifier ⇒ String
MAC Address of the switch the client is connected to
50 51 52 |
# File 'lib/mist_api/models/wired_client_response.rb', line 50 def dhcp_vendor_class_identifier @dhcp_vendor_class_identifier end |
#ip ⇒ Array[String]
MAC Address of the switch the client is connected to
54 55 56 |
# File 'lib/mist_api/models/wired_client_response.rb', line 54 def ip @ip end |
#mac ⇒ String
MAC Address of the switch the client is connected to
58 59 60 |
# File 'lib/mist_api/models/wired_client_response.rb', line 58 def mac @mac end |
#org_id ⇒ UUID | String
MAC Address of the switch the client is connected to
62 63 64 |
# File 'lib/mist_api/models/wired_client_response.rb', line 62 def org_id @org_id end |
#port_id ⇒ Array[String]
MAC Address of the switch the client is connected to
66 67 68 |
# File 'lib/mist_api/models/wired_client_response.rb', line 66 def port_id @port_id end |
#site_id ⇒ UUID | String
MAC Address of the switch the client is connected to
70 71 72 |
# File 'lib/mist_api/models/wired_client_response.rb', line 70 def site_id @site_id end |
#timestamp ⇒ Float
Epoch (seconds)
74 75 76 |
# File 'lib/mist_api/models/wired_client_response.rb', line 74 def @timestamp end |
#vlan ⇒ Array[Integer]
Epoch (seconds)
78 79 80 |
# File 'lib/mist_api/models/wired_client_response.rb', line 78 def vlan @vlan end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 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 221 222 |
# File 'lib/mist_api/models/wired_client_response.rb', line 161 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. auth_method = hash.key?('auth_method') ? hash['auth_method'] : SKIP auth_state = hash.key?('auth_state') ? hash['auth_state'] : SKIP device_mac = hash.key?('device_mac') ? hash['device_mac'] : SKIP # Parameter is an array, so we need to iterate through it device_mac_port = nil unless hash['device_mac_port'].nil? device_mac_port = [] hash['device_mac_port'].each do |structure| device_mac_port << (WiredClientResponseDeviceMacPortItem.from_hash(structure) if structure) end end device_mac_port = SKIP unless hash.key?('device_mac_port') dhcp_client_identifier = hash.key?('dhcp_client_identifier') ? hash['dhcp_client_identifier'] : SKIP # Parameter is an array, so we need to iterate through it = nil unless hash['dhcp_client_options'].nil? = [] hash['dhcp_client_options'].each do |structure| << (DhcpClientOption.from_hash(structure) if structure) end end = SKIP unless hash.key?('dhcp_client_options') dhcp_fqdn = hash.key?('dhcp_fqdn') ? hash['dhcp_fqdn'] : SKIP dhcp_hostname = hash.key?('dhcp_hostname') ? hash['dhcp_hostname'] : SKIP dhcp_request_params = hash.key?('dhcp_request_params') ? hash['dhcp_request_params'] : SKIP dhcp_vendor_class_identifier = hash.key?('dhcp_vendor_class_identifier') ? hash['dhcp_vendor_class_identifier'] : SKIP ip = hash.key?('ip') ? hash['ip'] : SKIP mac = hash.key?('mac') ? hash['mac'] : SKIP org_id = hash.key?('org_id') ? hash['org_id'] : SKIP port_id = hash.key?('port_id') ? hash['port_id'] : SKIP site_id = hash.key?('site_id') ? hash['site_id'] : SKIP = hash.key?('timestamp') ? hash['timestamp'] : SKIP vlan = hash.key?('vlan') ? hash['vlan'] : SKIP # Create object from extracted values. WiredClientResponse.new(auth_method, auth_state, device_mac, device_mac_port, dhcp_client_identifier, , dhcp_fqdn, dhcp_hostname, dhcp_request_params, dhcp_vendor_class_identifier, ip, mac, org_id, port_id, site_id, , vlan) end |
.names ⇒ Object
A mapping from model property names to API property names.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/mist_api/models/wired_client_response.rb', line 81 def self.names @_hash = {} if @_hash.nil? @_hash['auth_method'] = 'auth_method' @_hash['auth_state'] = 'auth_state' @_hash['device_mac'] = 'device_mac' @_hash['device_mac_port'] = 'device_mac_port' @_hash['dhcp_client_identifier'] = 'dhcp_client_identifier' @_hash['dhcp_client_options'] = 'dhcp_client_options' @_hash['dhcp_fqdn'] = 'dhcp_fqdn' @_hash['dhcp_hostname'] = 'dhcp_hostname' @_hash['dhcp_request_params'] = 'dhcp_request_params' @_hash['dhcp_vendor_class_identifier'] = 'dhcp_vendor_class_identifier' @_hash['ip'] = 'ip' @_hash['mac'] = 'mac' @_hash['org_id'] = 'org_id' @_hash['port_id'] = 'port_id' @_hash['site_id'] = 'site_id' @_hash['timestamp'] = 'timestamp' @_hash['vlan'] = 'vlan' @_hash end |
.nullables ⇒ Object
An array for nullable fields
127 128 129 |
# File 'lib/mist_api/models/wired_client_response.rb', line 127 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
# File 'lib/mist_api/models/wired_client_response.rb', line 104 def self.optionals %w[ auth_method auth_state device_mac device_mac_port dhcp_client_identifier dhcp_client_options dhcp_fqdn dhcp_hostname dhcp_request_params dhcp_vendor_class_identifier ip mac org_id port_id site_id timestamp vlan ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
237 238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/mist_api/models/wired_client_response.rb', line 237 def inspect class_name = self.class.name.split('::').last "<#{class_name} auth_method: #{@auth_method.inspect}, auth_state: #{@auth_state.inspect},"\ " device_mac: #{@device_mac.inspect}, device_mac_port: #{@device_mac_port.inspect},"\ " dhcp_client_identifier: #{@dhcp_client_identifier.inspect}, dhcp_client_options:"\ " #{@dhcp_client_options.inspect}, dhcp_fqdn: #{@dhcp_fqdn.inspect}, dhcp_hostname:"\ " #{@dhcp_hostname.inspect}, dhcp_request_params: #{@dhcp_request_params.inspect},"\ " dhcp_vendor_class_identifier: #{@dhcp_vendor_class_identifier.inspect}, ip:"\ " #{@ip.inspect}, mac: #{@mac.inspect}, org_id: #{@org_id.inspect}, port_id:"\ " #{@port_id.inspect}, site_id: #{@site_id.inspect}, timestamp: #{@timestamp.inspect}, vlan:"\ " #{@vlan.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
225 226 227 228 229 230 231 232 233 234 |
# File 'lib/mist_api/models/wired_client_response.rb', line 225 def to_s class_name = self.class.name.split('::').last "<#{class_name} auth_method: #{@auth_method}, auth_state: #{@auth_state}, device_mac:"\ " #{@device_mac}, device_mac_port: #{@device_mac_port}, dhcp_client_identifier:"\ " #{@dhcp_client_identifier}, dhcp_client_options: #{@dhcp_client_options}, dhcp_fqdn:"\ " #{@dhcp_fqdn}, dhcp_hostname: #{@dhcp_hostname}, dhcp_request_params:"\ " #{@dhcp_request_params}, dhcp_vendor_class_identifier: #{@dhcp_vendor_class_identifier},"\ " ip: #{@ip}, mac: #{@mac}, org_id: #{@org_id}, port_id: #{@port_id}, site_id: #{@site_id},"\ " timestamp: #{@timestamp}, vlan: #{@vlan}>" end |