pulpcore_client 3.21.29 → 3.22.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -5
  3. data/docs/AccessPoliciesApi.md +2 -2
  4. data/docs/ArtifactDistributionResponse.md +29 -0
  5. data/docs/ContentSettingsResponse.md +19 -0
  6. data/docs/ContentguardsApi.md +2 -2
  7. data/docs/ContentguardsContentRedirectApi.md +2 -2
  8. data/docs/ContentguardsRbacApi.md +2 -2
  9. data/docs/DistributionResponse.md +1 -1
  10. data/docs/DistributionsApi.md +5 -5
  11. data/docs/DistributionsArtifactsApi.md +154 -0
  12. data/docs/ExportersFilesystemApi.md +2 -2
  13. data/docs/ExportersPulpApi.md +2 -2
  14. data/docs/FilesystemExport.md +1 -3
  15. data/docs/ImportersPulpApi.md +2 -2
  16. data/docs/PaginatedArtifactDistributionResponseList.md +23 -0
  17. data/docs/PublicationsApi.md +2 -2
  18. data/docs/RemoteResponse.md +4 -2
  19. data/docs/RemoteResponseHiddenFields.md +19 -0
  20. data/docs/RemotesApi.md +4 -4
  21. data/docs/RepositoriesApi.md +3 -3
  22. data/docs/RepositoryResponse.md +1 -1
  23. data/docs/RepositoryVersionsApi.md +4 -4
  24. data/docs/SigningServicesApi.md +4 -2
  25. data/docs/StatusResponse.md +3 -1
  26. data/docs/TaskGroupsApi.md +0 -2
  27. data/docs/TaskSchedulesApi.md +4 -4
  28. data/docs/TasksApi.md +32 -18
  29. data/docs/UploadsApi.md +10 -0
  30. data/docs/UserResponse.md +3 -1
  31. data/docs/WorkersApi.md +4 -4
  32. data/lib/pulpcore_client/api/access_policies_api.rb +3 -3
  33. data/lib/pulpcore_client/api/artifacts_api.rb +1 -1
  34. data/lib/pulpcore_client/api/contentguards_api.rb +3 -3
  35. data/lib/pulpcore_client/api/contentguards_content_redirect_api.rb +3 -3
  36. data/lib/pulpcore_client/api/contentguards_rbac_api.rb +3 -3
  37. data/lib/pulpcore_client/api/distributions_api.rb +7 -7
  38. data/lib/pulpcore_client/api/distributions_artifacts_api.rb +198 -0
  39. data/lib/pulpcore_client/api/exporters_filesystem_api.rb +3 -3
  40. data/lib/pulpcore_client/api/exporters_pulp_api.rb +3 -3
  41. data/lib/pulpcore_client/api/groups_api.rb +1 -1
  42. data/lib/pulpcore_client/api/importers_pulp_api.rb +3 -3
  43. data/lib/pulpcore_client/api/publications_api.rb +3 -3
  44. data/lib/pulpcore_client/api/remotes_api.rb +5 -5
  45. data/lib/pulpcore_client/api/repositories_api.rb +3 -3
  46. data/lib/pulpcore_client/api/repository_versions_api.rb +5 -5
  47. data/lib/pulpcore_client/api/roles_api.rb +1 -1
  48. data/lib/pulpcore_client/api/signing_services_api.rb +9 -2
  49. data/lib/pulpcore_client/api/task_groups_api.rb +0 -7
  50. data/lib/pulpcore_client/api/task_schedules_api.rb +5 -5
  51. data/lib/pulpcore_client/api/tasks_api.rb +40 -19
  52. data/lib/pulpcore_client/api/uploads_api.rb +19 -0
  53. data/lib/pulpcore_client/api/users_api.rb +1 -1
  54. data/lib/pulpcore_client/api/workers_api.rb +5 -5
  55. data/lib/pulpcore_client/models/artifact_distribution_response.rb +279 -0
  56. data/lib/pulpcore_client/models/content_settings_response.rb +228 -0
  57. data/lib/pulpcore_client/models/distribution_response.rb +4 -2
  58. data/lib/pulpcore_client/models/filesystem_export.rb +4 -14
  59. data/lib/pulpcore_client/models/group_role.rb +19 -0
  60. data/lib/pulpcore_client/models/paginated_artifact_distribution_response_list.rb +237 -0
  61. data/lib/pulpcore_client/models/remote_response.rb +21 -7
  62. data/lib/pulpcore_client/models/remote_response_hidden_fields.rb +215 -0
  63. data/lib/pulpcore_client/models/repository_response.rb +4 -2
  64. data/lib/pulpcore_client/models/status_response.rb +19 -4
  65. data/lib/pulpcore_client/models/user_response.rb +16 -4
  66. data/lib/pulpcore_client/models/user_role.rb +19 -0
  67. data/lib/pulpcore_client/version.rb +1 -1
  68. data/lib/pulpcore_client.rb +5 -0
  69. data/spec/api/access_policies_api_spec.rb +1 -1
  70. data/spec/api/contentguards_api_spec.rb +1 -1
  71. data/spec/api/contentguards_content_redirect_api_spec.rb +1 -1
  72. data/spec/api/contentguards_rbac_api_spec.rb +1 -1
  73. data/spec/api/distributions_api_spec.rb +3 -3
  74. data/spec/api/distributions_artifacts_api_spec.rb +76 -0
  75. data/spec/api/exporters_filesystem_api_spec.rb +1 -1
  76. data/spec/api/exporters_pulp_api_spec.rb +1 -1
  77. data/spec/api/importers_pulp_api_spec.rb +1 -1
  78. data/spec/api/publications_api_spec.rb +1 -1
  79. data/spec/api/remotes_api_spec.rb +2 -2
  80. data/spec/api/repositories_api_spec.rb +1 -1
  81. data/spec/api/repository_versions_api_spec.rb +2 -2
  82. data/spec/api/signing_services_api_spec.rb +2 -1
  83. data/spec/api/task_groups_api_spec.rb +0 -1
  84. data/spec/api/task_schedules_api_spec.rb +2 -2
  85. data/spec/api/tasks_api_spec.rb +16 -9
  86. data/spec/api/uploads_api_spec.rb +5 -0
  87. data/spec/api/workers_api_spec.rb +2 -2
  88. data/spec/models/artifact_distribution_response_spec.rb +77 -0
  89. data/spec/models/content_settings_response_spec.rb +47 -0
  90. data/spec/models/filesystem_export_spec.rb +0 -6
  91. data/spec/models/paginated_artifact_distribution_response_list_spec.rb +59 -0
  92. data/spec/models/remote_response_hidden_fields_spec.rb +47 -0
  93. data/spec/models/remote_response_spec.rb +6 -0
  94. data/spec/models/status_response_spec.rb +6 -0
  95. data/spec/models/user_response_spec.rb +6 -0
  96. metadata +148 -128
@@ -150,33 +150,40 @@ module PulpcoreClient
150
150
  # List tasks
151
151
  # A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
152
152
  # @param [Hash] opts the optional parameters
153
- # @option opts [String] :child_tasks Foreign Key referenced by HREF
153
+ # @option opts [String] :child_tasks Filter results where child_tasks matches value
154
154
  # @option opts [String] :created_resources
155
- # @option opts [DateTime] :finished_at ISO 8601 formatted dates are supported
155
+ # @option opts [String] :exclusive_resources
156
+ # @option opts [Array<String>] :exclusive_resources__in Multiple values may be separated by commas.
157
+ # @option opts [DateTime] :finished_at Filter results where finished_at matches value
156
158
  # @option opts [DateTime] :finished_at__gt Filter results where finished_at is greater than value
157
159
  # @option opts [DateTime] :finished_at__gte Filter results where finished_at is greater than or equal to value
158
160
  # @option opts [DateTime] :finished_at__lt Filter results where finished_at is less than value
159
161
  # @option opts [DateTime] :finished_at__lte Filter results where finished_at is less than or equal to value
160
162
  # @option opts [Array<DateTime>] :finished_at__range Filter results where finished_at is between two comma separated values
161
163
  # @option opts [Integer] :limit Number of results to return per page.
162
- # @option opts [String] :logging_cid
164
+ # @option opts [String] :logging_cid Filter results where logging_cid matches value
163
165
  # @option opts [String] :logging_cid__contains Filter results where logging_cid contains value
164
- # @option opts [String] :name
166
+ # @option opts [String] :name Filter results where name matches value
165
167
  # @option opts [String] :name__contains Filter results where name contains value
168
+ # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
166
169
  # @option opts [Integer] :offset The initial index from which to return the results.
167
170
  # @option opts [Array<String>] :ordering Ordering
168
- # @option opts [String] :parent_task Foreign Key referenced by HREF
171
+ # @option opts [String] :parent_task Filter results where parent_task matches value
172
+ # @option opts [String] :reserved_resources
173
+ # @option opts [Array<String>] :reserved_resources__in Multiple values may be separated by commas.
169
174
  # @option opts [Array<String>] :reserved_resources_record
170
- # @option opts [DateTime] :started_at ISO 8601 formatted dates are supported
175
+ # @option opts [String] :shared_resources
176
+ # @option opts [Array<String>] :shared_resources__in Multiple values may be separated by commas.
177
+ # @option opts [DateTime] :started_at Filter results where started_at matches value
171
178
  # @option opts [DateTime] :started_at__gt Filter results where started_at is greater than value
172
179
  # @option opts [DateTime] :started_at__gte Filter results where started_at is greater than or equal to value
173
180
  # @option opts [DateTime] :started_at__lt Filter results where started_at is less than value
174
181
  # @option opts [DateTime] :started_at__lte Filter results where started_at is less than or equal to value
175
182
  # @option opts [Array<DateTime>] :started_at__range Filter results where started_at is between two comma separated values
176
- # @option opts [String] :state
183
+ # @option opts [String] :state Filter results where state matches value
177
184
  # @option opts [Array<String>] :state__in Filter results where state is in a comma-separated list of values
178
- # @option opts [String] :task_group Foreign Key referenced by HREF
179
- # @option opts [String] :worker Foreign Key referenced by HREF
185
+ # @option opts [String] :task_group Filter results where task_group matches value
186
+ # @option opts [String] :worker Filter results where worker matches value
180
187
  # @option opts [Array<String>] :worker__in Filter results where worker is in a comma-separated list of values
181
188
  # @option opts [Array<String>] :fields A list of fields to include in the response.
182
189
  # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
@@ -189,33 +196,40 @@ module PulpcoreClient
189
196
  # List tasks
190
197
  # A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \&quot;Normal\&quot; Django Models and Master/Detail models are supported by the &#x60;&#x60;register_with&#x60;&#x60; method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to &#39;pk&#39; endpoint_name (str): The name of the final path segment that should identify the ViewSet&#39;s collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \&quot;parent_prefix\&quot; of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object&#39;s identity. schema (DefaultSchema): The schema class to use by default in a viewset.
191
198
  # @param [Hash] opts the optional parameters
192
- # @option opts [String] :child_tasks Foreign Key referenced by HREF
199
+ # @option opts [String] :child_tasks Filter results where child_tasks matches value
193
200
  # @option opts [String] :created_resources
194
- # @option opts [DateTime] :finished_at ISO 8601 formatted dates are supported
201
+ # @option opts [String] :exclusive_resources
202
+ # @option opts [Array<String>] :exclusive_resources__in Multiple values may be separated by commas.
203
+ # @option opts [DateTime] :finished_at Filter results where finished_at matches value
195
204
  # @option opts [DateTime] :finished_at__gt Filter results where finished_at is greater than value
196
205
  # @option opts [DateTime] :finished_at__gte Filter results where finished_at is greater than or equal to value
197
206
  # @option opts [DateTime] :finished_at__lt Filter results where finished_at is less than value
198
207
  # @option opts [DateTime] :finished_at__lte Filter results where finished_at is less than or equal to value
199
208
  # @option opts [Array<DateTime>] :finished_at__range Filter results where finished_at is between two comma separated values
200
209
  # @option opts [Integer] :limit Number of results to return per page.
201
- # @option opts [String] :logging_cid
210
+ # @option opts [String] :logging_cid Filter results where logging_cid matches value
202
211
  # @option opts [String] :logging_cid__contains Filter results where logging_cid contains value
203
- # @option opts [String] :name
212
+ # @option opts [String] :name Filter results where name matches value
204
213
  # @option opts [String] :name__contains Filter results where name contains value
214
+ # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
205
215
  # @option opts [Integer] :offset The initial index from which to return the results.
206
216
  # @option opts [Array<String>] :ordering Ordering
207
- # @option opts [String] :parent_task Foreign Key referenced by HREF
217
+ # @option opts [String] :parent_task Filter results where parent_task matches value
218
+ # @option opts [String] :reserved_resources
219
+ # @option opts [Array<String>] :reserved_resources__in Multiple values may be separated by commas.
208
220
  # @option opts [Array<String>] :reserved_resources_record
209
- # @option opts [DateTime] :started_at ISO 8601 formatted dates are supported
221
+ # @option opts [String] :shared_resources
222
+ # @option opts [Array<String>] :shared_resources__in Multiple values may be separated by commas.
223
+ # @option opts [DateTime] :started_at Filter results where started_at matches value
210
224
  # @option opts [DateTime] :started_at__gt Filter results where started_at is greater than value
211
225
  # @option opts [DateTime] :started_at__gte Filter results where started_at is greater than or equal to value
212
226
  # @option opts [DateTime] :started_at__lt Filter results where started_at is less than value
213
227
  # @option opts [DateTime] :started_at__lte Filter results where started_at is less than or equal to value
214
228
  # @option opts [Array<DateTime>] :started_at__range Filter results where started_at is between two comma separated values
215
- # @option opts [String] :state
229
+ # @option opts [String] :state Filter results where state matches value
216
230
  # @option opts [Array<String>] :state__in Filter results where state is in a comma-separated list of values
217
- # @option opts [String] :task_group Foreign Key referenced by HREF
218
- # @option opts [String] :worker Foreign Key referenced by HREF
231
+ # @option opts [String] :task_group Filter results where task_group matches value
232
+ # @option opts [String] :worker Filter results where worker matches value
219
233
  # @option opts [Array<String>] :worker__in Filter results where worker is in a comma-separated list of values
220
234
  # @option opts [Array<String>] :fields A list of fields to include in the response.
221
235
  # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
@@ -224,7 +238,7 @@ module PulpcoreClient
224
238
  if @api_client.config.debugging
225
239
  @api_client.config.logger.debug 'Calling API: TasksApi.list ...'
226
240
  end
227
- allowable_values = ["-args", "-child_tasks", "-created_resources", "-error", "-export", "-finished_at", "-group_roles", "-import", "-kwargs", "-logging_cid", "-name", "-parent_task", "-pk", "-progress_reports", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-reserved_resources_record", "-started_at", "-state", "-task_group", "-taskschedule", "-user_roles", "-worker", "args", "child_tasks", "created_resources", "error", "export", "finished_at", "group_roles", "import", "kwargs", "logging_cid", "name", "parent_task", "pk", "progress_reports", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "reserved_resources_record", "started_at", "state", "task_group", "taskschedule", "user_roles", "worker"]
241
+ allowable_values = ["-args", "-error", "-finished_at", "-kwargs", "-logging_cid", "-name", "-pk", "-pulp_created", "-pulp_id", "-pulp_last_updated", "-reserved_resources_record", "-started_at", "-state", "args", "error", "finished_at", "kwargs", "logging_cid", "name", "pk", "pulp_created", "pulp_id", "pulp_last_updated", "reserved_resources_record", "started_at", "state"]
228
242
  if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
229
243
  fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
230
244
  end
@@ -239,6 +253,8 @@ module PulpcoreClient
239
253
  query_params = opts[:query_params] || {}
240
254
  query_params[:'child_tasks'] = opts[:'child_tasks'] if !opts[:'child_tasks'].nil?
241
255
  query_params[:'created_resources'] = opts[:'created_resources'] if !opts[:'created_resources'].nil?
256
+ query_params[:'exclusive_resources'] = opts[:'exclusive_resources'] if !opts[:'exclusive_resources'].nil?
257
+ query_params[:'exclusive_resources__in'] = @api_client.build_collection_param(opts[:'exclusive_resources__in'], :csv) if !opts[:'exclusive_resources__in'].nil?
242
258
  query_params[:'finished_at'] = opts[:'finished_at'] if !opts[:'finished_at'].nil?
243
259
  query_params[:'finished_at__gt'] = opts[:'finished_at__gt'] if !opts[:'finished_at__gt'].nil?
244
260
  query_params[:'finished_at__gte'] = opts[:'finished_at__gte'] if !opts[:'finished_at__gte'].nil?
@@ -250,10 +266,15 @@ module PulpcoreClient
250
266
  query_params[:'logging_cid__contains'] = opts[:'logging_cid__contains'] if !opts[:'logging_cid__contains'].nil?
251
267
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
252
268
  query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
269
+ query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
253
270
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
254
271
  query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
255
272
  query_params[:'parent_task'] = opts[:'parent_task'] if !opts[:'parent_task'].nil?
273
+ query_params[:'reserved_resources'] = opts[:'reserved_resources'] if !opts[:'reserved_resources'].nil?
274
+ query_params[:'reserved_resources__in'] = @api_client.build_collection_param(opts[:'reserved_resources__in'], :csv) if !opts[:'reserved_resources__in'].nil?
256
275
  query_params[:'reserved_resources_record'] = @api_client.build_collection_param(opts[:'reserved_resources_record'], :multi) if !opts[:'reserved_resources_record'].nil?
276
+ query_params[:'shared_resources'] = opts[:'shared_resources'] if !opts[:'shared_resources'].nil?
277
+ query_params[:'shared_resources__in'] = @api_client.build_collection_param(opts[:'shared_resources__in'], :csv) if !opts[:'shared_resources__in'].nil?
257
278
  query_params[:'started_at'] = opts[:'started_at'] if !opts[:'started_at'].nil?
258
279
  query_params[:'started_at__gt'] = opts[:'started_at__gt'] if !opts[:'started_at__gt'].nil?
259
280
  query_params[:'started_at__gte'] = opts[:'started_at__gte'] if !opts[:'started_at__gte'].nil?
@@ -286,6 +286,11 @@ module PulpcoreClient
286
286
  # @param [Hash] opts the optional parameters
287
287
  # @option opts [Integer] :limit Number of results to return per page.
288
288
  # @option opts [Integer] :offset The initial index from which to return the results.
289
+ # @option opts [Array<String>] :ordering Ordering
290
+ # @option opts [Integer] :size Filter results where size matches value
291
+ # @option opts [Integer] :size__gt Filter results where size is greater than value
292
+ # @option opts [Integer] :size__lt Filter results where size is less than value
293
+ # @option opts [Array<Integer>] :size__range Filter results where size is between two comma separated values
289
294
  # @option opts [Array<String>] :fields A list of fields to include in the response.
290
295
  # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
291
296
  # @return [PaginatedUploadResponseList]
@@ -299,6 +304,11 @@ module PulpcoreClient
299
304
  # @param [Hash] opts the optional parameters
300
305
  # @option opts [Integer] :limit Number of results to return per page.
301
306
  # @option opts [Integer] :offset The initial index from which to return the results.
307
+ # @option opts [Array<String>] :ordering Ordering
308
+ # @option opts [Integer] :size Filter results where size matches value
309
+ # @option opts [Integer] :size__gt Filter results where size is greater than value
310
+ # @option opts [Integer] :size__lt Filter results where size is less than value
311
+ # @option opts [Array<Integer>] :size__range Filter results where size is between two comma separated values
302
312
  # @option opts [Array<String>] :fields A list of fields to include in the response.
303
313
  # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
304
314
  # @return [Array<(PaginatedUploadResponseList, Integer, Hash)>] PaginatedUploadResponseList data, response status code and response headers
@@ -306,6 +316,10 @@ module PulpcoreClient
306
316
  if @api_client.config.debugging
307
317
  @api_client.config.logger.debug 'Calling API: UploadsApi.list ...'
308
318
  end
319
+ allowable_values = ["-pk", "-pulp_created", "-pulp_id", "-pulp_last_updated", "-size", "pk", "pulp_created", "pulp_id", "pulp_last_updated", "size"]
320
+ if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
321
+ fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
322
+ end
309
323
  # resource path
310
324
  local_var_path = '/pulp/api/v3/uploads/'
311
325
 
@@ -313,6 +327,11 @@ module PulpcoreClient
313
327
  query_params = opts[:query_params] || {}
314
328
  query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
315
329
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
330
+ query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
331
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
332
+ query_params[:'size__gt'] = opts[:'size__gt'] if !opts[:'size__gt'].nil?
333
+ query_params[:'size__lt'] = opts[:'size__lt'] if !opts[:'size__lt'].nil?
334
+ query_params[:'size__range'] = @api_client.build_collection_param(opts[:'size__range'], :csv) if !opts[:'size__range'].nil?
316
335
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
317
336
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
318
337
 
@@ -214,7 +214,7 @@ module PulpcoreClient
214
214
  if @api_client.config.debugging
215
215
  @api_client.config.logger.debug 'Calling API: UsersApi.list ...'
216
216
  end
217
- allowable_values = ["-date_joined", "-email", "-first_name", "-groups", "-id", "-is_active", "-is_staff", "-is_superuser", "-last_login", "-last_name", "-object_roles", "-password", "-pk", "-user_permissions", "-username", "date_joined", "email", "first_name", "groups", "id", "is_active", "is_staff", "is_superuser", "last_login", "last_name", "object_roles", "password", "pk", "user_permissions", "username"]
217
+ allowable_values = ["-date_joined", "-email", "-first_name", "-id", "-is_active", "-is_staff", "-is_superuser", "-last_login", "-last_name", "-password", "-pk", "-username", "date_joined", "email", "first_name", "id", "is_active", "is_staff", "is_superuser", "last_login", "last_name", "password", "pk", "username"]
218
218
  if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
219
219
  fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
220
220
  end
@@ -22,7 +22,7 @@ module PulpcoreClient
22
22
  # List workers
23
23
  # A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \"Normal\" Django Models and Master/Detail models are supported by the ``register_with`` method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to 'pk' endpoint_name (str): The name of the final path segment that should identify the ViewSet's collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \"parent_prefix\" of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object's identity. schema (DefaultSchema): The schema class to use by default in a viewset.
24
24
  # @param [Hash] opts the optional parameters
25
- # @option opts [DateTime] :last_heartbeat ISO 8601 formatted dates are supported
25
+ # @option opts [DateTime] :last_heartbeat Filter results where last_heartbeat matches value
26
26
  # @option opts [DateTime] :last_heartbeat__gt Filter results where last_heartbeat is greater than value
27
27
  # @option opts [DateTime] :last_heartbeat__gte Filter results where last_heartbeat is greater than or equal to value
28
28
  # @option opts [DateTime] :last_heartbeat__lt Filter results where last_heartbeat is less than value
@@ -30,7 +30,7 @@ module PulpcoreClient
30
30
  # @option opts [Array<DateTime>] :last_heartbeat__range Filter results where last_heartbeat is between two comma separated values
31
31
  # @option opts [Integer] :limit Number of results to return per page.
32
32
  # @option opts [Boolean] :missing
33
- # @option opts [String] :name
33
+ # @option opts [String] :name Filter results where name matches value
34
34
  # @option opts [String] :name__contains Filter results where name contains value
35
35
  # @option opts [String] :name__icontains Filter results where name contains value
36
36
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
@@ -49,7 +49,7 @@ module PulpcoreClient
49
49
  # List workers
50
50
  # A customized named ModelViewSet that knows how to register itself with the Pulp API router. This viewset is discoverable by its name. \&quot;Normal\&quot; Django Models and Master/Detail models are supported by the &#x60;&#x60;register_with&#x60;&#x60; method. Attributes: lookup_field (str): The name of the field by which an object should be looked up, in addition to any parent lookups if this ViewSet is nested. Defaults to &#39;pk&#39; endpoint_name (str): The name of the final path segment that should identify the ViewSet&#39;s collection endpoint. nest_prefix (str): Optional prefix under which this ViewSet should be nested. This must correspond to the \&quot;parent_prefix\&quot; of a router with rest_framework_nested.NestedMixin. None indicates this ViewSet should not be nested. parent_lookup_kwargs (dict): Optional mapping of key names that would appear in self.kwargs to django model filter expressions that can be used with the corresponding value from self.kwargs, used only by a nested ViewSet to filter based on the parent object&#39;s identity. schema (DefaultSchema): The schema class to use by default in a viewset.
51
51
  # @param [Hash] opts the optional parameters
52
- # @option opts [DateTime] :last_heartbeat ISO 8601 formatted dates are supported
52
+ # @option opts [DateTime] :last_heartbeat Filter results where last_heartbeat matches value
53
53
  # @option opts [DateTime] :last_heartbeat__gt Filter results where last_heartbeat is greater than value
54
54
  # @option opts [DateTime] :last_heartbeat__gte Filter results where last_heartbeat is greater than or equal to value
55
55
  # @option opts [DateTime] :last_heartbeat__lt Filter results where last_heartbeat is less than value
@@ -57,7 +57,7 @@ module PulpcoreClient
57
57
  # @option opts [Array<DateTime>] :last_heartbeat__range Filter results where last_heartbeat is between two comma separated values
58
58
  # @option opts [Integer] :limit Number of results to return per page.
59
59
  # @option opts [Boolean] :missing
60
- # @option opts [String] :name
60
+ # @option opts [String] :name Filter results where name matches value
61
61
  # @option opts [String] :name__contains Filter results where name contains value
62
62
  # @option opts [String] :name__icontains Filter results where name contains value
63
63
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
@@ -72,7 +72,7 @@ module PulpcoreClient
72
72
  if @api_client.config.debugging
73
73
  @api_client.config.logger.debug 'Calling API: WorkersApi.list ...'
74
74
  end
75
- allowable_values = ["-group_roles", "-last_heartbeat", "-name", "-pk", "-pulp_created", "-pulp_id", "-pulp_labels", "-pulp_last_updated", "-tasks", "-user_roles", "group_roles", "last_heartbeat", "name", "pk", "pulp_created", "pulp_id", "pulp_labels", "pulp_last_updated", "tasks", "user_roles"]
75
+ allowable_values = ["-last_heartbeat", "-name", "-pk", "-pulp_created", "-pulp_id", "-pulp_last_updated", "last_heartbeat", "name", "pk", "pulp_created", "pulp_id", "pulp_last_updated"]
76
76
  if @api_client.config.client_side_validation && opts[:'ordering'] && !opts[:'ordering'].all? { |item| allowable_values.include?(item) }
77
77
  fail ArgumentError, "invalid value for \"ordering\", must include one of #{allowable_values}"
78
78
  end
@@ -0,0 +1,279 @@
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 PulpcoreClient
16
+ # A serializer for ArtifactDistribution.
17
+ class ArtifactDistributionResponse
18
+ # An optional content-guard.
19
+ attr_accessor :content_guard
20
+
21
+ attr_accessor :pulp_labels
22
+
23
+ # Timestamp of creation.
24
+ attr_accessor :pulp_created
25
+
26
+ # The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\")
27
+ attr_accessor :base_path
28
+
29
+ # The URL for accessing the publication as defined by this distribution.
30
+ attr_accessor :base_url
31
+
32
+ attr_accessor :pulp_href
33
+
34
+ # A unique name. Ex, `rawhide` and `stable`.
35
+ attr_accessor :name
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'content_guard' => :'content_guard',
41
+ :'pulp_labels' => :'pulp_labels',
42
+ :'pulp_created' => :'pulp_created',
43
+ :'base_path' => :'base_path',
44
+ :'base_url' => :'base_url',
45
+ :'pulp_href' => :'pulp_href',
46
+ :'name' => :'name'
47
+ }
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'content_guard' => :'String',
54
+ :'pulp_labels' => :'Hash<String, String>',
55
+ :'pulp_created' => :'DateTime',
56
+ :'base_path' => :'String',
57
+ :'base_url' => :'String',
58
+ :'pulp_href' => :'String',
59
+ :'name' => :'String'
60
+ }
61
+ end
62
+
63
+ # List of attributes with nullable: true
64
+ def self.openapi_nullable
65
+ Set.new([
66
+ :'content_guard',
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::ArtifactDistributionResponse` 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::ArtifactDistributionResponse`. 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?(:'content_guard')
86
+ self.content_guard = attributes[:'content_guard']
87
+ end
88
+
89
+ if attributes.key?(:'pulp_labels')
90
+ if (value = attributes[:'pulp_labels']).is_a?(Hash)
91
+ self.pulp_labels = value
92
+ end
93
+ end
94
+
95
+ if attributes.key?(:'pulp_created')
96
+ self.pulp_created = attributes[:'pulp_created']
97
+ end
98
+
99
+ if attributes.key?(:'base_path')
100
+ self.base_path = attributes[:'base_path']
101
+ end
102
+
103
+ if attributes.key?(:'base_url')
104
+ self.base_url = attributes[:'base_url']
105
+ end
106
+
107
+ if attributes.key?(:'pulp_href')
108
+ self.pulp_href = attributes[:'pulp_href']
109
+ end
110
+
111
+ if attributes.key?(:'name')
112
+ self.name = attributes[:'name']
113
+ end
114
+ end
115
+
116
+ # Show invalid properties with the reasons. Usually used together with valid?
117
+ # @return Array for valid properties with the reasons
118
+ def list_invalid_properties
119
+ invalid_properties = Array.new
120
+ if @base_path.nil?
121
+ invalid_properties.push('invalid value for "base_path", base_path cannot be nil.')
122
+ end
123
+
124
+ if @name.nil?
125
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
126
+ end
127
+
128
+ invalid_properties
129
+ end
130
+
131
+ # Check to see if the all the properties in the model are valid
132
+ # @return true if the model is valid
133
+ def valid?
134
+ return false if @base_path.nil?
135
+ return false if @name.nil?
136
+ true
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ content_guard == o.content_guard &&
145
+ pulp_labels == o.pulp_labels &&
146
+ pulp_created == o.pulp_created &&
147
+ base_path == o.base_path &&
148
+ base_url == o.base_url &&
149
+ pulp_href == o.pulp_href &&
150
+ name == o.name
151
+ end
152
+
153
+ # @see the `==` method
154
+ # @param [Object] Object to be compared
155
+ def eql?(o)
156
+ self == o
157
+ end
158
+
159
+ # Calculates hash code according to all attributes.
160
+ # @return [Integer] Hash code
161
+ def hash
162
+ [content_guard, pulp_labels, pulp_created, base_path, base_url, pulp_href, name].hash
163
+ end
164
+
165
+ # Builds the object from hash
166
+ # @param [Hash] attributes Model attributes in the form of hash
167
+ # @return [Object] Returns the model itself
168
+ def self.build_from_hash(attributes)
169
+ new.build_from_hash(attributes)
170
+ end
171
+
172
+ # Builds the object from hash
173
+ # @param [Hash] attributes Model attributes in the form of hash
174
+ # @return [Object] Returns the model itself
175
+ def build_from_hash(attributes)
176
+ return nil unless attributes.is_a?(Hash)
177
+ self.class.openapi_types.each_pair do |key, type|
178
+ if type =~ /\AArray<(.*)>/i
179
+ # check to ensure the input is an array given that the attribute
180
+ # is documented as an array but the input is not
181
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
182
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
183
+ end
184
+ elsif !attributes[self.class.attribute_map[key]].nil?
185
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
186
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
187
+ end
188
+
189
+ self
190
+ end
191
+
192
+ # Deserializes the data based on type
193
+ # @param string type Data type
194
+ # @param string value Value to be deserialized
195
+ # @return [Object] Deserialized data
196
+ def _deserialize(type, value)
197
+ case type.to_sym
198
+ when :DateTime
199
+ DateTime.parse(value)
200
+ when :Date
201
+ Date.parse(value)
202
+ when :String
203
+ value.to_s
204
+ when :Integer
205
+ value.to_i
206
+ when :Float
207
+ value.to_f
208
+ when :Boolean
209
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
210
+ true
211
+ else
212
+ false
213
+ end
214
+ when :Object
215
+ # generic object (usually a Hash), return directly
216
+ value
217
+ when /\AArray<(?<inner_type>.+)>\z/
218
+ inner_type = Regexp.last_match[:inner_type]
219
+ value.map { |v| _deserialize(inner_type, v) }
220
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
221
+ k_type = Regexp.last_match[:k_type]
222
+ v_type = Regexp.last_match[:v_type]
223
+ {}.tap do |hash|
224
+ value.each do |k, v|
225
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
226
+ end
227
+ end
228
+ else # model
229
+ PulpcoreClient.const_get(type).build_from_hash(value)
230
+ end
231
+ end
232
+
233
+ # Returns the string representation of the object
234
+ # @return [String] String presentation of the object
235
+ def to_s
236
+ to_hash.to_s
237
+ end
238
+
239
+ # to_body is an alias to to_hash (backward compatibility)
240
+ # @return [Hash] Returns the object in the form of hash
241
+ def to_body
242
+ to_hash
243
+ end
244
+
245
+ # Returns the object in the form of hash
246
+ # @return [Hash] Returns the object in the form of hash
247
+ def to_hash
248
+ hash = {}
249
+ self.class.attribute_map.each_pair do |attr, param|
250
+ value = self.send(attr)
251
+ if value.nil?
252
+ is_nullable = self.class.openapi_nullable.include?(attr)
253
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
254
+ end
255
+
256
+ hash[param] = _to_hash(value)
257
+ end
258
+ hash
259
+ end
260
+
261
+ # Outputs non-array value in the form of hash
262
+ # For object, use to_hash. Otherwise, just return the value
263
+ # @param [Object] value Any valid value
264
+ # @return [Hash] Returns the value in the form of hash
265
+ def _to_hash(value)
266
+ if value.is_a?(Array)
267
+ value.compact.map { |v| _to_hash(v) }
268
+ elsif value.is_a?(Hash)
269
+ {}.tap do |hash|
270
+ value.each { |k, v| hash[k] = _to_hash(v) }
271
+ end
272
+ elsif value.respond_to? :to_hash
273
+ value.to_hash
274
+ else
275
+ value
276
+ end
277
+ end
278
+ end
279
+ end