lib/ionoscloud/models/nat_gateway_properties.rb in ionoscloud-6.0.0.beta.4 vs lib/ionoscloud/models/nat_gateway_properties.rb in ionoscloud-6.0.0
- old
+ new
@@ -1,11 +1,11 @@
=begin
#CLOUD API
#IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and flexibility, and can be used to perform a multitude of management tasks, including adding servers, volumes, configuring networks, and so on.
-The version of the OpenAPI document: 6.0-SDK.3
+The version of the OpenAPI document: 6.0
Generated by: https://openapi-generator.tech
OpenAPI Generator version: 5.2.1-SNAPSHOT
=end
@@ -13,24 +13,30 @@
require 'date'
require 'time'
module Ionoscloud
class NatGatewayProperties
- # Name of the NAT gateway
+
+ # 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
+
+ # 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 valid subnet mask. If user will not provide any IP then system will generate an IP with /24 subnet.
+
+ # Collection of LANs connected to the NAT Gateway. IPs must contain valid subnet mask. If user will not provide any IP then 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
{
+
:'name' => :'name',
+
:'public_ips' => :'publicIps',
+
:'lans' => :'lans'
}
end
# Returns all the JSON keys this model knows about
@@ -39,19 +45,25 @@
end
# Attribute type mapping.
def self.openapi_types
{
+
:'name' => :'String',
+
:'public_ips' => :'Array<String>',
+
:'lans' => :'Array<NatGatewayLanProperties>'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
Set.new([
+
+
+
])
end
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
@@ -65,58 +77,66 @@
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::NatGatewayProperties`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
end
h[k.to_sym] = v
}
+
if attributes.key?(:'name')
self.name = attributes[:'name']
end
- if attributes.key?(:'public_ips')
- if (value = attributes[:'public_ips']).is_a?(Array)
- self.public_ips = value
- end
+
+ if attributes.key?(:'public_ips') && (value = attributes[:'public_ips']).is_a?(Array)
+ self.public_ips = value
end
- if attributes.key?(:'lans')
- if (value = attributes[:'lans']).is_a?(Array)
- self.lans = 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
+
+
+
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
- name == o.name &&
- public_ips == o.public_ips &&
- lans == o.lans
+ name == o.name &&
+ public_ips == o.public_ips &&
+ lans == o.lans
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)