pulpcore_client 3.16.24 → 3.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +70 -22
  3. data/docs/AccessPoliciesApi.md +53 -0
  4. data/docs/AccessPolicy.md +3 -1
  5. data/docs/AccessPolicyResponse.md +3 -1
  6. data/docs/ContentguardsRbacApi.md +138 -22
  7. data/docs/GroupRole.md +19 -0
  8. data/docs/GroupRoleResponse.md +23 -0
  9. data/docs/GroupsApi.md +248 -20
  10. data/docs/GroupsModelPermissionsApi.md +20 -20
  11. data/docs/GroupsObjectPermissionsApi.md +20 -20
  12. data/docs/GroupsRolesApi.md +255 -0
  13. data/docs/GroupsUsersApi.md +15 -15
  14. data/docs/MyPermissionsResponse.md +17 -0
  15. data/docs/NestedRole.md +21 -0
  16. data/docs/NestedRoleResponse.md +21 -0
  17. data/docs/ObjectRolesResponse.md +17 -0
  18. data/docs/PaginatedGroupRoleResponseList.md +23 -0
  19. data/docs/PaginatedRoleResponseList.md +23 -0
  20. data/docs/PaginatedUserRoleResponseList.md +23 -0
  21. data/docs/PatchedAccessPolicy.md +3 -1
  22. data/docs/PatchedRole.md +21 -0
  23. data/docs/PatchedUser.md +29 -0
  24. data/docs/PermissionResponse.md +1 -1
  25. data/docs/Purge.md +19 -0
  26. data/docs/Role.md +21 -0
  27. data/docs/RoleResponse.md +27 -0
  28. data/docs/RolesApi.md +363 -0
  29. data/docs/StatesEnum.md +16 -0
  30. data/docs/TasksApi.md +282 -0
  31. data/docs/User.md +29 -0
  32. data/docs/UserGroup.md +17 -0
  33. data/docs/UserResponse.md +3 -3
  34. data/docs/UserRole.md +19 -0
  35. data/docs/UserRoleResponse.md +23 -0
  36. data/docs/UsersApi.md +219 -0
  37. data/docs/UsersRolesApi.md +255 -0
  38. data/docs/WorkerResponse.md +3 -3
  39. data/git_push.sh +58 -0
  40. data/lib/pulpcore_client/api/access_policies_api.rb +60 -0
  41. data/lib/pulpcore_client/api/artifacts_api.rb +24 -0
  42. data/lib/pulpcore_client/api/contentguards_rbac_api.rb +168 -40
  43. data/lib/pulpcore_client/api/groups_api.rb +304 -36
  44. data/lib/pulpcore_client/api/groups_model_permissions_api.rb +36 -36
  45. data/lib/pulpcore_client/api/groups_object_permissions_api.rb +36 -36
  46. data/lib/pulpcore_client/api/groups_roles_api.rb +315 -0
  47. data/lib/pulpcore_client/api/groups_users_api.rb +27 -27
  48. data/lib/pulpcore_client/api/roles_api.rb +443 -0
  49. data/lib/pulpcore_client/api/tasks_api.rb +332 -0
  50. data/lib/pulpcore_client/api/uploads_api.rb +4 -0
  51. data/lib/pulpcore_client/api/users_api.rb +264 -0
  52. data/lib/pulpcore_client/api/users_roles_api.rb +315 -0
  53. data/lib/pulpcore_client/api_client.rb +5 -2
  54. data/lib/pulpcore_client/configuration.rb +0 -1
  55. data/lib/pulpcore_client/models/access_policy.rb +19 -2
  56. data/lib/pulpcore_client/models/access_policy_response.rb +19 -2
  57. data/lib/pulpcore_client/models/artifact.rb +90 -0
  58. data/lib/pulpcore_client/models/filesystem_exporter.rb +38 -0
  59. data/lib/pulpcore_client/models/group.rb +9 -0
  60. data/lib/pulpcore_client/models/group_role.rb +238 -0
  61. data/lib/pulpcore_client/models/group_role_response.rb +242 -0
  62. data/lib/pulpcore_client/models/group_user.rb +9 -0
  63. data/lib/pulpcore_client/models/{rbac_content_guard_permission.rb → my_permissions_response.rb} +16 -22
  64. data/lib/pulpcore_client/models/nested_role.rb +234 -0
  65. data/lib/pulpcore_client/models/nested_role_response.rb +234 -0
  66. data/lib/pulpcore_client/models/object_roles_response.rb +213 -0
  67. data/lib/pulpcore_client/models/paginated_group_role_response_list.rb +237 -0
  68. data/lib/pulpcore_client/models/paginated_role_response_list.rb +237 -0
  69. data/lib/pulpcore_client/models/paginated_user_role_response_list.rb +237 -0
  70. data/lib/pulpcore_client/models/patched_access_policy.rb +14 -2
  71. data/lib/pulpcore_client/models/patched_filesystem_exporter.rb +30 -0
  72. data/lib/pulpcore_client/models/patched_group.rb +9 -0
  73. data/lib/pulpcore_client/models/patched_pulp_exporter.rb +30 -0
  74. data/lib/pulpcore_client/models/patched_pulp_importer.rb +15 -0
  75. data/lib/pulpcore_client/models/patched_rbac_content_guard.rb +30 -0
  76. data/lib/pulpcore_client/models/patched_role.rb +261 -0
  77. data/lib/pulpcore_client/models/patched_task_cancel.rb +15 -0
  78. data/lib/pulpcore_client/models/patched_user.rb +342 -0
  79. data/lib/pulpcore_client/models/permission_response.rb +1 -1
  80. data/lib/pulpcore_client/models/pulp_export.rb +15 -0
  81. data/lib/pulpcore_client/models/pulp_exporter.rb +38 -0
  82. data/lib/pulpcore_client/models/pulp_import.rb +30 -0
  83. data/lib/pulpcore_client/models/pulp_import_check.rb +45 -0
  84. data/lib/pulpcore_client/models/pulp_importer.rb +19 -0
  85. data/lib/pulpcore_client/models/purge.rb +219 -0
  86. data/lib/pulpcore_client/models/rbac_content_guard.rb +34 -0
  87. data/lib/pulpcore_client/models/role.rb +275 -0
  88. data/lib/pulpcore_client/models/role_response.rb +270 -0
  89. data/lib/pulpcore_client/models/states_enum.rb +38 -0
  90. data/lib/pulpcore_client/models/upload_chunk.rb +15 -0
  91. data/lib/pulpcore_client/models/upload_commit.rb +19 -0
  92. data/lib/pulpcore_client/models/user.rb +351 -0
  93. data/lib/pulpcore_client/models/user_group.rb +241 -0
  94. data/lib/pulpcore_client/models/user_response.rb +6 -29
  95. data/lib/pulpcore_client/models/user_role.rb +238 -0
  96. data/lib/pulpcore_client/models/user_role_response.rb +242 -0
  97. data/lib/pulpcore_client/models/worker_response.rb +10 -10
  98. data/lib/pulpcore_client/version.rb +1 -1
  99. data/lib/pulpcore_client.rb +22 -1
  100. data/pulpcore_client.gemspec +3 -3
  101. data/spec/api/access_policies_api_spec.rb +11 -0
  102. data/spec/api/contentguards_rbac_api_spec.rb +36 -12
  103. data/spec/api/groups_api_spec.rb +54 -4
  104. data/spec/api/groups_model_permissions_api_spec.rb +4 -4
  105. data/spec/api/groups_object_permissions_api_spec.rb +4 -4
  106. data/spec/api/groups_roles_api_spec.rb +97 -0
  107. data/spec/api/groups_users_api_spec.rb +3 -3
  108. data/spec/api/roles_api_spec.rb +121 -0
  109. data/spec/api/tasks_api_spec.rb +62 -0
  110. data/spec/api/users_api_spec.rb +50 -0
  111. data/spec/api/users_roles_api_spec.rb +97 -0
  112. data/spec/models/access_policy_response_spec.rb +6 -0
  113. data/spec/models/access_policy_spec.rb +6 -0
  114. data/spec/models/group_role_response_spec.rb +59 -0
  115. data/spec/models/{rbac_content_guard_permission_spec.rb → group_role_spec.rb} +8 -8
  116. data/spec/models/my_permissions_response_spec.rb +41 -0
  117. data/spec/models/nested_role_response_spec.rb +53 -0
  118. data/spec/models/nested_role_spec.rb +53 -0
  119. data/spec/models/object_roles_response_spec.rb +41 -0
  120. data/spec/models/paginated_group_role_response_list_spec.rb +59 -0
  121. data/spec/models/paginated_role_response_list_spec.rb +59 -0
  122. data/spec/models/paginated_user_role_response_list_spec.rb +59 -0
  123. data/spec/models/patched_access_policy_spec.rb +6 -0
  124. data/spec/models/patched_role_spec.rb +53 -0
  125. data/spec/models/patched_user_spec.rb +77 -0
  126. data/spec/models/purge_spec.rb +47 -0
  127. data/spec/models/role_response_spec.rb +71 -0
  128. data/spec/models/role_spec.rb +53 -0
  129. data/spec/models/states_enum_spec.rb +35 -0
  130. data/spec/models/user_group_spec.rb +41 -0
  131. data/spec/models/user_role_response_spec.rb +59 -0
  132. data/spec/models/user_role_spec.rb +47 -0
  133. data/spec/models/user_spec.rb +77 -0
  134. data/spec/models/worker_response_spec.rb +2 -2
  135. metadata +190 -111
  136. data/docs/RBACContentGuardPermission.md +0 -19
@@ -19,6 +19,74 @@ module PulpcoreClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Add a role for this object to users/groups.
23
+ # @param task_href [String]
24
+ # @param nested_role [NestedRole]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [NestedRoleResponse]
27
+ def add_role(task_href, nested_role, opts = {})
28
+ data, _status_code, _headers = add_role_with_http_info(task_href, nested_role, opts)
29
+ data
30
+ end
31
+
32
+ # Add a role for this object to users/groups.
33
+ # @param task_href [String]
34
+ # @param nested_role [NestedRole]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
37
+ def add_role_with_http_info(task_href, nested_role, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: TasksApi.add_role ...'
40
+ end
41
+ # verify the required parameter 'task_href' is set
42
+ if @api_client.config.client_side_validation && task_href.nil?
43
+ fail ArgumentError, "Missing the required parameter 'task_href' when calling TasksApi.add_role"
44
+ end
45
+ # verify the required parameter 'nested_role' is set
46
+ if @api_client.config.client_side_validation && nested_role.nil?
47
+ fail ArgumentError, "Missing the required parameter 'nested_role' when calling TasksApi.add_role"
48
+ end
49
+ # resource path
50
+ local_var_path = '{task_href}add_role/'.sub('{' + 'task_href' + '}', CGI.escape(task_href.to_s).gsub('%2F', '/'))
51
+
52
+ # query parameters
53
+ query_params = opts[:query_params] || {}
54
+
55
+ # header parameters
56
+ header_params = opts[:header_params] || {}
57
+ # HTTP header 'Accept' (if needed)
58
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
59
+ # HTTP header 'Content-Type'
60
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
61
+
62
+ # form parameters
63
+ form_params = opts[:form_params] || {}
64
+
65
+ # http body (model)
66
+ post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
67
+
68
+ # return_type
69
+ return_type = opts[:return_type] || 'NestedRoleResponse'
70
+
71
+ # auth_names
72
+ auth_names = opts[:auth_names] || ['basicAuth']
73
+
74
+ new_options = opts.merge(
75
+ :header_params => header_params,
76
+ :query_params => query_params,
77
+ :form_params => form_params,
78
+ :body => post_body,
79
+ :auth_names => auth_names,
80
+ :return_type => return_type
81
+ )
82
+
83
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: TasksApi#add_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
22
90
  # Delete a task
23
91
  # 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
92
  # @param task_href [String]
@@ -229,6 +297,202 @@ module PulpcoreClient
229
297
  return data, status_code, headers
230
298
  end
231
299
 
300
+ # List roles assigned to this object.
301
+ # @param task_href [String]
302
+ # @param [Hash] opts the optional parameters
303
+ # @option opts [String] :fields A list of fields to include in the response.
304
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
305
+ # @return [ObjectRolesResponse]
306
+ def list_roles(task_href, opts = {})
307
+ data, _status_code, _headers = list_roles_with_http_info(task_href, opts)
308
+ data
309
+ end
310
+
311
+ # List roles assigned to this object.
312
+ # @param task_href [String]
313
+ # @param [Hash] opts the optional parameters
314
+ # @option opts [String] :fields A list of fields to include in the response.
315
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
316
+ # @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
317
+ def list_roles_with_http_info(task_href, opts = {})
318
+ if @api_client.config.debugging
319
+ @api_client.config.logger.debug 'Calling API: TasksApi.list_roles ...'
320
+ end
321
+ # verify the required parameter 'task_href' is set
322
+ if @api_client.config.client_side_validation && task_href.nil?
323
+ fail ArgumentError, "Missing the required parameter 'task_href' when calling TasksApi.list_roles"
324
+ end
325
+ # resource path
326
+ local_var_path = '{task_href}list_roles/'.sub('{' + 'task_href' + '}', CGI.escape(task_href.to_s).gsub('%2F', '/'))
327
+
328
+ # query parameters
329
+ query_params = opts[:query_params] || {}
330
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
331
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
332
+
333
+ # header parameters
334
+ header_params = opts[:header_params] || {}
335
+ # HTTP header 'Accept' (if needed)
336
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
337
+
338
+ # form parameters
339
+ form_params = opts[:form_params] || {}
340
+
341
+ # http body (model)
342
+ post_body = opts[:body]
343
+
344
+ # return_type
345
+ return_type = opts[:return_type] || 'ObjectRolesResponse'
346
+
347
+ # auth_names
348
+ auth_names = opts[:auth_names] || ['basicAuth']
349
+
350
+ new_options = opts.merge(
351
+ :header_params => header_params,
352
+ :query_params => query_params,
353
+ :form_params => form_params,
354
+ :body => post_body,
355
+ :auth_names => auth_names,
356
+ :return_type => return_type
357
+ )
358
+
359
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
360
+ if @api_client.config.debugging
361
+ @api_client.config.logger.debug "API called: TasksApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
362
+ end
363
+ return data, status_code, headers
364
+ end
365
+
366
+ # List permissions available to the current user on this object.
367
+ # @param task_href [String]
368
+ # @param [Hash] opts the optional parameters
369
+ # @option opts [String] :fields A list of fields to include in the response.
370
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
371
+ # @return [MyPermissionsResponse]
372
+ def my_permissions(task_href, opts = {})
373
+ data, _status_code, _headers = my_permissions_with_http_info(task_href, opts)
374
+ data
375
+ end
376
+
377
+ # List permissions available to the current user on this object.
378
+ # @param task_href [String]
379
+ # @param [Hash] opts the optional parameters
380
+ # @option opts [String] :fields A list of fields to include in the response.
381
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
382
+ # @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
383
+ def my_permissions_with_http_info(task_href, opts = {})
384
+ if @api_client.config.debugging
385
+ @api_client.config.logger.debug 'Calling API: TasksApi.my_permissions ...'
386
+ end
387
+ # verify the required parameter 'task_href' is set
388
+ if @api_client.config.client_side_validation && task_href.nil?
389
+ fail ArgumentError, "Missing the required parameter 'task_href' when calling TasksApi.my_permissions"
390
+ end
391
+ # resource path
392
+ local_var_path = '{task_href}my_permissions/'.sub('{' + 'task_href' + '}', CGI.escape(task_href.to_s).gsub('%2F', '/'))
393
+
394
+ # query parameters
395
+ query_params = opts[:query_params] || {}
396
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
397
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
398
+
399
+ # header parameters
400
+ header_params = opts[:header_params] || {}
401
+ # HTTP header 'Accept' (if needed)
402
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
403
+
404
+ # form parameters
405
+ form_params = opts[:form_params] || {}
406
+
407
+ # http body (model)
408
+ post_body = opts[:body]
409
+
410
+ # return_type
411
+ return_type = opts[:return_type] || 'MyPermissionsResponse'
412
+
413
+ # auth_names
414
+ auth_names = opts[:auth_names] || ['basicAuth']
415
+
416
+ new_options = opts.merge(
417
+ :header_params => header_params,
418
+ :query_params => query_params,
419
+ :form_params => form_params,
420
+ :body => post_body,
421
+ :auth_names => auth_names,
422
+ :return_type => return_type
423
+ )
424
+
425
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
426
+ if @api_client.config.debugging
427
+ @api_client.config.logger.debug "API called: TasksApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
428
+ end
429
+ return data, status_code, headers
430
+ end
431
+
432
+ # Purge Completed Tasks
433
+ # Trigger an asynchronous task that deletes completed tasks that finished prior to a specified timestamp (tech-preview, may change in the future).
434
+ # @param purge [Purge]
435
+ # @param [Hash] opts the optional parameters
436
+ # @return [AsyncOperationResponse]
437
+ def purge(purge, opts = {})
438
+ data, _status_code, _headers = purge_with_http_info(purge, opts)
439
+ data
440
+ end
441
+
442
+ # Purge Completed Tasks
443
+ # Trigger an asynchronous task that deletes completed tasks that finished prior to a specified timestamp (tech-preview, may change in the future).
444
+ # @param purge [Purge]
445
+ # @param [Hash] opts the optional parameters
446
+ # @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
447
+ def purge_with_http_info(purge, opts = {})
448
+ if @api_client.config.debugging
449
+ @api_client.config.logger.debug 'Calling API: TasksApi.purge ...'
450
+ end
451
+ # verify the required parameter 'purge' is set
452
+ if @api_client.config.client_side_validation && purge.nil?
453
+ fail ArgumentError, "Missing the required parameter 'purge' when calling TasksApi.purge"
454
+ end
455
+ # resource path
456
+ local_var_path = '/pulp/api/v3/tasks/purge/'
457
+
458
+ # query parameters
459
+ query_params = opts[:query_params] || {}
460
+
461
+ # header parameters
462
+ header_params = opts[:header_params] || {}
463
+ # HTTP header 'Accept' (if needed)
464
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
465
+ # HTTP header 'Content-Type'
466
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
467
+
468
+ # form parameters
469
+ form_params = opts[:form_params] || {}
470
+
471
+ # http body (model)
472
+ post_body = opts[:body] || @api_client.object_to_http_body(purge)
473
+
474
+ # return_type
475
+ return_type = opts[:return_type] || 'AsyncOperationResponse'
476
+
477
+ # auth_names
478
+ auth_names = opts[:auth_names] || ['basicAuth']
479
+
480
+ new_options = opts.merge(
481
+ :header_params => header_params,
482
+ :query_params => query_params,
483
+ :form_params => form_params,
484
+ :body => post_body,
485
+ :auth_names => auth_names,
486
+ :return_type => return_type
487
+ )
488
+
489
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
490
+ if @api_client.config.debugging
491
+ @api_client.config.logger.debug "API called: TasksApi#purge\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
492
+ end
493
+ return data, status_code, headers
494
+ end
495
+
232
496
  # Inspect a task
233
497
  # 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.
234
498
  # @param task_href [String]
@@ -297,6 +561,74 @@ module PulpcoreClient
297
561
  return data, status_code, headers
298
562
  end
299
563
 
564
+ # Remove a role for this object from users/groups.
565
+ # @param task_href [String]
566
+ # @param nested_role [NestedRole]
567
+ # @param [Hash] opts the optional parameters
568
+ # @return [NestedRoleResponse]
569
+ def remove_role(task_href, nested_role, opts = {})
570
+ data, _status_code, _headers = remove_role_with_http_info(task_href, nested_role, opts)
571
+ data
572
+ end
573
+
574
+ # Remove a role for this object from users/groups.
575
+ # @param task_href [String]
576
+ # @param nested_role [NestedRole]
577
+ # @param [Hash] opts the optional parameters
578
+ # @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
579
+ def remove_role_with_http_info(task_href, nested_role, opts = {})
580
+ if @api_client.config.debugging
581
+ @api_client.config.logger.debug 'Calling API: TasksApi.remove_role ...'
582
+ end
583
+ # verify the required parameter 'task_href' is set
584
+ if @api_client.config.client_side_validation && task_href.nil?
585
+ fail ArgumentError, "Missing the required parameter 'task_href' when calling TasksApi.remove_role"
586
+ end
587
+ # verify the required parameter 'nested_role' is set
588
+ if @api_client.config.client_side_validation && nested_role.nil?
589
+ fail ArgumentError, "Missing the required parameter 'nested_role' when calling TasksApi.remove_role"
590
+ end
591
+ # resource path
592
+ local_var_path = '{task_href}remove_role/'.sub('{' + 'task_href' + '}', CGI.escape(task_href.to_s).gsub('%2F', '/'))
593
+
594
+ # query parameters
595
+ query_params = opts[:query_params] || {}
596
+
597
+ # header parameters
598
+ header_params = opts[:header_params] || {}
599
+ # HTTP header 'Accept' (if needed)
600
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
601
+ # HTTP header 'Content-Type'
602
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
603
+
604
+ # form parameters
605
+ form_params = opts[:form_params] || {}
606
+
607
+ # http body (model)
608
+ post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
609
+
610
+ # return_type
611
+ return_type = opts[:return_type] || 'NestedRoleResponse'
612
+
613
+ # auth_names
614
+ auth_names = opts[:auth_names] || ['basicAuth']
615
+
616
+ new_options = opts.merge(
617
+ :header_params => header_params,
618
+ :query_params => query_params,
619
+ :form_params => form_params,
620
+ :body => post_body,
621
+ :auth_names => auth_names,
622
+ :return_type => return_type
623
+ )
624
+
625
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
626
+ if @api_client.config.debugging
627
+ @api_client.config.logger.debug "API called: TasksApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
628
+ end
629
+ return data, status_code, headers
630
+ end
631
+
300
632
  # Cancel a task
301
633
  # This operation cancels a task.
302
634
  # @param task_href [String]
@@ -389,6 +389,10 @@ module PulpcoreClient
389
389
  if @api_client.config.client_side_validation && file.nil?
390
390
  fail ArgumentError, "Missing the required parameter 'file' when calling UploadsApi.update"
391
391
  end
392
+ if @api_client.config.client_side_validation && !opts[:'sha256'].nil? && opts[:'sha256'].to_s.length < 1
393
+ fail ArgumentError, 'invalid value for "opts[:"sha256"]" when calling UploadsApi.update, the character length must be great than or equal to 1.'
394
+ end
395
+
392
396
  # resource path
393
397
  local_var_path = '{upload_href}'.sub('{' + 'upload_href' + '}', CGI.escape(upload_href.to_s).gsub('%2F', '/'))
394
398
 
@@ -19,6 +19,130 @@ module PulpcoreClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Create an user
23
+ # ViewSet for User. NOTE: This API endpoint is in \"tech preview\" and subject to change
24
+ # @param user [User]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [UserResponse]
27
+ def create(user, opts = {})
28
+ data, _status_code, _headers = create_with_http_info(user, opts)
29
+ data
30
+ end
31
+
32
+ # Create an user
33
+ # ViewSet for User. NOTE: This API endpoint is in \&quot;tech preview\&quot; and subject to change
34
+ # @param user [User]
35
+ # @param [Hash] opts the optional parameters
36
+ # @return [Array<(UserResponse, Integer, Hash)>] UserResponse data, response status code and response headers
37
+ def create_with_http_info(user, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: UsersApi.create ...'
40
+ end
41
+ # verify the required parameter 'user' is set
42
+ if @api_client.config.client_side_validation && user.nil?
43
+ fail ArgumentError, "Missing the required parameter 'user' when calling UsersApi.create"
44
+ end
45
+ # resource path
46
+ local_var_path = '/pulp/api/v3/users/'
47
+
48
+ # query parameters
49
+ query_params = opts[:query_params] || {}
50
+
51
+ # header parameters
52
+ header_params = opts[:header_params] || {}
53
+ # HTTP header 'Accept' (if needed)
54
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
55
+ # HTTP header 'Content-Type'
56
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body] || @api_client.object_to_http_body(user)
63
+
64
+ # return_type
65
+ return_type = opts[:return_type] || 'UserResponse'
66
+
67
+ # auth_names
68
+ auth_names = opts[:auth_names] || ['basicAuth']
69
+
70
+ new_options = opts.merge(
71
+ :header_params => header_params,
72
+ :query_params => query_params,
73
+ :form_params => form_params,
74
+ :body => post_body,
75
+ :auth_names => auth_names,
76
+ :return_type => return_type
77
+ )
78
+
79
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
+ if @api_client.config.debugging
81
+ @api_client.config.logger.debug "API called: UsersApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
+ end
83
+ return data, status_code, headers
84
+ end
85
+
86
+ # Delete an user
87
+ # ViewSet for User. NOTE: This API endpoint is in \"tech preview\" and subject to change
88
+ # @param auth_user_href [String]
89
+ # @param [Hash] opts the optional parameters
90
+ # @return [nil]
91
+ def delete(auth_user_href, opts = {})
92
+ delete_with_http_info(auth_user_href, opts)
93
+ nil
94
+ end
95
+
96
+ # Delete an user
97
+ # ViewSet for User. NOTE: This API endpoint is in \&quot;tech preview\&quot; and subject to change
98
+ # @param auth_user_href [String]
99
+ # @param [Hash] opts the optional parameters
100
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
101
+ def delete_with_http_info(auth_user_href, opts = {})
102
+ if @api_client.config.debugging
103
+ @api_client.config.logger.debug 'Calling API: UsersApi.delete ...'
104
+ end
105
+ # verify the required parameter 'auth_user_href' is set
106
+ if @api_client.config.client_side_validation && auth_user_href.nil?
107
+ fail ArgumentError, "Missing the required parameter 'auth_user_href' when calling UsersApi.delete"
108
+ end
109
+ # resource path
110
+ local_var_path = '{auth_user_href}'.sub('{' + 'auth_user_href' + '}', CGI.escape(auth_user_href.to_s).gsub('%2F', '/'))
111
+
112
+ # query parameters
113
+ query_params = opts[:query_params] || {}
114
+
115
+ # header parameters
116
+ header_params = opts[:header_params] || {}
117
+
118
+ # form parameters
119
+ form_params = opts[:form_params] || {}
120
+
121
+ # http body (model)
122
+ post_body = opts[:body]
123
+
124
+ # return_type
125
+ return_type = opts[:return_type]
126
+
127
+ # auth_names
128
+ auth_names = opts[:auth_names] || ['basicAuth']
129
+
130
+ new_options = opts.merge(
131
+ :header_params => header_params,
132
+ :query_params => query_params,
133
+ :form_params => form_params,
134
+ :body => post_body,
135
+ :auth_names => auth_names,
136
+ :return_type => return_type
137
+ )
138
+
139
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
140
+ if @api_client.config.debugging
141
+ @api_client.config.logger.debug "API called: UsersApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
142
+ end
143
+ return data, status_code, headers
144
+ end
145
+
22
146
  # List users
23
147
  # ViewSet for User. NOTE: This API endpoint is in \"tech preview\" and subject to change
24
148
  # @param [Hash] opts the optional parameters
@@ -156,6 +280,76 @@ module PulpcoreClient
156
280
  return data, status_code, headers
157
281
  end
158
282
 
283
+ # Update an user
284
+ # ViewSet for User. NOTE: This API endpoint is in \"tech preview\" and subject to change
285
+ # @param auth_user_href [String]
286
+ # @param patched_user [PatchedUser]
287
+ # @param [Hash] opts the optional parameters
288
+ # @return [UserResponse]
289
+ def partial_update(auth_user_href, patched_user, opts = {})
290
+ data, _status_code, _headers = partial_update_with_http_info(auth_user_href, patched_user, opts)
291
+ data
292
+ end
293
+
294
+ # Update an user
295
+ # ViewSet for User. NOTE: This API endpoint is in \&quot;tech preview\&quot; and subject to change
296
+ # @param auth_user_href [String]
297
+ # @param patched_user [PatchedUser]
298
+ # @param [Hash] opts the optional parameters
299
+ # @return [Array<(UserResponse, Integer, Hash)>] UserResponse data, response status code and response headers
300
+ def partial_update_with_http_info(auth_user_href, patched_user, opts = {})
301
+ if @api_client.config.debugging
302
+ @api_client.config.logger.debug 'Calling API: UsersApi.partial_update ...'
303
+ end
304
+ # verify the required parameter 'auth_user_href' is set
305
+ if @api_client.config.client_side_validation && auth_user_href.nil?
306
+ fail ArgumentError, "Missing the required parameter 'auth_user_href' when calling UsersApi.partial_update"
307
+ end
308
+ # verify the required parameter 'patched_user' is set
309
+ if @api_client.config.client_side_validation && patched_user.nil?
310
+ fail ArgumentError, "Missing the required parameter 'patched_user' when calling UsersApi.partial_update"
311
+ end
312
+ # resource path
313
+ local_var_path = '{auth_user_href}'.sub('{' + 'auth_user_href' + '}', CGI.escape(auth_user_href.to_s).gsub('%2F', '/'))
314
+
315
+ # query parameters
316
+ query_params = opts[:query_params] || {}
317
+
318
+ # header parameters
319
+ header_params = opts[:header_params] || {}
320
+ # HTTP header 'Accept' (if needed)
321
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
322
+ # HTTP header 'Content-Type'
323
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
324
+
325
+ # form parameters
326
+ form_params = opts[:form_params] || {}
327
+
328
+ # http body (model)
329
+ post_body = opts[:body] || @api_client.object_to_http_body(patched_user)
330
+
331
+ # return_type
332
+ return_type = opts[:return_type] || 'UserResponse'
333
+
334
+ # auth_names
335
+ auth_names = opts[:auth_names] || ['basicAuth']
336
+
337
+ new_options = opts.merge(
338
+ :header_params => header_params,
339
+ :query_params => query_params,
340
+ :form_params => form_params,
341
+ :body => post_body,
342
+ :auth_names => auth_names,
343
+ :return_type => return_type
344
+ )
345
+
346
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
347
+ if @api_client.config.debugging
348
+ @api_client.config.logger.debug "API called: UsersApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
349
+ end
350
+ return data, status_code, headers
351
+ end
352
+
159
353
  # List user permissions.
160
354
  # @param auth_user_href [String]
161
355
  # @param [Hash] opts the optional parameters
@@ -289,5 +483,75 @@ module PulpcoreClient
289
483
  end
290
484
  return data, status_code, headers
291
485
  end
486
+
487
+ # Update an user
488
+ # ViewSet for User. NOTE: This API endpoint is in \"tech preview\" and subject to change
489
+ # @param auth_user_href [String]
490
+ # @param user [User]
491
+ # @param [Hash] opts the optional parameters
492
+ # @return [UserResponse]
493
+ def update(auth_user_href, user, opts = {})
494
+ data, _status_code, _headers = update_with_http_info(auth_user_href, user, opts)
495
+ data
496
+ end
497
+
498
+ # Update an user
499
+ # ViewSet for User. NOTE: This API endpoint is in \&quot;tech preview\&quot; and subject to change
500
+ # @param auth_user_href [String]
501
+ # @param user [User]
502
+ # @param [Hash] opts the optional parameters
503
+ # @return [Array<(UserResponse, Integer, Hash)>] UserResponse data, response status code and response headers
504
+ def update_with_http_info(auth_user_href, user, opts = {})
505
+ if @api_client.config.debugging
506
+ @api_client.config.logger.debug 'Calling API: UsersApi.update ...'
507
+ end
508
+ # verify the required parameter 'auth_user_href' is set
509
+ if @api_client.config.client_side_validation && auth_user_href.nil?
510
+ fail ArgumentError, "Missing the required parameter 'auth_user_href' when calling UsersApi.update"
511
+ end
512
+ # verify the required parameter 'user' is set
513
+ if @api_client.config.client_side_validation && user.nil?
514
+ fail ArgumentError, "Missing the required parameter 'user' when calling UsersApi.update"
515
+ end
516
+ # resource path
517
+ local_var_path = '{auth_user_href}'.sub('{' + 'auth_user_href' + '}', CGI.escape(auth_user_href.to_s).gsub('%2F', '/'))
518
+
519
+ # query parameters
520
+ query_params = opts[:query_params] || {}
521
+
522
+ # header parameters
523
+ header_params = opts[:header_params] || {}
524
+ # HTTP header 'Accept' (if needed)
525
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
526
+ # HTTP header 'Content-Type'
527
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
528
+
529
+ # form parameters
530
+ form_params = opts[:form_params] || {}
531
+
532
+ # http body (model)
533
+ post_body = opts[:body] || @api_client.object_to_http_body(user)
534
+
535
+ # return_type
536
+ return_type = opts[:return_type] || 'UserResponse'
537
+
538
+ # auth_names
539
+ auth_names = opts[:auth_names] || ['basicAuth']
540
+
541
+ new_options = opts.merge(
542
+ :header_params => header_params,
543
+ :query_params => query_params,
544
+ :form_params => form_params,
545
+ :body => post_body,
546
+ :auth_names => auth_names,
547
+ :return_type => return_type
548
+ )
549
+
550
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
551
+ if @api_client.config.debugging
552
+ @api_client.config.logger.debug "API called: UsersApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
553
+ end
554
+ return data, status_code, headers
555
+ end
292
556
  end
293
557
  end