Class: MistApi::MxtunnelIpsec
- Defined in:
- lib/mist_api/models/mxtunnel_ipsec.rb
Overview
MxtunnelIpsec Model.
Instance Attribute Summary collapse
-
#dns_servers ⇒ Array[String]
TODO: Write general description for this method.
-
#dns_suffix ⇒ Array[String]
TODO: Write general description for this method.
-
#enabled ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#extra_routes ⇒ Array[MxtunnelIpsecExtraRoute]
TODO: Write general description for this method.
-
#split_tunnel ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#use_mxedge ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
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(dns_servers = SKIP, dns_suffix = SKIP, enabled = SKIP, extra_routes = SKIP, split_tunnel = SKIP, use_mxedge = SKIP) ⇒ MxtunnelIpsec
constructor
A new instance of MxtunnelIpsec.
-
#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(dns_servers = SKIP, dns_suffix = SKIP, enabled = SKIP, extra_routes = SKIP, split_tunnel = SKIP, use_mxedge = SKIP) ⇒ MxtunnelIpsec
Returns a new instance of MxtunnelIpsec.
67 68 69 70 71 72 73 74 75 |
# File 'lib/mist_api/models/mxtunnel_ipsec.rb', line 67 def initialize(dns_servers = SKIP, dns_suffix = SKIP, enabled = SKIP, extra_routes = SKIP, split_tunnel = SKIP, use_mxedge = SKIP) @dns_servers = dns_servers unless dns_servers == SKIP @dns_suffix = dns_suffix unless dns_suffix == SKIP @enabled = enabled unless enabled == SKIP @extra_routes = extra_routes unless extra_routes == SKIP @split_tunnel = split_tunnel unless split_tunnel == SKIP @use_mxedge = use_mxedge unless use_mxedge == SKIP end |
Instance Attribute Details
#dns_servers ⇒ Array[String]
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/mxtunnel_ipsec.rb', line 14 def dns_servers @dns_servers end |
#dns_suffix ⇒ Array[String]
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/mxtunnel_ipsec.rb', line 18 def dns_suffix @dns_suffix end |
#enabled ⇒ TrueClass | FalseClass
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/mxtunnel_ipsec.rb', line 22 def enabled @enabled end |
#extra_routes ⇒ Array[MxtunnelIpsecExtraRoute]
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/mxtunnel_ipsec.rb', line 26 def extra_routes @extra_routes end |
#split_tunnel ⇒ TrueClass | FalseClass
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/mxtunnel_ipsec.rb', line 30 def split_tunnel @split_tunnel end |
#use_mxedge ⇒ TrueClass | FalseClass
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/mxtunnel_ipsec.rb', line 34 def use_mxedge @use_mxedge end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/mist_api/models/mxtunnel_ipsec.rb', line 78 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. dns_servers = hash.key?('dns_servers') ? hash['dns_servers'] : SKIP dns_suffix = hash.key?('dns_suffix') ? hash['dns_suffix'] : SKIP enabled = hash.key?('enabled') ? hash['enabled'] : SKIP # Parameter is an array, so we need to iterate through it extra_routes = nil unless hash['extra_routes'].nil? extra_routes = [] hash['extra_routes'].each do |structure| extra_routes << (MxtunnelIpsecExtraRoute.from_hash(structure) if structure) end end extra_routes = SKIP unless hash.key?('extra_routes') split_tunnel = hash.key?('split_tunnel') ? hash['split_tunnel'] : SKIP use_mxedge = hash.key?('use_mxedge') ? hash['use_mxedge'] : SKIP # Create object from extracted values. MxtunnelIpsec.new(dns_servers, dns_suffix, enabled, extra_routes, split_tunnel, use_mxedge) end |
.names ⇒ Object
A mapping from model property names to API property names.
37 38 39 40 41 42 43 44 45 46 |
# File 'lib/mist_api/models/mxtunnel_ipsec.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['dns_servers'] = 'dns_servers' @_hash['dns_suffix'] = 'dns_suffix' @_hash['enabled'] = 'enabled' @_hash['extra_routes'] = 'extra_routes' @_hash['split_tunnel'] = 'split_tunnel' @_hash['use_mxedge'] = 'use_mxedge' @_hash end |
.nullables ⇒ Object
An array for nullable fields
61 62 63 64 65 |
# File 'lib/mist_api/models/mxtunnel_ipsec.rb', line 61 def self.nullables %w[ dns_servers ] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 56 57 58 |
# File 'lib/mist_api/models/mxtunnel_ipsec.rb', line 49 def self.optionals %w[ dns_servers dns_suffix enabled extra_routes split_tunnel use_mxedge ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
116 117 118 119 120 121 |
# File 'lib/mist_api/models/mxtunnel_ipsec.rb', line 116 def inspect class_name = self.class.name.split('::').last "<#{class_name} dns_servers: #{@dns_servers.inspect}, dns_suffix: #{@dns_suffix.inspect},"\ " enabled: #{@enabled.inspect}, extra_routes: #{@extra_routes.inspect}, split_tunnel:"\ " #{@split_tunnel.inspect}, use_mxedge: #{@use_mxedge.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
108 109 110 111 112 113 |
# File 'lib/mist_api/models/mxtunnel_ipsec.rb', line 108 def to_s class_name = self.class.name.split('::').last "<#{class_name} dns_servers: #{@dns_servers}, dns_suffix: #{@dns_suffix}, enabled:"\ " #{@enabled}, extra_routes: #{@extra_routes}, split_tunnel: #{@split_tunnel}, use_mxedge:"\ " #{@use_mxedge}>" end |