pulp_rpm_client 3.19.0.dev1662960501 → 3.19.0.dev1663133026

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pulp_rpm_client might be problematic. Click here for more details.

Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +36 -8
  3. data/docs/AcsRpmApi.md +228 -0
  4. data/docs/DistributionsRpmApi.md +228 -0
  5. data/docs/MyPermissionsResponse.md +17 -0
  6. data/docs/NestedRole.md +21 -0
  7. data/docs/NestedRoleResponse.md +21 -0
  8. data/docs/ObjectRolesResponse.md +17 -0
  9. data/docs/PublicationsRpmApi.md +228 -0
  10. data/docs/RemotesRpmApi.md +228 -0
  11. data/docs/RemotesUlnApi.md +228 -0
  12. data/docs/RepositoriesRpmApi.md +228 -0
  13. data/lib/pulp_rpm_client/api/acs_rpm_api.rb +268 -0
  14. data/lib/pulp_rpm_client/api/distributions_rpm_api.rb +268 -0
  15. data/lib/pulp_rpm_client/api/publications_rpm_api.rb +268 -0
  16. data/lib/pulp_rpm_client/api/remotes_rpm_api.rb +268 -0
  17. data/lib/pulp_rpm_client/api/remotes_uln_api.rb +268 -0
  18. data/lib/pulp_rpm_client/api/repositories_rpm_api.rb +268 -0
  19. data/lib/pulp_rpm_client/models/my_permissions_response.rb +213 -0
  20. data/lib/pulp_rpm_client/models/nested_role.rb +234 -0
  21. data/lib/pulp_rpm_client/models/nested_role_response.rb +234 -0
  22. data/lib/pulp_rpm_client/models/object_roles_response.rb +213 -0
  23. data/lib/pulp_rpm_client/version.rb +1 -1
  24. data/lib/pulp_rpm_client.rb +4 -0
  25. data/spec/api/acs_rpm_api_spec.rb +50 -0
  26. data/spec/api/distributions_rpm_api_spec.rb +50 -0
  27. data/spec/api/publications_rpm_api_spec.rb +50 -0
  28. data/spec/api/remotes_rpm_api_spec.rb +50 -0
  29. data/spec/api/remotes_uln_api_spec.rb +50 -0
  30. data/spec/api/repositories_rpm_api_spec.rb +50 -0
  31. data/spec/models/my_permissions_response_spec.rb +41 -0
  32. data/spec/models/nested_role_response_spec.rb +53 -0
  33. data/spec/models/nested_role_spec.rb +53 -0
  34. data/spec/models/object_roles_response_spec.rb +41 -0
  35. metadata +18 -2
