lib/ionoscloud/models/snapshots.rb in ionoscloud-6.1.1 vs lib/ionoscloud/models/snapshots.rb in ionoscloud-6.1.2
- old
+ new
@@ -14,36 +14,36 @@
require 'time'
module Ionoscloud
class Snapshots
- # The resource's unique identifier.
- attr_accessor :id
-
-
- # The type of object that has been created.
- attr_accessor :type
-
-
# URL to the object representation (absolute path).
attr_accessor :href
+ # The resource's unique identifier.
+ attr_accessor :id
+
+
# Array of items in the collection.
attr_accessor :items
+
+ # The type of object that has been created.
+ attr_accessor :type
+
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
+ :'href' => :'href',
+
:'id' => :'id',
- :'type' => :'type',
+ :'items' => :'items',
- :'href' => :'href',
-
- :'items' => :'items'
+ :'type' => :'type'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
@@ -52,17 +52,17 @@
# Attribute type mapping.
def self.openapi_types
{
+ :'href' => :'String',
+
:'id' => :'String',
- :'type' => :'Type',
+ :'items' => :'Array<Snapshot>',
- :'href' => :'String',
-
- :'items' => :'Array<Snapshot>'
+ :'type' => :'Type'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
@@ -88,27 +88,27 @@
end
h[k.to_sym] = v
}
- if attributes.key?(:'id')
- self.id = attributes[:'id']
+ if attributes.key?(:'href')
+ self.href = attributes[:'href']
end
- if attributes.key?(:'type')
- self.type = attributes[:'type']
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
end
- if attributes.key?(:'href')
- self.href = attributes[:'href']
+ if attributes.key?(:'items') && (value = attributes[:'items']).is_a?(Array)
+ self.items = value
end
- if attributes.key?(:'items') && (value = attributes[:'items']).is_a?(Array)
- self.items = value
+ if attributes.key?(:'type')
+ self.type = attributes[:'type']
end
end
# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properties with the reasons
@@ -138,14 +138,14 @@
# 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
+ id == o.id &&
+ items == o.items &&
+ type == o.type
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -153,10 +153,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [id, type, href, items].hash
+ [href, id, items, type].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself