lib/ionoscloud/models/nat_gateway_properties.rb in ionoscloud-6.1.1 vs lib/ionoscloud/models/nat_gateway_properties.rb in ionoscloud-6.1.2
- old
+ new
@@ -14,30 +14,30 @@
require 'time'
module Ionoscloud
class NatGatewayProperties
+ # Collection of LANs connected to the NAT Gateway. IPs must contain a valid subnet mask. If no IP is provided, the system will generate an IP with /24 subnet.
+ attr_accessor :lans
+
+
# Name of the NAT Gateway.
attr_accessor :name
# Collection of public IP addresses of the NAT Gateway. Should be customer reserved IP addresses in that location.
attr_accessor :public_ips
-
- # Collection of LANs connected to the NAT Gateway. IPs must contain a valid subnet mask. If no IP is provided, the system will generate an IP with /24 subnet.
- attr_accessor :lans
-
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
+ :'lans' => :'lans',
+
:'name' => :'name',
- :'public_ips' => :'publicIps',
-
- :'lans' => :'lans'
+ :'public_ips' => :'publicIps'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
@@ -46,15 +46,15 @@
# Attribute type mapping.
def self.openapi_types
{
+ :'lans' => :'Array<NatGatewayLanProperties>',
+
:'name' => :'String',
- :'public_ips' => :'Array<String>',
-
- :'lans' => :'Array<NatGatewayLanProperties>'
+ :'public_ips' => :'Array<String>'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
@@ -79,51 +79,51 @@
end
h[k.to_sym] = v
}
+ if attributes.key?(:'lans') && (value = attributes[:'lans']).is_a?(Array)
+ self.lans = value
+ end
+
+
if attributes.key?(:'name')
self.name = attributes[:'name']
end
if attributes.key?(:'public_ips') && (value = attributes[:'public_ips']).is_a?(Array)
self.public_ips = value
end
-
-
- if attributes.key?(:'lans') && (value = attributes[:'lans']).is_a?(Array)
- self.lans = value
- end
end
# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properties with the reasons
def list_invalid_properties
invalid_properties = Array.new
+
if @name.nil?
invalid_properties.push('invalid value for "name", name cannot be nil.')
end
if @public_ips.nil?
invalid_properties.push('invalid value for "public_ips", public_ips cannot be nil.')
end
-
invalid_properties
end
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
+
return false if @name.nil?
return false if @public_ips.nil?
-
true
end
@@ -131,13 +131,13 @@
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
+ lans == o.lans &&
name == o.name &&
- public_ips == o.public_ips &&
- lans == o.lans
+ public_ips == o.public_ips
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -145,10 +145,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [name, public_ips, lans].hash
+ [lans, name, public_ips].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself