pulpcore_client 3.2.1 → 3.3.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -80,11 +80,11 @@ module PulpcoreClient
80
80
  # List tasks
81
81
  # @param [Hash] opts the optional parameters
82
82
  # @option opts [String] :ordering Which field to use when ordering the results.
83
+ # @option opts [String] :name__contains Filter results where name contains value
83
84
  # @option opts [String] :state
84
85
  # @option opts [String] :state__in Filter results where state is in a comma-separated list of values
85
86
  # @option opts [String] :worker Foreign Key referenced by HREF
86
87
  # @option opts [String] :worker__in Filter results where worker is in a comma-separated list of values
87
- # @option opts [String] :name__contains Filter results where name contains value
88
88
  # @option opts [String] :started_at__lt Filter results where started_at is less than value
89
89
  # @option opts [String] :started_at__lte Filter results where started_at is less than or equal to value
90
90
  # @option opts [String] :started_at__gt Filter results where started_at is greater than value
@@ -95,17 +95,19 @@ module PulpcoreClient
95
95
  # @option opts [String] :finished_at__gt Filter results where finished_at is greater than value
96
96
  # @option opts [String] :finished_at__gte Filter results where finished_at is greater than or equal to value
97
97
  # @option opts [String] :finished_at__range Filter results where finished_at is between two comma separated values
98
+ # @option opts [String] :parent_task Foreign Key referenced by HREF
99
+ # @option opts [String] :child_tasks Foreign Key referenced by HREF
100
+ # @option opts [String] :task_group Foreign Key referenced by HREF
98
101
  # @option opts [String] :reserved_resources_record
99
102
  # @option opts [String] :created_resources
100
103
  # @option opts [String] :name
101
104
  # @option opts [String] :started_at ISO 8601 formatted dates are supported
102
105
  # @option opts [String] :finished_at ISO 8601 formatted dates are supported
103
- # @option opts [String] :parent Foreign Key referenced by HREF
104
106
  # @option opts [Integer] :limit Number of results to return per page.
105
107
  # @option opts [Integer] :offset The initial index from which to return the results.
106
108
  # @option opts [String] :fields A list of fields to include in the response.
107
109
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
108
- # @return [InlineResponse2002]
110
+ # @return [InlineResponse2007]
109
111
  def list(opts = {})
110
112
  data, _status_code, _headers = list_with_http_info(opts)
111
113
  data
@@ -114,11 +116,11 @@ module PulpcoreClient
114
116
  # List tasks
115
117
  # @param [Hash] opts the optional parameters
116
118
  # @option opts [String] :ordering Which field to use when ordering the results.
119
+ # @option opts [String] :name__contains Filter results where name contains value
117
120
  # @option opts [String] :state
118
121
  # @option opts [String] :state__in Filter results where state is in a comma-separated list of values
119
122
  # @option opts [String] :worker Foreign Key referenced by HREF
120
123
  # @option opts [String] :worker__in Filter results where worker is in a comma-separated list of values
121
- # @option opts [String] :name__contains Filter results where name contains value
122
124
  # @option opts [String] :started_at__lt Filter results where started_at is less than value
123
125
  # @option opts [String] :started_at__lte Filter results where started_at is less than or equal to value
124
126
  # @option opts [String] :started_at__gt Filter results where started_at is greater than value
@@ -129,17 +131,19 @@ module PulpcoreClient
129
131
  # @option opts [String] :finished_at__gt Filter results where finished_at is greater than value
130
132
  # @option opts [String] :finished_at__gte Filter results where finished_at is greater than or equal to value
131
133
  # @option opts [String] :finished_at__range Filter results where finished_at is between two comma separated values
134
+ # @option opts [String] :parent_task Foreign Key referenced by HREF
135
+ # @option opts [String] :child_tasks Foreign Key referenced by HREF
136
+ # @option opts [String] :task_group Foreign Key referenced by HREF
132
137
  # @option opts [String] :reserved_resources_record
133
138
  # @option opts [String] :created_resources
134
139
  # @option opts [String] :name
135
140
  # @option opts [String] :started_at ISO 8601 formatted dates are supported
136
141
  # @option opts [String] :finished_at ISO 8601 formatted dates are supported
137
- # @option opts [String] :parent Foreign Key referenced by HREF
138
142
  # @option opts [Integer] :limit Number of results to return per page.
139
143
  # @option opts [Integer] :offset The initial index from which to return the results.
140
144
  # @option opts [String] :fields A list of fields to include in the response.
141
145
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
142
- # @return [Array<(InlineResponse2002, Integer, Hash)>] InlineResponse2002 data, response status code and response headers
146
+ # @return [Array<(InlineResponse2007, Integer, Hash)>] InlineResponse2007 data, response status code and response headers
143
147
  def list_with_http_info(opts = {})
144
148
  if @api_client.config.debugging
145
149
  @api_client.config.logger.debug 'Calling API: TasksApi.list ...'
@@ -150,11 +154,11 @@ module PulpcoreClient
150
154
  # query parameters
151
155
  query_params = opts[:query_params] || {}
152
156
  query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
157
+ query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
153
158
  query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
154
159
  query_params[:'state__in'] = opts[:'state__in'] if !opts[:'state__in'].nil?
155
160
  query_params[:'worker'] = opts[:'worker'] if !opts[:'worker'].nil?
156
161
  query_params[:'worker__in'] = opts[:'worker__in'] if !opts[:'worker__in'].nil?
157
- query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
158
162
  query_params[:'started_at__lt'] = opts[:'started_at__lt'] if !opts[:'started_at__lt'].nil?
159
163
  query_params[:'started_at__lte'] = opts[:'started_at__lte'] if !opts[:'started_at__lte'].nil?
160
164
  query_params[:'started_at__gt'] = opts[:'started_at__gt'] if !opts[:'started_at__gt'].nil?
@@ -165,12 +169,14 @@ module PulpcoreClient
165
169
  query_params[:'finished_at__gt'] = opts[:'finished_at__gt'] if !opts[:'finished_at__gt'].nil?
166
170
  query_params[:'finished_at__gte'] = opts[:'finished_at__gte'] if !opts[:'finished_at__gte'].nil?
167
171
  query_params[:'finished_at__range'] = opts[:'finished_at__range'] if !opts[:'finished_at__range'].nil?
172
+ query_params[:'parent_task'] = opts[:'parent_task'] if !opts[:'parent_task'].nil?
173
+ query_params[:'child_tasks'] = opts[:'child_tasks'] if !opts[:'child_tasks'].nil?
174
+ query_params[:'task_group'] = opts[:'task_group'] if !opts[:'task_group'].nil?
168
175
  query_params[:'reserved_resources_record'] = opts[:'reserved_resources_record'] if !opts[:'reserved_resources_record'].nil?
169
176
  query_params[:'created_resources'] = opts[:'created_resources'] if !opts[:'created_resources'].nil?
170
177
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
171
178
  query_params[:'started_at'] = opts[:'started_at'] if !opts[:'started_at'].nil?
172
179
  query_params[:'finished_at'] = opts[:'finished_at'] if !opts[:'finished_at'].nil?
173
- query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].nil?
174
180
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
175
181
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
176
182
  query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
@@ -188,7 +194,7 @@ module PulpcoreClient
188
194
  post_body = opts[:body]
189
195
 
190
196
  # return_type
191
- return_type = opts[:return_type] || 'InlineResponse2002'
197
+ return_type = opts[:return_type] || 'InlineResponse2007'
192
198
 
193
199
  # auth_names
194
200
  auth_names = opts[:auth_names] || ['Basic']
@@ -216,12 +216,13 @@ module PulpcoreClient
216
216
  # List uploads
217
217
  # View for chunked uploads.
218
218
  # @param [Hash] opts the optional parameters
219
+ # @option opts [String] :ordering Which field to use when ordering the results.
219
220
  # @option opts [String] :completed ISO 8601 formatted dates are supported
220
221
  # @option opts [Integer] :limit Number of results to return per page.
221
222
  # @option opts [Integer] :offset The initial index from which to return the results.
222
223
  # @option opts [String] :fields A list of fields to include in the response.
223
224
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
224
- # @return [InlineResponse2003]
225
+ # @return [InlineResponse2008]
225
226
  def list(opts = {})
226
227
  data, _status_code, _headers = list_with_http_info(opts)
227
228
  data
@@ -230,12 +231,13 @@ module PulpcoreClient
230
231
  # List uploads
231
232
  # View for chunked uploads.
232
233
  # @param [Hash] opts the optional parameters
234
+ # @option opts [String] :ordering Which field to use when ordering the results.
233
235
  # @option opts [String] :completed ISO 8601 formatted dates are supported
234
236
  # @option opts [Integer] :limit Number of results to return per page.
235
237
  # @option opts [Integer] :offset The initial index from which to return the results.
236
238
  # @option opts [String] :fields A list of fields to include in the response.
237
239
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
238
- # @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
240
+ # @return [Array<(InlineResponse2008, Integer, Hash)>] InlineResponse2008 data, response status code and response headers
239
241
  def list_with_http_info(opts = {})
240
242
  if @api_client.config.debugging
241
243
  @api_client.config.logger.debug 'Calling API: UploadsApi.list ...'
@@ -245,6 +247,7 @@ module PulpcoreClient
245
247
 
246
248
  # query parameters
247
249
  query_params = opts[:query_params] || {}
250
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
248
251
  query_params[:'completed'] = opts[:'completed'] if !opts[:'completed'].nil?
249
252
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
250
253
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
@@ -263,7 +266,7 @@ module PulpcoreClient
263
266
  post_body = opts[:body]
264
267
 
265
268
  # return_type
266
- return_type = opts[:return_type] || 'InlineResponse2003'
269
+ return_type = opts[:return_type] || 'InlineResponse2008'
267
270
 
268
271
  # auth_names
269
272
  auth_names = opts[:auth_names] || ['Basic']
@@ -21,6 +21,7 @@ module PulpcoreClient
21
21
  end
22
22
  # List workers
23
23
  # @param [Hash] opts the optional parameters
24
+ # @option opts [String] :ordering Which field to use when ordering the results.
24
25
  # @option opts [String] :name
25
26
  # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
26
27
  # @option opts [String] :last_heartbeat__lt Filter results where last_heartbeat is less than value
@@ -35,7 +36,7 @@ module PulpcoreClient
35
36
  # @option opts [Integer] :offset The initial index from which to return the results.
36
37
  # @option opts [String] :fields A list of fields to include in the response.
37
38
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
38
- # @return [InlineResponse2004]
39
+ # @return [InlineResponse2009]
39
40
  def list(opts = {})
40
41
  data, _status_code, _headers = list_with_http_info(opts)
41
42
  data
@@ -43,6 +44,7 @@ module PulpcoreClient
43
44
 
44
45
  # List workers
45
46
  # @param [Hash] opts the optional parameters
47
+ # @option opts [String] :ordering Which field to use when ordering the results.
46
48
  # @option opts [String] :name
47
49
  # @option opts [String] :name__in Filter results where name is in a comma-separated list of values
48
50
  # @option opts [String] :last_heartbeat__lt Filter results where last_heartbeat is less than value
@@ -57,7 +59,7 @@ module PulpcoreClient
57
59
  # @option opts [Integer] :offset The initial index from which to return the results.
58
60
  # @option opts [String] :fields A list of fields to include in the response.
59
61
  # @option opts [String] :exclude_fields A list of fields to exclude from the response.
60
- # @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
62
+ # @return [Array<(InlineResponse2009, Integer, Hash)>] InlineResponse2009 data, response status code and response headers
61
63
  def list_with_http_info(opts = {})
62
64
  if @api_client.config.debugging
63
65
  @api_client.config.logger.debug 'Calling API: WorkersApi.list ...'
@@ -67,6 +69,7 @@ module PulpcoreClient
67
69
 
68
70
  # query parameters
69
71
  query_params = opts[:query_params] || {}
72
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
70
73
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
71
74
  query_params[:'name__in'] = opts[:'name__in'] if !opts[:'name__in'].nil?
72
75
  query_params[:'last_heartbeat__lt'] = opts[:'last_heartbeat__lt'] if !opts[:'last_heartbeat__lt'].nil?
@@ -94,7 +97,7 @@ module PulpcoreClient
94
97
  post_body = opts[:body]
95
98
 
96
99
  # return_type
97
- return_type = opts[:return_type] || 'InlineResponse2004'
100
+ return_type = opts[:return_type] || 'InlineResponse2009'
98
101
 
99
102
  # auth_names
100
103
  auth_names = opts[:auth_names] || ['Basic']
@@ -0,0 +1,246 @@
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 Import
17
+ attr_accessor :pulp_href
18
+
19
+ # Timestamp of creation.
20
+ attr_accessor :pulp_created
21
+
22
+ # A URI of the Task that ran the Import.
23
+ attr_accessor :task
24
+
25
+ # Any parameters that were used to create the import.
26
+ attr_accessor :params
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
+ :'task' => :'task',
34
+ :'params' => :'params'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.openapi_types
40
+ {
41
+ :'pulp_href' => :'String',
42
+ :'pulp_created' => :'DateTime',
43
+ :'task' => :'String',
44
+ :'params' => :'Object'
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::Import` 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::Import`. 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?(:'task')
78
+ self.task = attributes[:'task']
79
+ end
80
+
81
+ if attributes.key?(:'params')
82
+ self.params = attributes[:'params']
83
+ end
84
+ end
85
+
86
+ # Show invalid properties with the reasons. Usually used together with valid?
87
+ # @return Array for valid properties with the reasons
88
+ def list_invalid_properties
89
+ invalid_properties = Array.new
90
+ if @task.nil?
91
+ invalid_properties.push('invalid value for "task", task cannot be nil.')
92
+ end
93
+
94
+ if @params.nil?
95
+ invalid_properties.push('invalid value for "params", params cannot be nil.')
96
+ end
97
+
98
+ invalid_properties
99
+ end
100
+
101
+ # Check to see if the all the properties in the model are valid
102
+ # @return true if the model is valid
103
+ def valid?
104
+ return false if @task.nil?
105
+ return false if @params.nil?
106
+ true
107
+ end
108
+
109
+ # Checks equality by comparing each attribute.
110
+ # @param [Object] Object to be compared
111
+ def ==(o)
112
+ return true if self.equal?(o)
113
+ self.class == o.class &&
114
+ pulp_href == o.pulp_href &&
115
+ pulp_created == o.pulp_created &&
116
+ task == o.task &&
117
+ params == o.params
118
+ end
119
+
120
+ # @see the `==` method
121
+ # @param [Object] Object to be compared
122
+ def eql?(o)
123
+ self == o
124
+ end
125
+
126
+ # Calculates hash code according to all attributes.
127
+ # @return [Integer] Hash code
128
+ def hash
129
+ [pulp_href, pulp_created, task, params].hash
130
+ end
131
+
132
+ # Builds the object from hash
133
+ # @param [Hash] attributes Model attributes in the form of hash
134
+ # @return [Object] Returns the model itself
135
+ def self.build_from_hash(attributes)
136
+ new.build_from_hash(attributes)
137
+ end
138
+
139
+ # Builds the object from hash
140
+ # @param [Hash] attributes Model attributes in the form of hash
141
+ # @return [Object] Returns the model itself
142
+ def build_from_hash(attributes)
143
+ return nil unless attributes.is_a?(Hash)
144
+ self.class.openapi_types.each_pair do |key, type|
145
+ if type =~ /\AArray<(.*)>/i
146
+ # check to ensure the input is an array given that the attribute
147
+ # is documented as an array but the input is not
148
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
149
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
150
+ end
151
+ elsif !attributes[self.class.attribute_map[key]].nil?
152
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
153
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
154
+ end
155
+
156
+ self
157
+ end
158
+
159
+ # Deserializes the data based on type
160
+ # @param string type Data type
161
+ # @param string value Value to be deserialized
162
+ # @return [Object] Deserialized data
163
+ def _deserialize(type, value)
164
+ case type.to_sym
165
+ when :DateTime
166
+ DateTime.parse(value)
167
+ when :Date
168
+ Date.parse(value)
169
+ when :String
170
+ value.to_s
171
+ when :Integer
172
+ value.to_i
173
+ when :Float
174
+ value.to_f
175
+ when :Boolean
176
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
177
+ true
178
+ else
179
+ false
180
+ end
181
+ when :Object
182
+ # generic object (usually a Hash), return directly
183
+ value
184
+ when /\AArray<(?<inner_type>.+)>\z/
185
+ inner_type = Regexp.last_match[:inner_type]
186
+ value.map { |v| _deserialize(inner_type, v) }
187
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
188
+ k_type = Regexp.last_match[:k_type]
189
+ v_type = Regexp.last_match[:v_type]
190
+ {}.tap do |hash|
191
+ value.each do |k, v|
192
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
193
+ end
194
+ end
195
+ else # model
196
+ PulpcoreClient.const_get(type).build_from_hash(value)
197
+ end
198
+ end
199
+
200
+ # Returns the string representation of the object
201
+ # @return [String] String presentation of the object
202
+ def to_s
203
+ to_hash.to_s
204
+ end
205
+
206
+ # to_body is an alias to to_hash (backward compatibility)
207
+ # @return [Hash] Returns the object in the form of hash
208
+ def to_body
209
+ to_hash
210
+ end
211
+
212
+ # Returns the object in the form of hash
213
+ # @return [Hash] Returns the object in the form of hash
214
+ def to_hash
215
+ hash = {}
216
+ self.class.attribute_map.each_pair do |attr, param|
217
+ value = self.send(attr)
218
+ if value.nil?
219
+ is_nullable = self.class.openapi_nullable.include?(attr)
220
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
221
+ end
222
+
223
+ hash[param] = _to_hash(value)
224
+ end
225
+ hash
226
+ end
227
+
228
+ # Outputs non-array value in the form of hash
229
+ # For object, use to_hash. Otherwise, just return the value
230
+ # @param [Object] value Any valid value
231
+ # @return [Hash] Returns the value in the form of hash
232
+ def _to_hash(value)
233
+ if value.is_a?(Array)
234
+ value.compact.map { |v| _to_hash(v) }
235
+ elsif value.is_a?(Hash)
236
+ {}.tap do |hash|
237
+ value.each { |k, v| hash[k] = _to_hash(v) }
238
+ end
239
+ elsif value.respond_to? :to_hash
240
+ value.to_hash
241
+ else
242
+ value
243
+ end
244
+ end
245
+ end
246
+ end
@@ -38,7 +38,7 @@ module PulpcoreClient
38
38
  :'count' => :'Integer',
39
39
  :'_next' => :'String',
40
40
  :'previous' => :'String',
41
- :'results' => :'Array<SigningService>'
41
+ :'results' => :'Array<PulpExporter>'
42
42
  }
43
43
  end
44
44
 
@@ -38,7 +38,7 @@ module PulpcoreClient
38
38
  :'count' => :'Integer',
39
39
  :'_next' => :'String',
40
40
  :'previous' => :'String',
41
- :'results' => :'Array<Task>'
41
+ :'results' => :'Array<PulpExport>'
42
42
  }
43
43
  end
44
44
 
@@ -38,7 +38,7 @@ module PulpcoreClient
38
38
  :'count' => :'Integer',
39
39
  :'_next' => :'String',
40
40
  :'previous' => :'String',
41
- :'results' => :'Array<Upload>'
41
+ :'results' => :'Array<PulpImporter>'
42
42
  }
43
43
  end
44
44
 
@@ -38,7 +38,7 @@ module PulpcoreClient
38
38
  :'count' => :'Integer',
39
39
  :'_next' => :'String',
40
40
  :'previous' => :'String',
41
- :'results' => :'Array<Worker>'
41
+ :'results' => :'Array<Import>'
42
42
  }
43
43
  end
44
44