lib/cloudsmith-api/models/packages_move.rb in cloudsmith-api-0.30.7 vs lib/cloudsmith-api/models/packages_move.rb in cloudsmith-api-0.44.4
- old
+ new
@@ -16,22 +16,27 @@
class PackagesMove
# None
attr_accessor :destination
+ # If true, the uploaded package will overwrite any others with the same attributes (e.g. same version); otherwise, it will be flagged as a duplicate.
+ attr_accessor :republish
+
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
- :'destination' => :'destination'
+ :'destination' => :'destination',
+ :'republish' => :'republish'
}
end
# Attribute type mapping.
def self.swagger_types
{
- :'destination' => :'String'
+ :'destination' => :'String',
+ :'republish' => :'BOOLEAN'
}
end
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
@@ -43,10 +48,14 @@
if attributes.has_key?(:'destination')
self.destination = attributes[:'destination']
end
+ if attributes.has_key?(:'republish')
+ self.republish = attributes[:'republish']
+ 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
@@ -68,11 +77,12 @@
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
- destination == o.destination
+ destination == o.destination &&
+ republish == o.republish
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -80,10 +90,10 @@
end
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
- [destination].hash
+ [destination, republish].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself