lib/ionoscloud/models/ip_block_properties.rb in ionoscloud-5.1.2 vs lib/ionoscloud/models/ip_block_properties.rb in ionoscloud-6.0.0.beta.1

- old
+ new

@@ -1,54 +1,44 @@ =begin #CLOUD API #An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to perform a variety of management tasks such as spinning up additional servers, adding volumes, adjusting networking, and so forth. It is designed to allow users to leverage the same power and flexibility found within the DCD visual tool. Both tools are consistent with their concepts and lend well to making the experience smooth and intuitive. -The version of the OpenAPI document: 5.0 +The version of the OpenAPI document: 6.0 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.2.1-SNAPSHOT +OpenAPI Generator version: 5.0.1-SNAPSHOT =end require 'date' require 'time' module Ionoscloud class IpBlockProperties - # A collection of IPs associated with the IP Block attr_accessor :ips - # Location of that IP Block. Property cannot be modified after creation (disallowed in update requests) attr_accessor :location - # The size of the IP block attr_accessor :size - # A name of that resource attr_accessor :name - # Read-Only attribute. Lists consumption detail of an individual ip attr_accessor :ip_consumers # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'ips' => :'ips', - :'location' => :'location', - :'size' => :'size', - :'name' => :'name', - :'ip_consumers' => :'ipConsumers' } end # Returns all the JSON keys this model knows about @@ -57,31 +47,21 @@ end # Attribute type mapping. def self.openapi_types { - :'ips' => :'Array<String>', - :'location' => :'String', - :'size' => :'Integer', - :'name' => :'String', - :'ip_consumers' => :'Array<IpConsumer>' } 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 @@ -95,85 +75,69 @@ if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::IpBlockProperties`. 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?(:'ips') && (value = attributes[:'ips']).is_a?(Array) - self.ips = value + if attributes.key?(:'ips') + if (value = attributes[:'ips']).is_a?(Array) + self.ips = value + end end - if attributes.key?(:'location') self.location = attributes[:'location'] end - if attributes.key?(:'size') self.size = attributes[:'size'] end - if attributes.key?(:'name') self.name = attributes[:'name'] end - - if attributes.key?(:'ip_consumers') && (value = attributes[:'ip_consumers']).is_a?(Array) - self.ip_consumers = value + if attributes.key?(:'ip_consumers') + if (value = attributes[:'ip_consumers']).is_a?(Array) + self.ip_consumers = value + end 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 @location.nil? invalid_properties.push('invalid value for "location", location cannot be nil.') end - if @size.nil? invalid_properties.push('invalid value for "size", size 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 @location.nil? - return false if @size.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 && - ips == o.ips && - location == o.location && - size == o.size && - name == o.name && - ip_consumers == o.ip_consumers + ips == o.ips && + location == o.location && + size == o.size && + name == o.name && + ip_consumers == o.ip_consumers end # @see the `==` method # @param [Object] Object to be compared def eql?(o) @@ -301,9 +265,7 @@ value.to_hash else value end end - end - end