pulpcore_client 3.14.19 → 3.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (96) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +38 -5
  3. data/docs/AccessPoliciesApi.md +1 -1
  4. data/docs/ArtifactsApi.md +1 -1
  5. data/docs/ContentApi.md +1 -1
  6. data/docs/ContentguardsApi.md +1 -1
  7. data/docs/ContentguardsRbacApi.md +473 -0
  8. data/docs/ExportersFilesystemApi.md +362 -0
  9. data/docs/ExportersFilesystemExportsApi.md +243 -0
  10. data/docs/ExportersPulpApi.md +1 -1
  11. data/docs/ExportersPulpExportsApi.md +1 -1
  12. data/docs/FilesystemExport.md +21 -0
  13. data/docs/FilesystemExportResponse.md +25 -0
  14. data/docs/FilesystemExporter.md +21 -0
  15. data/docs/FilesystemExporterResponse.md +25 -0
  16. data/docs/GroupsApi.md +1 -1
  17. data/docs/GroupsModelPermissionsApi.md +1 -1
  18. data/docs/GroupsObjectPermissionsApi.md +1 -1
  19. data/docs/GroupsUsersApi.md +1 -1
  20. data/docs/ImportersPulpApi.md +1 -1
  21. data/docs/ImportersPulpImportCheckApi.md +1 -1
  22. data/docs/ImportersPulpImportsApi.md +1 -1
  23. data/docs/MethodEnum.md +16 -0
  24. data/docs/OrphansApi.md +1 -1
  25. data/docs/OrphansCleanup.md +3 -1
  26. data/docs/OrphansCleanupApi.md +1 -1
  27. data/docs/PaginatedFilesystemExportResponseList.md +23 -0
  28. data/docs/PaginatedFilesystemExporterResponseList.md +23 -0
  29. data/docs/PaginatedRBACContentGuardResponseList.md +23 -0
  30. data/docs/PatchedFilesystemExporter.md +21 -0
  31. data/docs/PatchedRBACContentGuard.md +19 -0
  32. data/docs/PublicationsApi.md +1 -1
  33. data/docs/RBACContentGuard.md +19 -0
  34. data/docs/RBACContentGuardPermission.md +19 -0
  35. data/docs/RBACContentGuardResponse.md +27 -0
  36. data/docs/ReclaimSpace.md +19 -0
  37. data/docs/RepairApi.md +1 -1
  38. data/docs/RepositoriesApi.md +1 -1
  39. data/docs/RepositoriesReclaimSpaceApi.md +61 -0
  40. data/docs/RepositoryResponse.md +3 -3
  41. data/docs/RepositoryVersionsApi.md +1 -1
  42. data/docs/SigningServicesApi.md +1 -1
  43. data/docs/StatusApi.md +1 -1
  44. data/docs/TaskGroupsApi.md +1 -1
  45. data/docs/TasksApi.md +1 -1
  46. data/docs/UploadsApi.md +1 -1
  47. data/docs/UsersApi.md +1 -1
  48. data/docs/WorkersApi.md +1 -1
  49. data/git_push.sh +58 -0
  50. data/lib/pulpcore_client/api/contentguards_rbac_api.rb +580 -0
  51. data/lib/pulpcore_client/api/exporters_filesystem_api.rb +442 -0
  52. data/lib/pulpcore_client/api/exporters_filesystem_exports_api.rb +297 -0
  53. data/lib/pulpcore_client/api/repositories_reclaim_space_api.rb +84 -0
  54. data/lib/pulpcore_client/api_client.rb +5 -2
  55. data/lib/pulpcore_client/configuration.rb +2 -3
  56. data/lib/pulpcore_client/models/filesystem_export.rb +229 -0
  57. data/lib/pulpcore_client/models/filesystem_export_response.rb +250 -0
  58. data/lib/pulpcore_client/models/filesystem_exporter.rb +238 -0
  59. data/lib/pulpcore_client/models/filesystem_exporter_response.rb +257 -0
  60. data/lib/pulpcore_client/models/method_enum.rb +37 -0
  61. data/lib/pulpcore_client/models/orphans_cleanup.rb +17 -4
  62. data/lib/pulpcore_client/models/paginated_filesystem_export_response_list.rb +237 -0
  63. data/lib/pulpcore_client/models/paginated_filesystem_exporter_response_list.rb +237 -0
  64. data/lib/pulpcore_client/models/paginated_rbac_content_guard_response_list.rb +237 -0
  65. data/lib/pulpcore_client/models/patched_filesystem_exporter.rb +228 -0
  66. data/lib/pulpcore_client/models/patched_rbac_content_guard.rb +219 -0
  67. data/lib/pulpcore_client/models/rbac_content_guard.rb +224 -0
  68. data/lib/pulpcore_client/models/rbac_content_guard_permission.rb +219 -0
  69. data/lib/pulpcore_client/models/rbac_content_guard_response.rb +261 -0
  70. data/lib/pulpcore_client/models/reclaim_space.rb +227 -0
  71. data/lib/pulpcore_client/models/repository_response.rb +17 -16
  72. data/lib/pulpcore_client/version.rb +1 -1
  73. data/lib/pulpcore_client.rb +18 -0
  74. data/pulpcore_client.gemspec +3 -3
  75. data/spec/api/contentguards_rbac_api_spec.rb +146 -0
  76. data/spec/api/exporters_filesystem_api_spec.rb +120 -0
  77. data/spec/api/exporters_filesystem_exports_api_spec.rb +91 -0
  78. data/spec/api/repositories_reclaim_space_api_spec.rb +46 -0
  79. data/spec/configuration_spec.rb +3 -3
  80. data/spec/models/filesystem_export_response_spec.rb +65 -0
  81. data/spec/models/filesystem_export_spec.rb +53 -0
  82. data/spec/models/filesystem_exporter_response_spec.rb +65 -0
  83. data/spec/models/filesystem_exporter_spec.rb +53 -0
  84. data/spec/models/method_enum_spec.rb +35 -0
  85. data/spec/models/orphans_cleanup_spec.rb +6 -0
  86. data/spec/models/paginated_filesystem_export_response_list_spec.rb +59 -0
  87. data/spec/models/paginated_filesystem_exporter_response_list_spec.rb +59 -0
  88. data/spec/models/paginated_rbac_content_guard_response_list_spec.rb +59 -0
  89. data/spec/models/patched_filesystem_exporter_spec.rb +53 -0
  90. data/spec/models/patched_rbac_content_guard_spec.rb +47 -0
  91. data/spec/models/rbac_content_guard_permission_spec.rb +47 -0
  92. data/spec/models/rbac_content_guard_response_spec.rb +71 -0
  93. data/spec/models/rbac_content_guard_spec.rb +47 -0
  94. data/spec/models/reclaim_space_spec.rb +47 -0
  95. data/spec/models/repository_response_spec.rb +1 -1
  96. metadata +158 -91
@@ -0,0 +1,580 @@
1
+ =begin
2
+ #Pulp 3 API
3
+
4
+ #Fetch, Upload, Organize, and Distribute Software Packages
5
+
6
+ The version of the OpenAPI document: v3
7
+ Contact: pulp-list@redhat.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'cgi'
14
+
15
+ module PulpcoreClient
16
+ class ContentguardsRbacApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Add download permission
23
+ # Give users and groups the `download` permission
24
+ # @param r_b_a_c_content_guard_href [String]
25
+ # @param rbac_content_guard_permission [RBACContentGuardPermission]
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [RBACContentGuardResponse]
28
+ def assign_permission(r_b_a_c_content_guard_href, rbac_content_guard_permission, opts = {})
29
+ data, _status_code, _headers = assign_permission_with_http_info(r_b_a_c_content_guard_href, rbac_content_guard_permission, opts)
30
+ data
31
+ end
32
+
33
+ # Add download permission
34
+ # Give users and groups the `download` permission
35
+ # @param r_b_a_c_content_guard_href [String]
36
+ # @param rbac_content_guard_permission [RBACContentGuardPermission]
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(RBACContentGuardResponse, Integer, Hash)>] RBACContentGuardResponse data, response status code and response headers
39
+ def assign_permission_with_http_info(r_b_a_c_content_guard_href, rbac_content_guard_permission, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: ContentguardsRbacApi.assign_permission ...'
42
+ end
43
+ # verify the required parameter 'r_b_a_c_content_guard_href' is set
44
+ if @api_client.config.client_side_validation && r_b_a_c_content_guard_href.nil?
45
+ fail ArgumentError, "Missing the required parameter 'r_b_a_c_content_guard_href' when calling ContentguardsRbacApi.assign_permission"
46
+ end
47
+ # verify the required parameter 'rbac_content_guard_permission' is set
48
+ if @api_client.config.client_side_validation && rbac_content_guard_permission.nil?
49
+ fail ArgumentError, "Missing the required parameter 'rbac_content_guard_permission' when calling ContentguardsRbacApi.assign_permission"
50
+ end
51
+ # resource path
52
+ local_var_path = '{r_b_a_c_content_guard_href}assign_permission/'.sub('{' + 'r_b_a_c_content_guard_href' + '}', CGI.escape(r_b_a_c_content_guard_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(rbac_content_guard_permission)
69
+
70
+ # return_type
71
+ return_type = opts[:return_type] || 'RBACContentGuardResponse'
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: ContentguardsRbacApi#assign_permission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
88
+ end
89
+ return data, status_code, headers
90
+ end
91
+
92
+ # Create a rbac content guard
93
+ # Viewset for creating contentguards that use RBAC to protect content. Has add and remove actions for managing permission for users and groups to download content protected by this guard.
94
+ # @param rbac_content_guard [RBACContentGuard]
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [RBACContentGuardResponse]
97
+ def create(rbac_content_guard, opts = {})
98
+ data, _status_code, _headers = create_with_http_info(rbac_content_guard, opts)
99
+ data
100
+ end
101
+
102
+ # Create a rbac content guard
103
+ # Viewset for creating contentguards that use RBAC to protect content. Has add and remove actions for managing permission for users and groups to download content protected by this guard.
104
+ # @param rbac_content_guard [RBACContentGuard]
105
+ # @param [Hash] opts the optional parameters
106
+ # @return [Array<(RBACContentGuardResponse, Integer, Hash)>] RBACContentGuardResponse data, response status code and response headers
107
+ def create_with_http_info(rbac_content_guard, opts = {})
108
+ if @api_client.config.debugging
109
+ @api_client.config.logger.debug 'Calling API: ContentguardsRbacApi.create ...'
110
+ end
111
+ # verify the required parameter 'rbac_content_guard' is set
112
+ if @api_client.config.client_side_validation && rbac_content_guard.nil?
113
+ fail ArgumentError, "Missing the required parameter 'rbac_content_guard' when calling ContentguardsRbacApi.create"
114
+ end
115
+ # resource path
116
+ local_var_path = '/pulp/api/v3/contentguards/core/rbac/'
117
+
118
+ # query parameters
119
+ query_params = opts[:query_params] || {}
120
+
121
+ # header parameters
122
+ header_params = opts[:header_params] || {}
123
+ # HTTP header 'Accept' (if needed)
124
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
125
+ # HTTP header 'Content-Type'
126
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
127
+
128
+ # form parameters
129
+ form_params = opts[:form_params] || {}
130
+
131
+ # http body (model)
132
+ post_body = opts[:body] || @api_client.object_to_http_body(rbac_content_guard)
133
+
134
+ # return_type
135
+ return_type = opts[:return_type] || 'RBACContentGuardResponse'
136
+
137
+ # auth_names
138
+ auth_names = opts[:auth_names] || ['basicAuth']
139
+
140
+ new_options = opts.merge(
141
+ :header_params => header_params,
142
+ :query_params => query_params,
143
+ :form_params => form_params,
144
+ :body => post_body,
145
+ :auth_names => auth_names,
146
+ :return_type => return_type
147
+ )
148
+
149
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
150
+ if @api_client.config.debugging
151
+ @api_client.config.logger.debug "API called: ContentguardsRbacApi#create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
152
+ end
153
+ return data, status_code, headers
154
+ end
155
+
156
+ # Delete a rbac content guard
157
+ # Viewset for creating contentguards that use RBAC to protect content. Has add and remove actions for managing permission for users and groups to download content protected by this guard.
158
+ # @param r_b_a_c_content_guard_href [String]
159
+ # @param [Hash] opts the optional parameters
160
+ # @return [nil]
161
+ def delete(r_b_a_c_content_guard_href, opts = {})
162
+ delete_with_http_info(r_b_a_c_content_guard_href, opts)
163
+ nil
164
+ end
165
+
166
+ # Delete a rbac content guard
167
+ # Viewset for creating contentguards that use RBAC to protect content. Has add and remove actions for managing permission for users and groups to download content protected by this guard.
168
+ # @param r_b_a_c_content_guard_href [String]
169
+ # @param [Hash] opts the optional parameters
170
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
171
+ def delete_with_http_info(r_b_a_c_content_guard_href, opts = {})
172
+ if @api_client.config.debugging
173
+ @api_client.config.logger.debug 'Calling API: ContentguardsRbacApi.delete ...'
174
+ end
175
+ # verify the required parameter 'r_b_a_c_content_guard_href' is set
176
+ if @api_client.config.client_side_validation && r_b_a_c_content_guard_href.nil?
177
+ fail ArgumentError, "Missing the required parameter 'r_b_a_c_content_guard_href' when calling ContentguardsRbacApi.delete"
178
+ end
179
+ # resource path
180
+ local_var_path = '{r_b_a_c_content_guard_href}'.sub('{' + 'r_b_a_c_content_guard_href' + '}', CGI.escape(r_b_a_c_content_guard_href.to_s).gsub('%2F', '/'))
181
+
182
+ # query parameters
183
+ query_params = opts[:query_params] || {}
184
+
185
+ # header parameters
186
+ header_params = opts[:header_params] || {}
187
+
188
+ # form parameters
189
+ form_params = opts[:form_params] || {}
190
+
191
+ # http body (model)
192
+ post_body = opts[:body]
193
+
194
+ # return_type
195
+ return_type = opts[:return_type]
196
+
197
+ # auth_names
198
+ auth_names = opts[:auth_names] || ['basicAuth']
199
+
200
+ new_options = opts.merge(
201
+ :header_params => header_params,
202
+ :query_params => query_params,
203
+ :form_params => form_params,
204
+ :body => post_body,
205
+ :auth_names => auth_names,
206
+ :return_type => return_type
207
+ )
208
+
209
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
210
+ if @api_client.config.debugging
211
+ @api_client.config.logger.debug "API called: ContentguardsRbacApi#delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
212
+ end
213
+ return data, status_code, headers
214
+ end
215
+
216
+ # List rbac content guards
217
+ # Viewset for creating contentguards that use RBAC to protect content. Has add and remove actions for managing permission for users and groups to download content protected by this guard.
218
+ # @param [Hash] opts the optional parameters
219
+ # @option opts [Integer] :limit Number of results to return per page.
220
+ # @option opts [String] :name
221
+ # @option opts [String] :name__contains Filter results where name contains value
222
+ # @option opts [String] :name__icontains Filter results where name contains value
223
+ # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
224
+ # @option opts [String] :name__startswith Filter results where name starts with value
225
+ # @option opts [Integer] :offset The initial index from which to return the results.
226
+ # @option opts [String] :ordering Which field to use when ordering the results.
227
+ # @option opts [String] :fields A list of fields to include in the response.
228
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
229
+ # @return [PaginatedRBACContentGuardResponseList]
230
+ def list(opts = {})
231
+ data, _status_code, _headers = list_with_http_info(opts)
232
+ data
233
+ end
234
+
235
+ # List rbac content guards
236
+ # Viewset for creating contentguards that use RBAC to protect content. Has add and remove actions for managing permission for users and groups to download content protected by this guard.
237
+ # @param [Hash] opts the optional parameters
238
+ # @option opts [Integer] :limit Number of results to return per page.
239
+ # @option opts [String] :name
240
+ # @option opts [String] :name__contains Filter results where name contains value
241
+ # @option opts [String] :name__icontains Filter results where name contains value
242
+ # @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
243
+ # @option opts [String] :name__startswith Filter results where name starts with value
244
+ # @option opts [Integer] :offset The initial index from which to return the results.
245
+ # @option opts [String] :ordering Which field to use when ordering the results.
246
+ # @option opts [String] :fields A list of fields to include in the response.
247
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
248
+ # @return [Array<(PaginatedRBACContentGuardResponseList, Integer, Hash)>] PaginatedRBACContentGuardResponseList data, response status code and response headers
249
+ def list_with_http_info(opts = {})
250
+ if @api_client.config.debugging
251
+ @api_client.config.logger.debug 'Calling API: ContentguardsRbacApi.list ...'
252
+ end
253
+ # resource path
254
+ local_var_path = '/pulp/api/v3/contentguards/core/rbac/'
255
+
256
+ # query parameters
257
+ query_params = opts[:query_params] || {}
258
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
259
+ query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
260
+ query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
261
+ query_params[:'name__icontains'] = opts[:'name__icontains'] if !opts[:'name__icontains'].nil?
262
+ query_params[:'name__in'] = @api_client.build_collection_param(opts[:'name__in'], :csv) if !opts[:'name__in'].nil?
263
+ query_params[:'name__startswith'] = opts[:'name__startswith'] if !opts[:'name__startswith'].nil?
264
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
265
+ query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
266
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
267
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
268
+
269
+ # header parameters
270
+ header_params = opts[:header_params] || {}
271
+ # HTTP header 'Accept' (if needed)
272
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
273
+
274
+ # form parameters
275
+ form_params = opts[:form_params] || {}
276
+
277
+ # http body (model)
278
+ post_body = opts[:body]
279
+
280
+ # return_type
281
+ return_type = opts[:return_type] || 'PaginatedRBACContentGuardResponseList'
282
+
283
+ # auth_names
284
+ auth_names = opts[:auth_names] || ['basicAuth']
285
+
286
+ new_options = opts.merge(
287
+ :header_params => header_params,
288
+ :query_params => query_params,
289
+ :form_params => form_params,
290
+ :body => post_body,
291
+ :auth_names => auth_names,
292
+ :return_type => return_type
293
+ )
294
+
295
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
296
+ if @api_client.config.debugging
297
+ @api_client.config.logger.debug "API called: ContentguardsRbacApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
298
+ end
299
+ return data, status_code, headers
300
+ end
301
+
302
+ # Update a rbac content guard
303
+ # Viewset for creating contentguards that use RBAC to protect content. Has add and remove actions for managing permission for users and groups to download content protected by this guard.
304
+ # @param r_b_a_c_content_guard_href [String]
305
+ # @param patched_rbac_content_guard [PatchedRBACContentGuard]
306
+ # @param [Hash] opts the optional parameters
307
+ # @return [RBACContentGuardResponse]
308
+ def partial_update(r_b_a_c_content_guard_href, patched_rbac_content_guard, opts = {})
309
+ data, _status_code, _headers = partial_update_with_http_info(r_b_a_c_content_guard_href, patched_rbac_content_guard, opts)
310
+ data
311
+ end
312
+
313
+ # Update a rbac content guard
314
+ # Viewset for creating contentguards that use RBAC to protect content. Has add and remove actions for managing permission for users and groups to download content protected by this guard.
315
+ # @param r_b_a_c_content_guard_href [String]
316
+ # @param patched_rbac_content_guard [PatchedRBACContentGuard]
317
+ # @param [Hash] opts the optional parameters
318
+ # @return [Array<(RBACContentGuardResponse, Integer, Hash)>] RBACContentGuardResponse data, response status code and response headers
319
+ def partial_update_with_http_info(r_b_a_c_content_guard_href, patched_rbac_content_guard, opts = {})
320
+ if @api_client.config.debugging
321
+ @api_client.config.logger.debug 'Calling API: ContentguardsRbacApi.partial_update ...'
322
+ end
323
+ # verify the required parameter 'r_b_a_c_content_guard_href' is set
324
+ if @api_client.config.client_side_validation && r_b_a_c_content_guard_href.nil?
325
+ fail ArgumentError, "Missing the required parameter 'r_b_a_c_content_guard_href' when calling ContentguardsRbacApi.partial_update"
326
+ end
327
+ # verify the required parameter 'patched_rbac_content_guard' is set
328
+ if @api_client.config.client_side_validation && patched_rbac_content_guard.nil?
329
+ fail ArgumentError, "Missing the required parameter 'patched_rbac_content_guard' when calling ContentguardsRbacApi.partial_update"
330
+ end
331
+ # resource path
332
+ local_var_path = '{r_b_a_c_content_guard_href}'.sub('{' + 'r_b_a_c_content_guard_href' + '}', CGI.escape(r_b_a_c_content_guard_href.to_s).gsub('%2F', '/'))
333
+
334
+ # query parameters
335
+ query_params = opts[:query_params] || {}
336
+
337
+ # header parameters
338
+ header_params = opts[:header_params] || {}
339
+ # HTTP header 'Accept' (if needed)
340
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
341
+ # HTTP header 'Content-Type'
342
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
343
+
344
+ # form parameters
345
+ form_params = opts[:form_params] || {}
346
+
347
+ # http body (model)
348
+ post_body = opts[:body] || @api_client.object_to_http_body(patched_rbac_content_guard)
349
+
350
+ # return_type
351
+ return_type = opts[:return_type] || 'RBACContentGuardResponse'
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(:PATCH, local_var_path, new_options)
366
+ if @api_client.config.debugging
367
+ @api_client.config.logger.debug "API called: ContentguardsRbacApi#partial_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
368
+ end
369
+ return data, status_code, headers
370
+ end
371
+
372
+ # Inspect a rbac content guard
373
+ # Viewset for creating contentguards that use RBAC to protect content. Has add and remove actions for managing permission for users and groups to download content protected by this guard.
374
+ # @param r_b_a_c_content_guard_href [String]
375
+ # @param [Hash] opts the optional parameters
376
+ # @option opts [String] :fields A list of fields to include in the response.
377
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
378
+ # @return [RBACContentGuardResponse]
379
+ def read(r_b_a_c_content_guard_href, opts = {})
380
+ data, _status_code, _headers = read_with_http_info(r_b_a_c_content_guard_href, opts)
381
+ data
382
+ end
383
+
384
+ # Inspect a rbac content guard
385
+ # Viewset for creating contentguards that use RBAC to protect content. Has add and remove actions for managing permission for users and groups to download content protected by this guard.
386
+ # @param r_b_a_c_content_guard_href [String]
387
+ # @param [Hash] opts the optional parameters
388
+ # @option opts [String] :fields A list of fields to include in the response.
389
+ # @option opts [String] :exclude_fields A list of fields to exclude from the response.
390
+ # @return [Array<(RBACContentGuardResponse, Integer, Hash)>] RBACContentGuardResponse data, response status code and response headers
391
+ def read_with_http_info(r_b_a_c_content_guard_href, opts = {})
392
+ if @api_client.config.debugging
393
+ @api_client.config.logger.debug 'Calling API: ContentguardsRbacApi.read ...'
394
+ end
395
+ # verify the required parameter 'r_b_a_c_content_guard_href' is set
396
+ if @api_client.config.client_side_validation && r_b_a_c_content_guard_href.nil?
397
+ fail ArgumentError, "Missing the required parameter 'r_b_a_c_content_guard_href' when calling ContentguardsRbacApi.read"
398
+ end
399
+ # resource path
400
+ local_var_path = '{r_b_a_c_content_guard_href}'.sub('{' + 'r_b_a_c_content_guard_href' + '}', CGI.escape(r_b_a_c_content_guard_href.to_s).gsub('%2F', '/'))
401
+
402
+ # query parameters
403
+ query_params = opts[:query_params] || {}
404
+ query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
405
+ query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
406
+
407
+ # header parameters
408
+ header_params = opts[:header_params] || {}
409
+ # HTTP header 'Accept' (if needed)
410
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
411
+
412
+ # form parameters
413
+ form_params = opts[:form_params] || {}
414
+
415
+ # http body (model)
416
+ post_body = opts[:body]
417
+
418
+ # return_type
419
+ return_type = opts[:return_type] || 'RBACContentGuardResponse'
420
+
421
+ # auth_names
422
+ auth_names = opts[:auth_names] || ['basicAuth']
423
+
424
+ new_options = opts.merge(
425
+ :header_params => header_params,
426
+ :query_params => query_params,
427
+ :form_params => form_params,
428
+ :body => post_body,
429
+ :auth_names => auth_names,
430
+ :return_type => return_type
431
+ )
432
+
433
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
434
+ if @api_client.config.debugging
435
+ @api_client.config.logger.debug "API called: ContentguardsRbacApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
436
+ end
437
+ return data, status_code, headers
438
+ end
439
+
440
+ # Remove download permission
441
+ # Remove `download` permission from users and groups
442
+ # @param r_b_a_c_content_guard_href [String]
443
+ # @param rbac_content_guard_permission [RBACContentGuardPermission]
444
+ # @param [Hash] opts the optional parameters
445
+ # @return [RBACContentGuardResponse]
446
+ def remove_permission(r_b_a_c_content_guard_href, rbac_content_guard_permission, opts = {})
447
+ data, _status_code, _headers = remove_permission_with_http_info(r_b_a_c_content_guard_href, rbac_content_guard_permission, opts)
448
+ data
449
+ end
450
+
451
+ # Remove download permission
452
+ # Remove &#x60;download&#x60; permission from users and groups
453
+ # @param r_b_a_c_content_guard_href [String]
454
+ # @param rbac_content_guard_permission [RBACContentGuardPermission]
455
+ # @param [Hash] opts the optional parameters
456
+ # @return [Array<(RBACContentGuardResponse, Integer, Hash)>] RBACContentGuardResponse data, response status code and response headers
457
+ def remove_permission_with_http_info(r_b_a_c_content_guard_href, rbac_content_guard_permission, opts = {})
458
+ if @api_client.config.debugging
459
+ @api_client.config.logger.debug 'Calling API: ContentguardsRbacApi.remove_permission ...'
460
+ end
461
+ # verify the required parameter 'r_b_a_c_content_guard_href' is set
462
+ if @api_client.config.client_side_validation && r_b_a_c_content_guard_href.nil?
463
+ fail ArgumentError, "Missing the required parameter 'r_b_a_c_content_guard_href' when calling ContentguardsRbacApi.remove_permission"
464
+ end
465
+ # verify the required parameter 'rbac_content_guard_permission' is set
466
+ if @api_client.config.client_side_validation && rbac_content_guard_permission.nil?
467
+ fail ArgumentError, "Missing the required parameter 'rbac_content_guard_permission' when calling ContentguardsRbacApi.remove_permission"
468
+ end
469
+ # resource path
470
+ local_var_path = '{r_b_a_c_content_guard_href}remove_permission/'.sub('{' + 'r_b_a_c_content_guard_href' + '}', CGI.escape(r_b_a_c_content_guard_href.to_s).gsub('%2F', '/'))
471
+
472
+ # query parameters
473
+ query_params = opts[:query_params] || {}
474
+
475
+ # header parameters
476
+ header_params = opts[:header_params] || {}
477
+ # HTTP header 'Accept' (if needed)
478
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
479
+ # HTTP header 'Content-Type'
480
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
481
+
482
+ # form parameters
483
+ form_params = opts[:form_params] || {}
484
+
485
+ # http body (model)
486
+ post_body = opts[:body] || @api_client.object_to_http_body(rbac_content_guard_permission)
487
+
488
+ # return_type
489
+ return_type = opts[:return_type] || 'RBACContentGuardResponse'
490
+
491
+ # auth_names
492
+ auth_names = opts[:auth_names] || ['basicAuth']
493
+
494
+ new_options = opts.merge(
495
+ :header_params => header_params,
496
+ :query_params => query_params,
497
+ :form_params => form_params,
498
+ :body => post_body,
499
+ :auth_names => auth_names,
500
+ :return_type => return_type
501
+ )
502
+
503
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
504
+ if @api_client.config.debugging
505
+ @api_client.config.logger.debug "API called: ContentguardsRbacApi#remove_permission\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
506
+ end
507
+ return data, status_code, headers
508
+ end
509
+
510
+ # Update a rbac content guard
511
+ # Viewset for creating contentguards that use RBAC to protect content. Has add and remove actions for managing permission for users and groups to download content protected by this guard.
512
+ # @param r_b_a_c_content_guard_href [String]
513
+ # @param rbac_content_guard [RBACContentGuard]
514
+ # @param [Hash] opts the optional parameters
515
+ # @return [RBACContentGuardResponse]
516
+ def update(r_b_a_c_content_guard_href, rbac_content_guard, opts = {})
517
+ data, _status_code, _headers = update_with_http_info(r_b_a_c_content_guard_href, rbac_content_guard, opts)
518
+ data
519
+ end
520
+
521
+ # Update a rbac content guard
522
+ # Viewset for creating contentguards that use RBAC to protect content. Has add and remove actions for managing permission for users and groups to download content protected by this guard.
523
+ # @param r_b_a_c_content_guard_href [String]
524
+ # @param rbac_content_guard [RBACContentGuard]
525
+ # @param [Hash] opts the optional parameters
526
+ # @return [Array<(RBACContentGuardResponse, Integer, Hash)>] RBACContentGuardResponse data, response status code and response headers
527
+ def update_with_http_info(r_b_a_c_content_guard_href, rbac_content_guard, opts = {})
528
+ if @api_client.config.debugging
529
+ @api_client.config.logger.debug 'Calling API: ContentguardsRbacApi.update ...'
530
+ end
531
+ # verify the required parameter 'r_b_a_c_content_guard_href' is set
532
+ if @api_client.config.client_side_validation && r_b_a_c_content_guard_href.nil?
533
+ fail ArgumentError, "Missing the required parameter 'r_b_a_c_content_guard_href' when calling ContentguardsRbacApi.update"
534
+ end
535
+ # verify the required parameter 'rbac_content_guard' is set
536
+ if @api_client.config.client_side_validation && rbac_content_guard.nil?
537
+ fail ArgumentError, "Missing the required parameter 'rbac_content_guard' when calling ContentguardsRbacApi.update"
538
+ end
539
+ # resource path
540
+ local_var_path = '{r_b_a_c_content_guard_href}'.sub('{' + 'r_b_a_c_content_guard_href' + '}', CGI.escape(r_b_a_c_content_guard_href.to_s).gsub('%2F', '/'))
541
+
542
+ # query parameters
543
+ query_params = opts[:query_params] || {}
544
+
545
+ # header parameters
546
+ header_params = opts[:header_params] || {}
547
+ # HTTP header 'Accept' (if needed)
548
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
549
+ # HTTP header 'Content-Type'
550
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
551
+
552
+ # form parameters
553
+ form_params = opts[:form_params] || {}
554
+
555
+ # http body (model)
556
+ post_body = opts[:body] || @api_client.object_to_http_body(rbac_content_guard)
557
+
558
+ # return_type
559
+ return_type = opts[:return_type] || 'RBACContentGuardResponse'
560
+
561
+ # auth_names
562
+ auth_names = opts[:auth_names] || ['basicAuth']
563
+
564
+ new_options = opts.merge(
565
+ :header_params => header_params,
566
+ :query_params => query_params,
567
+ :form_params => form_params,
568
+ :body => post_body,
569
+ :auth_names => auth_names,
570
+ :return_type => return_type
571
+ )
572
+
573
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
574
+ if @api_client.config.debugging
575
+ @api_client.config.logger.debug "API called: ContentguardsRbacApi#update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
576
+ end
577
+ return data, status_code, headers
578
+ end
579
+ end
580
+ end