Class: PulpRpmClient::RpmPackageResponse
- Inherits:
-
Object
- Object
- PulpRpmClient::RpmPackageResponse
- Defined in:
- lib/pulp_rpm_client/models/rpm_package_response.rb
Overview
A Serializer for Package. Add serializers for the new fields defined in Package and add those fields to the Meta class keeping fields from the parent class as well. Provide help_text.
Instance Attribute Summary collapse
-
#arch ⇒ Object
The target architecture for a package.For example, ‘x86_64’, ‘i686’, or ‘noarch’.
-
#artifact ⇒ Object
Artifact file representing the physical content.
-
#changelogs ⇒ Object
Changelogs that package contains.
-
#checksum_type ⇒ Object
Type of checksum, e.g.
-
#conflicts ⇒ Object
Capabilities the package conflicts.
-
#description ⇒ Object
In-depth description of the packaged software.
-
#enhances ⇒ Object
Capabilities the package enhances.
-
#epoch ⇒ Object
The package’s epoch.
-
#files ⇒ Object
Files that package contains.
-
#is_modular ⇒ Object
Flag to identify if the package is modular.
-
#location_base ⇒ Object
Base location of this package.
-
#location_href ⇒ Object
Relative location of package to the repodata.
-
#md5 ⇒ Object
The MD5 checksum if available.
-
#name ⇒ Object
Name of the package.
-
#obsoletes ⇒ Object
Capabilities the package obsoletes.
-
#pkg_id ⇒ Object
Checksum of the package file.
-
#prn ⇒ Object
The Pulp Resource Name (PRN).
-
#provides ⇒ Object
Capabilities the package provides.
-
#pulp_created ⇒ Object
Timestamp of creation.
-
#pulp_href ⇒ Object
Returns the value of attribute pulp_href.
-
#pulp_labels ⇒ Object
A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
-
#pulp_last_updated ⇒ Object
Timestamp of the last time this resource was updated.
-
#recommends ⇒ Object
Capabilities the package recommends.
-
#release ⇒ Object
The release of a particular version of the package.
-
#requires ⇒ Object
Capabilities the package requires.
-
#rpm_buildhost ⇒ Object
Hostname of the system that built the package.
-
#rpm_group ⇒ Object
RPM group (See: fedoraproject.org/wiki/RPMGroups).
-
#rpm_header_end ⇒ Object
Last byte of the header.
-
#rpm_header_start ⇒ Object
First byte of the header.
-
#rpm_license ⇒ Object
License term applicable to the package software (GPLv2, etc.).
-
#rpm_packager ⇒ Object
Person or persons responsible for creating the package.
-
#rpm_sourcerpm ⇒ Object
Name of the source package (srpm) the package was built from.
-
#rpm_vendor ⇒ Object
Name of the organization that produced the package.
-
#sha1 ⇒ Object
The SHA-1 checksum if available.
-
#sha224 ⇒ Object
The SHA-224 checksum if available.
-
#sha256 ⇒ Object
The SHA-256 checksum if available.
-
#sha384 ⇒ Object
The SHA-384 checksum if available.
-
#sha512 ⇒ Object
The SHA-512 checksum if available.
-
#size_archive ⇒ Object
Size, in bytes, of the archive portion of the original package file.
-
#size_installed ⇒ Object
Total size, in bytes, of every file installed by this package.
-
#size_package ⇒ Object
Size, in bytes, of the package.
-
#suggests ⇒ Object
Capabilities the package suggests.
-
#summary ⇒ Object
Short description of the packaged software.
-
#supplements ⇒ Object
Capabilities the package supplements.
-
#time_build ⇒ Object
Time the package was built in seconds since the epoch.
-
#time_file ⇒ Object
The ‘file’ time attribute in the primary XML - file mtime in seconds since the epoch.
-
#url ⇒ Object
URL with more information about the packaged software.
-
#version ⇒ Object
The version of the package.
Class Method Summary collapse
-
._deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ RpmPackageResponse
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ RpmPackageResponse
Initializes the object
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 293 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::RpmPackageResponse` 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 `PulpRpmClient::RpmPackageResponse`. 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?(:'prn') self.prn = attributes[:'prn'] end if attributes.key?(:'pulp_created') self.pulp_created = attributes[:'pulp_created'] end if attributes.key?(:'pulp_last_updated') self.pulp_last_updated = attributes[:'pulp_last_updated'] end if attributes.key?(:'md5') self.md5 = attributes[:'md5'] end if attributes.key?(:'sha1') self.sha1 = attributes[:'sha1'] end if attributes.key?(:'sha224') self.sha224 = attributes[:'sha224'] end if attributes.key?(:'sha256') self.sha256 = attributes[:'sha256'] end if attributes.key?(:'sha384') self.sha384 = attributes[:'sha384'] end if attributes.key?(:'sha512') self.sha512 = attributes[:'sha512'] end if attributes.key?(:'pulp_labels') if (value = attributes[:'pulp_labels']).is_a?(Hash) self.pulp_labels = value end end if attributes.key?(:'artifact') self.artifact = attributes[:'artifact'] end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'epoch') self.epoch = attributes[:'epoch'] end if attributes.key?(:'version') self.version = attributes[:'version'] end if attributes.key?(:'release') self.release = attributes[:'release'] end if attributes.key?(:'arch') self.arch = attributes[:'arch'] end if attributes.key?(:'pkg_id') self.pkg_id = attributes[:'pkg_id'] end if attributes.key?(:'checksum_type') self.checksum_type = attributes[:'checksum_type'] end if attributes.key?(:'summary') self.summary = attributes[:'summary'] end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'url') self.url = attributes[:'url'] end if attributes.key?(:'changelogs') self.changelogs = attributes[:'changelogs'] end if attributes.key?(:'files') self.files = attributes[:'files'] end if attributes.key?(:'requires') self.requires = attributes[:'requires'] end if attributes.key?(:'provides') self.provides = attributes[:'provides'] end if attributes.key?(:'conflicts') self.conflicts = attributes[:'conflicts'] end if attributes.key?(:'obsoletes') self.obsoletes = attributes[:'obsoletes'] end if attributes.key?(:'suggests') self.suggests = attributes[:'suggests'] end if attributes.key?(:'enhances') self.enhances = attributes[:'enhances'] end if attributes.key?(:'recommends') self.recommends = attributes[:'recommends'] end if attributes.key?(:'supplements') self.supplements = attributes[:'supplements'] end if attributes.key?(:'location_base') self.location_base = attributes[:'location_base'] end if attributes.key?(:'location_href') self.location_href = attributes[:'location_href'] end if attributes.key?(:'rpm_buildhost') self.rpm_buildhost = attributes[:'rpm_buildhost'] end if attributes.key?(:'rpm_group') self.rpm_group = attributes[:'rpm_group'] end if attributes.key?(:'rpm_license') self.rpm_license = attributes[:'rpm_license'] end if attributes.key?(:'rpm_packager') self.rpm_packager = attributes[:'rpm_packager'] end if attributes.key?(:'rpm_sourcerpm') self.rpm_sourcerpm = attributes[:'rpm_sourcerpm'] end if attributes.key?(:'rpm_vendor') self.rpm_vendor = attributes[:'rpm_vendor'] end if attributes.key?(:'rpm_header_start') self.rpm_header_start = attributes[:'rpm_header_start'] end if attributes.key?(:'rpm_header_end') self.rpm_header_end = attributes[:'rpm_header_end'] end if attributes.key?(:'is_modular') self.is_modular = attributes[:'is_modular'] end if attributes.key?(:'size_archive') self.size_archive = attributes[:'size_archive'] end if attributes.key?(:'size_installed') self.size_installed = attributes[:'size_installed'] end if attributes.key?(:'size_package') self.size_package = attributes[:'size_package'] end if attributes.key?(:'time_build') self.time_build = attributes[:'time_build'] end if attributes.key?(:'time_file') self.time_file = attributes[:'time_file'] end end |
Instance Attribute Details
#arch ⇒ Object
The target architecture for a package.For example, ‘x86_64’, ‘i686’, or ‘noarch’
67 68 69 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 67 def arch @arch end |
#artifact ⇒ Object
Artifact file representing the physical content
52 53 54 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 52 def artifact @artifact end |
#changelogs ⇒ Object
Changelogs that package contains
85 86 87 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 85 def changelogs @changelogs end |
#checksum_type ⇒ Object
Type of checksum, e.g. ‘sha256’, ‘md5’
73 74 75 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 73 def checksum_type @checksum_type end |
#conflicts ⇒ Object
Capabilities the package conflicts
97 98 99 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 97 def conflicts @conflicts end |
#description ⇒ Object
In-depth description of the packaged software
79 80 81 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 79 def description @description end |
#enhances ⇒ Object
Capabilities the package enhances
106 107 108 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 106 def enhances @enhances end |
#epoch ⇒ Object
The package’s epoch
58 59 60 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 58 def epoch @epoch end |
#files ⇒ Object
Files that package contains
88 89 90 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 88 def files @files end |
#is_modular ⇒ Object
Flag to identify if the package is modular
145 146 147 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 145 def is_modular @is_modular end |
#location_base ⇒ Object
Base location of this package
115 116 117 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 115 def location_base @location_base end |
#location_href ⇒ Object
Relative location of package to the repodata
118 119 120 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 118 def location_href @location_href end |
#md5 ⇒ Object
The MD5 checksum if available.
31 32 33 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 31 def md5 @md5 end |
#name ⇒ Object
Name of the package
55 56 57 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 55 def name @name end |
#obsoletes ⇒ Object
Capabilities the package obsoletes
100 101 102 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 100 def obsoletes @obsoletes end |
#pkg_id ⇒ Object
Checksum of the package file
70 71 72 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 70 def pkg_id @pkg_id end |
#prn ⇒ Object
The Pulp Resource Name (PRN).
22 23 24 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 22 def prn @prn end |
#provides ⇒ Object
Capabilities the package provides
94 95 96 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 94 def provides @provides end |
#pulp_created ⇒ Object
Timestamp of creation.
25 26 27 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 25 def pulp_created @pulp_created end |
#pulp_href ⇒ Object
Returns the value of attribute pulp_href.
19 20 21 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 19 def pulp_href @pulp_href end |
#pulp_labels ⇒ Object
A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
49 50 51 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 49 def pulp_labels @pulp_labels end |
#pulp_last_updated ⇒ Object
Timestamp of the last time this resource was updated. Note: for immutable resources - like content, repository versions, and publication - pulp_created and pulp_last_updated dates will be the same.
28 29 30 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 28 def pulp_last_updated @pulp_last_updated end |
#recommends ⇒ Object
Capabilities the package recommends
109 110 111 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 109 def recommends @recommends end |
#release ⇒ Object
The release of a particular version of the package. e.g. ‘1.el7’ or ‘3.f24’
64 65 66 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 64 def release @release end |
#requires ⇒ Object
Capabilities the package requires
91 92 93 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 91 def requires @requires end |
#rpm_buildhost ⇒ Object
Hostname of the system that built the package
121 122 123 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 121 def rpm_buildhost @rpm_buildhost end |
#rpm_group ⇒ Object
RPM group (See: fedoraproject.org/wiki/RPMGroups)
124 125 126 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 124 def rpm_group @rpm_group end |
#rpm_header_end ⇒ Object
Last byte of the header
142 143 144 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 142 def rpm_header_end @rpm_header_end end |
#rpm_header_start ⇒ Object
First byte of the header
139 140 141 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 139 def rpm_header_start @rpm_header_start end |
#rpm_license ⇒ Object
License term applicable to the package software (GPLv2, etc.)
127 128 129 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 127 def rpm_license @rpm_license end |
#rpm_packager ⇒ Object
Person or persons responsible for creating the package
130 131 132 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 130 def rpm_packager @rpm_packager end |
#rpm_sourcerpm ⇒ Object
Name of the source package (srpm) the package was built from
133 134 135 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 133 def rpm_sourcerpm @rpm_sourcerpm end |
#rpm_vendor ⇒ Object
Name of the organization that produced the package
136 137 138 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 136 def rpm_vendor @rpm_vendor end |
#sha1 ⇒ Object
The SHA-1 checksum if available.
34 35 36 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 34 def sha1 @sha1 end |
#sha224 ⇒ Object
The SHA-224 checksum if available.
37 38 39 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 37 def sha224 @sha224 end |
#sha256 ⇒ Object
The SHA-256 checksum if available.
40 41 42 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 40 def sha256 @sha256 end |
#sha384 ⇒ Object
The SHA-384 checksum if available.
43 44 45 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 43 def sha384 @sha384 end |
#sha512 ⇒ Object
The SHA-512 checksum if available.
46 47 48 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 46 def sha512 @sha512 end |
#size_archive ⇒ Object
Size, in bytes, of the archive portion of the original package file
148 149 150 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 148 def size_archive @size_archive end |
#size_installed ⇒ Object
Total size, in bytes, of every file installed by this package
151 152 153 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 151 def size_installed @size_installed end |
#size_package ⇒ Object
Size, in bytes, of the package
154 155 156 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 154 def size_package @size_package end |
#suggests ⇒ Object
Capabilities the package suggests
103 104 105 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 103 def suggests @suggests end |
#summary ⇒ Object
Short description of the packaged software
76 77 78 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 76 def summary @summary end |
#supplements ⇒ Object
Capabilities the package supplements
112 113 114 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 112 def supplements @supplements end |
#time_build ⇒ Object
Time the package was built in seconds since the epoch
157 158 159 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 157 def time_build @time_build end |
#time_file ⇒ Object
The ‘file’ time attribute in the primary XML - file mtime in seconds since the epoch.
160 161 162 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 160 def time_file @time_file end |
#url ⇒ Object
URL with more information about the packaged software
82 83 84 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 82 def url @url end |
#version ⇒ Object
The version of the package. For example, ‘2.8.0’
61 62 63 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 61 def version @version end |
Class Method Details
._deserialize(type, value) ⇒ Object
Deserializes the data based on type
610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 610 def self._deserialize(type, value) case type.to_sym when :Time Time.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 # models (e.g. Pet) or oneOf klass = PulpRpmClient.const_get(type) klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) end end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
217 218 219 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 217 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 163 def self.attribute_map { :'pulp_href' => :'pulp_href', :'prn' => :'prn', :'pulp_created' => :'pulp_created', :'pulp_last_updated' => :'pulp_last_updated', :'md5' => :'md5', :'sha1' => :'sha1', :'sha224' => :'sha224', :'sha256' => :'sha256', :'sha384' => :'sha384', :'sha512' => :'sha512', :'pulp_labels' => :'pulp_labels', :'artifact' => :'artifact', :'name' => :'name', :'epoch' => :'epoch', :'version' => :'version', :'release' => :'release', :'arch' => :'arch', :'pkg_id' => :'pkgId', :'checksum_type' => :'checksum_type', :'summary' => :'summary', :'description' => :'description', :'url' => :'url', :'changelogs' => :'changelogs', :'files' => :'files', :'requires' => :'requires', :'provides' => :'provides', :'conflicts' => :'conflicts', :'obsoletes' => :'obsoletes', :'suggests' => :'suggests', :'enhances' => :'enhances', :'recommends' => :'recommends', :'supplements' => :'supplements', :'location_base' => :'location_base', :'location_href' => :'location_href', :'rpm_buildhost' => :'rpm_buildhost', :'rpm_group' => :'rpm_group', :'rpm_license' => :'rpm_license', :'rpm_packager' => :'rpm_packager', :'rpm_sourcerpm' => :'rpm_sourcerpm', :'rpm_vendor' => :'rpm_vendor', :'rpm_header_start' => :'rpm_header_start', :'rpm_header_end' => :'rpm_header_end', :'is_modular' => :'is_modular', :'size_archive' => :'size_archive', :'size_installed' => :'size_installed', :'size_package' => :'size_package', :'time_build' => :'time_build', :'time_file' => :'time_file' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 586 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif 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[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 276 def self.openapi_nullable Set.new([ :'changelogs', :'files', :'requires', :'provides', :'conflicts', :'obsoletes', :'suggests', :'enhances', :'recommends', :'supplements', ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 222 def self.openapi_types { :'pulp_href' => :'String', :'prn' => :'String', :'pulp_created' => :'Time', :'pulp_last_updated' => :'Time', :'md5' => :'String', :'sha1' => :'String', :'sha224' => :'String', :'sha256' => :'String', :'sha384' => :'String', :'sha512' => :'String', :'pulp_labels' => :'Hash<String, String>', :'artifact' => :'String', :'name' => :'String', :'epoch' => :'String', :'version' => :'String', :'release' => :'String', :'arch' => :'String', :'pkg_id' => :'String', :'checksum_type' => :'String', :'summary' => :'String', :'description' => :'String', :'url' => :'String', :'changelogs' => :'Object', :'files' => :'Object', :'requires' => :'Object', :'provides' => :'Object', :'conflicts' => :'Object', :'obsoletes' => :'Object', :'suggests' => :'Object', :'enhances' => :'Object', :'recommends' => :'Object', :'supplements' => :'Object', :'location_base' => :'String', :'location_href' => :'String', :'rpm_buildhost' => :'String', :'rpm_group' => :'String', :'rpm_license' => :'String', :'rpm_packager' => :'String', :'rpm_sourcerpm' => :'String', :'rpm_vendor' => :'String', :'rpm_header_start' => :'Integer', :'rpm_header_end' => :'Integer', :'is_modular' => :'Boolean', :'size_archive' => :'Integer', :'size_installed' => :'Integer', :'size_package' => :'Integer', :'time_build' => :'Integer', :'time_file' => :'Integer' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 518 def ==(o) return true if self.equal?(o) self.class == o.class && pulp_href == o.pulp_href && prn == o.prn && pulp_created == o.pulp_created && pulp_last_updated == o.pulp_last_updated && md5 == o.md5 && sha1 == o.sha1 && sha224 == o.sha224 && sha256 == o.sha256 && sha384 == o.sha384 && sha512 == o.sha512 && pulp_labels == o.pulp_labels && artifact == o.artifact && name == o.name && epoch == o.epoch && version == o.version && release == o.release && arch == o.arch && pkg_id == o.pkg_id && checksum_type == o.checksum_type && summary == o.summary && description == o.description && url == o.url && changelogs == o.changelogs && files == o.files && requires == o.requires && provides == o.provides && conflicts == o.conflicts && obsoletes == o.obsoletes && suggests == o.suggests && enhances == o.enhances && recommends == o.recommends && supplements == o.supplements && location_base == o.location_base && location_href == o.location_href && rpm_buildhost == o.rpm_buildhost && rpm_group == o.rpm_group && rpm_license == o.rpm_license && rpm_packager == o.rpm_packager && rpm_sourcerpm == o.rpm_sourcerpm && rpm_vendor == o.rpm_vendor && rpm_header_start == o.rpm_header_start && rpm_header_end == o.rpm_header_end && is_modular == o.is_modular && size_archive == o.size_archive && size_installed == o.size_installed && size_package == o.size_package && time_build == o.time_build && time_file == o.time_file end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
681 682 683 684 685 686 687 688 689 690 691 692 693 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 681 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 |
#eql?(o) ⇒ Boolean
573 574 575 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 573 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
579 580 581 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 579 def hash [pulp_href, prn, pulp_created, pulp_last_updated, md5, sha1, sha224, sha256, sha384, sha512, pulp_labels, artifact, name, epoch, version, release, arch, pkg_id, checksum_type, summary, description, url, changelogs, files, requires, provides, conflicts, obsoletes, suggests, enhances, recommends, supplements, location_base, location_href, rpm_buildhost, rpm_group, rpm_license, rpm_packager, rpm_sourcerpm, rpm_vendor, rpm_header_start, rpm_header_end, is_modular, size_archive, size_installed, size_package, time_build, time_file].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
503 504 505 506 507 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 503 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
657 658 659 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 657 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
663 664 665 666 667 668 669 670 671 672 673 674 675 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 663 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 |
#to_s ⇒ String
Returns the string representation of the object
651 652 653 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 651 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
511 512 513 514 |
# File 'lib/pulp_rpm_client/models/rpm_package_response.rb', line 511 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' true end |