pulpcore_client 3.17.8 → 3.18.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.
- checksums.yaml +4 -4
- data/README.md +22 -4
- data/docs/AccessPolicy.md +2 -2
- data/docs/AccessPolicyResponse.md +2 -2
- data/docs/ContentRedirectContentGuard.md +19 -0
- data/docs/ContentRedirectContentGuardResponse.md +23 -0
- data/docs/ContentguardsContentRedirectApi.md +361 -0
- data/docs/PaginatedContentRedirectContentGuardResponseList.md +23 -0
- data/docs/PaginatedTaskScheduleResponseList.md +23 -0
- data/docs/PatchedContentRedirectContentGuard.md +19 -0
- data/docs/TaskScheduleResponse.md +29 -0
- data/docs/TaskSchedulesApi.md +368 -0
- data/docs/WorkerResponse.md +6 -4
- data/lib/pulpcore_client/api/contentguards_content_redirect_api.rb +440 -0
- data/lib/pulpcore_client/api/task_schedules_api.rb +441 -0
- data/lib/pulpcore_client/api_client.rb +4 -1
- data/lib/pulpcore_client/configuration.rb +0 -1
- data/lib/pulpcore_client/models/access_policy.rb +0 -10
- data/lib/pulpcore_client/models/access_policy_response.rb +0 -10
- data/lib/pulpcore_client/models/content_redirect_content_guard.rb +258 -0
- data/lib/pulpcore_client/models/content_redirect_content_guard_response.rb +243 -0
- data/lib/pulpcore_client/models/paginated_content_redirect_content_guard_response_list.rb +237 -0
- data/lib/pulpcore_client/models/paginated_task_schedule_response_list.rb +237 -0
- data/lib/pulpcore_client/models/patched_content_redirect_content_guard.rb +249 -0
- data/lib/pulpcore_client/models/task_schedule_response.rb +282 -0
- data/lib/pulpcore_client/models/worker_response.rb +23 -13
- data/lib/pulpcore_client/version.rb +1 -1
- data/lib/pulpcore_client.rb +8 -0
- data/spec/api/contentguards_content_redirect_api_spec.rb +120 -0
- data/spec/api/task_schedules_api_spec.rb +119 -0
- data/spec/models/content_redirect_content_guard_response_spec.rb +59 -0
- data/spec/models/content_redirect_content_guard_spec.rb +47 -0
- data/spec/models/paginated_content_redirect_content_guard_response_list_spec.rb +59 -0
- data/spec/models/paginated_task_schedule_response_list_spec.rb +59 -0
- data/spec/models/patched_content_redirect_content_guard_spec.rb +47 -0
- data/spec/models/task_schedule_response_spec.rb +77 -0
- data/spec/models/worker_response_spec.rb +8 -2
- metadata +147 -115
@@ -0,0 +1,441 @@
|
|
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 TaskSchedulesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Add a role for this object to users/groups.
|
23
|
+
# @param task_schedule_href [String]
|
24
|
+
# @param nested_role [NestedRole]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [NestedRoleResponse]
|
27
|
+
def add_role(task_schedule_href, nested_role, opts = {})
|
28
|
+
data, _status_code, _headers = add_role_with_http_info(task_schedule_href, nested_role, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Add a role for this object to users/groups.
|
33
|
+
# @param task_schedule_href [String]
|
34
|
+
# @param nested_role [NestedRole]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
|
37
|
+
def add_role_with_http_info(task_schedule_href, nested_role, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: TaskSchedulesApi.add_role ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'task_schedule_href' is set
|
42
|
+
if @api_client.config.client_side_validation && task_schedule_href.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'task_schedule_href' when calling TaskSchedulesApi.add_role"
|
44
|
+
end
|
45
|
+
# verify the required parameter 'nested_role' is set
|
46
|
+
if @api_client.config.client_side_validation && nested_role.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'nested_role' when calling TaskSchedulesApi.add_role"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '{task_schedule_href}add_role/'.sub('{' + 'task_schedule_href' + '}', CGI.escape(task_schedule_href.to_s).gsub('%2F', '/'))
|
51
|
+
|
52
|
+
# query parameters
|
53
|
+
query_params = opts[:query_params] || {}
|
54
|
+
|
55
|
+
# header parameters
|
56
|
+
header_params = opts[:header_params] || {}
|
57
|
+
# HTTP header 'Accept' (if needed)
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
59
|
+
# HTTP header 'Content-Type'
|
60
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
61
|
+
|
62
|
+
# form parameters
|
63
|
+
form_params = opts[:form_params] || {}
|
64
|
+
|
65
|
+
# http body (model)
|
66
|
+
post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
|
67
|
+
|
68
|
+
# return_type
|
69
|
+
return_type = opts[:return_type] || 'NestedRoleResponse'
|
70
|
+
|
71
|
+
# auth_names
|
72
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
73
|
+
|
74
|
+
new_options = opts.merge(
|
75
|
+
:header_params => header_params,
|
76
|
+
:query_params => query_params,
|
77
|
+
:form_params => form_params,
|
78
|
+
:body => post_body,
|
79
|
+
:auth_names => auth_names,
|
80
|
+
:return_type => return_type
|
81
|
+
)
|
82
|
+
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
84
|
+
if @api_client.config.debugging
|
85
|
+
@api_client.config.logger.debug "API called: TaskSchedulesApi#add_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
86
|
+
end
|
87
|
+
return data, status_code, headers
|
88
|
+
end
|
89
|
+
|
90
|
+
# List task schedules
|
91
|
+
# ViewSet to monitor task schedules. NOTE: This feature is in tech-preview and may change in backwards incompatible ways.
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
94
|
+
# @option opts [String] :name
|
95
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
96
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
97
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
98
|
+
# @option opts [String] :task_name
|
99
|
+
# @option opts [String] :task_name__contains Filter results where task_name contains value
|
100
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
101
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
102
|
+
# @return [PaginatedTaskScheduleResponseList]
|
103
|
+
def list(opts = {})
|
104
|
+
data, _status_code, _headers = list_with_http_info(opts)
|
105
|
+
data
|
106
|
+
end
|
107
|
+
|
108
|
+
# List task schedules
|
109
|
+
# ViewSet to monitor task schedules. NOTE: This feature is in tech-preview and may change in backwards incompatible ways.
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
112
|
+
# @option opts [String] :name
|
113
|
+
# @option opts [String] :name__contains Filter results where name contains value
|
114
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
115
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
116
|
+
# @option opts [String] :task_name
|
117
|
+
# @option opts [String] :task_name__contains Filter results where task_name contains value
|
118
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
119
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
120
|
+
# @return [Array<(PaginatedTaskScheduleResponseList, Integer, Hash)>] PaginatedTaskScheduleResponseList data, response status code and response headers
|
121
|
+
def list_with_http_info(opts = {})
|
122
|
+
if @api_client.config.debugging
|
123
|
+
@api_client.config.logger.debug 'Calling API: TaskSchedulesApi.list ...'
|
124
|
+
end
|
125
|
+
# resource path
|
126
|
+
local_var_path = '/pulp/api/v3/task-schedules/'
|
127
|
+
|
128
|
+
# query parameters
|
129
|
+
query_params = opts[:query_params] || {}
|
130
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
131
|
+
query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
|
132
|
+
query_params[:'name__contains'] = opts[:'name__contains'] if !opts[:'name__contains'].nil?
|
133
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
134
|
+
query_params[:'ordering'] = opts[:'ordering'] if !opts[:'ordering'].nil?
|
135
|
+
query_params[:'task_name'] = opts[:'task_name'] if !opts[:'task_name'].nil?
|
136
|
+
query_params[:'task_name__contains'] = opts[:'task_name__contains'] if !opts[:'task_name__contains'].nil?
|
137
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
138
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
139
|
+
|
140
|
+
# header parameters
|
141
|
+
header_params = opts[:header_params] || {}
|
142
|
+
# HTTP header 'Accept' (if needed)
|
143
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
144
|
+
|
145
|
+
# form parameters
|
146
|
+
form_params = opts[:form_params] || {}
|
147
|
+
|
148
|
+
# http body (model)
|
149
|
+
post_body = opts[:body]
|
150
|
+
|
151
|
+
# return_type
|
152
|
+
return_type = opts[:return_type] || 'PaginatedTaskScheduleResponseList'
|
153
|
+
|
154
|
+
# auth_names
|
155
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
156
|
+
|
157
|
+
new_options = opts.merge(
|
158
|
+
:header_params => header_params,
|
159
|
+
:query_params => query_params,
|
160
|
+
:form_params => form_params,
|
161
|
+
:body => post_body,
|
162
|
+
:auth_names => auth_names,
|
163
|
+
:return_type => return_type
|
164
|
+
)
|
165
|
+
|
166
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
167
|
+
if @api_client.config.debugging
|
168
|
+
@api_client.config.logger.debug "API called: TaskSchedulesApi#list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
169
|
+
end
|
170
|
+
return data, status_code, headers
|
171
|
+
end
|
172
|
+
|
173
|
+
# List roles assigned to this object.
|
174
|
+
# @param task_schedule_href [String]
|
175
|
+
# @param [Hash] opts the optional parameters
|
176
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
177
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
178
|
+
# @return [ObjectRolesResponse]
|
179
|
+
def list_roles(task_schedule_href, opts = {})
|
180
|
+
data, _status_code, _headers = list_roles_with_http_info(task_schedule_href, opts)
|
181
|
+
data
|
182
|
+
end
|
183
|
+
|
184
|
+
# List roles assigned to this object.
|
185
|
+
# @param task_schedule_href [String]
|
186
|
+
# @param [Hash] opts the optional parameters
|
187
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
188
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
189
|
+
# @return [Array<(ObjectRolesResponse, Integer, Hash)>] ObjectRolesResponse data, response status code and response headers
|
190
|
+
def list_roles_with_http_info(task_schedule_href, opts = {})
|
191
|
+
if @api_client.config.debugging
|
192
|
+
@api_client.config.logger.debug 'Calling API: TaskSchedulesApi.list_roles ...'
|
193
|
+
end
|
194
|
+
# verify the required parameter 'task_schedule_href' is set
|
195
|
+
if @api_client.config.client_side_validation && task_schedule_href.nil?
|
196
|
+
fail ArgumentError, "Missing the required parameter 'task_schedule_href' when calling TaskSchedulesApi.list_roles"
|
197
|
+
end
|
198
|
+
# resource path
|
199
|
+
local_var_path = '{task_schedule_href}list_roles/'.sub('{' + 'task_schedule_href' + '}', CGI.escape(task_schedule_href.to_s).gsub('%2F', '/'))
|
200
|
+
|
201
|
+
# query parameters
|
202
|
+
query_params = opts[:query_params] || {}
|
203
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
204
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
205
|
+
|
206
|
+
# header parameters
|
207
|
+
header_params = opts[:header_params] || {}
|
208
|
+
# HTTP header 'Accept' (if needed)
|
209
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
210
|
+
|
211
|
+
# form parameters
|
212
|
+
form_params = opts[:form_params] || {}
|
213
|
+
|
214
|
+
# http body (model)
|
215
|
+
post_body = opts[:body]
|
216
|
+
|
217
|
+
# return_type
|
218
|
+
return_type = opts[:return_type] || 'ObjectRolesResponse'
|
219
|
+
|
220
|
+
# auth_names
|
221
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
222
|
+
|
223
|
+
new_options = opts.merge(
|
224
|
+
:header_params => header_params,
|
225
|
+
:query_params => query_params,
|
226
|
+
:form_params => form_params,
|
227
|
+
:body => post_body,
|
228
|
+
:auth_names => auth_names,
|
229
|
+
:return_type => return_type
|
230
|
+
)
|
231
|
+
|
232
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
233
|
+
if @api_client.config.debugging
|
234
|
+
@api_client.config.logger.debug "API called: TaskSchedulesApi#list_roles\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
235
|
+
end
|
236
|
+
return data, status_code, headers
|
237
|
+
end
|
238
|
+
|
239
|
+
# List permissions available to the current user on this object.
|
240
|
+
# @param task_schedule_href [String]
|
241
|
+
# @param [Hash] opts the optional parameters
|
242
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
243
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
244
|
+
# @return [MyPermissionsResponse]
|
245
|
+
def my_permissions(task_schedule_href, opts = {})
|
246
|
+
data, _status_code, _headers = my_permissions_with_http_info(task_schedule_href, opts)
|
247
|
+
data
|
248
|
+
end
|
249
|
+
|
250
|
+
# List permissions available to the current user on this object.
|
251
|
+
# @param task_schedule_href [String]
|
252
|
+
# @param [Hash] opts the optional parameters
|
253
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
254
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
255
|
+
# @return [Array<(MyPermissionsResponse, Integer, Hash)>] MyPermissionsResponse data, response status code and response headers
|
256
|
+
def my_permissions_with_http_info(task_schedule_href, opts = {})
|
257
|
+
if @api_client.config.debugging
|
258
|
+
@api_client.config.logger.debug 'Calling API: TaskSchedulesApi.my_permissions ...'
|
259
|
+
end
|
260
|
+
# verify the required parameter 'task_schedule_href' is set
|
261
|
+
if @api_client.config.client_side_validation && task_schedule_href.nil?
|
262
|
+
fail ArgumentError, "Missing the required parameter 'task_schedule_href' when calling TaskSchedulesApi.my_permissions"
|
263
|
+
end
|
264
|
+
# resource path
|
265
|
+
local_var_path = '{task_schedule_href}my_permissions/'.sub('{' + 'task_schedule_href' + '}', CGI.escape(task_schedule_href.to_s).gsub('%2F', '/'))
|
266
|
+
|
267
|
+
# query parameters
|
268
|
+
query_params = opts[:query_params] || {}
|
269
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
270
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
271
|
+
|
272
|
+
# header parameters
|
273
|
+
header_params = opts[:header_params] || {}
|
274
|
+
# HTTP header 'Accept' (if needed)
|
275
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
276
|
+
|
277
|
+
# form parameters
|
278
|
+
form_params = opts[:form_params] || {}
|
279
|
+
|
280
|
+
# http body (model)
|
281
|
+
post_body = opts[:body]
|
282
|
+
|
283
|
+
# return_type
|
284
|
+
return_type = opts[:return_type] || 'MyPermissionsResponse'
|
285
|
+
|
286
|
+
# auth_names
|
287
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
288
|
+
|
289
|
+
new_options = opts.merge(
|
290
|
+
:header_params => header_params,
|
291
|
+
:query_params => query_params,
|
292
|
+
:form_params => form_params,
|
293
|
+
:body => post_body,
|
294
|
+
:auth_names => auth_names,
|
295
|
+
:return_type => return_type
|
296
|
+
)
|
297
|
+
|
298
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
299
|
+
if @api_client.config.debugging
|
300
|
+
@api_client.config.logger.debug "API called: TaskSchedulesApi#my_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
301
|
+
end
|
302
|
+
return data, status_code, headers
|
303
|
+
end
|
304
|
+
|
305
|
+
# Inspect a task schedule
|
306
|
+
# ViewSet to monitor task schedules. NOTE: This feature is in tech-preview and may change in backwards incompatible ways.
|
307
|
+
# @param task_schedule_href [String]
|
308
|
+
# @param [Hash] opts the optional parameters
|
309
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
310
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
311
|
+
# @return [TaskScheduleResponse]
|
312
|
+
def read(task_schedule_href, opts = {})
|
313
|
+
data, _status_code, _headers = read_with_http_info(task_schedule_href, opts)
|
314
|
+
data
|
315
|
+
end
|
316
|
+
|
317
|
+
# Inspect a task schedule
|
318
|
+
# ViewSet to monitor task schedules. NOTE: This feature is in tech-preview and may change in backwards incompatible ways.
|
319
|
+
# @param task_schedule_href [String]
|
320
|
+
# @param [Hash] opts the optional parameters
|
321
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
322
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
323
|
+
# @return [Array<(TaskScheduleResponse, Integer, Hash)>] TaskScheduleResponse data, response status code and response headers
|
324
|
+
def read_with_http_info(task_schedule_href, opts = {})
|
325
|
+
if @api_client.config.debugging
|
326
|
+
@api_client.config.logger.debug 'Calling API: TaskSchedulesApi.read ...'
|
327
|
+
end
|
328
|
+
# verify the required parameter 'task_schedule_href' is set
|
329
|
+
if @api_client.config.client_side_validation && task_schedule_href.nil?
|
330
|
+
fail ArgumentError, "Missing the required parameter 'task_schedule_href' when calling TaskSchedulesApi.read"
|
331
|
+
end
|
332
|
+
# resource path
|
333
|
+
local_var_path = '{task_schedule_href}'.sub('{' + 'task_schedule_href' + '}', CGI.escape(task_schedule_href.to_s).gsub('%2F', '/'))
|
334
|
+
|
335
|
+
# query parameters
|
336
|
+
query_params = opts[:query_params] || {}
|
337
|
+
query_params[:'fields'] = opts[:'fields'] if !opts[:'fields'].nil?
|
338
|
+
query_params[:'exclude_fields'] = opts[:'exclude_fields'] if !opts[:'exclude_fields'].nil?
|
339
|
+
|
340
|
+
# header parameters
|
341
|
+
header_params = opts[:header_params] || {}
|
342
|
+
# HTTP header 'Accept' (if needed)
|
343
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
344
|
+
|
345
|
+
# form parameters
|
346
|
+
form_params = opts[:form_params] || {}
|
347
|
+
|
348
|
+
# http body (model)
|
349
|
+
post_body = opts[:body]
|
350
|
+
|
351
|
+
# return_type
|
352
|
+
return_type = opts[:return_type] || 'TaskScheduleResponse'
|
353
|
+
|
354
|
+
# auth_names
|
355
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
356
|
+
|
357
|
+
new_options = opts.merge(
|
358
|
+
:header_params => header_params,
|
359
|
+
:query_params => query_params,
|
360
|
+
:form_params => form_params,
|
361
|
+
:body => post_body,
|
362
|
+
:auth_names => auth_names,
|
363
|
+
:return_type => return_type
|
364
|
+
)
|
365
|
+
|
366
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
367
|
+
if @api_client.config.debugging
|
368
|
+
@api_client.config.logger.debug "API called: TaskSchedulesApi#read\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
369
|
+
end
|
370
|
+
return data, status_code, headers
|
371
|
+
end
|
372
|
+
|
373
|
+
# Remove a role for this object from users/groups.
|
374
|
+
# @param task_schedule_href [String]
|
375
|
+
# @param nested_role [NestedRole]
|
376
|
+
# @param [Hash] opts the optional parameters
|
377
|
+
# @return [NestedRoleResponse]
|
378
|
+
def remove_role(task_schedule_href, nested_role, opts = {})
|
379
|
+
data, _status_code, _headers = remove_role_with_http_info(task_schedule_href, nested_role, opts)
|
380
|
+
data
|
381
|
+
end
|
382
|
+
|
383
|
+
# Remove a role for this object from users/groups.
|
384
|
+
# @param task_schedule_href [String]
|
385
|
+
# @param nested_role [NestedRole]
|
386
|
+
# @param [Hash] opts the optional parameters
|
387
|
+
# @return [Array<(NestedRoleResponse, Integer, Hash)>] NestedRoleResponse data, response status code and response headers
|
388
|
+
def remove_role_with_http_info(task_schedule_href, nested_role, opts = {})
|
389
|
+
if @api_client.config.debugging
|
390
|
+
@api_client.config.logger.debug 'Calling API: TaskSchedulesApi.remove_role ...'
|
391
|
+
end
|
392
|
+
# verify the required parameter 'task_schedule_href' is set
|
393
|
+
if @api_client.config.client_side_validation && task_schedule_href.nil?
|
394
|
+
fail ArgumentError, "Missing the required parameter 'task_schedule_href' when calling TaskSchedulesApi.remove_role"
|
395
|
+
end
|
396
|
+
# verify the required parameter 'nested_role' is set
|
397
|
+
if @api_client.config.client_side_validation && nested_role.nil?
|
398
|
+
fail ArgumentError, "Missing the required parameter 'nested_role' when calling TaskSchedulesApi.remove_role"
|
399
|
+
end
|
400
|
+
# resource path
|
401
|
+
local_var_path = '{task_schedule_href}remove_role/'.sub('{' + 'task_schedule_href' + '}', CGI.escape(task_schedule_href.to_s).gsub('%2F', '/'))
|
402
|
+
|
403
|
+
# query parameters
|
404
|
+
query_params = opts[:query_params] || {}
|
405
|
+
|
406
|
+
# header parameters
|
407
|
+
header_params = opts[:header_params] || {}
|
408
|
+
# HTTP header 'Accept' (if needed)
|
409
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
410
|
+
# HTTP header 'Content-Type'
|
411
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
|
412
|
+
|
413
|
+
# form parameters
|
414
|
+
form_params = opts[:form_params] || {}
|
415
|
+
|
416
|
+
# http body (model)
|
417
|
+
post_body = opts[:body] || @api_client.object_to_http_body(nested_role)
|
418
|
+
|
419
|
+
# return_type
|
420
|
+
return_type = opts[:return_type] || 'NestedRoleResponse'
|
421
|
+
|
422
|
+
# auth_names
|
423
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
424
|
+
|
425
|
+
new_options = opts.merge(
|
426
|
+
:header_params => header_params,
|
427
|
+
:query_params => query_params,
|
428
|
+
:form_params => form_params,
|
429
|
+
:body => post_body,
|
430
|
+
:auth_names => auth_names,
|
431
|
+
:return_type => return_type
|
432
|
+
)
|
433
|
+
|
434
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
435
|
+
if @api_client.config.debugging
|
436
|
+
@api_client.config.logger.debug "API called: TaskSchedulesApi#remove_role\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
437
|
+
end
|
438
|
+
return data, status_code, headers
|
439
|
+
end
|
440
|
+
end
|
441
|
+
end
|
@@ -118,6 +118,9 @@ module PulpcoreClient
|
|
118
118
|
update_params_for_auth! header_params, query_params, opts[:auth_names]
|
119
119
|
|
120
120
|
req_opts = {
|
121
|
+
:method => http_method,
|
122
|
+
:headers => header_params,
|
123
|
+
:params => query_params,
|
121
124
|
:params_encoding => @config.params_encoding,
|
122
125
|
:timeout => @config.timeout,
|
123
126
|
:verbose => @config.debugging
|
@@ -125,13 +128,13 @@ module PulpcoreClient
|
|
125
128
|
|
126
129
|
if [:post, :patch, :put, :delete].include?(http_method)
|
127
130
|
req_body = build_request_body(header_params, form_params, opts[:body])
|
131
|
+
req_opts.update :body => req_body
|
128
132
|
if @config.debugging
|
129
133
|
@config.logger.debug "HTTP request body param ~BEGIN~\n#{req_body}\n~END~\n"
|
130
134
|
end
|
131
135
|
end
|
132
136
|
request.headers = header_params
|
133
137
|
request.body = req_body
|
134
|
-
request.options = OpenStruct.new(req_opts)
|
135
138
|
request.url url
|
136
139
|
request.params = query_params
|
137
140
|
download_file(request) if opts[:return_type] == 'File'
|
@@ -86,14 +86,6 @@ module PulpcoreClient
|
|
86
86
|
# @return Array for valid properties with the reasons
|
87
87
|
def list_invalid_properties
|
88
88
|
invalid_properties = Array.new
|
89
|
-
if @permissions_assignment.nil?
|
90
|
-
invalid_properties.push('invalid value for "permissions_assignment", permissions_assignment cannot be nil.')
|
91
|
-
end
|
92
|
-
|
93
|
-
if @creation_hooks.nil?
|
94
|
-
invalid_properties.push('invalid value for "creation_hooks", creation_hooks cannot be nil.')
|
95
|
-
end
|
96
|
-
|
97
89
|
if @statements.nil?
|
98
90
|
invalid_properties.push('invalid value for "statements", statements cannot be nil.')
|
99
91
|
end
|
@@ -104,8 +96,6 @@ module PulpcoreClient
|
|
104
96
|
# Check to see if the all the properties in the model are valid
|
105
97
|
# @return true if the model is valid
|
106
98
|
def valid?
|
107
|
-
return false if @permissions_assignment.nil?
|
108
|
-
return false if @creation_hooks.nil?
|
109
99
|
return false if @statements.nil?
|
110
100
|
true
|
111
101
|
end
|
@@ -121,14 +121,6 @@ module PulpcoreClient
|
|
121
121
|
# @return Array for valid properties with the reasons
|
122
122
|
def list_invalid_properties
|
123
123
|
invalid_properties = Array.new
|
124
|
-
if @permissions_assignment.nil?
|
125
|
-
invalid_properties.push('invalid value for "permissions_assignment", permissions_assignment cannot be nil.')
|
126
|
-
end
|
127
|
-
|
128
|
-
if @creation_hooks.nil?
|
129
|
-
invalid_properties.push('invalid value for "creation_hooks", creation_hooks cannot be nil.')
|
130
|
-
end
|
131
|
-
|
132
124
|
if @statements.nil?
|
133
125
|
invalid_properties.push('invalid value for "statements", statements cannot be nil.')
|
134
126
|
end
|
@@ -139,8 +131,6 @@ module PulpcoreClient
|
|
139
131
|
# Check to see if the all the properties in the model are valid
|
140
132
|
# @return true if the model is valid
|
141
133
|
def valid?
|
142
|
-
return false if @permissions_assignment.nil?
|
143
|
-
return false if @creation_hooks.nil?
|
144
134
|
return false if @statements.nil?
|
145
135
|
true
|
146
136
|
end
|