Class: MistApi::DeviceGateway
- Defined in:
- lib/mist_api/models/device_gateway.rb
Overview
Device gateway
Instance Attribute Summary collapse
-
#additional_config_cmds ⇒ Array[String]
additional CLI commands to append to the generated Junos config.
-
#bgp_config ⇒ Hash[String, BgpConfig]
additional CLI commands to append to the generated Junos config.
-
#created_time ⇒ Float
When the object has been created, in epoch.
-
#deviceprofile_id ⇒ UUID | String
When the object has been created, in epoch.
-
#dhcpd_config ⇒ DhcpdConfig
When the object has been created, in epoch.
-
#dns_servers ⇒ Array[String]
Global dns settings.
-
#dns_suffix ⇒ Array[String]
Global dns settings.
-
#extra_routes ⇒ Hash[String, GatewayExtraRoute]
Property key is the destination CIDR (e.g. “10.0.0.0/8”), the destination Network name or a variable (e.g. “{myvar}”).
-
#extra_routes6 ⇒ Hash[String, GatewayExtraRoute]
Property key is the destination CIDR (e.g. “2a02:1234:420a:10c9::/64”), the destination Network name or a variable (e.g. “{myvar}”).
-
#for_site ⇒ TrueClass | FalseClass
Property key is the destination CIDR (e.g. “2a02:1234:420a:10c9::/64”), the destination Network name or a variable (e.g. “{myvar}”).
-
#gateway_mgmt ⇒ GatewayMgmt
Gateway Management settings.
-
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#idp_profiles ⇒ Hash[String, IdpProfile]
Property key is the profile name.
-
#image1_url ⇒ String
Property key is the profile name.
-
#image2_url ⇒ String
Property key is the profile name.
-
#image3_url ⇒ String
Property key is the profile name.
-
#ip_configs ⇒ Hash[String, GatewayIpConfigProperty]
Property key is the network name.
-
#mac ⇒ String
Device MAC address.
-
#managed ⇒ TrueClass | FalseClass
Whether the device is managed by Mist.
-
#map_id ⇒ UUID | String
Map where the device belongs to.
-
#mist_configured ⇒ TrueClass | FalseClass
whether the device can be configured by Mist or not.
-
#model ⇒ String
Device Model.
-
#modified_time ⇒ Float
When the object has been modified for the last time, in epoch.
-
#msp_id ⇒ UUID | String
When the object has been modified for the last time, in epoch.
-
#name ⇒ String
When the object has been modified for the last time, in epoch.
-
#networks ⇒ Array[Network]
When the object has been modified for the last time, in epoch.
-
#notes ⇒ String
When the object has been modified for the last time, in epoch.
-
#ntp_servers ⇒ Array[String]
When the object has been modified for the last time, in epoch.
-
#oob_ip_config ⇒ GatewayOobIpConfig
Out-of-band (vme/em0/fxp0) IP config.
-
#org_id ⇒ UUID | String
Out-of-band (vme/em0/fxp0) IP config.
-
#path_preferences ⇒ Hash[String, GatewayPathPreferences]
Property key is the path name.
-
#port_config ⇒ Hash[String, GatewayPortConfig]
Property key is the port name or range (e.g. “ge-0/0/0-10”).
-
#port_mirroring ⇒ GatewayPortMirroring
Property key is the port name or range (e.g. “ge-0/0/0-10”).
-
#router_id ⇒ String
Auto assigned if not set.
-
#routing_policies ⇒ Hash[String, GwRoutingPolicy]
Property key is the routing policy name.
-
#serial ⇒ String
Device Serial.
-
#service_policies ⇒ Array[ServicePolicy]
Device Serial.
-
#site_id ⇒ UUID | String
Device Serial.
-
#ssr_additional_config_cmds ⇒ Array[String]
additional CLI commands to append to the generated SSR config.
-
#tunnel_configs ⇒ Hash[String, TunnelConfig]
Property key is the tunnel name.
-
#tunnel_provider_options ⇒ TunnelProviderOptions
Property key is the tunnel name.
-
#type ⇒ String
readonly
Device Type.
-
#url_filtering_deny_msg ⇒ String
When a service policy denies a app_category, what message to show in user’s browser.
-
#vars ⇒ Hash[String, String]
Dictionary of name->value, the vars can then be used in Wlans.
-
#vrf_config ⇒ VrfConfig
Dictionary of name->value, the vars can then be used in Wlans.
-
#vrf_instances ⇒ Hash[String, GatewayVrfInstance]
Property key is the network name.
-
#x ⇒ Float
X in pixel.
-
#y ⇒ Float
Y in pixel.
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(additional_config_cmds = SKIP, bgp_config = SKIP, created_time = SKIP, deviceprofile_id = SKIP, dhcpd_config = SKIP, dns_servers = SKIP, dns_suffix = SKIP, extra_routes = SKIP, extra_routes6 = SKIP, for_site = SKIP, gateway_mgmt = SKIP, id = SKIP, idp_profiles = SKIP, image1_url = SKIP, image2_url = SKIP, image3_url = SKIP, ip_configs = SKIP, mac = SKIP, managed = SKIP, map_id = SKIP, mist_configured = SKIP, model = SKIP, modified_time = SKIP, msp_id = SKIP, name = SKIP, networks = SKIP, notes = SKIP, ntp_servers = SKIP, oob_ip_config = SKIP, org_id = SKIP, path_preferences = SKIP, port_config = SKIP, port_mirroring = SKIP, router_id = SKIP, routing_policies = SKIP, serial = SKIP, service_policies = SKIP, site_id = SKIP, tunnel_configs = SKIP, tunnel_provider_options = SKIP, url_filtering_deny_msg = 'Access to this URL Category has been blocked', vars = SKIP, vrf_config = SKIP, vrf_instances = SKIP, x = SKIP, y = SKIP, ssr_additional_config_cmds = SKIP, additional_properties = nil) ⇒ DeviceGateway
constructor
A new instance of DeviceGateway.
-
#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(additional_config_cmds = SKIP, bgp_config = SKIP, created_time = SKIP, deviceprofile_id = SKIP, dhcpd_config = SKIP, dns_servers = SKIP, dns_suffix = SKIP, extra_routes = SKIP, extra_routes6 = SKIP, for_site = SKIP, gateway_mgmt = SKIP, id = SKIP, idp_profiles = SKIP, image1_url = SKIP, image2_url = SKIP, image3_url = SKIP, ip_configs = SKIP, mac = SKIP, managed = SKIP, map_id = SKIP, mist_configured = SKIP, model = SKIP, modified_time = SKIP, msp_id = SKIP, name = SKIP, networks = SKIP, notes = SKIP, ntp_servers = SKIP, oob_ip_config = SKIP, org_id = SKIP, path_preferences = SKIP, port_config = SKIP, port_mirroring = SKIP, router_id = SKIP, routing_policies = SKIP, serial = SKIP, service_policies = SKIP, site_id = SKIP, tunnel_configs = SKIP, tunnel_provider_options = SKIP, url_filtering_deny_msg = 'Access to this URL Category has been blocked', vars = SKIP, vrf_config = SKIP, vrf_instances = SKIP, x = SKIP, y = SKIP, ssr_additional_config_cmds = SKIP, additional_properties = nil) ⇒ DeviceGateway
Returns a new instance of DeviceGateway.
333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 |
# File 'lib/mist_api/models/device_gateway.rb', line 333 def initialize( additional_config_cmds = SKIP, bgp_config = SKIP, created_time = SKIP, deviceprofile_id = SKIP, dhcpd_config = SKIP, dns_servers = SKIP, dns_suffix = SKIP, extra_routes = SKIP, extra_routes6 = SKIP, for_site = SKIP, gateway_mgmt = SKIP, id = SKIP, idp_profiles = SKIP, image1_url = SKIP, image2_url = SKIP, image3_url = SKIP, ip_configs = SKIP, mac = SKIP, managed = SKIP, map_id = SKIP, mist_configured = SKIP, model = SKIP, modified_time = SKIP, msp_id = SKIP, name = SKIP, networks = SKIP, notes = SKIP, ntp_servers = SKIP, oob_ip_config = SKIP, org_id = SKIP, path_preferences = SKIP, port_config = SKIP, port_mirroring = SKIP, router_id = SKIP, routing_policies = SKIP, serial = SKIP, service_policies = SKIP, site_id = SKIP, tunnel_configs = SKIP, = SKIP, url_filtering_deny_msg = 'Access to this URL Category has been blocked', vars = SKIP, vrf_config = SKIP, vrf_instances = SKIP, x = SKIP, y = SKIP, ssr_additional_config_cmds = SKIP, additional_properties = nil ) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @additional_config_cmds = additional_config_cmds unless additional_config_cmds == SKIP @bgp_config = bgp_config unless bgp_config == SKIP @created_time = created_time unless created_time == SKIP @deviceprofile_id = deviceprofile_id unless deviceprofile_id == SKIP @dhcpd_config = dhcpd_config unless dhcpd_config == SKIP @dns_servers = dns_servers unless dns_servers == SKIP @dns_suffix = dns_suffix unless dns_suffix == SKIP @extra_routes = extra_routes unless extra_routes == SKIP @extra_routes6 = extra_routes6 unless extra_routes6 == SKIP @for_site = for_site unless for_site == SKIP @gateway_mgmt = gateway_mgmt unless gateway_mgmt == SKIP @id = id unless id == SKIP @idp_profiles = idp_profiles unless idp_profiles == SKIP @image1_url = image1_url unless image1_url == SKIP @image2_url = image2_url unless image2_url == SKIP @image3_url = image3_url unless image3_url == SKIP @ip_configs = ip_configs unless ip_configs == SKIP @mac = mac unless mac == SKIP @managed = managed unless managed == SKIP @map_id = map_id unless map_id == SKIP @mist_configured = mist_configured unless mist_configured == SKIP @model = model unless model == SKIP @modified_time = modified_time unless modified_time == SKIP @msp_id = msp_id unless msp_id == SKIP @name = name unless name == SKIP @networks = networks unless networks == SKIP @notes = notes unless notes == SKIP @ntp_servers = ntp_servers unless ntp_servers == SKIP @oob_ip_config = oob_ip_config unless oob_ip_config == SKIP @org_id = org_id unless org_id == SKIP @path_preferences = path_preferences unless path_preferences == SKIP @port_config = port_config unless port_config == SKIP @port_mirroring = port_mirroring unless port_mirroring == SKIP @router_id = router_id unless router_id == SKIP @routing_policies = routing_policies unless routing_policies == SKIP @serial = serial unless serial == SKIP @service_policies = service_policies unless service_policies == SKIP @site_id = site_id unless site_id == SKIP @tunnel_configs = tunnel_configs unless tunnel_configs == SKIP @tunnel_provider_options = unless == SKIP @type = 'gateway' @url_filtering_deny_msg = url_filtering_deny_msg unless url_filtering_deny_msg == SKIP @vars = vars unless vars == SKIP @vrf_config = vrf_config unless vrf_config == SKIP @vrf_instances = vrf_instances unless vrf_instances == SKIP @x = x unless x == SKIP @y = y unless y == SKIP unless ssr_additional_config_cmds == SKIP @ssr_additional_config_cmds = ssr_additional_config_cmds end @additional_properties = additional_properties end |
Instance Attribute Details
#additional_config_cmds ⇒ Array[String]
additional CLI commands to append to the generated Junos config. Note: no check is done
15 16 17 |
# File 'lib/mist_api/models/device_gateway.rb', line 15 def additional_config_cmds @additional_config_cmds end |
#bgp_config ⇒ Hash[String, BgpConfig]
additional CLI commands to append to the generated Junos config. Note: no check is done
20 21 22 |
# File 'lib/mist_api/models/device_gateway.rb', line 20 def bgp_config @bgp_config end |
#created_time ⇒ Float
When the object has been created, in epoch
24 25 26 |
# File 'lib/mist_api/models/device_gateway.rb', line 24 def created_time @created_time end |
#deviceprofile_id ⇒ UUID | String
When the object has been created, in epoch
28 29 30 |
# File 'lib/mist_api/models/device_gateway.rb', line 28 def deviceprofile_id @deviceprofile_id end |
#dhcpd_config ⇒ DhcpdConfig
When the object has been created, in epoch
32 33 34 |
# File 'lib/mist_api/models/device_gateway.rb', line 32 def dhcpd_config @dhcpd_config end |
#dns_servers ⇒ Array[String]
Global dns settings. To keep compatibility, dns settings in ‘ip_config` and `oob_ip_config` will overwrite this setting
37 38 39 |
# File 'lib/mist_api/models/device_gateway.rb', line 37 def dns_servers @dns_servers end |
#dns_suffix ⇒ Array[String]
Global dns settings. To keep compatibility, dns settings in ‘ip_config` and `oob_ip_config` will overwrite this setting
42 43 44 |
# File 'lib/mist_api/models/device_gateway.rb', line 42 def dns_suffix @dns_suffix end |
#extra_routes ⇒ Hash[String, GatewayExtraRoute]
Property key is the destination CIDR (e.g. “10.0.0.0/8”), the destination Network name or a variable (e.g. “{myvar}”)
47 48 49 |
# File 'lib/mist_api/models/device_gateway.rb', line 47 def extra_routes @extra_routes end |
#extra_routes6 ⇒ Hash[String, GatewayExtraRoute]
Property key is the destination CIDR (e.g. “2a02:1234:420a:10c9::/64”), the destination Network name or a variable (e.g. “{myvar}”)
52 53 54 |
# File 'lib/mist_api/models/device_gateway.rb', line 52 def extra_routes6 @extra_routes6 end |
#for_site ⇒ TrueClass | FalseClass
Property key is the destination CIDR (e.g. “2a02:1234:420a:10c9::/64”), the destination Network name or a variable (e.g. “{myvar}”)
57 58 59 |
# File 'lib/mist_api/models/device_gateway.rb', line 57 def for_site @for_site end |
#gateway_mgmt ⇒ GatewayMgmt
Gateway Management settings
61 62 63 |
# File 'lib/mist_api/models/device_gateway.rb', line 61 def gateway_mgmt @gateway_mgmt end |
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
65 66 67 |
# File 'lib/mist_api/models/device_gateway.rb', line 65 def id @id end |
#idp_profiles ⇒ Hash[String, IdpProfile]
Property key is the profile name
69 70 71 |
# File 'lib/mist_api/models/device_gateway.rb', line 69 def idp_profiles @idp_profiles end |
#image1_url ⇒ String
Property key is the profile name
73 74 75 |
# File 'lib/mist_api/models/device_gateway.rb', line 73 def image1_url @image1_url end |
#image2_url ⇒ String
Property key is the profile name
77 78 79 |
# File 'lib/mist_api/models/device_gateway.rb', line 77 def image2_url @image2_url end |
#image3_url ⇒ String
Property key is the profile name
81 82 83 |
# File 'lib/mist_api/models/device_gateway.rb', line 81 def image3_url @image3_url end |
#ip_configs ⇒ Hash[String, GatewayIpConfigProperty]
Property key is the network name
85 86 87 |
# File 'lib/mist_api/models/device_gateway.rb', line 85 def ip_configs @ip_configs end |
#mac ⇒ String
Device MAC address
89 90 91 |
# File 'lib/mist_api/models/device_gateway.rb', line 89 def mac @mac end |
#managed ⇒ TrueClass | FalseClass
Whether the device is managed by Mist. Deprecated in favour of mist_configured.
94 95 96 |
# File 'lib/mist_api/models/device_gateway.rb', line 94 def managed @managed end |
#map_id ⇒ UUID | String
Map where the device belongs to
98 99 100 |
# File 'lib/mist_api/models/device_gateway.rb', line 98 def map_id @map_id end |
#mist_configured ⇒ TrueClass | FalseClass
whether the device can be configured by Mist or not. This deprecates ‘managed` for adopted devices.
103 104 105 |
# File 'lib/mist_api/models/device_gateway.rb', line 103 def mist_configured @mist_configured end |
#model ⇒ String
Device Model
107 108 109 |
# File 'lib/mist_api/models/device_gateway.rb', line 107 def model @model end |
#modified_time ⇒ Float
When the object has been modified for the last time, in epoch
111 112 113 |
# File 'lib/mist_api/models/device_gateway.rb', line 111 def modified_time @modified_time end |
#msp_id ⇒ UUID | String
When the object has been modified for the last time, in epoch
115 116 117 |
# File 'lib/mist_api/models/device_gateway.rb', line 115 def msp_id @msp_id end |
#name ⇒ String
When the object has been modified for the last time, in epoch
119 120 121 |
# File 'lib/mist_api/models/device_gateway.rb', line 119 def name @name end |
#networks ⇒ Array[Network]
When the object has been modified for the last time, in epoch
123 124 125 |
# File 'lib/mist_api/models/device_gateway.rb', line 123 def networks @networks end |
#notes ⇒ String
When the object has been modified for the last time, in epoch
127 128 129 |
# File 'lib/mist_api/models/device_gateway.rb', line 127 def notes @notes end |
#ntp_servers ⇒ Array[String]
When the object has been modified for the last time, in epoch
131 132 133 |
# File 'lib/mist_api/models/device_gateway.rb', line 131 def ntp_servers @ntp_servers end |
#oob_ip_config ⇒ GatewayOobIpConfig
Out-of-band (vme/em0/fxp0) IP config
135 136 137 |
# File 'lib/mist_api/models/device_gateway.rb', line 135 def oob_ip_config @oob_ip_config end |
#org_id ⇒ UUID | String
Out-of-band (vme/em0/fxp0) IP config
139 140 141 |
# File 'lib/mist_api/models/device_gateway.rb', line 139 def org_id @org_id end |
#path_preferences ⇒ Hash[String, GatewayPathPreferences]
Property key is the path name
143 144 145 |
# File 'lib/mist_api/models/device_gateway.rb', line 143 def path_preferences @path_preferences end |
#port_config ⇒ Hash[String, GatewayPortConfig]
Property key is the port name or range (e.g. “ge-0/0/0-10”)
147 148 149 |
# File 'lib/mist_api/models/device_gateway.rb', line 147 def port_config @port_config end |
#port_mirroring ⇒ GatewayPortMirroring
Property key is the port name or range (e.g. “ge-0/0/0-10”)
151 152 153 |
# File 'lib/mist_api/models/device_gateway.rb', line 151 def port_mirroring @port_mirroring end |
#router_id ⇒ String
Auto assigned if not set
155 156 157 |
# File 'lib/mist_api/models/device_gateway.rb', line 155 def router_id @router_id end |
#routing_policies ⇒ Hash[String, GwRoutingPolicy]
Property key is the routing policy name
159 160 161 |
# File 'lib/mist_api/models/device_gateway.rb', line 159 def routing_policies @routing_policies end |
#serial ⇒ String
Device Serial
163 164 165 |
# File 'lib/mist_api/models/device_gateway.rb', line 163 def serial @serial end |
#service_policies ⇒ Array[ServicePolicy]
Device Serial
167 168 169 |
# File 'lib/mist_api/models/device_gateway.rb', line 167 def service_policies @service_policies end |
#site_id ⇒ UUID | String
Device Serial
171 172 173 |
# File 'lib/mist_api/models/device_gateway.rb', line 171 def site_id @site_id end |
#ssr_additional_config_cmds ⇒ Array[String]
additional CLI commands to append to the generated SSR config. Note: no check is done
215 216 217 |
# File 'lib/mist_api/models/device_gateway.rb', line 215 def ssr_additional_config_cmds @ssr_additional_config_cmds end |
#tunnel_configs ⇒ Hash[String, TunnelConfig]
Property key is the tunnel name
175 176 177 |
# File 'lib/mist_api/models/device_gateway.rb', line 175 def tunnel_configs @tunnel_configs end |
#tunnel_provider_options ⇒ TunnelProviderOptions
Property key is the tunnel name
179 180 181 |
# File 'lib/mist_api/models/device_gateway.rb', line 179 def @tunnel_provider_options end |
#type ⇒ String (readonly)
Device Type. enum: ‘gateway`
183 184 185 |
# File 'lib/mist_api/models/device_gateway.rb', line 183 def type @type end |
#url_filtering_deny_msg ⇒ String
When a service policy denies a app_category, what message to show in user’s browser
188 189 190 |
# File 'lib/mist_api/models/device_gateway.rb', line 188 def url_filtering_deny_msg @url_filtering_deny_msg end |
#vars ⇒ Hash[String, String]
Dictionary of name->value, the vars can then be used in Wlans. This can overwrite those from Site Vars
193 194 195 |
# File 'lib/mist_api/models/device_gateway.rb', line 193 def vars @vars end |
#vrf_config ⇒ VrfConfig
Dictionary of name->value, the vars can then be used in Wlans. This can overwrite those from Site Vars
198 199 200 |
# File 'lib/mist_api/models/device_gateway.rb', line 198 def vrf_config @vrf_config end |
#vrf_instances ⇒ Hash[String, GatewayVrfInstance]
Property key is the network name
202 203 204 |
# File 'lib/mist_api/models/device_gateway.rb', line 202 def vrf_instances @vrf_instances end |
#x ⇒ Float
X in pixel
206 207 208 |
# File 'lib/mist_api/models/device_gateway.rb', line 206 def x @x end |
#y ⇒ Float
Y in pixel
210 211 212 |
# File 'lib/mist_api/models/device_gateway.rb', line 210 def y @y end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 |
# File 'lib/mist_api/models/device_gateway.rb', line 408 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. additional_config_cmds = hash.key?('additional_config_cmds') ? hash['additional_config_cmds'] : SKIP bgp_config = BgpConfig.from_hash(hash['bgp_config']) if hash['bgp_config'] bgp_config = SKIP unless hash.key?('bgp_config') created_time = hash.key?('created_time') ? hash['created_time'] : SKIP deviceprofile_id = hash.key?('deviceprofile_id') ? hash['deviceprofile_id'] : SKIP dhcpd_config = DhcpdConfig.from_hash(hash['dhcpd_config']) if hash['dhcpd_config'] dns_servers = hash.key?('dns_servers') ? hash['dns_servers'] : SKIP dns_suffix = hash.key?('dns_suffix') ? hash['dns_suffix'] : SKIP extra_routes = GatewayExtraRoute.from_hash(hash['extra_routes']) if hash['extra_routes'] extra_routes = SKIP unless hash.key?('extra_routes') extra_routes6 = GatewayExtraRoute.from_hash(hash['extra_routes6']) if hash['extra_routes6'] extra_routes6 = SKIP unless hash.key?('extra_routes6') for_site = hash.key?('for_site') ? hash['for_site'] : SKIP gateway_mgmt = GatewayMgmt.from_hash(hash['gateway_mgmt']) if hash['gateway_mgmt'] id = hash.key?('id') ? hash['id'] : SKIP idp_profiles = IdpProfile.from_hash(hash['idp_profiles']) if hash['idp_profiles'] idp_profiles = SKIP unless hash.key?('idp_profiles') image1_url = hash.key?('image1_url') ? hash['image1_url'] : SKIP image2_url = hash.key?('image2_url') ? hash['image2_url'] : SKIP image3_url = hash.key?('image3_url') ? hash['image3_url'] : SKIP ip_configs = GatewayIpConfigProperty.from_hash(hash['ip_configs']) if hash['ip_configs'] ip_configs = SKIP unless hash.key?('ip_configs') mac = hash.key?('mac') ? hash['mac'] : SKIP managed = hash.key?('managed') ? hash['managed'] : SKIP map_id = hash.key?('map_id') ? hash['map_id'] : SKIP mist_configured = hash.key?('mist_configured') ? hash['mist_configured'] : SKIP model = hash.key?('model') ? hash['model'] : SKIP modified_time = hash.key?('modified_time') ? hash['modified_time'] : SKIP msp_id = hash.key?('msp_id') ? hash['msp_id'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP # Parameter is an array, so we need to iterate through it networks = nil unless hash['networks'].nil? networks = [] hash['networks'].each do |structure| networks << (Network.from_hash(structure) if structure) end end networks = SKIP unless hash.key?('networks') notes = hash.key?('notes') ? hash['notes'] : SKIP ntp_servers = hash.key?('ntp_servers') ? hash['ntp_servers'] : SKIP oob_ip_config = GatewayOobIpConfig.from_hash(hash['oob_ip_config']) if hash['oob_ip_config'] org_id = hash.key?('org_id') ? hash['org_id'] : SKIP path_preferences = GatewayPathPreferences.from_hash(hash['path_preferences']) if hash['path_preferences'] path_preferences = SKIP unless hash.key?('path_preferences') port_config = GatewayPortConfig.from_hash(hash['port_config']) if hash['port_config'] port_config = SKIP unless hash.key?('port_config') port_mirroring = GatewayPortMirroring.from_hash(hash['port_mirroring']) if hash['port_mirroring'] router_id = hash.key?('router_id') ? hash['router_id'] : SKIP routing_policies = GwRoutingPolicy.from_hash(hash['routing_policies']) if hash['routing_policies'] routing_policies = SKIP unless hash.key?('routing_policies') serial = hash.key?('serial') ? hash['serial'] : SKIP # Parameter is an array, so we need to iterate through it service_policies = nil unless hash['service_policies'].nil? service_policies = [] hash['service_policies'].each do |structure| service_policies << (ServicePolicy.from_hash(structure) if structure) end end service_policies = SKIP unless hash.key?('service_policies') site_id = hash.key?('site_id') ? hash['site_id'] : SKIP tunnel_configs = TunnelConfig.from_hash(hash['tunnel_configs']) if hash['tunnel_configs'] tunnel_configs = SKIP unless hash.key?('tunnel_configs') = TunnelProviderOptions.from_hash(hash['tunnel_provider_options']) if hash['tunnel_provider_options'] url_filtering_deny_msg = hash['url_filtering_deny_msg'] ||= 'Access to this URL Category has been blocked' vars = hash.key?('vars') ? hash['vars'] : SKIP vrf_config = VrfConfig.from_hash(hash['vrf_config']) if hash['vrf_config'] vrf_instances = GatewayVrfInstance.from_hash(hash['vrf_instances']) if hash['vrf_instances'] vrf_instances = SKIP unless hash.key?('vrf_instances') x = hash.key?('x') ? hash['x'] : SKIP y = hash.key?('y') ? hash['y'] : SKIP ssr_additional_config_cmds = hash.key?('ssr_additional_config_cmds') ? hash['ssr_additional_config_cmds'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. DeviceGateway.new(additional_config_cmds, bgp_config, created_time, deviceprofile_id, dhcpd_config, dns_servers, dns_suffix, extra_routes, extra_routes6, for_site, gateway_mgmt, id, idp_profiles, image1_url, image2_url, image3_url, ip_configs, mac, managed, map_id, mist_configured, model, modified_time, msp_id, name, networks, notes, ntp_servers, oob_ip_config, org_id, path_preferences, port_config, port_mirroring, router_id, routing_policies, serial, service_policies, site_id, tunnel_configs, , url_filtering_deny_msg, vars, vrf_config, vrf_instances, x, y, ssr_additional_config_cmds, additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/mist_api/models/device_gateway.rb', line 218 def self.names @_hash = {} if @_hash.nil? @_hash['additional_config_cmds'] = 'additional_config_cmds' @_hash['bgp_config'] = 'bgp_config' @_hash['created_time'] = 'created_time' @_hash['deviceprofile_id'] = 'deviceprofile_id' @_hash['dhcpd_config'] = 'dhcpd_config' @_hash['dns_servers'] = 'dns_servers' @_hash['dns_suffix'] = 'dns_suffix' @_hash['extra_routes'] = 'extra_routes' @_hash['extra_routes6'] = 'extra_routes6' @_hash['for_site'] = 'for_site' @_hash['gateway_mgmt'] = 'gateway_mgmt' @_hash['id'] = 'id' @_hash['idp_profiles'] = 'idp_profiles' @_hash['image1_url'] = 'image1_url' @_hash['image2_url'] = 'image2_url' @_hash['image3_url'] = 'image3_url' @_hash['ip_configs'] = 'ip_configs' @_hash['mac'] = 'mac' @_hash['managed'] = 'managed' @_hash['map_id'] = 'map_id' @_hash['mist_configured'] = 'mist_configured' @_hash['model'] = 'model' @_hash['modified_time'] = 'modified_time' @_hash['msp_id'] = 'msp_id' @_hash['name'] = 'name' @_hash['networks'] = 'networks' @_hash['notes'] = 'notes' @_hash['ntp_servers'] = 'ntp_servers' @_hash['oob_ip_config'] = 'oob_ip_config' @_hash['org_id'] = 'org_id' @_hash['path_preferences'] = 'path_preferences' @_hash['port_config'] = 'port_config' @_hash['port_mirroring'] = 'port_mirroring' @_hash['router_id'] = 'router_id' @_hash['routing_policies'] = 'routing_policies' @_hash['serial'] = 'serial' @_hash['service_policies'] = 'service_policies' @_hash['site_id'] = 'site_id' @_hash['tunnel_configs'] = 'tunnel_configs' @_hash['tunnel_provider_options'] = 'tunnel_provider_options' @_hash['type'] = 'type' @_hash['url_filtering_deny_msg'] = 'url_filtering_deny_msg' @_hash['vars'] = 'vars' @_hash['vrf_config'] = 'vrf_config' @_hash['vrf_instances'] = 'vrf_instances' @_hash['x'] = 'x' @_hash['y'] = 'y' @_hash['ssr_additional_config_cmds'] = 'ssr_additional_config_cmds' @_hash end |
.nullables ⇒ Object
An array for nullable fields
325 326 327 328 329 330 331 |
# File 'lib/mist_api/models/device_gateway.rb', line 325 def self.nullables %w[ image1_url image2_url image3_url ] end |
.optionals ⇒ Object
An array for optional fields
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/mist_api/models/device_gateway.rb', line 272 def self.optionals %w[ additional_config_cmds bgp_config created_time deviceprofile_id dhcpd_config dns_servers dns_suffix extra_routes extra_routes6 for_site gateway_mgmt id idp_profiles image1_url image2_url image3_url ip_configs mac managed map_id mist_configured model modified_time msp_id name networks notes ntp_servers oob_ip_config org_id path_preferences port_config port_mirroring router_id routing_policies serial service_policies site_id tunnel_configs tunnel_provider_options url_filtering_deny_msg vars vrf_config vrf_instances x y ssr_additional_config_cmds ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 |
# File 'lib/mist_api/models/device_gateway.rb', line 589 def inspect class_name = self.class.name.split('::').last "<#{class_name} additional_config_cmds: #{@additional_config_cmds.inspect}, bgp_config:"\ " #{@bgp_config.inspect}, created_time: #{@created_time.inspect}, deviceprofile_id:"\ " #{@deviceprofile_id.inspect}, dhcpd_config: #{@dhcpd_config.inspect}, dns_servers:"\ " #{@dns_servers.inspect}, dns_suffix: #{@dns_suffix.inspect}, extra_routes:"\ " #{@extra_routes.inspect}, extra_routes6: #{@extra_routes6.inspect}, for_site:"\ " #{@for_site.inspect}, gateway_mgmt: #{@gateway_mgmt.inspect}, id: #{@id.inspect},"\ " idp_profiles: #{@idp_profiles.inspect}, image1_url: #{@image1_url.inspect}, image2_url:"\ " #{@image2_url.inspect}, image3_url: #{@image3_url.inspect}, ip_configs:"\ " #{@ip_configs.inspect}, mac: #{@mac.inspect}, managed: #{@managed.inspect}, map_id:"\ " #{@map_id.inspect}, mist_configured: #{@mist_configured.inspect}, model:"\ " #{@model.inspect}, modified_time: #{@modified_time.inspect}, msp_id: #{@msp_id.inspect},"\ " name: #{@name.inspect}, networks: #{@networks.inspect}, notes: #{@notes.inspect},"\ " ntp_servers: #{@ntp_servers.inspect}, oob_ip_config: #{@oob_ip_config.inspect}, org_id:"\ " #{@org_id.inspect}, path_preferences: #{@path_preferences.inspect}, port_config:"\ " #{@port_config.inspect}, port_mirroring: #{@port_mirroring.inspect}, router_id:"\ " #{@router_id.inspect}, routing_policies: #{@routing_policies.inspect}, serial:"\ " #{@serial.inspect}, service_policies: #{@service_policies.inspect}, site_id:"\ " #{@site_id.inspect}, tunnel_configs: #{@tunnel_configs.inspect}, tunnel_provider_options:"\ " #{@tunnel_provider_options.inspect}, type: #{@type.inspect}, url_filtering_deny_msg:"\ " #{@url_filtering_deny_msg.inspect}, vars: #{@vars.inspect}, vrf_config:"\ " #{@vrf_config.inspect}, vrf_instances: #{@vrf_instances.inspect}, x: #{@x.inspect}, y:"\ " #{@y.inspect}, ssr_additional_config_cmds: #{@ssr_additional_config_cmds.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 |
# File 'lib/mist_api/models/device_gateway.rb', line 566 def to_s class_name = self.class.name.split('::').last "<#{class_name} additional_config_cmds: #{@additional_config_cmds}, bgp_config:"\ " #{@bgp_config}, created_time: #{@created_time}, deviceprofile_id: #{@deviceprofile_id},"\ " dhcpd_config: #{@dhcpd_config}, dns_servers: #{@dns_servers}, dns_suffix: #{@dns_suffix},"\ " extra_routes: #{@extra_routes}, extra_routes6: #{@extra_routes6}, for_site: #{@for_site},"\ " gateway_mgmt: #{@gateway_mgmt}, id: #{@id}, idp_profiles: #{@idp_profiles}, image1_url:"\ " #{@image1_url}, image2_url: #{@image2_url}, image3_url: #{@image3_url}, ip_configs:"\ " #{@ip_configs}, mac: #{@mac}, managed: #{@managed}, map_id: #{@map_id}, mist_configured:"\ " #{@mist_configured}, model: #{@model}, modified_time: #{@modified_time}, msp_id:"\ " #{@msp_id}, name: #{@name}, networks: #{@networks}, notes: #{@notes}, ntp_servers:"\ " #{@ntp_servers}, oob_ip_config: #{@oob_ip_config}, org_id: #{@org_id}, path_preferences:"\ " #{@path_preferences}, port_config: #{@port_config}, port_mirroring: #{@port_mirroring},"\ " router_id: #{@router_id}, routing_policies: #{@routing_policies}, serial: #{@serial},"\ " service_policies: #{@service_policies}, site_id: #{@site_id}, tunnel_configs:"\ " #{@tunnel_configs}, tunnel_provider_options: #{@tunnel_provider_options}, type: #{@type},"\ " url_filtering_deny_msg: #{@url_filtering_deny_msg}, vars: #{@vars}, vrf_config:"\ " #{@vrf_config}, vrf_instances: #{@vrf_instances}, x: #{@x}, y: #{@y},"\ " ssr_additional_config_cmds: #{@ssr_additional_config_cmds}, additional_properties:"\ " #{@additional_properties}>" end |