Class: MistApi::NetworkInternetAccessStaticNatProperty
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- MistApi::NetworkInternetAccessStaticNatProperty
- Defined in:
- lib/mist_api/models/network_internet_access_static_nat_property.rb
Overview
NetworkInternetAccessStaticNatProperty Model.
Instance Attribute Summary collapse
-
#internal_ip ⇒ String
The Static NAT destination IP Address.
-
#name ⇒ String
The Static NAT destination IP Address.
-
#wan_name ⇒ String
SRX Only.
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, wan_name = SKIP) ⇒ NetworkInternetAccessStaticNatProperty
constructor
A new instance of NetworkInternetAccessStaticNatProperty.
-
#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, wan_name = SKIP) ⇒ NetworkInternetAccessStaticNatProperty
Returns a new instance of NetworkInternetAccessStaticNatProperty.
50 51 52 53 54 |
# File 'lib/mist_api/models/network_internet_access_static_nat_property.rb', line 50 def initialize(internal_ip = SKIP, name = SKIP, wan_name = SKIP) @internal_ip = internal_ip unless internal_ip == SKIP @name = name unless name == SKIP @wan_name = wan_name unless wan_name == SKIP end |
Instance Attribute Details
#internal_ip ⇒ String
The Static NAT destination IP Address. Must be an IP Address (i.e. “192.168.70.3”) or a Variable (i.e. “{myvar}”)
15 16 17 |
# File 'lib/mist_api/models/network_internet_access_static_nat_property.rb', line 15 def internal_ip @internal_ip end |
#name ⇒ String
The Static NAT destination IP Address. Must be an IP Address (i.e. “192.168.70.3”) or a Variable (i.e. “{myvar}”)
20 21 22 |
# File 'lib/mist_api/models/network_internet_access_static_nat_property.rb', line 20 def name @name end |
#wan_name ⇒ String
SRX Only. If not set, we configure the nat policies against all WAN ports for simplicity. Can be a Variable (i.e. “{myvar}”)
25 26 27 |
# File 'lib/mist_api/models/network_internet_access_static_nat_property.rb', line 25 def wan_name @wan_name 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_internet_access_static_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 wan_name = hash.key?('wan_name') ? hash['wan_name'] : SKIP # Create object from extracted values. NetworkInternetAccessStaticNatProperty.new(internal_ip, name, wan_name) 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_internet_access_static_nat_property.rb', line 28 def self.names @_hash = {} if @_hash.nil? @_hash['internal_ip'] = 'internal_ip' @_hash['name'] = 'name' @_hash['wan_name'] = 'wan_name' @_hash end |
.nullables ⇒ Object
An array for nullable fields
46 47 48 |
# File 'lib/mist_api/models/network_internet_access_static_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_internet_access_static_nat_property.rb', line 37 def self.optionals %w[ internal_ip name wan_name ] 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_internet_access_static_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_internet_access_static_nat_property.rb', line 88 def inspect class_name = self.class.name.split('::').last "<#{class_name} internal_ip: #{@internal_ip.inspect}, name: #{@name.inspect}, wan_name:"\ " #{@wan_name.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
82 83 84 85 |
# File 'lib/mist_api/models/network_internet_access_static_nat_property.rb', line 82 def to_s class_name = self.class.name.split('::').last "<#{class_name} internal_ip: #{@internal_ip}, name: #{@name}, wan_name: #{@wan_name}>" end |