pulp_deb_client 2.20.4 → 2.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -7
  3. data/docs/ContentInstallerPackagesApi.md +4 -4
  4. data/docs/ContentPackagesApi.md +9 -5
  5. data/docs/ContentReleaseArchitecturesApi.md +8 -4
  6. data/docs/ContentReleaseComponentsApi.md +11 -7
  7. data/docs/ContentReleasesApi.md +3 -3
  8. data/docs/{DebBasePackage.md → DebInstallerPackage.md} +2 -2
  9. data/docs/{DebBasePackageResponse.md → DebInstallerPackageResponse.md} +2 -2
  10. data/docs/DebPackage.md +29 -0
  11. data/docs/DebPackageResponse.md +97 -0
  12. data/docs/DebReleaseArchitecture.md +6 -2
  13. data/docs/DebReleaseArchitectureResponse.md +6 -2
  14. data/docs/DebReleaseComponent.md +6 -2
  15. data/docs/DebReleaseComponentResponse.md +6 -2
  16. data/docs/PaginateddebInstallerPackageResponseList.md +23 -0
  17. data/docs/{PaginateddebBasePackageResponseList.md → PaginateddebPackageResponseList.md} +3 -3
  18. data/docs/RepositoriesAptApi.md +4 -0
  19. data/lib/pulp_deb_client/api/content_installer_packages_api.rb +6 -6
  20. data/lib/pulp_deb_client/api/content_packages_api.rb +20 -6
  21. data/lib/pulp_deb_client/api/content_release_architectures_api.rb +12 -6
  22. data/lib/pulp_deb_client/api/content_release_components_api.rb +18 -12
  23. data/lib/pulp_deb_client/api/content_releases_api.rb +6 -6
  24. data/lib/pulp_deb_client/api/repositories_apt_api.rb +6 -0
  25. data/lib/pulp_deb_client/models/{deb_base_package.rb → deb_installer_package.rb} +3 -3
  26. data/lib/pulp_deb_client/models/{deb_base_package_response.rb → deb_installer_package_response.rb} +3 -3
  27. data/lib/pulp_deb_client/models/deb_package.rb +313 -0
  28. data/lib/pulp_deb_client/models/deb_package_response.rb +578 -0
  29. data/lib/pulp_deb_client/models/deb_release_architecture.rb +96 -11
  30. data/lib/pulp_deb_client/models/deb_release_architecture_response.rb +39 -11
  31. data/lib/pulp_deb_client/models/deb_release_component.rb +96 -11
  32. data/lib/pulp_deb_client/models/deb_release_component_response.rb +39 -11
  33. data/lib/pulp_deb_client/models/paginateddeb_installer_package_response_list.rb +237 -0
  34. data/lib/pulp_deb_client/models/{paginateddeb_base_package_response_list.rb → paginateddeb_package_response_list.rb} +4 -4
  35. data/lib/pulp_deb_client/version.rb +1 -1
  36. data/lib/pulp_deb_client.rb +6 -3
  37. data/spec/api/content_installer_packages_api_spec.rb +2 -2
  38. data/spec/api/content_packages_api_spec.rb +4 -2
  39. data/spec/api/content_release_architectures_api_spec.rb +4 -2
  40. data/spec/api/content_release_components_api_spec.rb +7 -5
  41. data/spec/api/content_releases_api_spec.rb +3 -3
  42. data/spec/api/repositories_apt_api_spec.rb +2 -0
  43. data/spec/models/{deb_base_package_response_spec.rb → deb_installer_package_response_spec.rb} +6 -6
  44. data/spec/models/{deb_base_package_spec.rb → deb_installer_package_spec.rb} +6 -6
  45. data/spec/models/deb_package_response_spec.rb +281 -0
  46. data/spec/models/deb_package_spec.rb +77 -0
  47. data/spec/models/deb_release_architecture_response_spec.rb +13 -1
  48. data/spec/models/deb_release_architecture_spec.rb +13 -1
  49. data/spec/models/deb_release_component_response_spec.rb +13 -1
  50. data/spec/models/deb_release_component_spec.rb +13 -1
  51. data/spec/models/paginateddeb_installer_package_response_list_spec.rb +59 -0
  52. data/spec/models/{paginateddeb_base_package_response_list_spec.rb → paginateddeb_package_response_list_spec.rb} +6 -6
  53. metadata +80 -68
