lib/cloudsmith-api/models/namespace.rb in cloudsmith-api-0.21.4 vs lib/cloudsmith-api/models/namespace.rb in cloudsmith-api-0.30.7
- old
+ new
@@ -14,39 +14,39 @@
module CloudsmithApi
class Namespace
#
- attr_accessor :slug
+ attr_accessor :name
#
- attr_accessor :type_name
+ attr_accessor :slug
#
- attr_accessor :name
+ attr_accessor :slug_perm
#
- attr_accessor :slug_perm
+ attr_accessor :type_name
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
- :'slug' => :'slug',
- :'type_name' => :'type_name',
:'name' => :'name',
- :'slug_perm' => :'slug_perm'
+ :'slug' => :'slug',
+ :'slug_perm' => :'slug_perm',
+ :'type_name' => :'type_name'
}
end
# Attribute type mapping.
def self.swagger_types
{
- :'slug' => :'String',
- :'type_name' => :'String',
:'name' => :'String',
- :'slug_perm' => :'String'
+ :'slug' => :'String',
+ :'slug_perm' => :'String',
+ :'type_name' => :'String'
}
end
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
@@ -54,26 +54,26 @@
return unless attributes.is_a?(Hash)
# convert string to symbol for hash key
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
- if attributes.has_key?(:'slug')
- self.slug = attributes[:'slug']
- end
-
- if attributes.has_key?(:'type_name')
- self.type_name = attributes[:'type_name']
- end
-
if attributes.has_key?(:'name')
self.name = attributes[:'name']
end
+ if attributes.has_key?(:'slug')
+ self.slug = attributes[:'slug']
+ end
+
if attributes.has_key?(:'slug_perm')
self.slug_perm = attributes[:'slug_perm']
end
+ if attributes.has_key?(:'type_name')
+ self.type_name = attributes[:'type_name']
+ end
+
end
# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properies with the reasons
def list_invalid_properties
@@ -90,14 +90,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 &&
- slug == o.slug &&
- type_name == o.type_name &&
name == o.name &&
- slug_perm == o.slug_perm
+ slug == o.slug &&
+ slug_perm == o.slug_perm &&
+ type_name == o.type_name
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -105,10 +105,10 @@
end
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
- [slug, type_name, name, slug_perm].hash
+ [name, slug, slug_perm, type_name].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself