class PulpDebClient::DebSourcePackageResponse
A Serializer for DscFile.
Attributes
A dict mapping relative paths inside the Content to the correspondingArtifact URLs. E.g.: {'relative/path': '/artifacts/1/'
Timestamp of creation.
Relative path of the Debian Source Control (dsc) file.It is normally advised to let Pulp generate this.
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/pulp_deb_client/models/deb_source_package_response.rb, line 84 def self.attribute_map { :'pulp_href' => :'pulp_href', :'pulp_created' => :'pulp_created', :'artifacts' => :'artifacts', :'relative_path' => :'relative_path', :'format' => :'format', :'source' => :'source', :'binary' => :'binary', :'architecture' => :'architecture', :'version' => :'version', :'maintainer' => :'maintainer', :'uploaders' => :'uploaders', :'homepage' => :'homepage', :'vcs_browser' => :'vcs_browser', :'vcs_arch' => :'vcs_arch', :'vcs_bzr' => :'vcs_bzr', :'vcs_cvs' => :'vcs_cvs', :'vcs_darcs' => :'vcs_darcs', :'vcs_git' => :'vcs_git', :'vcs_hg' => :'vcs_hg', :'vcs_mtn' => :'vcs_mtn', :'vcs_snv' => :'vcs_snv', :'testsuite' => :'testsuite', :'dgit' => :'dgit', :'standards_version' => :'standards_version', :'build_depends' => :'build_depends', :'build_depends_indep' => :'build_depends_indep', :'build_depends_arch' => :'build_depends_arch', :'build_conflicts' => :'build_conflicts', :'build_conflicts_indep' => :'build_conflicts_indep', :'build_conflicts_arch' => :'build_conflicts_arch', :'package_list' => :'package_list' } end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/pulp_deb_client/models/deb_source_package_response.rb, line 374 def self.build_from_hash(attributes) new.build_from_hash(attributes) end
Initializes the object @param [Hash] attributes Model attributes in the form of hash
# File lib/pulp_deb_client/models/deb_source_package_response.rb, line 165 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebSourcePackageResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebSourcePackageResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'pulp_href') self.pulp_href = attributes[:'pulp_href'] end if attributes.key?(:'pulp_created') self.pulp_created = attributes[:'pulp_created'] end if attributes.key?(:'artifacts') self.artifacts = attributes[:'artifacts'] end if attributes.key?(:'relative_path') self.relative_path = attributes[:'relative_path'] end if attributes.key?(:'format') self.format = attributes[:'format'] end if attributes.key?(:'source') self.source = attributes[:'source'] end if attributes.key?(:'binary') self.binary = attributes[:'binary'] end if attributes.key?(:'architecture') self.architecture = attributes[:'architecture'] end if attributes.key?(:'version') self.version = attributes[:'version'] end if attributes.key?(:'maintainer') self.maintainer = attributes[:'maintainer'] end if attributes.key?(:'uploaders') self.uploaders = attributes[:'uploaders'] end if attributes.key?(:'homepage') self.homepage = attributes[:'homepage'] end if attributes.key?(:'vcs_browser') self.vcs_browser = attributes[:'vcs_browser'] end if attributes.key?(:'vcs_arch') self.vcs_arch = attributes[:'vcs_arch'] end if attributes.key?(:'vcs_bzr') self.vcs_bzr = attributes[:'vcs_bzr'] end if attributes.key?(:'vcs_cvs') self.vcs_cvs = attributes[:'vcs_cvs'] end if attributes.key?(:'vcs_darcs') self.vcs_darcs = attributes[:'vcs_darcs'] end if attributes.key?(:'vcs_git') self.vcs_git = attributes[:'vcs_git'] end if attributes.key?(:'vcs_hg') self.vcs_hg = attributes[:'vcs_hg'] end if attributes.key?(:'vcs_mtn') self.vcs_mtn = attributes[:'vcs_mtn'] end if attributes.key?(:'vcs_snv') self.vcs_snv = attributes[:'vcs_snv'] end if attributes.key?(:'testsuite') self.testsuite = attributes[:'testsuite'] end if attributes.key?(:'dgit') self.dgit = attributes[:'dgit'] end if attributes.key?(:'standards_version') self.standards_version = attributes[:'standards_version'] end if attributes.key?(:'build_depends') self.build_depends = attributes[:'build_depends'] end if attributes.key?(:'build_depends_indep') self.build_depends_indep = attributes[:'build_depends_indep'] end if attributes.key?(:'build_depends_arch') self.build_depends_arch = attributes[:'build_depends_arch'] end if attributes.key?(:'build_conflicts') self.build_conflicts = attributes[:'build_conflicts'] end if attributes.key?(:'build_conflicts_indep') self.build_conflicts_indep = attributes[:'build_conflicts_indep'] end if attributes.key?(:'build_conflicts_arch') self.build_conflicts_arch = attributes[:'build_conflicts_arch'] end if attributes.key?(:'package_list') self.package_list = attributes[:'package_list'] end end
List of attributes with nullable: true
# File lib/pulp_deb_client/models/deb_source_package_response.rb, line 158 def self.openapi_nullable Set.new([ ]) end
Attribute type mapping.
# File lib/pulp_deb_client/models/deb_source_package_response.rb, line 121 def self.openapi_types { :'pulp_href' => :'String', :'pulp_created' => :'DateTime', :'artifacts' => :'Object', :'relative_path' => :'String', :'format' => :'String', :'source' => :'String', :'binary' => :'String', :'architecture' => :'String', :'version' => :'String', :'maintainer' => :'String', :'uploaders' => :'String', :'homepage' => :'String', :'vcs_browser' => :'String', :'vcs_arch' => :'String', :'vcs_bzr' => :'String', :'vcs_cvs' => :'String', :'vcs_darcs' => :'String', :'vcs_git' => :'String', :'vcs_hg' => :'String', :'vcs_mtn' => :'String', :'vcs_snv' => :'String', :'testsuite' => :'String', :'dgit' => :'String', :'standards_version' => :'String', :'build_depends' => :'String', :'build_depends_indep' => :'String', :'build_depends_arch' => :'String', :'build_conflicts' => :'String', :'build_conflicts_indep' => :'String', :'build_conflicts_arch' => :'String', :'package_list' => :'String' } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] Object to be compared
# File lib/pulp_deb_client/models/deb_source_package_response.rb, line 323 def ==(o) return true if self.equal?(o) self.class == o.class && pulp_href == o.pulp_href && pulp_created == o.pulp_created && artifacts == o.artifacts && relative_path == o.relative_path && format == o.format && source == o.source && binary == o.binary && architecture == o.architecture && version == o.version && maintainer == o.maintainer && uploaders == o.uploaders && homepage == o.homepage && vcs_browser == o.vcs_browser && vcs_arch == o.vcs_arch && vcs_bzr == o.vcs_bzr && vcs_cvs == o.vcs_cvs && vcs_darcs == o.vcs_darcs && vcs_git == o.vcs_git && vcs_hg == o.vcs_hg && vcs_mtn == o.vcs_mtn && vcs_snv == o.vcs_snv && testsuite == o.testsuite && dgit == o.dgit && standards_version == o.standards_version && build_depends == o.build_depends && build_depends_indep == o.build_depends_indep && build_depends_arch == o.build_depends_arch && build_conflicts == o.build_conflicts && build_conflicts_indep == o.build_conflicts_indep && build_conflicts_arch == o.build_conflicts_arch && package_list == o.package_list end
Deserializes the data based on type @param string type Data type @param string value Value to be deserialized @return [Object] Deserialized data
# File lib/pulp_deb_client/models/deb_source_package_response.rb, line 402 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :Boolean if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model PulpDebClient.const_get(type).build_from_hash(value) end end
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash
# File lib/pulp_deb_client/models/deb_source_package_response.rb, line 471 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/pulp_deb_client/models/deb_source_package_response.rb, line 381 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.openapi_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end
@see the `==` method @param [Object] Object to be compared
# File lib/pulp_deb_client/models/deb_source_package_response.rb, line 361 def eql?(o) self == o end
Calculates hash code according to all attributes. @return [Integer] Hash code
# File lib/pulp_deb_client/models/deb_source_package_response.rb, line 367 def hash [pulp_href, pulp_created, artifacts, relative_path, format, source, binary, architecture, version, maintainer, uploaders, homepage, vcs_browser, vcs_arch, vcs_bzr, vcs_cvs, vcs_darcs, vcs_git, vcs_hg, vcs_mtn, vcs_snv, testsuite, dgit, standards_version, build_depends, build_depends_indep, build_depends_arch, build_conflicts, build_conflicts_indep, build_conflicts_arch, package_list].hash end
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
# File lib/pulp_deb_client/models/deb_source_package_response.rb, line 305 def list_invalid_properties invalid_properties = Array.new if @artifacts.nil? invalid_properties.push('invalid value for "artifacts", artifacts cannot be nil.') end invalid_properties end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/pulp_deb_client/models/deb_source_package_response.rb, line 453 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end
Returns the string representation of the object @return [String] String presentation of the object
# File lib/pulp_deb_client/models/deb_source_package_response.rb, line 441 def to_s to_hash.to_s end
Check to see if the all the properties in the model are valid @return true if the model is valid
# File lib/pulp_deb_client/models/deb_source_package_response.rb, line 316 def valid? return false if @artifacts.nil? true end