Class: MistApi::TunnelConfigNode
- Defined in:
- lib/mist_api/models/tunnel_config_node.rb
Overview
Only if ‘provider`==`zscaler-ipsec`, `provider`==`jse-ipsec` or `provider`==`custom-ipsec`
Instance Attribute Summary collapse
-
#hosts ⇒ Array[String]
TODO: Write general description for this method.
-
#internal_ips ⇒ Array[String]
Only if ‘provider`==`zscaler-gre`, `provider`==`jse-ipsec`, `provider`==`custom-ipsec` or `provider`==`custom-gre`.
-
#probe_ips ⇒ Array[String]
Only if ‘provider`==`zscaler-gre`, `provider`==`jse-ipsec`, `provider`==`custom-ipsec` or `provider`==`custom-gre`.
-
#remote_ids ⇒ Array[String]
Only if ‘provider`==`jse-ipsec` or `provider`==`custom-ipsec`.
-
#wan_names ⇒ Array[String]
Only if ‘provider`==`jse-ipsec` or `provider`==`custom-ipsec`.
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(hosts = nil, wan_names = nil, internal_ips = SKIP, probe_ips = SKIP, remote_ids = SKIP) ⇒ TunnelConfigNode
constructor
A new instance of TunnelConfigNode.
-
#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(hosts = nil, wan_names = nil, internal_ips = SKIP, probe_ips = SKIP, remote_ids = SKIP) ⇒ TunnelConfigNode
Returns a new instance of TunnelConfigNode.
60 61 62 63 64 65 66 67 |
# File 'lib/mist_api/models/tunnel_config_node.rb', line 60 def initialize(hosts = nil, wan_names = nil, internal_ips = SKIP, probe_ips = SKIP, remote_ids = SKIP) @hosts = hosts @internal_ips = internal_ips unless internal_ips == SKIP @probe_ips = probe_ips unless probe_ips == SKIP @remote_ids = remote_ids unless remote_ids == SKIP @wan_names = wan_names end |
Instance Attribute Details
#hosts ⇒ Array[String]
TODO: Write general description for this method
15 16 17 |
# File 'lib/mist_api/models/tunnel_config_node.rb', line 15 def hosts @hosts end |
#internal_ips ⇒ Array[String]
Only if ‘provider`==`zscaler-gre`, `provider`==`jse-ipsec`, `provider`==`custom-ipsec` or `provider`==`custom-gre`
20 21 22 |
# File 'lib/mist_api/models/tunnel_config_node.rb', line 20 def internal_ips @internal_ips end |
#probe_ips ⇒ Array[String]
Only if ‘provider`==`zscaler-gre`, `provider`==`jse-ipsec`, `provider`==`custom-ipsec` or `provider`==`custom-gre`
25 26 27 |
# File 'lib/mist_api/models/tunnel_config_node.rb', line 25 def probe_ips @probe_ips end |
#remote_ids ⇒ Array[String]
Only if ‘provider`==`jse-ipsec` or `provider`==`custom-ipsec`
29 30 31 |
# File 'lib/mist_api/models/tunnel_config_node.rb', line 29 def remote_ids @remote_ids end |
#wan_names ⇒ Array[String]
Only if ‘provider`==`jse-ipsec` or `provider`==`custom-ipsec`
33 34 35 |
# File 'lib/mist_api/models/tunnel_config_node.rb', line 33 def wan_names @wan_names end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/mist_api/models/tunnel_config_node.rb', line 70 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. hosts = hash.key?('hosts') ? hash['hosts'] : nil wan_names = hash.key?('wan_names') ? hash['wan_names'] : nil internal_ips = hash.key?('internal_ips') ? hash['internal_ips'] : SKIP probe_ips = hash.key?('probe_ips') ? hash['probe_ips'] : SKIP remote_ids = hash.key?('remote_ids') ? hash['remote_ids'] : SKIP # Create object from extracted values. TunnelConfigNode.new(hosts, wan_names, internal_ips, probe_ips, remote_ids) end |
.names ⇒ Object
A mapping from model property names to API property names.
36 37 38 39 40 41 42 43 44 |
# File 'lib/mist_api/models/tunnel_config_node.rb', line 36 def self.names @_hash = {} if @_hash.nil? @_hash['hosts'] = 'hosts' @_hash['internal_ips'] = 'internal_ips' @_hash['probe_ips'] = 'probe_ips' @_hash['remote_ids'] = 'remote_ids' @_hash['wan_names'] = 'wan_names' @_hash end |
.nullables ⇒ Object
An array for nullable fields
56 57 58 |
# File 'lib/mist_api/models/tunnel_config_node.rb', line 56 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
47 48 49 50 51 52 53 |
# File 'lib/mist_api/models/tunnel_config_node.rb', line 47 def self.optionals %w[ internal_ips probe_ips remote_ids ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
96 97 98 99 100 101 |
# File 'lib/mist_api/models/tunnel_config_node.rb', line 96 def inspect class_name = self.class.name.split('::').last "<#{class_name} hosts: #{@hosts.inspect}, internal_ips: #{@internal_ips.inspect},"\ " probe_ips: #{@probe_ips.inspect}, remote_ids: #{@remote_ids.inspect}, wan_names:"\ " #{@wan_names.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
89 90 91 92 93 |
# File 'lib/mist_api/models/tunnel_config_node.rb', line 89 def to_s class_name = self.class.name.split('::').last "<#{class_name} hosts: #{@hosts}, internal_ips: #{@internal_ips}, probe_ips: #{@probe_ips},"\ " remote_ids: #{@remote_ids}, wan_names: #{@wan_names}>" end |