lib/cloudsmith-api/models/files_create.rb in cloudsmith-api-0.30.7 vs lib/cloudsmith-api/models/files_create.rb in cloudsmith-api-0.44.4

- old
+ new

@@ -16,27 +16,37 @@ class FilesCreate # Filename for the package file upload. attr_accessor :filename - # MD5 checksum for the package file upload. + # MD5 checksum for a POST-based package file upload. attr_accessor :md5_checksum + # The method to use for package file upload. + attr_accessor :method + # SHA256 checksum for a PUT-based package file upload. + attr_accessor :sha256_checksum + + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'filename' => :'filename', - :'md5_checksum' => :'md5_checksum' + :'md5_checksum' => :'md5_checksum', + :'method' => :'method', + :'sha256_checksum' => :'sha256_checksum' } end # Attribute type mapping. def self.swagger_types { :'filename' => :'String', - :'md5_checksum' => :'String' + :'md5_checksum' => :'String', + :'method' => :'String', + :'sha256_checksum' => :'String' } end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash @@ -52,42 +62,47 @@ if attributes.has_key?(:'md5_checksum') self.md5_checksum = attributes[:'md5_checksum'] end + if attributes.has_key?(:'method') + self.method = attributes[:'method'] + end + + if attributes.has_key?(:'sha256_checksum') + self.sha256_checksum = attributes[:'sha256_checksum'] + 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 invalid_properties = Array.new if @filename.nil? invalid_properties.push("invalid value for 'filename', filename cannot be nil.") end - if @md5_checksum.nil? - invalid_properties.push("invalid value for 'md5_checksum', md5_checksum cannot be nil.") - end - return 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? return false if @filename.nil? - return false if @md5_checksum.nil? return 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 && filename == o.filename && - md5_checksum == o.md5_checksum + md5_checksum == o.md5_checksum && + method == o.method && + sha256_checksum == o.sha256_checksum end # @see the `==` method # @param [Object] Object to be compared def eql?(o) @@ -95,10 +110,10 @@ end # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [filename, md5_checksum].hash + [filename, md5_checksum, method, sha256_checksum].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself