lib/cloudsmith-api/models/repository.rb in cloudsmith-api-0.21.4 vs lib/cloudsmith-api/models/repository.rb in cloudsmith-api-0.30.7

- old
+ new

@@ -17,116 +17,131 @@ class Repository # attr_accessor :cdn_url # - attr_accessor :self_url + attr_accessor :created_at # - attr_accessor :repository_type_str + attr_accessor :deleted_at # attr_accessor :description - # The identifier used by GPG for this key. - attr_accessor :gpg_fingerprint + # + attr_accessor :gpg_keys # If checked, files contained in packages will be indexed, which increase the synchronisation time required for packages. Note that it is recommended you keep this enabled unless the synchronisation time is significantly impacted. attr_accessor :index_files - # A descriptive name for the repository. - attr_accessor :name + # + attr_accessor :is_open_source # - attr_accessor :created_at + attr_accessor :is_private # - attr_accessor :is_open_source + attr_accessor :is_public + # A descriptive name for the repository. + attr_accessor :name + # attr_accessor :namespace # - attr_accessor :self_html_url + attr_accessor :namespace_url - # The public key given to repo users. - attr_accessor :gpg_public_key + # The number of downloads for packages in the repository. + attr_accessor :num_downloads - # - attr_accessor :namespace_url + # The number of packages in the repository. + attr_accessor :package_count + # The number of groups in the repository. + attr_accessor :package_group_count + + # The repository type changes how it is accessed and billed. Private repositories can only be used on paid plans, but are visible only to you or authorised delegates. Open-Source repositories are always visible to everyone and are restricted by licensing, but are free to use and come with generous bandwidth/storage. You can only select Open-Source at repository creation time. + attr_accessor :repository_type + # - attr_accessor :slug_perm + attr_accessor :repository_type_str # - attr_accessor :is_public + attr_accessor :self_html_url # - attr_accessor :deleted_at + attr_accessor :self_url - # The repository type changes how it is accessed and billed. Private repositories can only be used on paid plans, but are visible only to you or authorised delegates. Open-Source repositories are always visible to everyone and are restricted by licensing, but are free to use and come with generous bandwidth/storage. You can only select Open-Source at repository creation time. - attr_accessor :repository_type + # The calculated size of the repository. + attr_accessor :size + # + attr_accessor :size_str + # The slug identifies the repository in URIs. attr_accessor :slug # - attr_accessor :is_private + attr_accessor :slug_perm - # The calculated size of the repository. - attr_accessor :size - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'cdn_url' => :'cdn_url', - :'self_url' => :'self_url', - :'repository_type_str' => :'repository_type_str', + :'created_at' => :'created_at', + :'deleted_at' => :'deleted_at', :'description' => :'description', - :'gpg_fingerprint' => :'gpg_fingerprint', + :'gpg_keys' => :'gpg_keys', :'index_files' => :'index_files', - :'name' => :'name', - :'created_at' => :'created_at', :'is_open_source' => :'is_open_source', + :'is_private' => :'is_private', + :'is_public' => :'is_public', + :'name' => :'name', :'namespace' => :'namespace', - :'self_html_url' => :'self_html_url', - :'gpg_public_key' => :'gpg_public_key', :'namespace_url' => :'namespace_url', - :'slug_perm' => :'slug_perm', - :'is_public' => :'is_public', - :'deleted_at' => :'deleted_at', + :'num_downloads' => :'num_downloads', + :'package_count' => :'package_count', + :'package_group_count' => :'package_group_count', :'repository_type' => :'repository_type', + :'repository_type_str' => :'repository_type_str', + :'self_html_url' => :'self_html_url', + :'self_url' => :'self_url', + :'size' => :'size', + :'size_str' => :'size_str', :'slug' => :'slug', - :'is_private' => :'is_private', - :'size' => :'size' + :'slug_perm' => :'slug_perm' } end # Attribute type mapping. def self.swagger_types { :'cdn_url' => :'String', - :'self_url' => :'String', - :'repository_type_str' => :'String', + :'created_at' => :'String', + :'deleted_at' => :'String', :'description' => :'String', - :'gpg_fingerprint' => :'String', + :'gpg_keys' => :'Array<ReposGpgKeys>', :'index_files' => :'BOOLEAN', - :'name' => :'String', - :'created_at' => :'String', :'is_open_source' => :'BOOLEAN', + :'is_private' => :'BOOLEAN', + :'is_public' => :'BOOLEAN', + :'name' => :'String', :'namespace' => :'String', - :'self_html_url' => :'String', - :'gpg_public_key' => :'String', :'namespace_url' => :'String', - :'slug_perm' => :'String', - :'is_public' => :'BOOLEAN', - :'deleted_at' => :'String', + :'num_downloads' => :'Integer', + :'package_count' => :'Integer', + :'package_group_count' => :'Integer', :'repository_type' => :'String', + :'repository_type_str' => :'String', + :'self_html_url' => :'String', + :'self_url' => :'String', + :'size' => :'Integer', + :'size_str' => :'String', :'slug' => :'String', - :'is_private' => :'BOOLEAN', - :'size' => :'Integer' + :'slug_perm' => :'String' } end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash @@ -138,86 +153,100 @@ if attributes.has_key?(:'cdn_url') self.cdn_url = attributes[:'cdn_url'] end - if attributes.has_key?(:'self_url') - self.self_url = attributes[:'self_url'] + if attributes.has_key?(:'created_at') + self.created_at = attributes[:'created_at'] end - if attributes.has_key?(:'repository_type_str') - self.repository_type_str = attributes[:'repository_type_str'] + if attributes.has_key?(:'deleted_at') + self.deleted_at = attributes[:'deleted_at'] end if attributes.has_key?(:'description') self.description = attributes[:'description'] end - if attributes.has_key?(:'gpg_fingerprint') - self.gpg_fingerprint = attributes[:'gpg_fingerprint'] + if attributes.has_key?(:'gpg_keys') + if (value = attributes[:'gpg_keys']).is_a?(Array) + self.gpg_keys = value + end end if attributes.has_key?(:'index_files') self.index_files = attributes[:'index_files'] end - if attributes.has_key?(:'name') - self.name = attributes[:'name'] - end - - if attributes.has_key?(:'created_at') - self.created_at = attributes[:'created_at'] - end - if attributes.has_key?(:'is_open_source') self.is_open_source = attributes[:'is_open_source'] end - if attributes.has_key?(:'namespace') - self.namespace = attributes[:'namespace'] + if attributes.has_key?(:'is_private') + self.is_private = attributes[:'is_private'] end - if attributes.has_key?(:'self_html_url') - self.self_html_url = attributes[:'self_html_url'] + if attributes.has_key?(:'is_public') + self.is_public = attributes[:'is_public'] end - if attributes.has_key?(:'gpg_public_key') - self.gpg_public_key = attributes[:'gpg_public_key'] + if attributes.has_key?(:'name') + self.name = attributes[:'name'] end + if attributes.has_key?(:'namespace') + self.namespace = attributes[:'namespace'] + end + if attributes.has_key?(:'namespace_url') self.namespace_url = attributes[:'namespace_url'] end - if attributes.has_key?(:'slug_perm') - self.slug_perm = attributes[:'slug_perm'] + if attributes.has_key?(:'num_downloads') + self.num_downloads = attributes[:'num_downloads'] end - if attributes.has_key?(:'is_public') - self.is_public = attributes[:'is_public'] + if attributes.has_key?(:'package_count') + self.package_count = attributes[:'package_count'] end - if attributes.has_key?(:'deleted_at') - self.deleted_at = attributes[:'deleted_at'] + if attributes.has_key?(:'package_group_count') + self.package_group_count = attributes[:'package_group_count'] end if attributes.has_key?(:'repository_type') self.repository_type = attributes[:'repository_type'] end - if attributes.has_key?(:'slug') - self.slug = attributes[:'slug'] + if attributes.has_key?(:'repository_type_str') + self.repository_type_str = attributes[:'repository_type_str'] end - if attributes.has_key?(:'is_private') - self.is_private = attributes[:'is_private'] + if attributes.has_key?(:'self_html_url') + self.self_html_url = attributes[:'self_html_url'] end + if attributes.has_key?(:'self_url') + self.self_url = attributes[:'self_url'] + end + if attributes.has_key?(:'size') self.size = attributes[:'size'] end + if attributes.has_key?(:'size_str') + self.size_str = attributes[:'size_str'] + end + + if attributes.has_key?(:'slug') + self.slug = attributes[:'slug'] + end + + if attributes.has_key?(:'slug_perm') + self.slug_perm = attributes[:'slug_perm'] + 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 @@ -228,61 +257,64 @@ if @is_open_source.nil? invalid_properties.push("invalid value for 'is_open_source', is_open_source cannot be nil.") end - if @namespace.nil? - invalid_properties.push("invalid value for 'namespace', namespace cannot be nil.") + if @is_private.nil? + invalid_properties.push("invalid value for 'is_private', is_private cannot be nil.") end if @is_public.nil? invalid_properties.push("invalid value for 'is_public', is_public cannot be nil.") end - if @is_private.nil? - invalid_properties.push("invalid value for 'is_private', is_private cannot be nil.") + if @namespace.nil? + invalid_properties.push("invalid value for 'namespace', namespace 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 @description.nil? return false if @is_open_source.nil? - return false if @namespace.nil? - return false if @is_public.nil? return false if @is_private.nil? + return false if @is_public.nil? + return false if @namespace.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 && cdn_url == o.cdn_url && - self_url == o.self_url && - repository_type_str == o.repository_type_str && + created_at == o.created_at && + deleted_at == o.deleted_at && description == o.description && - gpg_fingerprint == o.gpg_fingerprint && + gpg_keys == o.gpg_keys && index_files == o.index_files && - name == o.name && - created_at == o.created_at && is_open_source == o.is_open_source && + is_private == o.is_private && + is_public == o.is_public && + name == o.name && namespace == o.namespace && - self_html_url == o.self_html_url && - gpg_public_key == o.gpg_public_key && namespace_url == o.namespace_url && - slug_perm == o.slug_perm && - is_public == o.is_public && - deleted_at == o.deleted_at && + num_downloads == o.num_downloads && + package_count == o.package_count && + package_group_count == o.package_group_count && repository_type == o.repository_type && + repository_type_str == o.repository_type_str && + self_html_url == o.self_html_url && + self_url == o.self_url && + size == o.size && + size_str == o.size_str && slug == o.slug && - is_private == o.is_private && - size == o.size + slug_perm == o.slug_perm end # @see the `==` method # @param [Object] Object to be compared def eql?(o) @@ -290,10 +322,10 @@ end # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [cdn_url, self_url, repository_type_str, description, gpg_fingerprint, index_files, name, created_at, is_open_source, namespace, self_html_url, gpg_public_key, namespace_url, slug_perm, is_public, deleted_at, repository_type, slug, is_private, size].hash + [cdn_url, created_at, deleted_at, description, gpg_keys, index_files, is_open_source, is_private, is_public, name, namespace, namespace_url, num_downloads, package_count, package_group_count, repository_type, repository_type_str, self_html_url, self_url, size, size_str, slug, slug_perm].hash end # Builds the object from hash # @param [Hash] attributes Model attributes in the form of hash # @return [Object] Returns the model itself