pulpcore_client 3.2.1 → 3.3.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 (79) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +37 -4
  3. data/docs/ArtifactsApi.md +2 -0
  4. data/docs/ExportersCoreExportsApi.md +243 -0
  5. data/docs/ExportersPulpApi.md +355 -0
  6. data/docs/Import.md +23 -0
  7. data/docs/ImportersCoreImportsApi.md +243 -0
  8. data/docs/ImportersPulpApi.md +355 -0
  9. data/docs/InlineResponse2001.md +1 -1
  10. data/docs/InlineResponse2002.md +1 -1
  11. data/docs/InlineResponse2003.md +1 -1
  12. data/docs/InlineResponse2004.md +1 -1
  13. data/docs/InlineResponse2005.md +23 -0
  14. data/docs/InlineResponse2006.md +23 -0
  15. data/docs/InlineResponse2007.md +23 -0
  16. data/docs/InlineResponse2008.md +23 -0
  17. data/docs/InlineResponse2009.md +23 -0
  18. data/docs/PulpExport.md +29 -0
  19. data/docs/PulpExporter.md +27 -0
  20. data/docs/PulpImport.md +17 -0
  21. data/docs/PulpImporter.md +23 -0
  22. data/docs/SigningServicesApi.md +6 -2
  23. data/docs/Task.md +6 -0
  24. data/docs/TaskGroup.md +29 -0
  25. data/docs/TaskGroupsApi.md +128 -0
  26. data/docs/TasksApi.md +10 -6
  27. data/docs/UploadsApi.md +4 -2
  28. data/docs/WorkersApi.md +4 -2
  29. data/lib/pulpcore_client/api/artifacts_api.rb +3 -0
  30. data/lib/pulpcore_client/api/exporters_core_exports_api.rb +297 -0
  31. data/lib/pulpcore_client/api/exporters_pulp_api.rb +431 -0
  32. data/lib/pulpcore_client/api/importers_core_imports_api.rb +297 -0
  33. data/lib/pulpcore_client/api/importers_pulp_api.rb +431 -0
  34. data/lib/pulpcore_client/api/signing_services_api.rb +9 -3
  35. data/lib/pulpcore_client/api/task_groups_api.rb +157 -0
  36. data/lib/pulpcore_client/api/tasks_api.rb +15 -9
  37. data/lib/pulpcore_client/api/uploads_api.rb +6 -3
  38. data/lib/pulpcore_client/api/workers_api.rb +6 -3
  39. data/lib/pulpcore_client/models/import.rb +246 -0
  40. data/lib/pulpcore_client/models/inline_response2001.rb +1 -1
  41. data/lib/pulpcore_client/models/inline_response2002.rb +1 -1
  42. data/lib/pulpcore_client/models/inline_response2003.rb +1 -1
  43. data/lib/pulpcore_client/models/inline_response2004.rb +1 -1
  44. data/lib/pulpcore_client/models/inline_response2005.rb +247 -0
  45. data/lib/pulpcore_client/models/inline_response2006.rb +247 -0
  46. data/lib/pulpcore_client/models/inline_response2007.rb +247 -0
  47. data/lib/pulpcore_client/models/inline_response2008.rb +247 -0
  48. data/lib/pulpcore_client/models/inline_response2009.rb +247 -0
  49. data/lib/pulpcore_client/models/pulp_export.rb +310 -0
  50. data/lib/pulpcore_client/models/pulp_exporter.rb +310 -0
  51. data/lib/pulpcore_client/models/pulp_import.rb +231 -0
  52. data/lib/pulpcore_client/models/pulp_importer.rb +262 -0
  53. data/lib/pulpcore_client/models/task.rb +33 -1
  54. data/lib/pulpcore_client/models/task_group.rb +291 -0
  55. data/lib/pulpcore_client/version.rb +1 -1
  56. data/lib/pulpcore_client.rb +16 -0
  57. data/spec/api/artifacts_api_spec.rb +1 -0
  58. data/spec/api/exporters_core_exports_api_spec.rb +91 -0
  59. data/spec/api/exporters_pulp_api_spec.rb +117 -0
  60. data/spec/api/importers_core_imports_api_spec.rb +91 -0
  61. data/spec/api/importers_pulp_api_spec.rb +117 -0
  62. data/spec/api/signing_services_api_spec.rb +3 -1
  63. data/spec/api/task_groups_api_spec.rb +63 -0
  64. data/spec/api/tasks_api_spec.rb +5 -3
  65. data/spec/api/uploads_api_spec.rb +2 -1
  66. data/spec/api/workers_api_spec.rb +2 -1
  67. data/spec/models/import_spec.rb +59 -0
  68. data/spec/models/inline_response2005_spec.rb +59 -0
  69. data/spec/models/inline_response2006_spec.rb +59 -0
  70. data/spec/models/inline_response2007_spec.rb +59 -0
  71. data/spec/models/inline_response2008_spec.rb +59 -0
  72. data/spec/models/inline_response2009_spec.rb +59 -0
  73. data/spec/models/pulp_export_spec.rb +77 -0
  74. data/spec/models/pulp_exporter_spec.rb +71 -0
  75. data/spec/models/pulp_import_spec.rb +41 -0
  76. data/spec/models/pulp_importer_spec.rb +59 -0
  77. data/spec/models/task_group_spec.rb +77 -0
  78. data/spec/models/task_spec.rb +18 -0
  79. metadata +66 -2
@@ -0,0 +1,262 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpcoreClient
16
+ class PulpImporter
17
+ attr_accessor :pulp_href
18
+
19
+ # Timestamp of creation.
20
+ attr_accessor :pulp_created
21
+
22
+ # Unique name of the Importer.
23
+ attr_accessor :name
24
+
25
+ # Mapping of repo names in an export file to the repo names in Pulp. For example, if the export has a repo named 'foo' and the repo to import content into was 'bar', the mapping would be \"{'foo': 'bar'}\".
26
+ attr_accessor :repo_mapping
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'pulp_href' => :'pulp_href',
32
+ :'pulp_created' => :'pulp_created',
33
+ :'name' => :'name',
34
+ :'repo_mapping' => :'repo_mapping'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'pulp_href' => :'String',
42
+ :'pulp_created' => :'DateTime',
43
+ :'name' => :'String',
44
+ :'repo_mapping' => :'Hash<String, String>'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::PulpImporter` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::PulpImporter`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'pulp_href')
70
+ self.pulp_href = attributes[:'pulp_href']
71
+ end
72
+
73
+ if attributes.key?(:'pulp_created')
74
+ self.pulp_created = attributes[:'pulp_created']
75
+ end
76
+
77
+ if attributes.key?(:'name')
78
+ self.name = attributes[:'name']
79
+ end
80
+
81
+ if attributes.key?(:'repo_mapping')
82
+ if (value = attributes[:'repo_mapping']).is_a?(Hash)
83
+ self.repo_mapping = value
84
+ end
85
+ end
86
+ end
87
+
88
+ # Show invalid properties with the reasons. Usually used together with valid?
89
+ # @return Array for valid properties with the reasons
90
+ def list_invalid_properties
91
+ invalid_properties = Array.new
92
+ if @name.nil?
93
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
94
+ end
95
+
96
+ if @name.to_s.length < 1
97
+ invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
98
+ end
99
+
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ return false if @name.nil?
107
+ return false if @name.to_s.length < 1
108
+ true
109
+ end
110
+
111
+ # Custom attribute writer method with validation
112
+ # @param [Object] name Value to be assigned
113
+ def name=(name)
114
+ if name.nil?
115
+ fail ArgumentError, 'name cannot be nil'
116
+ end
117
+
118
+ if name.to_s.length < 1
119
+ fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
120
+ end
121
+
122
+ @name = name
123
+ end
124
+
125
+ # Checks equality by comparing each attribute.
126
+ # @param [Object] Object to be compared
127
+ def ==(o)
128
+ return true if self.equal?(o)
129
+ self.class == o.class &&
130
+ pulp_href == o.pulp_href &&
131
+ pulp_created == o.pulp_created &&
132
+ name == o.name &&
133
+ repo_mapping == o.repo_mapping
134
+ end
135
+
136
+ # @see the `==` method
137
+ # @param [Object] Object to be compared
138
+ def eql?(o)
139
+ self == o
140
+ end
141
+
142
+ # Calculates hash code according to all attributes.
143
+ # @return [Integer] Hash code
144
+ def hash
145
+ [pulp_href, pulp_created, name, repo_mapping].hash
146
+ end
147
+
148
+ # Builds the object from hash
149
+ # @param [Hash] attributes Model attributes in the form of hash
150
+ # @return [Object] Returns the model itself
151
+ def self.build_from_hash(attributes)
152
+ new.build_from_hash(attributes)
153
+ end
154
+
155
+ # Builds the object from hash
156
+ # @param [Hash] attributes Model attributes in the form of hash
157
+ # @return [Object] Returns the model itself
158
+ def build_from_hash(attributes)
159
+ return nil unless attributes.is_a?(Hash)
160
+ self.class.openapi_types.each_pair do |key, type|
161
+ if type =~ /\AArray<(.*)>/i
162
+ # check to ensure the input is an array given that the attribute
163
+ # is documented as an array but the input is not
164
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
165
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
166
+ end
167
+ elsif !attributes[self.class.attribute_map[key]].nil?
168
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
169
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
170
+ end
171
+
172
+ self
173
+ end
174
+
175
+ # Deserializes the data based on type
176
+ # @param string type Data type
177
+ # @param string value Value to be deserialized
178
+ # @return [Object] Deserialized data
179
+ def _deserialize(type, value)
180
+ case type.to_sym
181
+ when :DateTime
182
+ DateTime.parse(value)
183
+ when :Date
184
+ Date.parse(value)
185
+ when :String
186
+ value.to_s
187
+ when :Integer
188
+ value.to_i
189
+ when :Float
190
+ value.to_f
191
+ when :Boolean
192
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
193
+ true
194
+ else
195
+ false
196
+ end
197
+ when :Object
198
+ # generic object (usually a Hash), return directly
199
+ value
200
+ when /\AArray<(?<inner_type>.+)>\z/
201
+ inner_type = Regexp.last_match[:inner_type]
202
+ value.map { |v| _deserialize(inner_type, v) }
203
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
204
+ k_type = Regexp.last_match[:k_type]
205
+ v_type = Regexp.last_match[:v_type]
206
+ {}.tap do |hash|
207
+ value.each do |k, v|
208
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
209
+ end
210
+ end
211
+ else # model
212
+ PulpcoreClient.const_get(type).build_from_hash(value)
213
+ end
214
+ end
215
+
216
+ # Returns the string representation of the object
217
+ # @return [String] String presentation of the object
218
+ def to_s
219
+ to_hash.to_s
220
+ end
221
+
222
+ # to_body is an alias to to_hash (backward compatibility)
223
+ # @return [Hash] Returns the object in the form of hash
224
+ def to_body
225
+ to_hash
226
+ end
227
+
228
+ # Returns the object in the form of hash
229
+ # @return [Hash] Returns the object in the form of hash
230
+ def to_hash
231
+ hash = {}
232
+ self.class.attribute_map.each_pair do |attr, param|
233
+ value = self.send(attr)
234
+ if value.nil?
235
+ is_nullable = self.class.openapi_nullable.include?(attr)
236
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
237
+ end
238
+
239
+ hash[param] = _to_hash(value)
240
+ end
241
+ hash
242
+ end
243
+
244
+ # Outputs non-array value in the form of hash
245
+ # For object, use to_hash. Otherwise, just return the value
246
+ # @param [Object] value Any valid value
247
+ # @return [Hash] Returns the value in the form of hash
248
+ def _to_hash(value)
249
+ if value.is_a?(Array)
250
+ value.compact.map { |v| _to_hash(v) }
251
+ elsif value.is_a?(Hash)
252
+ {}.tap do |hash|
253
+ value.each { |k, v| hash[k] = _to_hash(v) }
254
+ end
255
+ elsif value.respond_to? :to_hash
256
+ value.to_hash
257
+ else
258
+ value
259
+ end
260
+ end
261
+ end
262
+ end
@@ -37,6 +37,15 @@ module PulpcoreClient
37
37
  # The worker associated with this task. This field is empty if a worker is not yet assigned.
38
38
  attr_accessor :worker
39
39
 
40
+ # The parent task that spawned this task.
41
+ attr_accessor :parent_task
42
+
43
+ # Any tasks spawned by this task.
44
+ attr_accessor :child_tasks
45
+
46
+ # The task group that this task is a member of.
47
+ attr_accessor :task_group
48
+
40
49
  attr_accessor :progress_reports
41
50
 
42
51
  # Resources created by this task.
@@ -55,6 +64,9 @@ module PulpcoreClient
55
64
  :'finished_at' => :'finished_at',
56
65
  :'error' => :'error',
57
66
  :'worker' => :'worker',
67
+ :'parent_task' => :'parent_task',
68
+ :'child_tasks' => :'child_tasks',
69
+ :'task_group' => :'task_group',
58
70
  :'progress_reports' => :'progress_reports',
59
71
  :'created_resources' => :'created_resources',
60
72
  :'reserved_resources_record' => :'reserved_resources_record'
@@ -72,6 +84,9 @@ module PulpcoreClient
72
84
  :'finished_at' => :'DateTime',
73
85
  :'error' => :'Hash<String, Object>',
74
86
  :'worker' => :'String',
87
+ :'parent_task' => :'String',
88
+ :'child_tasks' => :'Array<String>',
89
+ :'task_group' => :'String',
75
90
  :'progress_reports' => :'Array<ProgressReport>',
76
91
  :'created_resources' => :'Array<String>',
77
92
  :'reserved_resources_record' => :'Array<Object>'
@@ -133,6 +148,20 @@ module PulpcoreClient
133
148
  self.worker = attributes[:'worker']
134
149
  end
135
150
 
151
+ if attributes.key?(:'parent_task')
152
+ self.parent_task = attributes[:'parent_task']
153
+ end
154
+
155
+ if attributes.key?(:'child_tasks')
156
+ if (value = attributes[:'child_tasks']).is_a?(Array)
157
+ self.child_tasks = value
158
+ end
159
+ end
160
+
161
+ if attributes.key?(:'task_group')
162
+ self.task_group = attributes[:'task_group']
163
+ end
164
+
136
165
  if attributes.key?(:'progress_reports')
137
166
  if (value = attributes[:'progress_reports']).is_a?(Array)
138
167
  self.progress_reports = value
@@ -217,6 +246,9 @@ module PulpcoreClient
217
246
  finished_at == o.finished_at &&
218
247
  error == o.error &&
219
248
  worker == o.worker &&
249
+ parent_task == o.parent_task &&
250
+ child_tasks == o.child_tasks &&
251
+ task_group == o.task_group &&
220
252
  progress_reports == o.progress_reports &&
221
253
  created_resources == o.created_resources &&
222
254
  reserved_resources_record == o.reserved_resources_record
@@ -231,7 +263,7 @@ module PulpcoreClient
231
263
  # Calculates hash code according to all attributes.
232
264
  # @return [Integer] Hash code
233
265
  def hash
234
- [pulp_href, pulp_created, state, name, started_at, finished_at, error, worker, progress_reports, created_resources, reserved_resources_record].hash
266
+ [pulp_href, pulp_created, state, name, started_at, finished_at, error, worker, parent_task, child_tasks, task_group, progress_reports, created_resources, reserved_resources_record].hash
235
267
  end
236
268
 
237
269
  # Builds the object from hash
