lib/ionoscloud/models/label_resources.rb in ionoscloud-6.1.1 vs lib/ionoscloud/models/label_resources.rb in ionoscloud-6.1.2
- old
+ new
@@ -14,36 +14,36 @@
require 'time'
module Ionoscloud
class LabelResources
- # A unique representation of the label as a resource collection.
- attr_accessor :id
+ attr_accessor :_links
- # The type of resource within a collection.
- attr_accessor :type
-
-
# URL to the collection representation (absolute path).
attr_accessor :href
+ # A unique representation of the label as a resource collection.
+ attr_accessor :id
+
+
# Array of items in the collection.
attr_accessor :items
- # The offset (if specified in the request).
- attr_accessor :offset
-
-
# The limit (if specified in the request).
attr_accessor :limit
- attr_accessor :_links
+ # The offset (if specified in the request).
+ attr_accessor :offset
+
+ # The type of resource within a collection.
+ attr_accessor :type
+
class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values
def initialize(datatype, allowable_values)
@@ -66,23 +66,23 @@
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
- :'id' => :'id',
+ :'_links' => :'_links',
- :'type' => :'type',
-
:'href' => :'href',
+ :'id' => :'id',
+
:'items' => :'items',
- :'offset' => :'offset',
-
:'limit' => :'limit',
- :'_links' => :'_links'
+ :'offset' => :'offset',
+
+ :'type' => :'type'
}
end
# Returns all the JSON keys this model knows about
def self.acceptable_attributes
@@ -91,23 +91,23 @@
# Attribute type mapping.
def self.openapi_types
{
- :'id' => :'String',
+ :'_links' => :'PaginationLinks',
- :'type' => :'String',
-
:'href' => :'String',
+ :'id' => :'String',
+
:'items' => :'Array<LabelResource>',
- :'offset' => :'Float',
-
:'limit' => :'Float',
- :'_links' => :'PaginationLinks'
+ :'offset' => :'Float',
+
+ :'type' => :'String'
}
end
# List of attributes with nullable: true
def self.openapi_nullable
@@ -136,42 +136,42 @@
end
h[k.to_sym] = v
}
- if attributes.key?(:'id')
- self.id = attributes[:'id']
+ if attributes.key?(:'_links')
+ self._links = attributes[:'_links']
end
- if attributes.key?(:'type')
- self.type = attributes[:'type']
+ if attributes.key?(:'href')
+ self.href = attributes[:'href']
end
- if attributes.key?(:'href')
- self.href = attributes[:'href']
+ if attributes.key?(:'id')
+ self.id = attributes[:'id']
end
if attributes.key?(:'items') && (value = attributes[:'items']).is_a?(Array)
self.items = value
end
- if attributes.key?(:'offset')
- self.offset = attributes[:'offset']
+ if attributes.key?(:'limit')
+ self.limit = attributes[:'limit']
end
- if attributes.key?(:'limit')
- self.limit = attributes[:'limit']
+ if attributes.key?(:'offset')
+ self.offset = attributes[:'offset']
end
- if attributes.key?(:'_links')
- self._links = attributes[:'_links']
+ 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
@@ -190,49 +190,49 @@
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
- type_validator = EnumAttributeValidator.new('String', ["collection"])
- return false unless type_validator.valid?(@type)
+ type_validator = EnumAttributeValidator.new('String', ["collection"])
+ return false unless type_validator.valid?(@type)
true
end
+
+
+
+
+
# Custom attribute writer method checking allowed values (enum).
# @param [Object] type Object to be assigned
def type=(type)
validator = EnumAttributeValidator.new('String', ["collection"])
unless validator.valid?(type)
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
end
@type = type
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 &&
+ _links == o._links &&
href == o.href &&
+ id == o.id &&
items == o.items &&
- offset == o.offset &&
limit == o.limit &&
- _links == o._links
+ offset == o.offset &&
+ type == o.type
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -240,10 +240,10 @@
end
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [id, type, href, items, offset, limit, _links].hash
+ [_links, href, id, items, limit, offset, type].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself