Class: MistApi::MxedgeTuntermIpConfig
- Defined in:
- lib/mist_api/models/mxedge_tunterm_ip_config.rb
Overview
IPconfiguration of the Mist Tunnel interface
Instance Attribute Summary collapse
-
#gateway ⇒ String
TODO: Write general description for this method.
-
#gateway6 ⇒ String
TODO: Write general description for this method.
-
#ip ⇒ String
Untagged VLAN.
-
#ip6 ⇒ String
Untagged VLAN.
-
#netmask ⇒ String
Untagged VLAN.
-
#netmask6 ⇒ String
Untagged VLAN.
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(gateway = nil, ip = nil, netmask = nil, gateway6 = SKIP, ip6 = SKIP, netmask6 = SKIP) ⇒ MxedgeTuntermIpConfig
constructor
A new instance of MxedgeTuntermIpConfig.
-
#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(gateway = nil, ip = nil, netmask = nil, gateway6 = SKIP, ip6 = SKIP, netmask6 = SKIP) ⇒ MxedgeTuntermIpConfig
Returns a new instance of MxedgeTuntermIpConfig.
62 63 64 65 66 67 68 69 70 |
# File 'lib/mist_api/models/mxedge_tunterm_ip_config.rb', line 62 def initialize(gateway = nil, ip = nil, netmask = nil, gateway6 = SKIP, ip6 = SKIP, netmask6 = SKIP) @gateway = gateway @gateway6 = gateway6 unless gateway6 == SKIP @ip = ip @ip6 = ip6 unless ip6 == SKIP @netmask = netmask @netmask6 = netmask6 unless netmask6 == SKIP end |
Instance Attribute Details
#gateway ⇒ String
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/mxedge_tunterm_ip_config.rb', line 14 def gateway @gateway end |
#gateway6 ⇒ String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/mxedge_tunterm_ip_config.rb', line 18 def gateway6 @gateway6 end |
#ip ⇒ String
Untagged VLAN
22 23 24 |
# File 'lib/mist_api/models/mxedge_tunterm_ip_config.rb', line 22 def ip @ip end |
#ip6 ⇒ String
Untagged VLAN
26 27 28 |
# File 'lib/mist_api/models/mxedge_tunterm_ip_config.rb', line 26 def ip6 @ip6 end |
#netmask ⇒ String
Untagged VLAN
30 31 32 |
# File 'lib/mist_api/models/mxedge_tunterm_ip_config.rb', line 30 def netmask @netmask end |
#netmask6 ⇒ String
Untagged VLAN
34 35 36 |
# File 'lib/mist_api/models/mxedge_tunterm_ip_config.rb', line 34 def netmask6 @netmask6 end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/mist_api/models/mxedge_tunterm_ip_config.rb', line 73 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. gateway = hash.key?('gateway') ? hash['gateway'] : nil ip = hash.key?('ip') ? hash['ip'] : nil netmask = hash.key?('netmask') ? hash['netmask'] : nil gateway6 = hash.key?('gateway6') ? hash['gateway6'] : SKIP ip6 = hash.key?('ip6') ? hash['ip6'] : SKIP netmask6 = hash.key?('netmask6') ? hash['netmask6'] : SKIP # Create object from extracted values. MxedgeTuntermIpConfig.new(gateway, ip, netmask, gateway6, ip6, netmask6) 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/mxedge_tunterm_ip_config.rb', line 37 def self.names @_hash = {} if @_hash.nil? @_hash['gateway'] = 'gateway' @_hash['gateway6'] = 'gateway6' @_hash['ip'] = 'ip' @_hash['ip6'] = 'ip6' @_hash['netmask'] = 'netmask' @_hash['netmask6'] = 'netmask6' @_hash end |
.nullables ⇒ Object
An array for nullable fields
58 59 60 |
# File 'lib/mist_api/models/mxedge_tunterm_ip_config.rb', line 58 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
49 50 51 52 53 54 55 |
# File 'lib/mist_api/models/mxedge_tunterm_ip_config.rb', line 49 def self.optionals %w[ gateway6 ip6 netmask6 ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
101 102 103 104 105 106 |
# File 'lib/mist_api/models/mxedge_tunterm_ip_config.rb', line 101 def inspect class_name = self.class.name.split('::').last "<#{class_name} gateway: #{@gateway.inspect}, gateway6: #{@gateway6.inspect}, ip:"\ " #{@ip.inspect}, ip6: #{@ip6.inspect}, netmask: #{@netmask.inspect}, netmask6:"\ " #{@netmask6.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
94 95 96 97 98 |
# File 'lib/mist_api/models/mxedge_tunterm_ip_config.rb', line 94 def to_s class_name = self.class.name.split('::').last "<#{class_name} gateway: #{@gateway}, gateway6: #{@gateway6}, ip: #{@ip}, ip6: #{@ip6},"\ " netmask: #{@netmask}, netmask6: #{@netmask6}>" end |