pulp_gem_client 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +35 -5
  3. data/docs/ContentGemApi.md +3 -1
  4. data/docs/DistributionsGemApi.md +355 -1
  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/PublicationsGemApi.md +235 -1
  10. data/docs/RemotesGemApi.md +355 -1
  11. data/docs/RepositoriesGemApi.md +355 -1
  12. data/docs/RepositoriesGemVersionsApi.md +3 -1
  13. data/docs/SetLabel.md +19 -0
  14. data/docs/SetLabelResponse.md +19 -0
  15. data/docs/UnsetLabel.md +17 -0
  16. data/docs/UnsetLabelResponse.md +19 -0
  17. data/lib/pulp_gem_client/api/content_gem_api.rb +3 -0
  18. data/lib/pulp_gem_client/api/distributions_gem_api.rb +431 -0
  19. data/lib/pulp_gem_client/api/publications_gem_api.rb +279 -0
  20. data/lib/pulp_gem_client/api/remotes_gem_api.rb +431 -0
  21. data/lib/pulp_gem_client/api/repositories_gem_api.rb +431 -0
  22. data/lib/pulp_gem_client/api/repositories_gem_versions_api.rb +3 -0
  23. data/lib/pulp_gem_client/configuration.rb +2 -2
  24. data/lib/pulp_gem_client/models/my_permissions_response.rb +213 -0
  25. data/lib/pulp_gem_client/models/nested_role.rb +253 -0
  26. data/lib/pulp_gem_client/models/nested_role_response.rb +234 -0
  27. data/lib/pulp_gem_client/models/object_roles_response.rb +213 -0
  28. data/lib/pulp_gem_client/models/set_label.rb +252 -0
  29. data/lib/pulp_gem_client/models/set_label_response.rb +243 -0
  30. data/lib/pulp_gem_client/models/unset_label.rb +242 -0
  31. data/lib/pulp_gem_client/models/unset_label_response.rb +242 -0
  32. data/lib/pulp_gem_client/version.rb +1 -1
  33. data/lib/pulp_gem_client.rb +8 -0
  34. data/spec/api/content_gem_api_spec.rb +1 -0
  35. data/spec/api/distributions_gem_api_spec.rb +85 -0
  36. data/spec/api/publications_gem_api_spec.rb +55 -0
  37. data/spec/api/remotes_gem_api_spec.rb +85 -0
  38. data/spec/api/repositories_gem_api_spec.rb +85 -0
  39. data/spec/api/repositories_gem_versions_api_spec.rb +1 -0
  40. data/spec/configuration_spec.rb +3 -3
  41. data/spec/models/my_permissions_response_spec.rb +41 -0
  42. data/spec/models/nested_role_response_spec.rb +53 -0
  43. data/spec/models/nested_role_spec.rb +53 -0
  44. data/spec/models/object_roles_response_spec.rb +41 -0
  45. data/spec/models/set_label_response_spec.rb +47 -0
  46. data/spec/models/set_label_spec.rb +47 -0
  47. data/spec/models/unset_label_response_spec.rb +47 -0
  48. data/spec/models/unset_label_spec.rb +41 -0
  49. metadata +57 -25
@@ -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_remote_href [String]
25
+ # @param nested_role [NestedRole]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [NestedRoleResponse]
28
+ def add_role(gem_gem_remote_href, nested_role, opts = {})
29
+ data, _status_code, _headers = add_role_with_http_info(gem_gem_remote_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_remote_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_remote_href, nested_role, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: RemotesGemApi.add_role ...'
42
+ end
43
+ # verify the required parameter 'gem_gem_remote_href' is set
44
+ if @api_client.config.client_side_validation && gem_gem_remote_href.nil?
45
+ fail ArgumentError, "Missing the required parameter 'gem_gem_remote_href' when calling RemotesGemApi.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 RemotesGemApi.add_role"
50
+ end
51
+ # resource path
52
+ local_var_path = '{gem_gem_remote_href}add_role/'.sub('{' + 'gem_gem_remote_href' + '}', CGI.escape(gem_gem_remote_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: RemotesGemApi#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 remote
23
93
  # A ViewSet for GemRemote.
24
94
  # @param gem_gem_remote [GemGemRemote]
@@ -152,7 +222,11 @@ module PulpGemClient
152
222
  # @option opts [String] :name Filter results where name matches value
153
223
  # @option opts [String] :name__contains Filter results where name contains value
154
224
  # @option opts [String] :name__icontains Filter results where name contains value
225
+ # @option opts [String] :name__iexact Filter results where name matches value
155
226
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
227
+ # @option opts [String] :name__iregex Filter results where name matches regex value
228
+ # @option opts [String] :name__istartswith Filter results where name starts with value
229
+ # @option opts [String] :name__regex Filter results where name matches regex value
156
230
  # @option opts [String] :name__startswith Filter results where name starts with value
157
231
  # @option opts [Integer] :offset The initial index from which to return the results.
158
232
  # @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;url&#x60; - Url * &#x60;-url&#x60; - Url (descending) * &#x60;ca_cert&#x60; - Ca cert * &#x60;-ca_cert&#x60; - Ca cert (descending) * &#x60;client_cert&#x60; - Client cert * &#x60;-client_cert&#x60; - Client cert (descending) * &#x60;client_key&#x60; - Client key * &#x60;-client_key&#x60; - Client key (descending) * &#x60;tls_validation&#x60; - Tls validation * &#x60;-tls_validation&#x60; - Tls validation (descending) * &#x60;username&#x60; - Username * &#x60;-username&#x60; - Username (descending) * &#x60;password&#x60; - Password * &#x60;-password&#x60; - Password (descending) * &#x60;proxy_url&#x60; - Proxy url * &#x60;-proxy_url&#x60; - Proxy url (descending) * &#x60;proxy_username&#x60; - Proxy username * &#x60;-proxy_username&#x60; - Proxy username (descending) * &#x60;proxy_password&#x60; - Proxy password * &#x60;-proxy_password&#x60; - Proxy password (descending) * &#x60;download_concurrency&#x60; - Download concurrency * &#x60;-download_concurrency&#x60; - Download concurrency (descending) * &#x60;max_retries&#x60; - Max retries * &#x60;-max_retries&#x60; - Max retries (descending) * &#x60;policy&#x60; - Policy * &#x60;-policy&#x60; - Policy (descending) * &#x60;total_timeout&#x60; - Total timeout * &#x60;-total_timeout&#x60; - Total timeout (descending) * &#x60;connect_timeout&#x60; - Connect timeout * &#x60;-connect_timeout&#x60; - Connect timeout (descending) * &#x60;sock_connect_timeout&#x60; - Sock connect timeout * &#x60;-sock_connect_timeout&#x60; - Sock connect timeout (descending) * &#x60;sock_read_timeout&#x60; - Sock read timeout * &#x60;-sock_read_timeout&#x60; - Sock read timeout (descending) * &#x60;headers&#x60; - Headers * &#x60;-headers&#x60; - Headers (descending) * &#x60;rate_limit&#x60; - Rate limit * &#x60;-rate_limit&#x60; - Rate limit (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
@@ -165,6 +239,7 @@ module PulpGemClient
165
239
  # @option opts [DateTime] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
166
240
  # @option opts [DateTime] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
167
241
  # @option opts [Array<DateTime>] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
242
+ # @option opts [String] :q
168
243
  # @option opts [Array<String>] :fields A list of fields to include in the response.
169
244
  # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
170
245
  # @return [PaginatedgemGemRemoteResponseList]
@@ -180,7 +255,11 @@ module PulpGemClient
180
255
  # @option opts [String] :name Filter results where name matches value
181
256
  # @option opts [String] :name__contains Filter results where name contains value
182
257
  # @option opts [String] :name__icontains Filter results where name contains value
258
+ # @option opts [String] :name__iexact Filter results where name matches value
183
259
  # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
260
+ # @option opts [String] :name__iregex Filter results where name matches regex value
261
+ # @option opts [String] :name__istartswith Filter results where name starts with value
262
+ # @option opts [String] :name__regex Filter results where name matches regex value
184
263
  # @option opts [String] :name__startswith Filter results where name starts with value
185
264
  # @option opts [Integer] :offset The initial index from which to return the results.
186
265
  # @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;url&#x60; - Url * &#x60;-url&#x60; - Url (descending) * &#x60;ca_cert&#x60; - Ca cert * &#x60;-ca_cert&#x60; - Ca cert (descending) * &#x60;client_cert&#x60; - Client cert * &#x60;-client_cert&#x60; - Client cert (descending) * &#x60;client_key&#x60; - Client key * &#x60;-client_key&#x60; - Client key (descending) * &#x60;tls_validation&#x60; - Tls validation * &#x60;-tls_validation&#x60; - Tls validation (descending) * &#x60;username&#x60; - Username * &#x60;-username&#x60; - Username (descending) * &#x60;password&#x60; - Password * &#x60;-password&#x60; - Password (descending) * &#x60;proxy_url&#x60; - Proxy url * &#x60;-proxy_url&#x60; - Proxy url (descending) * &#x60;proxy_username&#x60; - Proxy username * &#x60;-proxy_username&#x60; - Proxy username (descending) * &#x60;proxy_password&#x60; - Proxy password * &#x60;-proxy_password&#x60; - Proxy password (descending) * &#x60;download_concurrency&#x60; - Download concurrency * &#x60;-download_concurrency&#x60; - Download concurrency (descending) * &#x60;max_retries&#x60; - Max retries * &#x60;-max_retries&#x60; - Max retries (descending) * &#x60;policy&#x60; - Policy * &#x60;-policy&#x60; - Policy (descending) * &#x60;total_timeout&#x60; - Total timeout * &#x60;-total_timeout&#x60; - Total timeout (descending) * &#x60;connect_timeout&#x60; - Connect timeout * &#x60;-connect_timeout&#x60; - Connect timeout (descending) * &#x60;sock_connect_timeout&#x60; - Sock connect timeout * &#x60;-sock_connect_timeout&#x60; - Sock connect timeout (descending) * &#x60;sock_read_timeout&#x60; - Sock read timeout * &#x60;-sock_read_timeout&#x60; - Sock read timeout (descending) * &#x60;headers&#x60; - Headers * &#x60;-headers&#x60; - Headers (descending) * &#x60;rate_limit&#x60; - Rate limit * &#x60;-rate_limit&#x60; - Rate limit (descending) * &#x60;pk&#x60; - Pk * &#x60;-pk&#x60; - Pk (descending)
@@ -193,6 +272,7 @@ module PulpGemClient
193
272
  # @option opts [DateTime] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
194
273
  # @option opts [DateTime] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
195
274
  # @option opts [Array<DateTime>] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
275
+ # @option opts [String] :q
196
276
  # @option opts [Array<String>] :fields A list of fields to include in the response.
197
277
  # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
198
278
  # @return [Array<(PaginatedgemGemRemoteResponseList, Integer, Hash)>] PaginatedgemGemRemoteResponseList data, response status code and response headers
@@ -213,7 +293,11 @@ module PulpGemClient
213
293
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
214
294
  query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
215
295
  query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
296
+ query_params[:'name__iexact'] = opts[:'name__iexact'] if !opts[:'name__iexact'].nil?
216
297
  query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
298
+ query_params[:'name__iregex'] = opts[:'name__iregex'] if !opts[:'name__iregex'].nil?
299
+ query_params[:'name__istartswith'] = opts[:'name__istartswith'] if !opts[:'name__istartswith'].nil?
300
+ query_params[:'name__regex'] = opts[:'name__regex'] if !opts[:'name__regex'].nil?
217
301
  query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
218
302
  query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
219
303
  query_params[:'ordering'] = @api_client.build_collection_param(opts[:'ordering'], :csv) if !opts[:'ordering'].nil?
@@ -226,6 +310,7 @@ module PulpGemClient
226
310
  query_params[:'pulp_last_updated__lt'] = opts[:'pulp_last_updated__lt'] if !opts[:'pulp_last_updated__lt'].nil?
227
311
  query_params[:'pulp_last_updated__lte'] = opts[:'pulp_last_updated__lte'] if !opts[:'pulp_last_updated__lte'].nil?
228
312
  query_params[:'pulp_last_updated__range'] = @api_client.build_collection_param(opts[:'pulp_last_updated__range'], :csv) if !opts[:'pulp_last_updated__range'].nil?
313
+ query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil?
229
314
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
230
315
  query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
231
316
 
@@ -262,6 +347,142 @@ module PulpGemClient
262
347
  return data, status_code, headers
263
348
  end
264
349
 
350
+ # List roles
351
+ # List roles assigned to this object.
352
+ # @param gem_gem_remote_href [String]
353
+ # @param [Hash] opts the optional parameters
354
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
355
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
356
+ # @return [ObjectRolesResponse]
357
+ def list_roles(gem_gem_remote_href, opts = {})
358
+ data, _status_code, _headers = list_roles_with_http_info(gem_gem_remote_href, opts)
359
+ data
360
+ end
361
+
362
+ # List roles
363
+ # List roles assigned to this object.
364
+ # @param gem_gem_remote_href [String]
365
+ # @param [Hash] opts the optional parameters
366
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
367
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
368
+ # @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
369
+ def list_roles_with_http_info(gem_gem_remote_href, opts = {})
370
+ if @api_client.config.debugging
371
+ @api_client.config.logger.debug 'Calling API: RemotesGemApi.list_roles ...'
372
+ end
373
+ # verify the required parameter 'gem_gem_remote_href' is set
374
+ if @api_client.config.client_side_validation && gem_gem_remote_href.nil?
375
+ fail ArgumentError, "Missing the required parameter 'gem_gem_remote_href' when calling RemotesGemApi.list_roles"
376
+ end
377
+ # resource path
378
+ local_var_path = '{gem_gem_remote_href}list_roles/'.sub('{' + 'gem_gem_remote_href' + '}', CGI.escape(gem_gem_remote_href.to_s).gsub('%2F', '/'))
379
+
380
+ # query parameters
381
+ query_params = opts[:query_params] || {}
382
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
383
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
384
+
385
+ # header parameters
386
+ header_params = opts[:header_params] || {}
387
+ # HTTP header 'Accept' (if needed)
388
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
389
+
390
+ # form parameters
391
+ form_params = opts[:form_params] || {}
392
+
393
+ # http body (model)
394
+ post_body = opts[:body]
395
+
396
+ # return_type
397
+ return_type = opts[:return_type] || 'ObjectRolesResponse'
398
+
399
+ # auth_names
400
+ auth_names = opts[:auth_names] || ['basicAuth']
401
+
402
+ new_options = opts.merge(
403
+ :header_params => header_params,
404
+ :query_params => query_params,
405
+ :form_params => form_params,
406
+ :body => post_body,
407
+ :auth_names => auth_names,
408
+ :return_type => return_type
409
+ )
410
+
411
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
412
+ if @api_client.config.debugging
413
+ @api_client.config.logger.debug "API called: RemotesGemApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
414
+ end
415
+ return data, status_code, headers
416
+ end
417
+
418
+ # List user permissions
419
+ # List permissions available to the current user on this object.
420
+ # @param gem_gem_remote_href [String]
421
+ # @param [Hash] opts the optional parameters
422
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
423
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
424
+ # @return [MyPermissionsResponse]
425
+ def my_permissions(gem_gem_remote_href, opts = {})
426
+ data, _status_code, _headers = my_permissions_with_http_info(gem_gem_remote_href, opts)
427
+ data
428
+ end
429
+
430
+ # List user permissions
431
+ # List permissions available to the current user on this object.
432
+ # @param gem_gem_remote_href [String]
433
+ # @param [Hash] opts the optional parameters
434
+ # @option opts [Array<String>] :fields A list of fields to include in the response.
435
+ # @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
436
+ # @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
437
+ def my_permissions_with_http_info(gem_gem_remote_href, opts = {})
438
+ if @api_client.config.debugging
439
+ @api_client.config.logger.debug 'Calling API: RemotesGemApi.my_permissions ...'
440
+ end
441
+ # verify the required parameter 'gem_gem_remote_href' is set
442
+ if @api_client.config.client_side_validation && gem_gem_remote_href.nil?
443
+ fail ArgumentError, "Missing the required parameter 'gem_gem_remote_href' when calling RemotesGemApi.my_permissions"
444
+ end
445
+ # resource path
446
+ local_var_path = '{gem_gem_remote_href}my_permissions/'.sub('{' + 'gem_gem_remote_href' + '}', CGI.escape(gem_gem_remote_href.to_s).gsub('%2F', '/'))
447
+
448
+ # query parameters
449
+ query_params = opts[:query_params] || {}
450
+ query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :multi) if !opts[:'fields'].nil?
451
+ query_params[:'exclude_fields'] = @api_client.build_collection_param(opts[:'exclude_fields'], :multi) if !opts[:'exclude_fields'].nil?
452
+
453
+ # header parameters
454
+ header_params = opts[:header_params] || {}
455
+ # HTTP header 'Accept' (if needed)
456
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
457
+
458
+ # form parameters
459
+ form_params = opts[:form_params] || {}
460
+
461
+ # http body (model)
462
+ post_body = opts[:body]
463
+
464
+ # return_type
465
+ return_type = opts[:return_type] || 'MyPermissionsResponse'
466
+
467
+ # auth_names
468
+ auth_names = opts[:auth_names] || ['basicAuth']
469
+
470
+ new_options = opts.merge(
471
+ :header_params => header_params,
472
+ :query_params => query_params,
473
+ :form_params => form_params,
474
+ :body => post_body,
475
+ :auth_names => auth_names,
476
+ :return_type => return_type
477
+ )
478
+
479
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
480
+ if @api_client.config.debugging
481
+ @api_client.config.logger.debug "API called: RemotesGemApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
482
+ end
483
+ return data, status_code, headers
484
+ end
485
+
265
486
  # Update a gem remote
266
487
  # Trigger an asynchronous partial update task
267
488
  # @param gem_gem_remote_href [String]
@@ -400,6 +621,216 @@ module PulpGemClient
400
621
  return data, status_code, headers
401
622
  end
402
623
 
624
+ # Remove a role
625
+ # Remove a role for this object from users/groups.
626
+ # @param gem_gem_remote_href [String]
627
+ # @param nested_role [NestedRole]
628
+ # @param [Hash] opts the optional parameters
629
+ # @return [NestedRoleResponse]
630
+ def remove_role(gem_gem_remote_href, nested_role, opts = {})
631
+ data, _status_code, _headers = remove_role_with_http_info(gem_gem_remote_href, nested_role, opts)
632
+ data
633
+ end
634
+
635
+ # Remove a role
636
+ # Remove a role for this object from users/groups.
637
+ # @param gem_gem_remote_href [String]
638
+ # @param nested_role [NestedRole]
639
+ # @param [Hash] opts the optional parameters
640
+ # @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
641
+ def remove_role_with_http_info(gem_gem_remote_href, nested_role, opts = {})
642
+ if @api_client.config.debugging
643
+ @api_client.config.logger.debug 'Calling API: RemotesGemApi.remove_role ...'
644
+ end
645
+ # verify the required parameter 'gem_gem_remote_href' is set
646
+ if @api_client.config.client_side_validation && gem_gem_remote_href.nil?
647
+ fail ArgumentError, "Missing the required parameter 'gem_gem_remote_href' when calling RemotesGemApi.remove_role"
648
+ end
649
+ # verify the required parameter 'nested_role' is set
650
+ if @api_client.config.client_side_validation && nested_role.nil?
651
+ fail ArgumentError, "Missing the required parameter 'nested_role' when calling RemotesGemApi.remove_role"
652
+ end
653
+ # resource path
654
+ local_var_path = '{gem_gem_remote_href}remove_role/'.sub('{' + 'gem_gem_remote_href' + '}', CGI.escape(gem_gem_remote_href.to_s).gsub('%2F', '/'))
655
+
656
+ # query parameters
657
+ query_params = opts[:query_params] || {}
658
+
659
+ # header parameters
660
+ header_params = opts[:header_params] || {}
661
+ # HTTP header 'Accept' (if needed)
662
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
663
+ # HTTP header 'Content-Type'
664
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
665
+
666
+ # form parameters
667
+ form_params = opts[:form_params] || {}
668
+
669
+ # http body (model)
670
+ post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
671
+
672
+ # return_type
673
+ return_type = opts[:return_type] || 'NestedRoleResponse'
674
+
675
+ # auth_names
676
+ auth_names = opts[:auth_names] || ['basicAuth']
677
+
678
+ new_options = opts.merge(
679
+ :header_params => header_params,
680
+ :query_params => query_params,
681
+ :form_params => form_params,
682
+ :body => post_body,
683
+ :auth_names => auth_names,
684
+ :return_type => return_type
685
+ )
686
+
687
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
688
+ if @api_client.config.debugging
689
+ @api_client.config.logger.debug "API called: RemotesGemApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
690
+ end
691
+ return data, status_code, headers
692
+ end
693
+
694
+ # Set a label
695
+ # Set a single pulp_label on the object to a specific value or null.
696
+ # @param gem_gem_remote_href [String]
697
+ # @param set_label [SetLabel]
698
+ # @param [Hash] opts the optional parameters
699
+ # @return [SetLabelResponse]
700
+ def set_label(gem_gem_remote_href, set_label, opts = {})
701
+ data, _status_code, _headers = set_label_with_http_info(gem_gem_remote_href, set_label, opts)
702
+ data
703
+ end
704
+
705
+ # Set a label
706
+ # Set a single pulp_label on the object to a specific value or null.
707
+ # @param gem_gem_remote_href [String]
708
+ # @param set_label [SetLabel]
709
+ # @param [Hash] opts the optional parameters
710
+ # @return [Array<(SetLabelResponse, Integer, Hash)>] SetLabelResponse data, response status code and response headers
711
+ def set_label_with_http_info(gem_gem_remote_href, set_label, opts = {})
712
+ if @api_client.config.debugging
713
+ @api_client.config.logger.debug 'Calling API: RemotesGemApi.set_label ...'
714
+ end
715
+ # verify the required parameter 'gem_gem_remote_href' is set
716
+ if @api_client.config.client_side_validation && gem_gem_remote_href.nil?
717
+ fail ArgumentError, "Missing the required parameter 'gem_gem_remote_href' when calling RemotesGemApi.set_label"
718
+ end
719
+ # verify the required parameter 'set_label' is set
720
+ if @api_client.config.client_side_validation && set_label.nil?
721
+ fail ArgumentError, "Missing the required parameter 'set_label' when calling RemotesGemApi.set_label"
722
+ end
723
+ # resource path
724
+ local_var_path = '{gem_gem_remote_href}set_label/'.sub('{' + 'gem_gem_remote_href' + '}', CGI.escape(gem_gem_remote_href.to_s).gsub('%2F', '/'))
725
+
726
+ # query parameters
727
+ query_params = opts[:query_params] || {}
728
+
729
+ # header parameters
730
+ header_params = opts[:header_params] || {}
731
+ # HTTP header 'Accept' (if needed)
732
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
733
+ # HTTP header 'Content-Type'
734
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
735
+
736
+ # form parameters
737
+ form_params = opts[:form_params] || {}
738
+
739
+ # http body (model)
740
+ post_body = opts[:body] || @api_client.object_to_http_body(set_label)
741
+
742
+ # return_type
743
+ return_type = opts[:return_type] || 'SetLabelResponse'
744
+
745
+ # auth_names
746
+ auth_names = opts[:auth_names] || ['basicAuth']
747
+
748
+ new_options = opts.merge(
749
+ :header_params => header_params,
750
+ :query_params => query_params,
751
+ :form_params => form_params,
752
+ :body => post_body,
753
+ :auth_names => auth_names,
754
+ :return_type => return_type
755
+ )
756
+
757
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
758
+ if @api_client.config.debugging
759
+ @api_client.config.logger.debug "API called: RemotesGemApi#set_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
760
+ end
761
+ return data, status_code, headers
762
+ end
763
+
764
+ # Unset a label
765
+ # Unset a single pulp_label on the object.
766
+ # @param gem_gem_remote_href [String]
767
+ # @param unset_label [UnsetLabel]
768
+ # @param [Hash] opts the optional parameters
769
+ # @return [UnsetLabelResponse]
770
+ def unset_label(gem_gem_remote_href, unset_label, opts = {})
771
+ data, _status_code, _headers = unset_label_with_http_info(gem_gem_remote_href, unset_label, opts)
772
+ data
773
+ end
774
+
775
+ # Unset a label
776
+ # Unset a single pulp_label on the object.
777
+ # @param gem_gem_remote_href [String]
778
+ # @param unset_label [UnsetLabel]
779
+ # @param [Hash] opts the optional parameters
780
+ # @return [Array<(UnsetLabelResponse, Integer, Hash)>] UnsetLabelResponse data, response status code and response headers
781
+ def unset_label_with_http_info(gem_gem_remote_href, unset_label, opts = {})
782
+ if @api_client.config.debugging
783
+ @api_client.config.logger.debug 'Calling API: RemotesGemApi.unset_label ...'
784
+ end
785
+ # verify the required parameter 'gem_gem_remote_href' is set
786
+ if @api_client.config.client_side_validation && gem_gem_remote_href.nil?
787
+ fail ArgumentError, "Missing the required parameter 'gem_gem_remote_href' when calling RemotesGemApi.unset_label"
788
+ end
789
+ # verify the required parameter 'unset_label' is set
790
+ if @api_client.config.client_side_validation && unset_label.nil?
791
+ fail ArgumentError, "Missing the required parameter 'unset_label' when calling RemotesGemApi.unset_label"
792
+ end
793
+ # resource path
794
+ local_var_path = '{gem_gem_remote_href}unset_label/'.sub('{' + 'gem_gem_remote_href' + '}', CGI.escape(gem_gem_remote_href.to_s).gsub('%2F', '/'))
795
+
796
+ # query parameters
797
+ query_params = opts[:query_params] || {}
798
+
799
+ # header parameters
800
+ header_params = opts[:header_params] || {}
801
+ # HTTP header 'Accept' (if needed)
802
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
803
+ # HTTP header 'Content-Type'
804
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
805
+
806
+ # form parameters
807
+ form_params = opts[:form_params] || {}
808
+
809
+ # http body (model)
810
+ post_body = opts[:body] || @api_client.object_to_http_body(unset_label)
811
+
812
+ # return_type
813
+ return_type = opts[:return_type] || 'UnsetLabelResponse'
814
+
815
+ # auth_names
816
+ auth_names = opts[:auth_names] || ['basicAuth']
817
+
818
+ new_options = opts.merge(
819
+ :header_params => header_params,
820
+ :query_params => query_params,
821
+ :form_params => form_params,
822
+ :body => post_body,
823
+ :auth_names => auth_names,
824
+ :return_type => return_type
825
+ )
826
+
827
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
828
+ if @api_client.config.debugging
829
+ @api_client.config.logger.debug "API called: RemotesGemApi#unset_label\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
830
+ end
831
+ return data, status_code, headers
832
+ end
833
+
403
834
  # Update a gem remote
404
835
  # Trigger an asynchronous update task
405
836
  # @param gem_gem_remote_href [String]