lib/ionoscloud/models/datacenters.rb in ionoscloud-6.0.0.beta.4 vs lib/ionoscloud/models/datacenters.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,39 +13,53 @@
require 'date'
require 'time'
module Ionoscloud
class Datacenters
- # The resource's unique identifier
+
+ # The resource's unique identifier.
attr_accessor :id
- # The type of object that has been created
+
+ # The type of object that has been created.
attr_accessor :type
- # URL to the object representation (absolute path)
+
+ # URL to the object representation (absolute path).
attr_accessor :href
- # Array of items in that collection
+
+ # Array of items in that collection.
attr_accessor :items
- # the offset (if specified in the request)
+
+ # The offset (if specified in the request).
attr_accessor :offset
- # the limit (if specified in the request)
+
+ # The limit (if specified in the request).
attr_accessor :limit
+
attr_accessor :_links
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
+
:'id' => :'id',
+
:'type' => :'type',
+
:'href' => :'href',
+
:'items' => :'items',
+
:'offset' => :'offset',
+
:'limit' => :'limit',
+
:'_links' => :'_links'
}
end
# Returns all the JSON keys this model knows about
@@ -54,23 +68,37 @@
end
# Attribute type mapping.
def self.openapi_types
{
+
:'id' => :'String',
+
:'type' => :'Type',
+
:'href' => :'String',
+
:'items' => :'Array<Datacenter>',
+
:'offset' => :'Float',
+
:'limit' => :'Float',
+
:'_links' => :'PaginationLinks'
}
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
@@ -84,66 +112,92 @@
if (!self.class.attribute_map.key?(k.to_sym))
fail ArgumentError, "`#{k}` is not a valid attribute in `Ionoscloud::Datacenters`. 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?(:'id')
self.id = attributes[:'id']
end
+
if attributes.key?(:'type')
self.type = attributes[:'type']
end
+
if attributes.key?(:'href')
self.href = attributes[:'href']
end
- if attributes.key?(:'items')
- if (value = attributes[:'items']).is_a?(Array)
- self.items = value
- end
+
+ if attributes.key?(:'items') && (value = attributes[:'items']).is_a?(Array)
+ self.items = value
end
+
if attributes.key?(:'offset')
self.offset = attributes[:'offset']
end
+
if attributes.key?(:'limit')
self.limit = attributes[:'limit']
end
+
if attributes.key?(:'_links')
self._links = attributes[:'_links']
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
+
+
+
+
+
+
+
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?
+
+
+
+
+
+
+
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 &&
- id == o.id &&
- type == o.type &&
- href == o.href &&
- items == o.items &&
- offset == o.offset &&
- limit == o.limit &&
- _links == o._links
+ id == o.id &&
+ type == o.type &&
+ href == o.href &&
+ items == o.items &&
+ offset == o.offset &&
+ limit == o.limit &&
+ _links == o._links
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)