@@ -19,6 +19,74 @@ module PulpRpmClient
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 rpm_rpm_alternate_content_source_href [String]
24
+ # @param nested_role [NestedRole]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [NestedRoleResponse]
27
+ def add_role(rpm_rpm_alternate_content_source_href, nested_role, opts = {})
28
+ data, _status_code, _headers = add_role_with_http_info(rpm_rpm_alternate_content_source_href, nested_role, opts)
29
+ data
30
+ end
31
+
32
+ # Add a role for this object to users/groups.
33
+ # @param rpm_rpm_alternate_content_source_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(rpm_rpm_alternate_content_source_href, nested_role, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: AcsRpmApi.add_role ...'
40
+ end
41
+ # verify the required parameter 'rpm_rpm_alternate_content_source_href' is set
42
+ if @api_client.config.client_side_validation && rpm_rpm_alternate_content_source_href.nil?
43
+ fail ArgumentError, "Missing the required parameter 'rpm_rpm_alternate_content_source_href' when calling AcsRpmApi.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 AcsRpmApi.add_role"
48
+ end
49
+ # resource path
50
+ local_var_path = '{rpm_rpm_alternate_content_source_href}add_role/'.sub('{' + 'rpm_rpm_alternate_content_source_href' + '}', CGI.escape(rpm_rpm_alternate_content_source_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: AcsRpmApi#add_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
22
90
  # Create a rpm alternate content source
23
91
  # ViewSet for ACS.
24
92
  # @param rpm_rpm_alternate_content_source [RpmRpmAlternateContentSource]
@@ -235,6 +303,138 @@ module PulpRpmClient
235
303
  return data, status_code, headers
236
304
  end
237
305
 
306
+ # List roles assigned to this object.
307
+ # @param rpm_rpm_alternate_content_source_href [String]
308
+ # @param [Hash] opts the optional parameters
309
+ # @option opts [String] :fields A list of fields to include in the response.
310
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
311
+ # @return [ObjectRolesResponse]
312
+ def list_roles(rpm_rpm_alternate_content_source_href, opts = {})
313
+ data, _status_code, _headers = list_roles_with_http_info(rpm_rpm_alternate_content_source_href, opts)
314
+ data
315
+ end
316
+
317
+ # List roles assigned to this object.
318
+ # @param rpm_rpm_alternate_content_source_href [String]
319
+ # @param [Hash] opts the optional parameters
320
+ # @option opts [String] :fields A list of fields to include in the response.
321
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
322
+ # @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
323
+ def list_roles_with_http_info(rpm_rpm_alternate_content_source_href, opts = {})
324
+ if @api_client.config.debugging
325
+ @api_client.config.logger.debug 'Calling API: AcsRpmApi.list_roles ...'
326
+ end
327
+ # verify the required parameter 'rpm_rpm_alternate_content_source_href' is set
328
+ if @api_client.config.client_side_validation && rpm_rpm_alternate_content_source_href.nil?
329
+ fail ArgumentError, "Missing the required parameter 'rpm_rpm_alternate_content_source_href' when calling AcsRpmApi.list_roles"
330
+ end
331
+ # resource path
332
+ local_var_path = '{rpm_rpm_alternate_content_source_href}list_roles/'.sub('{' + 'rpm_rpm_alternate_content_source_href' + '}', CGI.escape(rpm_rpm_alternate_content_source_href.to_s).gsub('%2F', '/'))
333
+
334
+ # query parameters
335
+ query_params = opts[:query_params] || {}
336
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
337
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
338
+
339
+ # header parameters
340
+ header_params = opts[:header_params] || {}
341
+ # HTTP header 'Accept' (if needed)
342
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
343
+
344
+ # form parameters
345
+ form_params = opts[:form_params] || {}
346
+
347
+ # http body (model)
348
+ post_body = opts[:body]
349
+
350
+ # return_type
351
+ return_type = opts[:return_type] || 'ObjectRolesResponse'
352
+
353
+ # auth_names
354
+ auth_names = opts[:auth_names] || ['basicAuth']
355
+
356
+ new_options = opts.merge(
357
+ :header_params => header_params,
358
+ :query_params => query_params,
359
+ :form_params => form_params,
360
+ :body => post_body,
361
+ :auth_names => auth_names,
362
+ :return_type => return_type
363
+ )
364
+
365
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
366
+ if @api_client.config.debugging
367
+ @api_client.config.logger.debug "API called: AcsRpmApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
368
+ end
369
+ return data, status_code, headers
370
+ end
371
+
372
+ # List permissions available to the current user on this object.
373
+ # @param rpm_rpm_alternate_content_source_href [String]
374
+ # @param [Hash] opts the optional parameters
375
+ # @option opts [String] :fields A list of fields to include in the response.
376
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
377
+ # @return [MyPermissionsResponse]
378
+ def my_permissions(rpm_rpm_alternate_content_source_href, opts = {})
379
+ data, _status_code, _headers = my_permissions_with_http_info(rpm_rpm_alternate_content_source_href, opts)
380
+ data
381
+ end
382
+
383
+ # List permissions available to the current user on this object.
384
+ # @param rpm_rpm_alternate_content_source_href [String]
385
+ # @param [Hash] opts the optional parameters
386
+ # @option opts [String] :fields A list of fields to include in the response.
387
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
388
+ # @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
389
+ def my_permissions_with_http_info(rpm_rpm_alternate_content_source_href, opts = {})
390
+ if @api_client.config.debugging
391
+ @api_client.config.logger.debug 'Calling API: AcsRpmApi.my_permissions ...'
392
+ end
393
+ # verify the required parameter 'rpm_rpm_alternate_content_source_href' is set
394
+ if @api_client.config.client_side_validation && rpm_rpm_alternate_content_source_href.nil?
395
+ fail ArgumentError, "Missing the required parameter 'rpm_rpm_alternate_content_source_href' when calling AcsRpmApi.my_permissions"
396
+ end
397
+ # resource path
398
+ local_var_path = '{rpm_rpm_alternate_content_source_href}my_permissions/'.sub('{' + 'rpm_rpm_alternate_content_source_href' + '}', CGI.escape(rpm_rpm_alternate_content_source_href.to_s).gsub('%2F', '/'))
399
+
400
+ # query parameters
401
+ query_params = opts[:query_params] || {}
402
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
403
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
404
+
405
+ # header parameters
406
+ header_params = opts[:header_params] || {}
407
+ # HTTP header 'Accept' (if needed)
408
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
409
+
410
+ # form parameters
411
+ form_params = opts[:form_params] || {}
412
+
413
+ # http body (model)
414
+ post_body = opts[:body]
415
+
416
+ # return_type
417
+ return_type = opts[:return_type] || 'MyPermissionsResponse'
418
+
419
+ # auth_names
420
+ auth_names = opts[:auth_names] || ['basicAuth']
421
+
422
+ new_options = opts.merge(
423
+ :header_params => header_params,
424
+ :query_params => query_params,
425
+ :form_params => form_params,
426
+ :body => post_body,
427
+ :auth_names => auth_names,
428
+ :return_type => return_type
429
+ )
430
+
431
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
432
+ if @api_client.config.debugging
433
+ @api_client.config.logger.debug "API called: AcsRpmApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
434
+ end
435
+ return data, status_code, headers
436
+ end
437
+
238
438
  # Update a rpm alternate content source
239
439
  # Trigger an asynchronous partial update task
240
440
  # @param rpm_rpm_alternate_content_source_href [String]
@@ -433,6 +633,74 @@ module PulpRpmClient
433
633
  return data, status_code, headers
434
634
  end
435
635
 
636
+ # Remove a role for this object from users/groups.
637
+ # @param rpm_rpm_alternate_content_source_href [String]
638
+ # @param nested_role [NestedRole]
639
+ # @param [Hash] opts the optional parameters
640
+ # @return [NestedRoleResponse]
641
+ def remove_role(rpm_rpm_alternate_content_source_href, nested_role, opts = {})
642
+ data, _status_code, _headers = remove_role_with_http_info(rpm_rpm_alternate_content_source_href, nested_role, opts)
643
+ data
644
+ end
645
+
646
+ # Remove a role for this object from users/groups.
647
+ # @param rpm_rpm_alternate_content_source_href [String]
648
+ # @param nested_role [NestedRole]
649
+ # @param [Hash] opts the optional parameters
650
+ # @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
651
+ def remove_role_with_http_info(rpm_rpm_alternate_content_source_href, nested_role, opts = {})
652
+ if @api_client.config.debugging
653
+ @api_client.config.logger.debug 'Calling API: AcsRpmApi.remove_role ...'
654
+ end
655
+ # verify the required parameter 'rpm_rpm_alternate_content_source_href' is set
656
+ if @api_client.config.client_side_validation && rpm_rpm_alternate_content_source_href.nil?
657
+ fail ArgumentError, "Missing the required parameter 'rpm_rpm_alternate_content_source_href' when calling AcsRpmApi.remove_role"
658
+ end
659
+ # verify the required parameter 'nested_role' is set
660
+ if @api_client.config.client_side_validation && nested_role.nil?
661
+ fail ArgumentError, "Missing the required parameter 'nested_role' when calling AcsRpmApi.remove_role"
662
+ end
663
+ # resource path
664
+ local_var_path = '{rpm_rpm_alternate_content_source_href}remove_role/'.sub('{' + 'rpm_rpm_alternate_content_source_href' + '}', CGI.escape(rpm_rpm_alternate_content_source_href.to_s).gsub('%2F', '/'))
665
+
666
+ # query parameters
667
+ query_params = opts[:query_params] || {}
668
+
669
+ # header parameters
670
+ header_params = opts[:header_params] || {}
671
+ # HTTP header 'Accept' (if needed)
672
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
673
+ # HTTP header 'Content-Type'
674
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
675
+
676
+ # form parameters
677
+ form_params = opts[:form_params] || {}
678
+
679
+ # http body (model)
680
+ post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
681
+
682
+ # return_type
683
+ return_type = opts[:return_type] || 'NestedRoleResponse'
684
+
685
+ # auth_names
686
+ auth_names = opts[:auth_names] || ['basicAuth']
687
+
688
+ new_options = opts.merge(
689
+ :header_params => header_params,
690
+ :query_params => query_params,
691
+ :form_params => form_params,
692
+ :body => post_body,
693
+ :auth_names => auth_names,
694
+ :return_type => return_type
695
+ )
696
+
697
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
698
+ if @api_client.config.debugging
699
+ @api_client.config.logger.debug "API called: AcsRpmApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
700
+ end
701
+ return data, status_code, headers
702
+ end
703
+
436
704
  # Update a rpm alternate content source
437
705
  # Trigger an asynchronous update task
438
706
  # @param rpm_rpm_alternate_content_source_href [String]
@@ -19,6 +19,74 @@ module PulpRpmClient
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 rpm_rpm_distribution_href [String]
24
+ # @param nested_role [NestedRole]
25
+ # @param [Hash] opts the optional parameters
26
+ # @return [NestedRoleResponse]
27
+ def add_role(rpm_rpm_distribution_href, nested_role, opts = {})
28
+ data, _status_code, _headers = add_role_with_http_info(rpm_rpm_distribution_href, nested_role, opts)
29
+ data
30
+ end
31
+
32
+ # Add a role for this object to users/groups.
33
+ # @param rpm_rpm_distribution_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(rpm_rpm_distribution_href, nested_role, opts = {})
38
+ if @api_client.config.debugging
39
+ @api_client.config.logger.debug 'Calling API: DistributionsRpmApi.add_role ...'
40
+ end
41
+ # verify the required parameter 'rpm_rpm_distribution_href' is set
42
+ if @api_client.config.client_side_validation && rpm_rpm_distribution_href.nil?
43
+ fail ArgumentError, "Missing the required parameter 'rpm_rpm_distribution_href' when calling DistributionsRpmApi.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 DistributionsRpmApi.add_role"
48
+ end
49
+ # resource path
50
+ local_var_path = '{rpm_rpm_distribution_href}add_role/'.sub('{' + 'rpm_rpm_distribution_href' + '}', CGI.escape(rpm_rpm_distribution_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: DistributionsRpmApi#add_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
89
+
22
90
  # Create a rpm distribution
23
91
  # Trigger an asynchronous create task
24
92
  # @param rpm_rpm_distribution [RpmRpmDistribution]
@@ -253,6 +321,138 @@ module PulpRpmClient
253
321
  return data, status_code, headers
254
322
  end
255
323
 
324
+ # List roles assigned to this object.
325
+ # @param rpm_rpm_distribution_href [String]
326
+ # @param [Hash] opts the optional parameters
327
+ # @option opts [String] :fields A list of fields to include in the response.
328
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
329
+ # @return [ObjectRolesResponse]
330
+ def list_roles(rpm_rpm_distribution_href, opts = {})
331
+ data, _status_code, _headers = list_roles_with_http_info(rpm_rpm_distribution_href, opts)
332
+ data
333
+ end
334
+
335
+ # List roles assigned to this object.
336
+ # @param rpm_rpm_distribution_href [String]
337
+ # @param [Hash] opts the optional parameters
338
+ # @option opts [String] :fields A list of fields to include in the response.
339
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
340
+ # @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
341
+ def list_roles_with_http_info(rpm_rpm_distribution_href, opts = {})
342
+ if @api_client.config.debugging
343
+ @api_client.config.logger.debug 'Calling API: DistributionsRpmApi.list_roles ...'
344
+ end
345
+ # verify the required parameter 'rpm_rpm_distribution_href' is set
346
+ if @api_client.config.client_side_validation && rpm_rpm_distribution_href.nil?
347
+ fail ArgumentError, "Missing the required parameter 'rpm_rpm_distribution_href' when calling DistributionsRpmApi.list_roles"
348
+ end
349
+ # resource path
350
+ local_var_path = '{rpm_rpm_distribution_href}list_roles/'.sub('{' + 'rpm_rpm_distribution_href' + '}', CGI.escape(rpm_rpm_distribution_href.to_s).gsub('%2F', '/'))
351
+
352
+ # query parameters
353
+ query_params = opts[:query_params] || {}
354
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
355
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
356
+
357
+ # header parameters
358
+ header_params = opts[:header_params] || {}
359
+ # HTTP header 'Accept' (if needed)
360
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
361
+
362
+ # form parameters
363
+ form_params = opts[:form_params] || {}
364
+
365
+ # http body (model)
366
+ post_body = opts[:body]
367
+
368
+ # return_type
369
+ return_type = opts[:return_type] || 'ObjectRolesResponse'
370
+
371
+ # auth_names
372
+ auth_names = opts[:auth_names] || ['basicAuth']
373
+
374
+ new_options = opts.merge(
375
+ :header_params => header_params,
376
+ :query_params => query_params,
377
+ :form_params => form_params,
378
+ :body => post_body,
379
+ :auth_names => auth_names,
380
+ :return_type => return_type
381
+ )
382
+
383
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
384
+ if @api_client.config.debugging
385
+ @api_client.config.logger.debug "API called: DistributionsRpmApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
386
+ end
387
+ return data, status_code, headers
388
+ end
389
+
390
+ # List permissions available to the current user on this object.
391
+ # @param rpm_rpm_distribution_href [String]
392
+ # @param [Hash] opts the optional parameters
393
+ # @option opts [String] :fields A list of fields to include in the response.
394
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
395
+ # @return [MyPermissionsResponse]
396
+ def my_permissions(rpm_rpm_distribution_href, opts = {})
397
+ data, _status_code, _headers = my_permissions_with_http_info(rpm_rpm_distribution_href, opts)
398
+ data
399
+ end
400
+
401
+ # List permissions available to the current user on this object.
402
+ # @param rpm_rpm_distribution_href [String]
403
+ # @param [Hash] opts the optional parameters
404
+ # @option opts [String] :fields A list of fields to include in the response.
405
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
406
+ # @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
407
+ def my_permissions_with_http_info(rpm_rpm_distribution_href, opts = {})
408
+ if @api_client.config.debugging
409
+ @api_client.config.logger.debug 'Calling API: DistributionsRpmApi.my_permissions ...'
410
+ end
411
+ # verify the required parameter 'rpm_rpm_distribution_href' is set
412
+ if @api_client.config.client_side_validation && rpm_rpm_distribution_href.nil?
413
+ fail ArgumentError, "Missing the required parameter 'rpm_rpm_distribution_href' when calling DistributionsRpmApi.my_permissions"
414
+ end
415
+ # resource path
416
+ local_var_path = '{rpm_rpm_distribution_href}my_permissions/'.sub('{' + 'rpm_rpm_distribution_href' + '}', CGI.escape(rpm_rpm_distribution_href.to_s).gsub('%2F', '/'))
417
+
418
+ # query parameters
419
+ query_params = opts[:query_params] || {}
420
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
421
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
422
+
423
+ # header parameters
424
+ header_params = opts[:header_params] || {}
425
+ # HTTP header 'Accept' (if needed)
426
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
427
+
428
+ # form parameters
429
+ form_params = opts[:form_params] || {}
430
+
431
+ # http body (model)
432
+ post_body = opts[:body]
433
+
434
+ # return_type
435
+ return_type = opts[:return_type] || 'MyPermissionsResponse'
436
+
437
+ # auth_names
438
+ auth_names = opts[:auth_names] || ['basicAuth']
439
+
440
+ new_options = opts.merge(
441
+ :header_params => header_params,
442
+ :query_params => query_params,
443
+ :form_params => form_params,
444
+ :body => post_body,
445
+ :auth_names => auth_names,
446
+ :return_type => return_type
447
+ )
448
+
449
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
450
+ if @api_client.config.debugging
451
+ @api_client.config.logger.debug "API called: DistributionsRpmApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
452
+ end
453
+ return data, status_code, headers
454
+ end
455
+
256
456
  # Update a rpm distribution
257
457
  # Trigger an asynchronous partial update task
258
458
  # @param rpm_rpm_distribution_href [String]
@@ -391,6 +591,74 @@ module PulpRpmClient
391
591
  return data, status_code, headers
392
592
  end
393
593
 
594
+ # Remove a role for this object from users/groups.
595
+ # @param rpm_rpm_distribution_href [String]
596
+ # @param nested_role [NestedRole]
597
+ # @param [Hash] opts the optional parameters
598
+ # @return [NestedRoleResponse]
599
+ def remove_role(rpm_rpm_distribution_href, nested_role, opts = {})
600
+ data, _status_code, _headers = remove_role_with_http_info(rpm_rpm_distribution_href, nested_role, opts)
601
+ data
602
+ end
603
+
604
+ # Remove a role for this object from users/groups.
605
+ # @param rpm_rpm_distribution_href [String]
606
+ # @param nested_role [NestedRole]
607
+ # @param [Hash] opts the optional parameters
608
+ # @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
609
+ def remove_role_with_http_info(rpm_rpm_distribution_href, nested_role, opts = {})
610
+ if @api_client.config.debugging
611
+ @api_client.config.logger.debug 'Calling API: DistributionsRpmApi.remove_role ...'
612
+ end
613
+ # verify the required parameter 'rpm_rpm_distribution_href' is set
614
+ if @api_client.config.client_side_validation && rpm_rpm_distribution_href.nil?
615
+ fail ArgumentError, "Missing the required parameter 'rpm_rpm_distribution_href' when calling DistributionsRpmApi.remove_role"
616
+ end
617
+ # verify the required parameter 'nested_role' is set
618
+ if @api_client.config.client_side_validation && nested_role.nil?
619
+ fail ArgumentError, "Missing the required parameter 'nested_role' when calling DistributionsRpmApi.remove_role"
620
+ end
621
+ # resource path
622
+ local_var_path = '{rpm_rpm_distribution_href}remove_role/'.sub('{' + 'rpm_rpm_distribution_href' + '}', CGI.escape(rpm_rpm_distribution_href.to_s).gsub('%2F', '/'))
623
+
624
+ # query parameters
625
+ query_params = opts[:query_params] || {}
626
+
627
+ # header parameters
628
+ header_params = opts[:header_params] || {}
629
+ # HTTP header 'Accept' (if needed)
630
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
631
+ # HTTP header 'Content-Type'
632
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
633
+
634
+ # form parameters
635
+ form_params = opts[:form_params] || {}
636
+
637
+ # http body (model)
638
+ post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
639
+
640
+ # return_type
641
+ return_type = opts[:return_type] || 'NestedRoleResponse'
642
+
643
+ # auth_names
644
+ auth_names = opts[:auth_names] || ['basicAuth']
645
+
646
+ new_options = opts.merge(
647
+ :header_params => header_params,
648
+ :query_params => query_params,
649
+ :form_params => form_params,
650
+ :body => post_body,
651
+ :auth_names => auth_names,
652
+ :return_type => return_type
653
+ )
654
+
655
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
656
+ if @api_client.config.debugging
657
+ @api_client.config.logger.debug "API called: DistributionsRpmApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
658
+ end
659
+ return data, status_code, headers
660
+ end
661
+
394
662
  # Update a rpm distribution
395
663
  # Trigger an asynchronous update task
396
664
  # @param rpm_rpm_distribution_href [String]