pulp_gem_client 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,12 +4,16 @@ All URIs are relative to *http://pulp*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
+ [**add_role**](RepositoriesGemApi.md#add_role) | **POST** {gem_gem_repository_href}add_role/ | Add a role
7
8
  [**create**](RepositoriesGemApi.md#create) | **POST** /pulp/api/v3/repositories/gem/gem/ | Create a gem repository
8
9
  [**delete**](RepositoriesGemApi.md#delete) | **DELETE** {gem_gem_repository_href} | Delete a gem repository
9
10
  [**list**](RepositoriesGemApi.md#list) | **GET** /pulp/api/v3/repositories/gem/gem/ | List gem repositorys
11
+ [**list_roles**](RepositoriesGemApi.md#list_roles) | **GET** {gem_gem_repository_href}list_roles/ | List roles
10
12
  [**modify**](RepositoriesGemApi.md#modify) | **POST** {gem_gem_repository_href}modify/ | Modify Repository Content
13
+ [**my_permissions**](RepositoriesGemApi.md#my_permissions) | **GET** {gem_gem_repository_href}my_permissions/ | List user permissions
11
14
  [**partial_update**](RepositoriesGemApi.md#partial_update) | **PATCH** {gem_gem_repository_href} | Update a gem repository
12
15
  [**read**](RepositoriesGemApi.md#read) | **GET** {gem_gem_repository_href} | Inspect a gem repository
16
+ [**remove_role**](RepositoriesGemApi.md#remove_role) | **POST** {gem_gem_repository_href}remove_role/ | Remove a role
13
17
  [**set_label**](RepositoriesGemApi.md#set_label) | **POST** {gem_gem_repository_href}set_label/ | Set a label
14
18
  [**sync**](RepositoriesGemApi.md#sync) | **POST** {gem_gem_repository_href}sync/ | Sync from a remote
15
19
  [**unset_label**](RepositoriesGemApi.md#unset_label) | **POST** {gem_gem_repository_href}unset_label/ | Unset a label
@@ -17,6 +21,61 @@ Method | HTTP request | Description
17
21
 
18
22
 
19
23
 
24
+ ## add_role
25
+
26
+ > NestedRoleResponse add_role(gem_gem_repository_href, nested_role)
27
+
28
+ Add a role
29
+
30
+ Add a role for this object to users/groups.
31
+
32
+ ### Example
33
+
34
+ ```ruby
35
+ # load the gem
36
+ require 'pulp_gem_client'
37
+ # setup authorization
38
+ PulpGemClient.configure do |config|
39
+ # Configure HTTP basic authorization: basicAuth
40
+ config.username = 'YOUR USERNAME'
41
+ config.password = 'YOUR PASSWORD'
42
+ end
43
+
44
+ api_instance = PulpGemClient::RepositoriesGemApi.new
45
+ gem_gem_repository_href = 'gem_gem_repository_href_example' # String |
46
+ nested_role = PulpGemClient::NestedRole.new # NestedRole |
47
+
48
+ begin
49
+ #Add a role
50
+ result = api_instance.add_role(gem_gem_repository_href, nested_role)
51
+ p result
52
+ rescue PulpGemClient::ApiError => e
53
+ puts "Exception when calling RepositoriesGemApi->add_role: #{e}"
54
+ end
55
+ ```
56
+
57
+ ### Parameters
58
+
59
+
60
+ Name | Type | Description | Notes
61
+ ------------- | ------------- | ------------- | -------------
62
+ **gem_gem_repository_href** | **String**| |
63
+ **nested_role** | [**NestedRole**](NestedRole.md)| |
64
+
65
+ ### Return type
66
+
67
+ [**NestedRoleResponse**](NestedRoleResponse.md)
68
+
69
+ ### Authorization
70
+
71
+ [basicAuth](../README.md#basicAuth)
72
+
73
+ ### HTTP request headers
74
+
75
+ - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
76
+ - **Accept**: application/json
77
+
78
+
20
79
  ## create
21
80
 
22
81
  > GemGemRepositoryResponse create(gem_gem_repository)
@@ -152,7 +211,9 @@ opts = {
152
211
  name__icontains: 'name__icontains_example', # String | Filter results where name contains value
153
212
  name__iexact: 'name__iexact_example', # String | Filter results where name matches value
154
213
  name__in: ['name__in_example'], # Array<String> | Filter results where name is in a comma-separated list of values
214
+ name__iregex: 'name__iregex_example', # String | Filter results where name matches regex value
155
215
  name__istartswith: 'name__istartswith_example', # String | Filter results where name starts with value
216
+ name__regex: 'name__regex_example', # String | Filter results where name matches regex value
156
217
  name__startswith: 'name__startswith_example', # String | Filter results where name starts with value
157
218
  offset: 56, # Integer | The initial index from which to return the results.
158
219
  ordering: ['ordering_example'], # Array<String> | Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
@@ -195,7 +256,9 @@ Name | Type | Description | Notes
195
256
  **name__icontains** | **String**| Filter results where name contains value | [optional]
196
257
  **name__iexact** | **String**| Filter results where name matches value | [optional]
197
258
  **name__in** | [**Array&lt;String&gt;**](String.md)| Filter results where name is in a comma-separated list of values | [optional]
259
+ **name__iregex** | **String**| Filter results where name matches regex value | [optional]
198
260
  **name__istartswith** | **String**| Filter results where name starts with value | [optional]
261
+ **name__regex** | **String**| Filter results where name matches regex value | [optional]
199
262
  **name__startswith** | **String**| Filter results where name starts with value | [optional]
200
263
  **offset** | **Integer**| The initial index from which to return the results. | [optional]
201
264
  **ordering** | [**Array&lt;String&gt;**](String.md)| Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;pulp_type&#x60; - Pulp type * &#x60;-pulp_type&#x60; - Pulp type (descending) * &#x60;name&#x60; - Name * &#x60;-name&#x60; - Name (descending) * &#x60;pulp_labels&#x60; - Pulp labels * &#x60;-pulp_labels&#x60; - Pulp labels (descending) * &#x60;description&#x60; - Description * &#x60;-description&#x60; - Description (descending) * &#x60;next_version&#x60; - Next version * &#x60;-next_version&#x60; - Next version (descending) * &#x60;retain_repo_versions&#x60; - Retain repo versions * &#x60;-retain_repo_versions&#x60; - Retain repo versions (descending) * &#x60;user_hidden&#x60; - User hidden * &#x60;-user_hidden&#x60; - User hidden (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending) | [optional]
@@ -230,6 +293,65 @@ Name | Type | Description | Notes
230
293
  - **Accept**: application/json
231
294
 
232
295
 
296
+ ## list_roles
297
+
298
+ > ObjectRolesResponse list_roles(gem_gem_repository_href, opts)
299
+
300
+ List roles
301
+
302
+ List roles assigned to this object.
303
+
304
+ ### Example
305
+
306
+ ```ruby
307
+ # load the gem
308
+ require 'pulp_gem_client'
309
+ # setup authorization
310
+ PulpGemClient.configure do |config|
311
+ # Configure HTTP basic authorization: basicAuth
312
+ config.username = 'YOUR USERNAME'
313
+ config.password = 'YOUR PASSWORD'
314
+ end
315
+
316
+ api_instance = PulpGemClient::RepositoriesGemApi.new
317
+ gem_gem_repository_href = 'gem_gem_repository_href_example' # String |
318
+ opts = {
319
+ fields: ['fields_example'], # Array<String> | A list of fields to include in the response.
320
+ exclude_fields: ['exclude_fields_example'] # Array<String> | A list of fields to exclude from the response.
321
+ }
322
+
323
+ begin
324
+ #List roles
325
+ result = api_instance.list_roles(gem_gem_repository_href, opts)
326
+ p result
327
+ rescue PulpGemClient::ApiError => e
328
+ puts "Exception when calling RepositoriesGemApi->list_roles: #{e}"
329
+ end
330
+ ```
331
+
332
+ ### Parameters
333
+
334
+
335
+ Name | Type | Description | Notes
336
+ ------------- | ------------- | ------------- | -------------
337
+ **gem_gem_repository_href** | **String**| |
338
+ **fields** | [**Array&lt;String&gt;**](String.md)| A list of fields to include in the response. | [optional]
339
+ **exclude_fields** | [**Array&lt;String&gt;**](String.md)| A list of fields to exclude from the response. | [optional]
340
+
341
+ ### Return type
342
+
343
+ [**ObjectRolesResponse**](ObjectRolesResponse.md)
344
+
345
+ ### Authorization
346
+
347
+ [basicAuth](../README.md#basicAuth)
348
+
349
+ ### HTTP request headers
350
+
351
+ - **Content-Type**: Not defined
352
+ - **Accept**: application/json
353
+
354
+
233
355
  ## modify
234
356
 
235
357
  > AsyncOperationResponse modify(gem_gem_repository_href, repository_add_remove_content)
@@ -285,6 +407,65 @@ Name | Type | Description | Notes
285
407
  - **Accept**: application/json
286
408
 
287
409
 
410
+ ## my_permissions
411
+
412
+ > MyPermissionsResponse my_permissions(gem_gem_repository_href, opts)
413
+
414
+ List user permissions
415
+
416
+ List permissions available to the current user on this object.
417
+
418
+ ### Example
419
+
420
+ ```ruby
421
+ # load the gem
422
+ require 'pulp_gem_client'
423
+ # setup authorization
424
+ PulpGemClient.configure do |config|
425
+ # Configure HTTP basic authorization: basicAuth
426
+ config.username = 'YOUR USERNAME'
427
+ config.password = 'YOUR PASSWORD'
428
+ end
429
+
430
+ api_instance = PulpGemClient::RepositoriesGemApi.new
431
+ gem_gem_repository_href = 'gem_gem_repository_href_example' # String |
432
+ opts = {
433
+ fields: ['fields_example'], # Array<String> | A list of fields to include in the response.
434
+ exclude_fields: ['exclude_fields_example'] # Array<String> | A list of fields to exclude from the response.
435
+ }
436
+
437
+ begin
438
+ #List user permissions
439
+ result = api_instance.my_permissions(gem_gem_repository_href, opts)
440
+ p result
441
+ rescue PulpGemClient::ApiError => e
442
+ puts "Exception when calling RepositoriesGemApi->my_permissions: #{e}"
443
+ end
444
+ ```
445
+
446
+ ### Parameters
447
+
448
+
449
+ Name | Type | Description | Notes
450
+ ------------- | ------------- | ------------- | -------------
451
+ **gem_gem_repository_href** | **String**| |
452
+ **fields** | [**Array&lt;String&gt;**](String.md)| A list of fields to include in the response. | [optional]
453
+ **exclude_fields** | [**Array&lt;String&gt;**](String.md)| A list of fields to exclude from the response. | [optional]
454
+
455
+ ### Return type
456
+
457
+ [**MyPermissionsResponse**](MyPermissionsResponse.md)
458
+
459
+ ### Authorization
460
+
461
+ [basicAuth](../README.md#basicAuth)
462
+
463
+ ### HTTP request headers
464
+
465
+ - **Content-Type**: Not defined
466
+ - **Accept**: application/json
467
+
468
+
288
469
  ## partial_update
289
470
 
290
471
  > AsyncOperationResponse partial_update(gem_gem_repository_href, patchedgem_gem_repository)
@@ -399,6 +580,61 @@ Name | Type | Description | Notes
399
580
  - **Accept**: application/json
400
581
 
401
582
 
583
+ ## remove_role
584
+
585
+ > NestedRoleResponse remove_role(gem_gem_repository_href, nested_role)
586
+
587
+ Remove a role
588
+
589
+ Remove a role for this object from users/groups.
590
+
591
+ ### Example
592
+
593
+ ```ruby
594
+ # load the gem
595
+ require 'pulp_gem_client'
596
+ # setup authorization
597
+ PulpGemClient.configure do |config|
598
+ # Configure HTTP basic authorization: basicAuth
599
+ config.username = 'YOUR USERNAME'
600
+ config.password = 'YOUR PASSWORD'
601
+ end
602
+
603
+ api_instance = PulpGemClient::RepositoriesGemApi.new
604
+ gem_gem_repository_href = 'gem_gem_repository_href_example' # String |
605
+ nested_role = PulpGemClient::NestedRole.new # NestedRole |
606
+
607
+ begin
608
+ #Remove a role
609
+ result = api_instance.remove_role(gem_gem_repository_href, nested_role)
610
+ p result
611
+ rescue PulpGemClient::ApiError => e
612
+ puts "Exception when calling RepositoriesGemApi->remove_role: #{e}"
613
+ end
614
+ ```
615
+
616
+ ### Parameters
617
+
618
+
619
+ Name | Type | Description | Notes
620
+ ------------- | ------------- | ------------- | -------------
621
+ **gem_gem_repository_href** | **String**| |
622
+ **nested_role** | [**NestedRole**](NestedRole.md)| |
623
+
624
+ ### Return type
625
+
626
+ [**NestedRoleResponse**](NestedRoleResponse.md)
627
+
628
+ ### Authorization
629
+
630
+ [basicAuth](../README.md#basicAuth)
631
+
632
+ ### HTTP request headers
633
+
634
+ - **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
635
+ - **Accept**: application/json
636
+
637
+
402
638
  ## set_label
403
639
 
404
640
  > SetLabelResponse set_label(gem_gem_repository_href, set_label)
@@ -19,6 +19,76 @@ module PulpGemClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Add a role
23
+ # Add a role for this object to users/groups.
24
+ # @param gem_gem_distribution_href [String]
25
+ # @param nested_role [NestedRole]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [NestedRoleResponse]
28
+ def add_role(gem_gem_distribution_href, nested_role, opts = {})
29
+ data, _status_code, _headers = add_role_with_http_info(gem_gem_distribution_href, nested_role, opts)
30
+ data
31
+ end
32
+
33
+ # Add a role
34
+ # Add a role for this object to users/groups.
35
+ # @param gem_gem_distribution_href [String]
36
+ # @param nested_role [NestedRole]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
39
+ def add_role_with_http_info(gem_gem_distribution_href, nested_role, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: DistributionsGemApi.add_role ...'
42
+ end
43
+ # verify the required parameter 'gem_gem_distribution_href' is set
44
+ if @api_client.config.client_side_validation && gem_gem_distribution_href.nil?
45
+ fail ArgumentError, "Missing the required parameter 'gem_gem_distribution_href' when calling DistributionsGemApi.add_role"
46
+ end
47
+ # verify the required parameter 'nested_role' is set
48
+ if @api_client.config.client_side_validation && nested_role.nil?
49
+ fail ArgumentError, "Missing the required parameter 'nested_role' when calling DistributionsGemApi.add_role"
50
+ end
51
+ # resource path
52
+ local_var_path = '{gem_gem_distribution_href}add_role/'.sub('{' + 'gem_gem_distribution_href' + '}', CGI.escape(gem_gem_distribution_href.to_s).gsub('%2F', '/'))
53
+
54
+ # query parameters
55
+ query_params = opts[:query_params] || {}
56
+
57
+ # header parameters
58
+ header_params = opts[:header_params] || {}
59
+ # HTTP header 'Accept' (if needed)
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
61
+ # HTTP header 'Content-Type'
62
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+
67
+ # http body (model)
68
+ post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
69
+
70
+ # return_type
71
+ return_type = opts[:return_type] || 'NestedRoleResponse'
72
+
73
+ # auth_names
74
+ auth_names = opts[:auth_names] || ['basicAuth']
75
+
76
+ new_options = opts.merge(
77
+ :header_params => header_params,
78
+ :query_params => query_params,
79
+ :form_params => form_params,
80
+ :body => post_body,
81
+ :auth_names => auth_names,
82
+ :return_type => return_type
83
+ )
84
+
85
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
86
+ if @api_client.config.debugging
87
+ @api_client.config.logger.debug "API called: DistributionsGemApi#add_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
22
92
  # Create a gem distribution
23
93
  # Trigger an asynchronous create task
24
94
  # @param gem_gem_distribution [GemGemDistribution]
@@ -158,7 +228,9 @@ module PulpGemClient
158
228
  # @option opts [String] :name__icontains Filter results where name contains value
159
229
  # @option opts [String] :name__iexact Filter results where name matches value
160
230
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
231
+ # @option opts [String] :name__iregex Filter results where name matches regex value
161
232
  # @option opts [String] :name__istartswith Filter results where name starts with value
233
+ # @option opts [String] :name__regex Filter results where name matches regex value
162
234
  # @option opts [String] :name__startswith Filter results where name starts with value
163
235
  # @option opts [Integer] :offset The initial index from which to return the results.
164
236
  # @option opts [Array<String>] :ordering Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;pulp_type&#x60; - Pulp type * &#x60;-pulp_type&#x60; - Pulp type (descending) * &#x60;name&#x60; - Name * &#x60;-name&#x60; - Name (descending) * &#x60;pulp_labels&#x60; - Pulp labels * &#x60;-pulp_labels&#x60; - Pulp labels (descending) * &#x60;base_path&#x60; - Base path * &#x60;-base_path&#x60; - Base path (descending) * &#x60;hidden&#x60; - Hidden * &#x60;-hidden&#x60; - Hidden (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
@@ -190,7 +262,9 @@ module PulpGemClient
190
262
  # @option opts [String] :name__icontains Filter results where name contains value
191
263
  # @option opts [String] :name__iexact Filter results where name matches value
192
264
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
265
+ # @option opts [String] :name__iregex Filter results where name matches regex value
193
266
  # @option opts [String] :name__istartswith Filter results where name starts with value
267
+ # @option opts [String] :name__regex Filter results where name matches regex value
194
268
  # @option opts [String] :name__startswith Filter results where name starts with value
195
269
  # @option opts [Integer] :offset The initial index from which to return the results.
196
270
  # @option opts [Array<String>] :ordering Ordering * &#x60;pulp_id&#x60; - Pulp id * &#x60;-pulp_id&#x60; - Pulp id (descending) * &#x60;pulp_created&#x60; - Pulp created * &#x60;-pulp_created&#x60; - Pulp created (descending) * &#x60;pulp_last_updated&#x60; - Pulp last updated * &#x60;-pulp_last_updated&#x60; - Pulp last updated (descending) * &#x60;pulp_type&#x60; - Pulp type * &#x60;-pulp_type&#x60; - Pulp type (descending) * &#x60;name&#x60; - Name * &#x60;-name&#x60; - Name (descending) * &#x60;pulp_labels&#x60; - Pulp labels * &#x60;-pulp_labels&#x60; - Pulp labels (descending) * &#x60;base_path&#x60; - Base path * &#x60;-base_path&#x60; - Base path (descending) * &#x60;hidden&#x60; - Hidden * &#x60;-hidden&#x60; - Hidden (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
@@ -227,7 +301,9 @@ module PulpGemClient
227
301
  query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
228
302
  query_params[:'name__iexact'] = opts[:'name__iexact'] if !opts[:'name__iexact'].nil?
229
303
  query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
304
+ query_params[:'name__iregex'] = opts[:'name__iregex'] if !opts[:'name__iregex'].nil?
230
305
  query_params[:'name__istartswith'] = opts[:'name__istartswith'] if !opts[:'name__istartswith'].nil?
306
+ query_params[:'name__regex'] = opts[:'name__regex'] if !opts[:'name__regex'].nil?
231
307
  query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
232
308
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
233
309
  query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
@@ -274,6 +350,142 @@ module PulpGemClient
274
350
  return data, status_code, headers
275
351
  end
276
352
 
353
+ # List roles
354
+ # List roles assigned to this object.
355
+ # @param gem_gem_distribution_href [String]
356
+ # @param [Hash] opts the optional parameters
357
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
358
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
359
+ # @return [ObjectRolesResponse]
360
+ def list_roles(gem_gem_distribution_href, opts = {})
361
+ data, _status_code, _headers = list_roles_with_http_info(gem_gem_distribution_href, opts)
362
+ data
363
+ end
364
+
365
+ # List roles
366
+ # List roles assigned to this object.
367
+ # @param gem_gem_distribution_href [String]
368
+ # @param [Hash] opts the optional parameters
369
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
370
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
371
+ # @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
372
+ def list_roles_with_http_info(gem_gem_distribution_href, opts = {})
373
+ if @api_client.config.debugging
374
+ @api_client.config.logger.debug 'Calling API: DistributionsGemApi.list_roles ...'
375
+ end
376
+ # verify the required parameter 'gem_gem_distribution_href' is set
377
+ if @api_client.config.client_side_validation && gem_gem_distribution_href.nil?
378
+ fail ArgumentError, "Missing the required parameter 'gem_gem_distribution_href' when calling DistributionsGemApi.list_roles"
379
+ end
380
+ # resource path
381
+ local_var_path = '{gem_gem_distribution_href}list_roles/'.sub('{' + 'gem_gem_distribution_href' + '}', CGI.escape(gem_gem_distribution_href.to_s).gsub('%2F', '/'))
382
+
383
+ # query parameters
384
+ query_params = opts[:query_params] || {}
385
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
386
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
387
+
388
+ # header parameters
389
+ header_params = opts[:header_params] || {}
390
+ # HTTP header 'Accept' (if needed)
391
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
392
+
393
+ # form parameters
394
+ form_params = opts[:form_params] || {}
395
+
396
+ # http body (model)
397
+ post_body = opts[:body]
398
+
399
+ # return_type
400
+ return_type = opts[:return_type] || 'ObjectRolesResponse'
401
+
402
+ # auth_names
403
+ auth_names = opts[:auth_names] || ['basicAuth']
404
+
405
+ new_options = opts.merge(
406
+ :header_params => header_params,
407
+ :query_params => query_params,
408
+ :form_params => form_params,
409
+ :body => post_body,
410
+ :auth_names => auth_names,
411
+ :return_type => return_type
412
+ )
413
+
414
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
415
+ if @api_client.config.debugging
416
+ @api_client.config.logger.debug "API called: DistributionsGemApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
417
+ end
418
+ return data, status_code, headers
419
+ end
420
+
421
+ # List user permissions
422
+ # List permissions available to the current user on this object.
423
+ # @param gem_gem_distribution_href [String]
424
+ # @param [Hash] opts the optional parameters
425
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
426
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
427
+ # @return [MyPermissionsResponse]
428
+ def my_permissions(gem_gem_distribution_href, opts = {})
429
+ data, _status_code, _headers = my_permissions_with_http_info(gem_gem_distribution_href, opts)
430
+ data
431
+ end
432
+
433
+ # List user permissions
434
+ # List permissions available to the current user on this object.
435
+ # @param gem_gem_distribution_href [String]
436
+ # @param [Hash] opts the optional parameters
437
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
438
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
439
+ # @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
440
+ def my_permissions_with_http_info(gem_gem_distribution_href, opts = {})
441
+ if @api_client.config.debugging
442
+ @api_client.config.logger.debug 'Calling API: DistributionsGemApi.my_permissions ...'
443
+ end
444
+ # verify the required parameter 'gem_gem_distribution_href' is set
445
+ if @api_client.config.client_side_validation && gem_gem_distribution_href.nil?
446
+ fail ArgumentError, "Missing the required parameter 'gem_gem_distribution_href' when calling DistributionsGemApi.my_permissions"
447
+ end
448
+ # resource path
449
+ local_var_path = '{gem_gem_distribution_href}my_permissions/'.sub('{' + 'gem_gem_distribution_href' + '}', CGI.escape(gem_gem_distribution_href.to_s).gsub('%2F', '/'))
450
+
451
+ # query parameters
452
+ query_params = opts[:query_params] || {}
453
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
454
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
455
+
456
+ # header parameters
457
+ header_params = opts[:header_params] || {}
458
+ # HTTP header 'Accept' (if needed)
459
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
460
+
461
+ # form parameters
462
+ form_params = opts[:form_params] || {}
463
+
464
+ # http body (model)
465
+ post_body = opts[:body]
466
+
467
+ # return_type
468
+ return_type = opts[:return_type] || 'MyPermissionsResponse'
469
+
470
+ # auth_names
471
+ auth_names = opts[:auth_names] || ['basicAuth']
472
+
473
+ new_options = opts.merge(
474
+ :header_params => header_params,
475
+ :query_params => query_params,
476
+ :form_params => form_params,
477
+ :body => post_body,
478
+ :auth_names => auth_names,
479
+ :return_type => return_type
480
+ )
481
+
482
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
483
+ if @api_client.config.debugging
484
+ @api_client.config.logger.debug "API called: DistributionsGemApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
485
+ end
486
+ return data, status_code, headers
487
+ end
488
+
277
489
  # Update a gem distribution
278
490
  # Trigger an asynchronous partial update task
279
491
  # @param gem_gem_distribution_href [String]
@@ -412,6 +624,76 @@ module PulpGemClient
412
624
  return data, status_code, headers
413
625
  end
414
626
 
627
+ # Remove a role
628
+ # Remove a role for this object from users/groups.
629
+ # @param gem_gem_distribution_href [String]
630
+ # @param nested_role [NestedRole]
631
+ # @param [Hash] opts the optional parameters
632
+ # @return [NestedRoleResponse]
633
+ def remove_role(gem_gem_distribution_href, nested_role, opts = {})
634
+ data, _status_code, _headers = remove_role_with_http_info(gem_gem_distribution_href, nested_role, opts)
635
+ data
636
+ end
637
+
638
+ # Remove a role
639
+ # Remove a role for this object from users/groups.
640
+ # @param gem_gem_distribution_href [String]
641
+ # @param nested_role [NestedRole]
642
+ # @param [Hash] opts the optional parameters
643
+ # @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
644
+ def remove_role_with_http_info(gem_gem_distribution_href, nested_role, opts = {})
645
+ if @api_client.config.debugging
646
+ @api_client.config.logger.debug 'Calling API: DistributionsGemApi.remove_role ...'
647
+ end
648
+ # verify the required parameter 'gem_gem_distribution_href' is set
649
+ if @api_client.config.client_side_validation && gem_gem_distribution_href.nil?
650
+ fail ArgumentError, "Missing the required parameter 'gem_gem_distribution_href' when calling DistributionsGemApi.remove_role"
651
+ end
652
+ # verify the required parameter 'nested_role' is set
653
+ if @api_client.config.client_side_validation && nested_role.nil?
654
+ fail ArgumentError, "Missing the required parameter 'nested_role' when calling DistributionsGemApi.remove_role"
655
+ end
656
+ # resource path
657
+ local_var_path = '{gem_gem_distribution_href}remove_role/'.sub('{' + 'gem_gem_distribution_href' + '}', CGI.escape(gem_gem_distribution_href.to_s).gsub('%2F', '/'))
658
+
659
+ # query parameters
660
+ query_params = opts[:query_params] || {}
661
+
662
+ # header parameters
663
+ header_params = opts[:header_params] || {}
664
+ # HTTP header 'Accept' (if needed)
665
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
666
+ # HTTP header 'Content-Type'
667
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
668
+
669
+ # form parameters
670
+ form_params = opts[:form_params] || {}
671
+
672
+ # http body (model)
673
+ post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
674
+
675
+ # return_type
676
+ return_type = opts[:return_type] || 'NestedRoleResponse'
677
+
678
+ # auth_names
679
+ auth_names = opts[:auth_names] || ['basicAuth']
680
+
681
+ new_options = opts.merge(
682
+ :header_params => header_params,
683
+ :query_params => query_params,
684
+ :form_params => form_params,
685
+ :body => post_body,
686
+ :auth_names => auth_names,
687
+ :return_type => return_type
688
+ )
689
+
690
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
691
+ if @api_client.config.debugging
692
+ @api_client.config.logger.debug "API called: DistributionsGemApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
693
+ end
694
+ return data, status_code, headers
695
+ end
696
+
415
697
  # Set a label
416
698
  # Set a single pulp_label on the object to a specific value or null.
417
699
  # @param gem_gem_distribution_href [String]