Class: MistApi::NetworkVpnAccessDestinationNatProperty
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::NetworkVpnAccessDestinationNatProperty
- Defined in:
- lib/mist_api/models/network_vpn_access_destination_nat_property.rb
Overview
NetworkVpnAccessDestinationNatProperty Model.
Instance Attribute Summary collapse
-
#internal_ip ⇒ String
The Destination NAT destination IP Address.
-
#name ⇒ String
The Destination NAT destination IP Address.
-
#port ⇒ String
The Destination NAT destination IP Address.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(internal_ip = SKIP, name = SKIP, port = SKIP) ⇒ NetworkVpnAccessDestinationNatProperty
constructor
A new instance of NetworkVpnAccessDestinationNatProperty.
-
#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(internal_ip = SKIP, name = SKIP, port = SKIP) ⇒ NetworkVpnAccessDestinationNatProperty
Returns a new instance of NetworkVpnAccessDestinationNatProperty.
50 51 52 53 54 |
# File 'lib/mist_api/models/network_vpn_access_destination_nat_property.rb', line 50 def initialize(internal_ip = SKIP, name = SKIP, port = SKIP) @internal_ip = internal_ip unless internal_ip == SKIP @name = name unless name == SKIP @port = port unless port == SKIP end |
Instance Attribute Details
#internal_ip ⇒ String
The Destination NAT destination IP Address. Must be an IP (i.e. “192.168.70.30”) or a Variable (i.e. “{myvar}”)
15 16 17 |
# File 'lib/mist_api/models/network_vpn_access_destination_nat_property.rb', line 15 def internal_ip @internal_ip end |
#name ⇒ String
The Destination NAT destination IP Address. Must be an IP (i.e. “192.168.70.30”) or a Variable (i.e. “{myvar}”)
20 21 22 |
# File 'lib/mist_api/models/network_vpn_access_destination_nat_property.rb', line 20 def name @name end |
#port ⇒ String
The Destination NAT destination IP Address. Must be an IP (i.e. “192.168.70.30”) or a Variable (i.e. “{myvar}”)
25 26 27 |
# File 'lib/mist_api/models/network_vpn_access_destination_nat_property.rb', line 25 def port @port end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
57 58 59 60 61 62 63 64 65 66 67 68 69 |
# File 'lib/mist_api/models/network_vpn_access_destination_nat_property.rb', line 57 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. internal_ip = hash.key?('internal_ip') ? hash['internal_ip'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP port = hash.key?('port') ? hash['port'] : SKIP # Create object from extracted values. NetworkVpnAccessDestinationNatProperty.new(internal_ip, name, port) end |
.names ⇒ Object
A mapping from model property names to API property names.
28 29 30 31 32 33 34 |
# File 'lib/mist_api/models/network_vpn_access_destination_nat_property.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['internal_ip'] = 'internal_ip' @_hash['name'] = 'name' @_hash['port'] = 'port' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 |
# File 'lib/mist_api/models/network_vpn_access_destination_nat_property.rb', line 46 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
37 38 39 40 41 42 43 |
# File 'lib/mist_api/models/network_vpn_access_destination_nat_property.rb', line 37 def self.optionals %w[ internal_ip name port ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
73 74 75 76 77 78 79 |
# File 'lib/mist_api/models/network_vpn_access_destination_nat_property.rb', line 73 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
88 89 90 91 92 |
# File 'lib/mist_api/models/network_vpn_access_destination_nat_property.rb', line 88 def inspect class_name = self.class.name.split('::').last "<#{class_name} internal_ip: #{@internal_ip.inspect}, name: #{@name.inspect}, port:"\ " #{@port.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
82 83 84 85 |
# File 'lib/mist_api/models/network_vpn_access_destination_nat_property.rb', line 82 def to_s class_name = self.class.name.split('::').last "<#{class_name} internal_ip: #{@internal_ip}, name: #{@name}, port: #{@port}>" end |