@@ -0,0 +1,578 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpDebClient
16
+ # A Serializer for Package.
17
+ class DebPackageResponse
18
+ attr_accessor :pulp_href
19
+
20
+ # Timestamp of creation.
21
+ attr_accessor :pulp_created
22
+
23
+ # Artifact file representing the physical content
24
+ attr_accessor :artifact
25
+
26
+ # Path where the artifact is located relative to distributions base_path
27
+ attr_accessor :relative_path
28
+
29
+ # Name of the distribution.
30
+ attr_accessor :distribution
31
+
32
+ # Name of the component.
33
+ attr_accessor :component
34
+
35
+ # The MD5 checksum if available.
36
+ attr_accessor :md5
37
+
38
+ # The SHA-1 checksum if available.
39
+ attr_accessor :sha1
40
+
41
+ # The SHA-224 checksum if available.
42
+ attr_accessor :sha224
43
+
44
+ # The SHA-256 checksum if available.
45
+ attr_accessor :sha256
46
+
47
+ # The SHA-384 checksum if available.
48
+ attr_accessor :sha384
49
+
50
+ # The SHA-512 checksum if available.
51
+ attr_accessor :sha512
52
+
53
+ attr_accessor :package
54
+
55
+ attr_accessor :source
56
+
57
+ attr_accessor :version
58
+
59
+ attr_accessor :architecture
60
+
61
+ attr_accessor :section
62
+
63
+ attr_accessor :priority
64
+
65
+ attr_accessor :origin
66
+
67
+ attr_accessor :tag
68
+
69
+ attr_accessor :bugs
70
+
71
+ attr_accessor :essential
72
+
73
+ attr_accessor :build_essential
74
+
75
+ attr_accessor :installed_size
76
+
77
+ attr_accessor :maintainer
78
+
79
+ attr_accessor :original_maintainer
80
+
81
+ attr_accessor :description
82
+
83
+ attr_accessor :description_md5
84
+
85
+ attr_accessor :homepage
86
+
87
+ attr_accessor :built_using
88
+
89
+ attr_accessor :auto_built_package
90
+
91
+ attr_accessor :multi_arch
92
+
93
+ attr_accessor :breaks
94
+
95
+ attr_accessor :conflicts
96
+
97
+ attr_accessor :depends
98
+
99
+ attr_accessor :recommends
100
+
101
+ attr_accessor :suggests
102
+
103
+ attr_accessor :enhances
104
+
105
+ attr_accessor :pre_depends
106
+
107
+ attr_accessor :provides
108
+
109
+ attr_accessor :replaces
110
+
111
+ # Attribute mapping from ruby-style variable name to JSON key.
112
+ def self.attribute_map
113
+ {
114
+ :'pulp_href' => :'pulp_href',
115
+ :'pulp_created' => :'pulp_created',
116
+ :'artifact' => :'artifact',
117
+ :'relative_path' => :'relative_path',
118
+ :'distribution' => :'distribution',
119
+ :'component' => :'component',
120
+ :'md5' => :'md5',
121
+ :'sha1' => :'sha1',
122
+ :'sha224' => :'sha224',
123
+ :'sha256' => :'sha256',
124
+ :'sha384' => :'sha384',
125
+ :'sha512' => :'sha512',
126
+ :'package' => :'package',
127
+ :'source' => :'source',
128
+ :'version' => :'version',
129
+ :'architecture' => :'architecture',
130
+ :'section' => :'section',
131
+ :'priority' => :'priority',
132
+ :'origin' => :'origin',
133
+ :'tag' => :'tag',
134
+ :'bugs' => :'bugs',
135
+ :'essential' => :'essential',
136
+ :'build_essential' => :'build_essential',
137
+ :'installed_size' => :'installed_size',
138
+ :'maintainer' => :'maintainer',
139
+ :'original_maintainer' => :'original_maintainer',
140
+ :'description' => :'description',
141
+ :'description_md5' => :'description_md5',
142
+ :'homepage' => :'homepage',
143
+ :'built_using' => :'built_using',
144
+ :'auto_built_package' => :'auto_built_package',
145
+ :'multi_arch' => :'multi_arch',
146
+ :'breaks' => :'breaks',
147
+ :'conflicts' => :'conflicts',
148
+ :'depends' => :'depends',
149
+ :'recommends' => :'recommends',
150
+ :'suggests' => :'suggests',
151
+ :'enhances' => :'enhances',
152
+ :'pre_depends' => :'pre_depends',
153
+ :'provides' => :'provides',
154
+ :'replaces' => :'replaces'
155
+ }
156
+ end
157
+
158
+ # Attribute type mapping.
159
+ def self.openapi_types
160
+ {
161
+ :'pulp_href' => :'String',
162
+ :'pulp_created' => :'DateTime',
163
+ :'artifact' => :'String',
164
+ :'relative_path' => :'String',
165
+ :'distribution' => :'String',
166
+ :'component' => :'String',
167
+ :'md5' => :'String',
168
+ :'sha1' => :'String',
169
+ :'sha224' => :'String',
170
+ :'sha256' => :'String',
171
+ :'sha384' => :'String',
172
+ :'sha512' => :'String',
173
+ :'package' => :'String',
174
+ :'source' => :'String',
175
+ :'version' => :'String',
176
+ :'architecture' => :'String',
177
+ :'section' => :'String',
178
+ :'priority' => :'String',
179
+ :'origin' => :'String',
180
+ :'tag' => :'String',
181
+ :'bugs' => :'String',
182
+ :'essential' => :'String',
183
+ :'build_essential' => :'String',
184
+ :'installed_size' => :'String',
185
+ :'maintainer' => :'String',
186
+ :'original_maintainer' => :'String',
187
+ :'description' => :'String',
188
+ :'description_md5' => :'String',
189
+ :'homepage' => :'String',
190
+ :'built_using' => :'String',
191
+ :'auto_built_package' => :'String',
192
+ :'multi_arch' => :'String',
193
+ :'breaks' => :'String',
194
+ :'conflicts' => :'String',
195
+ :'depends' => :'String',
196
+ :'recommends' => :'String',
197
+ :'suggests' => :'String',
198
+ :'enhances' => :'String',
199
+ :'pre_depends' => :'String',
200
+ :'provides' => :'String',
201
+ :'replaces' => :'String'
202
+ }
203
+ end
204
+
205
+ # List of attributes with nullable: true
206
+ def self.openapi_nullable
207
+ Set.new([
208
+ ])
209
+ end
210
+
211
+ # Initializes the object
212
+ # @param [Hash] attributes Model attributes in the form of hash
213
+ def initialize(attributes = {})
214
+ if (!attributes.is_a?(Hash))
215
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpDebClient::DebPackageResponse` initialize method"
216
+ end
217
+
218
+ # check to see if the attribute exists and convert string to symbol for hash key
219
+ attributes = attributes.each_with_object({}) { |(k, v), h|
220
+ if (!self.class.attribute_map.key?(k.to_sym))
221
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpDebClient::DebPackageResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
222
+ end
223
+ h[k.to_sym] = v
224
+ }
225
+
226
+ if attributes.key?(:'pulp_href')
227
+ self.pulp_href = attributes[:'pulp_href']
228
+ end
229
+
230
+ if attributes.key?(:'pulp_created')
231
+ self.pulp_created = attributes[:'pulp_created']
232
+ end
233
+
234
+ if attributes.key?(:'artifact')
235
+ self.artifact = attributes[:'artifact']
236
+ end
237
+
238
+ if attributes.key?(:'relative_path')
239
+ self.relative_path = attributes[:'relative_path']
240
+ end
241
+
242
+ if attributes.key?(:'distribution')
243
+ self.distribution = attributes[:'distribution']
244
+ end
245
+
246
+ if attributes.key?(:'component')
247
+ self.component = attributes[:'component']
248
+ end
249
+
250
+ if attributes.key?(:'md5')
251
+ self.md5 = attributes[:'md5']
252
+ end
253
+
254
+ if attributes.key?(:'sha1')
255
+ self.sha1 = attributes[:'sha1']
256
+ end
257
+
258
+ if attributes.key?(:'sha224')
259
+ self.sha224 = attributes[:'sha224']
260
+ end
261
+
262
+ if attributes.key?(:'sha256')
263
+ self.sha256 = attributes[:'sha256']
264
+ end
265
+
266
+ if attributes.key?(:'sha384')
267
+ self.sha384 = attributes[:'sha384']
268
+ end
269
+
270
+ if attributes.key?(:'sha512')
271
+ self.sha512 = attributes[:'sha512']
272
+ end
273
+
274
+ if attributes.key?(:'package')
275
+ self.package = attributes[:'package']
276
+ end
277
+
278
+ if attributes.key?(:'source')
279
+ self.source = attributes[:'source']
280
+ end
281
+
282
+ if attributes.key?(:'version')
283
+ self.version = attributes[:'version']
284
+ end
285
+
286
+ if attributes.key?(:'architecture')
287
+ self.architecture = attributes[:'architecture']
288
+ end
289
+
290
+ if attributes.key?(:'section')
291
+ self.section = attributes[:'section']
292
+ end
293
+
294
+ if attributes.key?(:'priority')
295
+ self.priority = attributes[:'priority']
296
+ end
297
+
298
+ if attributes.key?(:'origin')
299
+ self.origin = attributes[:'origin']
300
+ end
301
+
302
+ if attributes.key?(:'tag')
303
+ self.tag = attributes[:'tag']
304
+ end
305
+
306
+ if attributes.key?(:'bugs')
307
+ self.bugs = attributes[:'bugs']
308
+ end
309
+
310
+ if attributes.key?(:'essential')
311
+ self.essential = attributes[:'essential']
312
+ end
313
+
314
+ if attributes.key?(:'build_essential')
315
+ self.build_essential = attributes[:'build_essential']
316
+ end
317
+
318
+ if attributes.key?(:'installed_size')
319
+ self.installed_size = attributes[:'installed_size']
320
+ end
321
+
322
+ if attributes.key?(:'maintainer')
323
+ self.maintainer = attributes[:'maintainer']
324
+ end
325
+
326
+ if attributes.key?(:'original_maintainer')
327
+ self.original_maintainer = attributes[:'original_maintainer']
328
+ end
329
+
330
+ if attributes.key?(:'description')
331
+ self.description = attributes[:'description']
332
+ end
333
+
334
+ if attributes.key?(:'description_md5')
335
+ self.description_md5 = attributes[:'description_md5']
336
+ end
337
+
338
+ if attributes.key?(:'homepage')
339
+ self.homepage = attributes[:'homepage']
340
+ end
341
+
342
+ if attributes.key?(:'built_using')
343
+ self.built_using = attributes[:'built_using']
344
+ end
345
+
346
+ if attributes.key?(:'auto_built_package')
347
+ self.auto_built_package = attributes[:'auto_built_package']
348
+ end
349
+
350
+ if attributes.key?(:'multi_arch')
351
+ self.multi_arch = attributes[:'multi_arch']
352
+ end
353
+
354
+ if attributes.key?(:'breaks')
355
+ self.breaks = attributes[:'breaks']
356
+ end
357
+
358
+ if attributes.key?(:'conflicts')
359
+ self.conflicts = attributes[:'conflicts']
360
+ end
361
+
362
+ if attributes.key?(:'depends')
363
+ self.depends = attributes[:'depends']
364
+ end
365
+
366
+ if attributes.key?(:'recommends')
367
+ self.recommends = attributes[:'recommends']
368
+ end
369
+
370
+ if attributes.key?(:'suggests')
371
+ self.suggests = attributes[:'suggests']
372
+ end
373
+
374
+ if attributes.key?(:'enhances')
375
+ self.enhances = attributes[:'enhances']
376
+ end
377
+
378
+ if attributes.key?(:'pre_depends')
379
+ self.pre_depends = attributes[:'pre_depends']
380
+ end
381
+
382
+ if attributes.key?(:'provides')
383
+ self.provides = attributes[:'provides']
384
+ end
385
+
386
+ if attributes.key?(:'replaces')
387
+ self.replaces = attributes[:'replaces']
388
+ end
389
+ end
390
+
391
+ # Show invalid properties with the reasons. Usually used together with valid?
392
+ # @return Array for valid properties with the reasons
393
+ def list_invalid_properties
394
+ invalid_properties = Array.new
395
+ invalid_properties
396
+ end
397
+
398
+ # Check to see if the all the properties in the model are valid
399
+ # @return true if the model is valid
400
+ def valid?
401
+ true
402
+ end
403
+
404
+ # Checks equality by comparing each attribute.
405
+ # @param [Object] Object to be compared
406
+ def ==(o)
407
+ return true if self.equal?(o)
408
+ self.class == o.class &&
409
+ pulp_href == o.pulp_href &&
410
+ pulp_created == o.pulp_created &&
411
+ artifact == o.artifact &&
412
+ relative_path == o.relative_path &&
413
+ distribution == o.distribution &&
414
+ component == o.component &&
415
+ md5 == o.md5 &&
416
+ sha1 == o.sha1 &&
417
+ sha224 == o.sha224 &&
418
+ sha256 == o.sha256 &&
419
+ sha384 == o.sha384 &&
420
+ sha512 == o.sha512 &&
421
+ package == o.package &&
422
+ source == o.source &&
423
+ version == o.version &&
424
+ architecture == o.architecture &&
425
+ section == o.section &&
426
+ priority == o.priority &&
427
+ origin == o.origin &&
428
+ tag == o.tag &&
429
+ bugs == o.bugs &&
430
+ essential == o.essential &&
431
+ build_essential == o.build_essential &&
432
+ installed_size == o.installed_size &&
433
+ maintainer == o.maintainer &&
434
+ original_maintainer == o.original_maintainer &&
435
+ description == o.description &&
436
+ description_md5 == o.description_md5 &&
437
+ homepage == o.homepage &&
438
+ built_using == o.built_using &&
439
+ auto_built_package == o.auto_built_package &&
440
+ multi_arch == o.multi_arch &&
441
+ breaks == o.breaks &&
442
+ conflicts == o.conflicts &&
443
+ depends == o.depends &&
444
+ recommends == o.recommends &&
445
+ suggests == o.suggests &&
446
+ enhances == o.enhances &&
447
+ pre_depends == o.pre_depends &&
448
+ provides == o.provides &&
449
+ replaces == o.replaces
450
+ end
451
+
452
+ # @see the `==` method
453
+ # @param [Object] Object to be compared
454
+ def eql?(o)
455
+ self == o
456
+ end
457
+
458
+ # Calculates hash code according to all attributes.
459
+ # @return [Integer] Hash code
460
+ def hash
461
+ [pulp_href, pulp_created, artifact, relative_path, distribution, component, md5, sha1, sha224, sha256, sha384, sha512, package, source, version, architecture, section, priority, origin, tag, bugs, essential, build_essential, installed_size, maintainer, original_maintainer, description, description_md5, homepage, built_using, auto_built_package, multi_arch, breaks, conflicts, depends, recommends, suggests, enhances, pre_depends, provides, replaces].hash
462
+ end
463
+
464
+ # Builds the object from hash
465
+ # @param [Hash] attributes Model attributes in the form of hash
466
+ # @return [Object] Returns the model itself
467
+ def self.build_from_hash(attributes)
468
+ new.build_from_hash(attributes)
469
+ end
470
+
471
+ # Builds the object from hash
472
+ # @param [Hash] attributes Model attributes in the form of hash
473
+ # @return [Object] Returns the model itself
474
+ def build_from_hash(attributes)
475
+ return nil unless attributes.is_a?(Hash)
476
+ self.class.openapi_types.each_pair do |key, type|
477
+ if type =~ /\AArray<(.*)>/i
478
+ # check to ensure the input is an array given that the attribute
479
+ # is documented as an array but the input is not
480
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
481
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
482
+ end
483
+ elsif !attributes[self.class.attribute_map[key]].nil?
484
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
485
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
486
+ end
487
+
488
+ self
489
+ end
490
+
491
+ # Deserializes the data based on type
492
+ # @param string type Data type
493
+ # @param string value Value to be deserialized
494
+ # @return [Object] Deserialized data
495
+ def _deserialize(type, value)
496
+ case type.to_sym
497
+ when :DateTime
498
+ DateTime.parse(value)
499
+ when :Date
500
+ Date.parse(value)
501
+ when :String
502
+ value.to_s
503
+ when :Integer
504
+ value.to_i
505
+ when :Float
506
+ value.to_f
507
+ when :Boolean
508
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
509
+ true
510
+ else
511
+ false
512
+ end
513
+ when :Object
514
+ # generic object (usually a Hash), return directly
515
+ value
516
+ when /\AArray<(?<inner_type>.+)>\z/
517
+ inner_type = Regexp.last_match[:inner_type]
518
+ value.map { |v| _deserialize(inner_type, v) }
519
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
520
+ k_type = Regexp.last_match[:k_type]
521
+ v_type = Regexp.last_match[:v_type]
522
+ {}.tap do |hash|
523
+ value.each do |k, v|
524
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
525
+ end
526
+ end
527
+ else # model
528
+ PulpDebClient.const_get(type).build_from_hash(value)
529
+ end
530
+ end
531
+
532
+ # Returns the string representation of the object
533
+ # @return [String] String presentation of the object
534
+ def to_s
535
+ to_hash.to_s
536
+ end
537
+
538
+ # to_body is an alias to to_hash (backward compatibility)
539
+ # @return [Hash] Returns the object in the form of hash
540
+ def to_body
541
+ to_hash
542
+ end
543
+
544
+ # Returns the object in the form of hash
545
+ # @return [Hash] Returns the object in the form of hash
546
+ def to_hash
547
+ hash = {}
548
+ self.class.attribute_map.each_pair do |attr, param|
549
+ value = self.send(attr)
550
+ if value.nil?
551
+ is_nullable = self.class.openapi_nullable.include?(attr)
552
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
553
+ end
554
+
555
+ hash[param] = _to_hash(value)
556
+ end
557
+ hash
558
+ end
559
+
560
+ # Outputs non-array value in the form of hash
561
+ # For object, use to_hash. Otherwise, just return the value
562
+ # @param [Object] value Any valid value
563
+ # @return [Hash] Returns the value in the form of hash
564
+ def _to_hash(value)
565
+ if value.is_a?(Array)
566
+ value.compact.map { |v| _to_hash(v) }
567
+ elsif value.is_a?(Hash)
568
+ {}.tap do |hash|
569
+ value.each { |k, v| hash[k] = _to_hash(v) }
570
+ end
571
+ elsif value.respond_to? :to_hash
572
+ value.to_hash
573
+ else
574
+ value
575
+ end
576
+ end
577
+ end
578
+ end