@@ -0,0 +1,291 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: v3
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpcoreClient
16
+ class TaskGroup
17
+ # A description of the task group.
18
+ attr_accessor :description
19
+
20
+ # Number of tasks in the 'waiting' state
21
+ attr_accessor :waiting
22
+
23
+ # Number of tasks in the 'skipped' state
24
+ attr_accessor :skipped
25
+
26
+ # Number of tasks in the 'running' state
27
+ attr_accessor :running
28
+
29
+ # Number of tasks in the 'completed' state
30
+ attr_accessor :completed
31
+
32
+ # Number of tasks in the 'canceled' state
33
+ attr_accessor :canceled
34
+
35
+ # Number of tasks in the 'failed' state
36
+ attr_accessor :failed
37
+
38
+ # Attribute mapping from ruby-style variable name to JSON key.
39
+ def self.attribute_map
40
+ {
41
+ :'description' => :'description',
42
+ :'waiting' => :'waiting',
43
+ :'skipped' => :'skipped',
44
+ :'running' => :'running',
45
+ :'completed' => :'completed',
46
+ :'canceled' => :'canceled',
47
+ :'failed' => :'failed'
48
+ }
49
+ end
50
+
51
+ # Attribute type mapping.
52
+ def self.openapi_types
53
+ {
54
+ :'description' => :'String',
55
+ :'waiting' => :'Integer',
56
+ :'skipped' => :'Integer',
57
+ :'running' => :'Integer',
58
+ :'completed' => :'Integer',
59
+ :'canceled' => :'Integer',
60
+ :'failed' => :'Integer'
61
+ }
62
+ end
63
+
64
+ # List of attributes with nullable: true
65
+ def self.openapi_nullable
66
+ Set.new([
67
+ ])
68
+ end
69
+
70
+ # Initializes the object
71
+ # @param [Hash] attributes Model attributes in the form of hash
72
+ def initialize(attributes = {})
73
+ if (!attributes.is_a?(Hash))
74
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::TaskGroup` initialize method"
75
+ end
76
+
77
+ # check to see if the attribute exists and convert string to symbol for hash key
78
+ attributes = attributes.each_with_object({}) { |(k, v), h|
79
+ if (!self.class.attribute_map.key?(k.to_sym))
80
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::TaskGroup`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
81
+ end
82
+ h[k.to_sym] = v
83
+ }
84
+
85
+ if attributes.key?(:'description')
86
+ self.description = attributes[:'description']
87
+ end
88
+
89
+ if attributes.key?(:'waiting')
90
+ self.waiting = attributes[:'waiting']
91
+ end
92
+
93
+ if attributes.key?(:'skipped')
94
+ self.skipped = attributes[:'skipped']
95
+ end
96
+
97
+ if attributes.key?(:'running')
98
+ self.running = attributes[:'running']
99
+ end
100
+
101
+ if attributes.key?(:'completed')
102
+ self.completed = attributes[:'completed']
103
+ end
104
+
105
+ if attributes.key?(:'canceled')
106
+ self.canceled = attributes[:'canceled']
107
+ end
108
+
109
+ if attributes.key?(:'failed')
110
+ self.failed = attributes[:'failed']
111
+ end
112
+ end
113
+
114
+ # Show invalid properties with the reasons. Usually used together with valid?
115
+ # @return Array for valid properties with the reasons
116
+ def list_invalid_properties
117
+ invalid_properties = Array.new
118
+ if @description.nil?
119
+ invalid_properties.push('invalid value for "description", description cannot be nil.')
120
+ end
121
+
122
+ if @description.to_s.length < 1
123
+ invalid_properties.push('invalid value for "description", the character length must be great than or equal to 1.')
124
+ end
125
+
126
+ invalid_properties
127
+ end
128
+
129
+ # Check to see if the all the properties in the model are valid
130
+ # @return true if the model is valid
131
+ def valid?
132
+ return false if @description.nil?
133
+ return false if @description.to_s.length < 1
134
+ true
135
+ end
136
+
137
+ # Custom attribute writer method with validation
138
+ # @param [Object] description Value to be assigned
139
+ def description=(description)
140
+ if description.nil?
141
+ fail ArgumentError, 'description cannot be nil'
142
+ end
143
+
144
+ if description.to_s.length < 1
145
+ fail ArgumentError, 'invalid value for "description", the character length must be great than or equal to 1.'
146
+ end
147
+
148
+ @description = description
149
+ end
150
+
151
+ # Checks equality by comparing each attribute.
152
+ # @param [Object] Object to be compared
153
+ def ==(o)
154
+ return true if self.equal?(o)
155
+ self.class == o.class &&
156
+ description == o.description &&
157
+ waiting == o.waiting &&
158
+ skipped == o.skipped &&
159
+ running == o.running &&
160
+ completed == o.completed &&
161
+ canceled == o.canceled &&
162
+ failed == o.failed
163
+ end
164
+
165
+ # @see the `==` method
166
+ # @param [Object] Object to be compared
167
+ def eql?(o)
168
+ self == o
169
+ end
170
+
171
+ # Calculates hash code according to all attributes.
172
+ # @return [Integer] Hash code
173
+ def hash
174
+ [description, waiting, skipped, running, completed, canceled, failed].hash
175
+ end
176
+
177
+ # Builds the object from hash
178
+ # @param [Hash] attributes Model attributes in the form of hash
179
+ # @return [Object] Returns the model itself
180
+ def self.build_from_hash(attributes)
181
+ new.build_from_hash(attributes)
182
+ end
183
+
184
+ # Builds the object from hash
185
+ # @param [Hash] attributes Model attributes in the form of hash
186
+ # @return [Object] Returns the model itself
187
+ def build_from_hash(attributes)
188
+ return nil unless attributes.is_a?(Hash)
189
+ self.class.openapi_types.each_pair do |key, type|
190
+ if type =~ /\AArray<(.*)>/i
191
+ # check to ensure the input is an array given that the attribute
192
+ # is documented as an array but the input is not
193
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
194
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
195
+ end
196
+ elsif !attributes[self.class.attribute_map[key]].nil?
197
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
198
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
199
+ end
200
+
201
+ self
202
+ end
203
+
204
+ # Deserializes the data based on type
205
+ # @param string type Data type
206
+ # @param string value Value to be deserialized
207
+ # @return [Object] Deserialized data
208
+ def _deserialize(type, value)
209
+ case type.to_sym
210
+ when :DateTime
211
+ DateTime.parse(value)
212
+ when :Date
213
+ Date.parse(value)
214
+ when :String
215
+ value.to_s
216
+ when :Integer
217
+ value.to_i
218
+ when :Float
219
+ value.to_f
220
+ when :Boolean
221
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
222
+ true
223
+ else
224
+ false
225
+ end
226
+ when :Object
227
+ # generic object (usually a Hash), return directly
228
+ value
229
+ when /\AArray<(?<inner_type>.+)>\z/
230
+ inner_type = Regexp.last_match[:inner_type]
231
+ value.map { |v| _deserialize(inner_type, v) }
232
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
233
+ k_type = Regexp.last_match[:k_type]
234
+ v_type = Regexp.last_match[:v_type]
235
+ {}.tap do |hash|
236
+ value.each do |k, v|
237
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
238
+ end
239
+ end
240
+ else # model
241
+ PulpcoreClient.const_get(type).build_from_hash(value)
242
+ end
243
+ end
244
+
245
+ # Returns the string representation of the object
246
+ # @return [String] String presentation of the object
247
+ def to_s
248
+ to_hash.to_s
249
+ end
250
+
251
+ # to_body is an alias to to_hash (backward compatibility)
252
+ # @return [Hash] Returns the object in the form of hash
253
+ def to_body
254
+ to_hash
255
+ end
256
+
257
+ # Returns the object in the form of hash
258
+ # @return [Hash] Returns the object in the form of hash
259
+ def to_hash
260
+ hash = {}
261
+ self.class.attribute_map.each_pair do |attr, param|
262
+ value = self.send(attr)
263
+ if value.nil?
264
+ is_nullable = self.class.openapi_nullable.include?(attr)
265
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
266
+ end
267
+
268
+ hash[param] = _to_hash(value)
269
+ end
270
+ hash
271
+ end
272
+
273
+ # Outputs non-array value in the form of hash
274
+ # For object, use to_hash. Otherwise, just return the value
275
+ # @param [Object] value Any valid value
276
+ # @return [Hash] Returns the value in the form of hash
277
+ def _to_hash(value)
278
+ if value.is_a?(Array)
279
+ value.compact.map { |v| _to_hash(v) }
280
+ elsif value.is_a?(Hash)
281
+ {}.tap do |hash|
282
+ value.each { |k, v| hash[k] = _to_hash(v) }
283
+ end
284
+ elsif value.respond_to? :to_hash
285
+ value.to_hash
286
+ else
287
+ value
288
+ end
289
+ end
290
+ end
291
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.2.3
11
11
  =end
12
12
 
13
13
  module PulpcoreClient
14
- VERSION = '3.2.1'
14
+ VERSION = '3.3.0'
15
15
  end
@@ -21,18 +21,29 @@ require 'pulpcore_client/models/artifact'
21
21
  require 'pulpcore_client/models/async_operation_response'
22
22
  require 'pulpcore_client/models/content_app_status'
23
23
  require 'pulpcore_client/models/database_connection'
24
+ require 'pulpcore_client/models/import'
24
25
  require 'pulpcore_client/models/inline_response200'
25
26
  require 'pulpcore_client/models/inline_response2001'
26
27
  require 'pulpcore_client/models/inline_response2002'
27
28
  require 'pulpcore_client/models/inline_response2003'
28
29
  require 'pulpcore_client/models/inline_response2004'
30
+ require 'pulpcore_client/models/inline_response2005'
31
+ require 'pulpcore_client/models/inline_response2006'
32
+ require 'pulpcore_client/models/inline_response2007'
33
+ require 'pulpcore_client/models/inline_response2008'
34
+ require 'pulpcore_client/models/inline_response2009'
29
35
  require 'pulpcore_client/models/progress_report'
36
+ require 'pulpcore_client/models/pulp_export'
37
+ require 'pulpcore_client/models/pulp_exporter'
38
+ require 'pulpcore_client/models/pulp_import'
39
+ require 'pulpcore_client/models/pulp_importer'
30
40
  require 'pulpcore_client/models/redis_connection'
31
41
  require 'pulpcore_client/models/signing_service'
32
42
  require 'pulpcore_client/models/status'
33
43
  require 'pulpcore_client/models/storage'
34
44
  require 'pulpcore_client/models/task'
35
45
  require 'pulpcore_client/models/task_cancel'
46
+ require 'pulpcore_client/models/task_group'
36
47
  require 'pulpcore_client/models/upload'
37
48
  require 'pulpcore_client/models/upload_chunk'
38
49
  require 'pulpcore_client/models/upload_commit'
@@ -42,9 +53,14 @@ require 'pulpcore_client/models/worker'
42
53
 
43
54
  # APIs
44
55
  require 'pulpcore_client/api/artifacts_api'
56
+ require 'pulpcore_client/api/exporters_core_exports_api'
57
+ require 'pulpcore_client/api/exporters_pulp_api'
58
+ require 'pulpcore_client/api/importers_core_imports_api'
59
+ require 'pulpcore_client/api/importers_pulp_api'
45
60
  require 'pulpcore_client/api/orphans_api'
46
61
  require 'pulpcore_client/api/signing_services_api'
47
62
  require 'pulpcore_client/api/status_api'
63
+ require 'pulpcore_client/api/task_groups_api'
48
64
  require 'pulpcore_client/api/tasks_api'
49
65
  require 'pulpcore_client/api/uploads_api'
50
66
  require 'pulpcore_client/api/workers_api'
@@ -65,6 +65,7 @@ describe 'ArtifactsApi' do
65
65
  # unit tests for list
66
66
  # List artifacts
67
67
  # @param [Hash] opts the optional parameters
68
+ # @option opts [String] :ordering Which field to use when ordering the results.
68
69
  # @option opts [String] :repository_version Repository Version referenced by HREF
69
70
  # @option opts [String] :md5 Filter results where md5 matches value
70
71
  # @option opts [String] :sha1 Filter results where sha1 matches value