flywheel-sdk 21.0.0__py2.py3-none-any.whl → 21.1.0rc0__py2.py3-none-any.whl
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.
- flywheel/__init__.py +51 -3
- flywheel/api/__init__.py +5 -0
- flywheel/api/audit_trail_api.py +8 -8
- flywheel/api/container_tasks_api.py +137 -0
- flywheel/api/form_responses_api.py +579 -0
- flywheel/api/jobs_api.py +97 -0
- flywheel/api/protocols_api.py +757 -0
- flywheel/api/staffing_pools_api.py +677 -0
- flywheel/api/tasks_api.py +897 -0
- flywheel/api_client.py +1 -1
- flywheel/configuration.py +2 -2
- flywheel/flywheel.py +369 -3
- flywheel/models/__init__.py +47 -4
- flywheel/models/action.py +3 -0
- flywheel/models/assignee.py +190 -0
- flywheel/models/assignee_type.py +28 -0
- flywheel/models/batch_create_filters.py +218 -0
- flywheel/models/{create_report_input.py → core_models_audit_trail_create_report_input.py} +24 -24
- flywheel/models/{modify_report_input.py → core_models_audit_trail_modify_report_input.py} +8 -8
- flywheel/models/{parent_type.py → core_models_search_parent_type.py} +1 -1
- flywheel/models/core_workflows_form_responses_models_form_parents.py +162 -0
- flywheel/models/core_workflows_form_responses_models_form_response_output.py +438 -0
- flywheel/models/core_workflows_reader_models_reader_task_parents.py +268 -0
- flywheel/models/current_user_output.py +31 -4
- flywheel/models/custom_field.py +404 -0
- flywheel/models/custom_form.py +242 -0
- flywheel/models/e_signature.py +241 -0
- flywheel/models/field_type.py +35 -0
- flywheel/models/form_response_base.py +310 -0
- flywheel/models/form_response_create.py +192 -0
- flywheel/models/libs_workflows_models_parent_type.py +31 -0
- flywheel/models/libs_workflows_models_task_status.py +31 -0
- flywheel/models/modify_user_input.py +31 -4
- flywheel/models/page_generic_form_response_output.py +217 -0
- flywheel/models/page_generic_protocol.py +242 -0
- flywheel/models/page_generic_reader_task_output.py +242 -0
- flywheel/models/page_generic_staffing_pool.py +242 -0
- flywheel/models/protocol.py +511 -0
- flywheel/models/protocol_e_signature_config.py +190 -0
- flywheel/models/protocol_input.py +352 -0
- flywheel/models/protocol_modify.py +275 -0
- flywheel/models/protocol_status.py +29 -0
- flywheel/models/reader_batch_create.py +460 -0
- flywheel/models/reader_task.py +723 -0
- flywheel/models/reader_task_config.py +188 -0
- flywheel/models/reader_task_create.py +541 -0
- flywheel/models/reader_task_modify.py +274 -0
- flywheel/models/reader_task_output.py +750 -0
- flywheel/models/reader_task_parent_details.py +295 -0
- flywheel/models/save_search_parent.py +4 -4
- flywheel/models/select_item.py +189 -0
- flywheel/models/staffing_pool.py +322 -0
- flywheel/models/staffing_pool_create.py +215 -0
- flywheel/models/staffing_pool_list.py +163 -0
- flywheel/models/staffing_pool_modify.py +217 -0
- flywheel/models/status_transitions.py +244 -0
- flywheel/models/task_assign.py +192 -0
- flywheel/models/task_facet.py +28 -0
- flywheel/models/task_parent_ref.py +243 -0
- flywheel/models/task_parent_ref_input.py +217 -0
- flywheel/models/task_priority.py +30 -0
- flywheel/models/task_submission.py +188 -0
- flywheel/models/user_input.py +31 -4
- flywheel/models/validation_rule.py +189 -0
- {flywheel_sdk-21.0.0.dist-info → flywheel_sdk-21.1.0rc0.dist-info}/METADATA +1 -1
- {flywheel_sdk-21.0.0.dist-info → flywheel_sdk-21.1.0rc0.dist-info}/RECORD +69 -21
- {flywheel_sdk-21.0.0.dist-info → flywheel_sdk-21.1.0rc0.dist-info}/WHEEL +0 -0
- {flywheel_sdk-21.0.0.dist-info → flywheel_sdk-21.1.0rc0.dist-info}/licenses/LICENSE.txt +0 -0
- {flywheel_sdk-21.0.0.dist-info → flywheel_sdk-21.1.0rc0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,677 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Flywheel
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: 0.0.1
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from __future__ import absolute_import
|
|
15
|
+
|
|
16
|
+
import re # noqa: F401
|
|
17
|
+
|
|
18
|
+
# python 2 and python 3 compatibility library
|
|
19
|
+
import six
|
|
20
|
+
|
|
21
|
+
from flywheel.api_client import ApiClient
|
|
22
|
+
import flywheel.models
|
|
23
|
+
from flywheel.util import check_filename_params
|
|
24
|
+
|
|
25
|
+
# NOTE: This file is auto generated by the swagger code generator program.
|
|
26
|
+
# Do not edit the class manually.
|
|
27
|
+
|
|
28
|
+
class StaffingPoolsApi(object):
|
|
29
|
+
def __init__(self, api_client=None):
|
|
30
|
+
if api_client is None:
|
|
31
|
+
api_client = ApiClient()
|
|
32
|
+
self.api_client = api_client
|
|
33
|
+
|
|
34
|
+
def create_staffing_pool(self, body, **kwargs): # noqa: E501
|
|
35
|
+
"""Create
|
|
36
|
+
|
|
37
|
+
Create a staffing pool.
|
|
38
|
+
This method makes a synchronous HTTP request by default.
|
|
39
|
+
|
|
40
|
+
:param StaffingPoolCreate body: (required)
|
|
41
|
+
:param bool async_: Perform the request asynchronously
|
|
42
|
+
:return: StaffingPool
|
|
43
|
+
"""
|
|
44
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
45
|
+
kwargs['_return_http_data_only'] = True
|
|
46
|
+
|
|
47
|
+
if kwargs.get('async_'):
|
|
48
|
+
return self.create_staffing_pool_with_http_info(body, **kwargs) # noqa: E501
|
|
49
|
+
else:
|
|
50
|
+
(data) = self.create_staffing_pool_with_http_info(body, **kwargs) # noqa: E501
|
|
51
|
+
if (
|
|
52
|
+
data
|
|
53
|
+
and hasattr(data, 'return_value')
|
|
54
|
+
and not ignore_simplified_return_value
|
|
55
|
+
):
|
|
56
|
+
return data.return_value()
|
|
57
|
+
return data
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def create_staffing_pool_with_http_info(self, body, **kwargs): # noqa: E501
|
|
61
|
+
"""Create
|
|
62
|
+
|
|
63
|
+
Create a staffing pool.
|
|
64
|
+
This method makes a synchronous HTTP request by default.
|
|
65
|
+
|
|
66
|
+
:param StaffingPoolCreate body: (required)
|
|
67
|
+
:param bool async_: Perform the request asynchronously
|
|
68
|
+
:return: StaffingPool
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
all_params = ['body',] # noqa: E501
|
|
72
|
+
all_params.append('async_')
|
|
73
|
+
all_params.append('_return_http_data_only')
|
|
74
|
+
all_params.append('_preload_content')
|
|
75
|
+
all_params.append('_request_timeout')
|
|
76
|
+
all_params.append('_request_out')
|
|
77
|
+
|
|
78
|
+
params = locals()
|
|
79
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
80
|
+
if key not in all_params:
|
|
81
|
+
raise TypeError(
|
|
82
|
+
"Got an unexpected keyword argument '%s'"
|
|
83
|
+
" to method create_staffing_pool" % key
|
|
84
|
+
)
|
|
85
|
+
params[key] = val
|
|
86
|
+
del params['kwargs']
|
|
87
|
+
# verify the required parameter 'body' is set
|
|
88
|
+
if ('body' not in params or
|
|
89
|
+
params['body'] is None):
|
|
90
|
+
raise ValueError("Missing the required parameter `body` when calling `create_staffing_pool`") # noqa: E501
|
|
91
|
+
check_filename_params(params)
|
|
92
|
+
|
|
93
|
+
collection_formats = {}
|
|
94
|
+
|
|
95
|
+
path_params = {}
|
|
96
|
+
|
|
97
|
+
query_params = []
|
|
98
|
+
|
|
99
|
+
header_params = {}
|
|
100
|
+
|
|
101
|
+
form_params = []
|
|
102
|
+
local_var_files = {}
|
|
103
|
+
|
|
104
|
+
body_params = None
|
|
105
|
+
if 'body' in params:
|
|
106
|
+
if 'StaffingPoolCreate'.startswith('union'):
|
|
107
|
+
body_type = type(params['body'])
|
|
108
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
109
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
110
|
+
else:
|
|
111
|
+
body_params = params['body']
|
|
112
|
+
else:
|
|
113
|
+
body_params = flywheel.models.StaffingPoolCreate.positional_to_model(params['body'])
|
|
114
|
+
# HTTP header `Accept`
|
|
115
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
116
|
+
['application/json']) # noqa: E501
|
|
117
|
+
|
|
118
|
+
# HTTP header `Content-Type`
|
|
119
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
120
|
+
['application/json']) # noqa: E501
|
|
121
|
+
|
|
122
|
+
# Authentication setting
|
|
123
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
124
|
+
|
|
125
|
+
return self.api_client.call_api(
|
|
126
|
+
'/staffing_pools', 'POST',
|
|
127
|
+
path_params,
|
|
128
|
+
query_params,
|
|
129
|
+
header_params,
|
|
130
|
+
body=body_params,
|
|
131
|
+
post_params=form_params,
|
|
132
|
+
files=local_var_files,
|
|
133
|
+
response_type='StaffingPool', # noqa: E501
|
|
134
|
+
auth_settings=auth_settings,
|
|
135
|
+
async_=params.get('async_'),
|
|
136
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
137
|
+
_preload_content=params.get('_preload_content', True),
|
|
138
|
+
_request_timeout=params.get('_request_timeout'),
|
|
139
|
+
_request_out=params.get('_request_out'),
|
|
140
|
+
collection_formats=collection_formats)
|
|
141
|
+
|
|
142
|
+
def delete_staffing_pool(self, pool_id, **kwargs): # noqa: E501
|
|
143
|
+
"""Delete
|
|
144
|
+
|
|
145
|
+
Delete a staffing pool by id.
|
|
146
|
+
This method makes a synchronous HTTP request by default.
|
|
147
|
+
|
|
148
|
+
:param str pool_id: (required)
|
|
149
|
+
:param bool async_: Perform the request asynchronously
|
|
150
|
+
:return: DeletedResult
|
|
151
|
+
"""
|
|
152
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
153
|
+
kwargs['_return_http_data_only'] = True
|
|
154
|
+
|
|
155
|
+
if kwargs.get('async_'):
|
|
156
|
+
return self.delete_staffing_pool_with_http_info(pool_id, **kwargs) # noqa: E501
|
|
157
|
+
else:
|
|
158
|
+
(data) = self.delete_staffing_pool_with_http_info(pool_id, **kwargs) # noqa: E501
|
|
159
|
+
if (
|
|
160
|
+
data
|
|
161
|
+
and hasattr(data, 'return_value')
|
|
162
|
+
and not ignore_simplified_return_value
|
|
163
|
+
):
|
|
164
|
+
return data.return_value()
|
|
165
|
+
return data
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
def delete_staffing_pool_with_http_info(self, pool_id, **kwargs): # noqa: E501
|
|
169
|
+
"""Delete
|
|
170
|
+
|
|
171
|
+
Delete a staffing pool by id.
|
|
172
|
+
This method makes a synchronous HTTP request by default.
|
|
173
|
+
|
|
174
|
+
:param str pool_id: (required)
|
|
175
|
+
:param bool async_: Perform the request asynchronously
|
|
176
|
+
:return: DeletedResult
|
|
177
|
+
"""
|
|
178
|
+
|
|
179
|
+
all_params = ['pool_id',] # noqa: E501
|
|
180
|
+
all_params.append('async_')
|
|
181
|
+
all_params.append('_return_http_data_only')
|
|
182
|
+
all_params.append('_preload_content')
|
|
183
|
+
all_params.append('_request_timeout')
|
|
184
|
+
all_params.append('_request_out')
|
|
185
|
+
|
|
186
|
+
params = locals()
|
|
187
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
188
|
+
if key not in all_params:
|
|
189
|
+
raise TypeError(
|
|
190
|
+
"Got an unexpected keyword argument '%s'"
|
|
191
|
+
" to method delete_staffing_pool" % key
|
|
192
|
+
)
|
|
193
|
+
params[key] = val
|
|
194
|
+
del params['kwargs']
|
|
195
|
+
# verify the required parameter 'pool_id' is set
|
|
196
|
+
if ('pool_id' not in params or
|
|
197
|
+
params['pool_id'] is None):
|
|
198
|
+
raise ValueError("Missing the required parameter `pool_id` when calling `delete_staffing_pool`") # noqa: E501
|
|
199
|
+
check_filename_params(params)
|
|
200
|
+
|
|
201
|
+
collection_formats = {}
|
|
202
|
+
|
|
203
|
+
path_params = {}
|
|
204
|
+
if 'pool_id' in params:
|
|
205
|
+
path_params['pool_id'] = params['pool_id'] # noqa: E501
|
|
206
|
+
|
|
207
|
+
query_params = []
|
|
208
|
+
|
|
209
|
+
header_params = {}
|
|
210
|
+
|
|
211
|
+
form_params = []
|
|
212
|
+
local_var_files = {}
|
|
213
|
+
|
|
214
|
+
body_params = None
|
|
215
|
+
# HTTP header `Accept`
|
|
216
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
217
|
+
['application/json']) # noqa: E501
|
|
218
|
+
|
|
219
|
+
# Authentication setting
|
|
220
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
221
|
+
|
|
222
|
+
return self.api_client.call_api(
|
|
223
|
+
'/staffing_pools/{pool_id}', 'DELETE',
|
|
224
|
+
path_params,
|
|
225
|
+
query_params,
|
|
226
|
+
header_params,
|
|
227
|
+
body=body_params,
|
|
228
|
+
post_params=form_params,
|
|
229
|
+
files=local_var_files,
|
|
230
|
+
response_type='DeletedResult', # noqa: E501
|
|
231
|
+
auth_settings=auth_settings,
|
|
232
|
+
async_=params.get('async_'),
|
|
233
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
234
|
+
_preload_content=params.get('_preload_content', True),
|
|
235
|
+
_request_timeout=params.get('_request_timeout'),
|
|
236
|
+
_request_out=params.get('_request_out'),
|
|
237
|
+
collection_formats=collection_formats)
|
|
238
|
+
|
|
239
|
+
def find_all_api_staffing_pools_get(self, **kwargs): # noqa: E501
|
|
240
|
+
"""Find All
|
|
241
|
+
|
|
242
|
+
This method makes a synchronous HTTP request by default.
|
|
243
|
+
|
|
244
|
+
:param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
|
|
245
|
+
:param str sort: The sort fields and order. (e.g. label:asc,created:desc)
|
|
246
|
+
:param int limit: The maximum number of entries to return.
|
|
247
|
+
:param int skip: The number of entries to skip.
|
|
248
|
+
:param int page: The page number (i.e. skip limit*page entries)
|
|
249
|
+
:param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
|
|
250
|
+
:param bool async_: Perform the request asynchronously
|
|
251
|
+
:return: PageGenericStaffingPool
|
|
252
|
+
"""
|
|
253
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
254
|
+
kwargs['_return_http_data_only'] = True
|
|
255
|
+
|
|
256
|
+
if kwargs.get('async_'):
|
|
257
|
+
return self.find_all_api_staffing_pools_get_with_http_info(**kwargs) # noqa: E501
|
|
258
|
+
else:
|
|
259
|
+
(data) = self.find_all_api_staffing_pools_get_with_http_info(**kwargs) # noqa: E501
|
|
260
|
+
if (
|
|
261
|
+
data
|
|
262
|
+
and hasattr(data, 'return_value')
|
|
263
|
+
and not ignore_simplified_return_value
|
|
264
|
+
):
|
|
265
|
+
return data.return_value()
|
|
266
|
+
return data
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
def find_all_api_staffing_pools_get_with_http_info(self, **kwargs): # noqa: E501
|
|
270
|
+
"""Find All
|
|
271
|
+
|
|
272
|
+
This method makes a synchronous HTTP request by default.
|
|
273
|
+
|
|
274
|
+
:param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
|
|
275
|
+
:param str sort: The sort fields and order. (e.g. label:asc,created:desc)
|
|
276
|
+
:param int limit: The maximum number of entries to return.
|
|
277
|
+
:param int skip: The number of entries to skip.
|
|
278
|
+
:param int page: The page number (i.e. skip limit*page entries)
|
|
279
|
+
:param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
|
|
280
|
+
:param bool async_: Perform the request asynchronously
|
|
281
|
+
:return: PageGenericStaffingPool
|
|
282
|
+
"""
|
|
283
|
+
|
|
284
|
+
all_params = ['filter','sort','limit','skip','page','after_id',] # noqa: E501
|
|
285
|
+
all_params.append('async_')
|
|
286
|
+
all_params.append('_return_http_data_only')
|
|
287
|
+
all_params.append('_preload_content')
|
|
288
|
+
all_params.append('_request_timeout')
|
|
289
|
+
all_params.append('_request_out')
|
|
290
|
+
|
|
291
|
+
params = locals()
|
|
292
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
293
|
+
if key not in all_params:
|
|
294
|
+
raise TypeError(
|
|
295
|
+
"Got an unexpected keyword argument '%s'"
|
|
296
|
+
" to method find_all_api_staffing_pools_get" % key
|
|
297
|
+
)
|
|
298
|
+
params[key] = val
|
|
299
|
+
del params['kwargs']
|
|
300
|
+
check_filename_params(params)
|
|
301
|
+
|
|
302
|
+
collection_formats = {}
|
|
303
|
+
|
|
304
|
+
path_params = {}
|
|
305
|
+
|
|
306
|
+
query_params = []
|
|
307
|
+
if 'filter' in params:
|
|
308
|
+
query_params.append(('filter', params['filter'])) # noqa: E501
|
|
309
|
+
if 'sort' in params:
|
|
310
|
+
query_params.append(('sort', params['sort'])) # noqa: E501
|
|
311
|
+
if 'limit' in params:
|
|
312
|
+
query_params.append(('limit', params['limit'])) # noqa: E501
|
|
313
|
+
if 'skip' in params:
|
|
314
|
+
query_params.append(('skip', params['skip'])) # noqa: E501
|
|
315
|
+
if 'page' in params:
|
|
316
|
+
query_params.append(('page', params['page'])) # noqa: E501
|
|
317
|
+
if 'after_id' in params:
|
|
318
|
+
query_params.append(('after_id', params['after_id'])) # noqa: E501
|
|
319
|
+
|
|
320
|
+
header_params = {}
|
|
321
|
+
|
|
322
|
+
form_params = []
|
|
323
|
+
local_var_files = {}
|
|
324
|
+
|
|
325
|
+
body_params = None
|
|
326
|
+
# HTTP header `Accept`
|
|
327
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
328
|
+
['application/json']) # noqa: E501
|
|
329
|
+
|
|
330
|
+
# Authentication setting
|
|
331
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
332
|
+
|
|
333
|
+
return self.api_client.call_api(
|
|
334
|
+
'/staffing_pools', 'GET',
|
|
335
|
+
path_params,
|
|
336
|
+
query_params,
|
|
337
|
+
header_params,
|
|
338
|
+
body=body_params,
|
|
339
|
+
post_params=form_params,
|
|
340
|
+
files=local_var_files,
|
|
341
|
+
response_type='PageGenericStaffingPool', # noqa: E501
|
|
342
|
+
auth_settings=auth_settings,
|
|
343
|
+
async_=params.get('async_'),
|
|
344
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
345
|
+
_preload_content=params.get('_preload_content', True),
|
|
346
|
+
_request_timeout=params.get('_request_timeout'),
|
|
347
|
+
_request_out=params.get('_request_out'),
|
|
348
|
+
collection_formats=collection_formats)
|
|
349
|
+
|
|
350
|
+
def get_staffing_pool(self, pool_id, **kwargs): # noqa: E501
|
|
351
|
+
"""Get By Id
|
|
352
|
+
|
|
353
|
+
Get a staffing pool by id.
|
|
354
|
+
This method makes a synchronous HTTP request by default.
|
|
355
|
+
|
|
356
|
+
:param str pool_id: (required)
|
|
357
|
+
:param bool async_: Perform the request asynchronously
|
|
358
|
+
:return: StaffingPool
|
|
359
|
+
"""
|
|
360
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
361
|
+
kwargs['_return_http_data_only'] = True
|
|
362
|
+
|
|
363
|
+
if kwargs.get('async_'):
|
|
364
|
+
return self.get_staffing_pool_with_http_info(pool_id, **kwargs) # noqa: E501
|
|
365
|
+
else:
|
|
366
|
+
(data) = self.get_staffing_pool_with_http_info(pool_id, **kwargs) # noqa: E501
|
|
367
|
+
if (
|
|
368
|
+
data
|
|
369
|
+
and hasattr(data, 'return_value')
|
|
370
|
+
and not ignore_simplified_return_value
|
|
371
|
+
):
|
|
372
|
+
return data.return_value()
|
|
373
|
+
return data
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
def get_staffing_pool_with_http_info(self, pool_id, **kwargs): # noqa: E501
|
|
377
|
+
"""Get By Id
|
|
378
|
+
|
|
379
|
+
Get a staffing pool by id.
|
|
380
|
+
This method makes a synchronous HTTP request by default.
|
|
381
|
+
|
|
382
|
+
:param str pool_id: (required)
|
|
383
|
+
:param bool async_: Perform the request asynchronously
|
|
384
|
+
:return: StaffingPool
|
|
385
|
+
"""
|
|
386
|
+
|
|
387
|
+
all_params = ['pool_id',] # noqa: E501
|
|
388
|
+
all_params.append('async_')
|
|
389
|
+
all_params.append('_return_http_data_only')
|
|
390
|
+
all_params.append('_preload_content')
|
|
391
|
+
all_params.append('_request_timeout')
|
|
392
|
+
all_params.append('_request_out')
|
|
393
|
+
|
|
394
|
+
params = locals()
|
|
395
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
396
|
+
if key not in all_params:
|
|
397
|
+
raise TypeError(
|
|
398
|
+
"Got an unexpected keyword argument '%s'"
|
|
399
|
+
" to method get_staffing_pool" % key
|
|
400
|
+
)
|
|
401
|
+
params[key] = val
|
|
402
|
+
del params['kwargs']
|
|
403
|
+
# verify the required parameter 'pool_id' is set
|
|
404
|
+
if ('pool_id' not in params or
|
|
405
|
+
params['pool_id'] is None):
|
|
406
|
+
raise ValueError("Missing the required parameter `pool_id` when calling `get_staffing_pool`") # noqa: E501
|
|
407
|
+
check_filename_params(params)
|
|
408
|
+
|
|
409
|
+
collection_formats = {}
|
|
410
|
+
|
|
411
|
+
path_params = {}
|
|
412
|
+
if 'pool_id' in params:
|
|
413
|
+
path_params['pool_id'] = params['pool_id'] # noqa: E501
|
|
414
|
+
|
|
415
|
+
query_params = []
|
|
416
|
+
|
|
417
|
+
header_params = {}
|
|
418
|
+
|
|
419
|
+
form_params = []
|
|
420
|
+
local_var_files = {}
|
|
421
|
+
|
|
422
|
+
body_params = None
|
|
423
|
+
# HTTP header `Accept`
|
|
424
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
425
|
+
['application/json']) # noqa: E501
|
|
426
|
+
|
|
427
|
+
# Authentication setting
|
|
428
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
429
|
+
|
|
430
|
+
return self.api_client.call_api(
|
|
431
|
+
'/staffing_pools/{pool_id}', 'GET',
|
|
432
|
+
path_params,
|
|
433
|
+
query_params,
|
|
434
|
+
header_params,
|
|
435
|
+
body=body_params,
|
|
436
|
+
post_params=form_params,
|
|
437
|
+
files=local_var_files,
|
|
438
|
+
response_type='StaffingPool', # noqa: E501
|
|
439
|
+
auth_settings=auth_settings,
|
|
440
|
+
async_=params.get('async_'),
|
|
441
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
442
|
+
_preload_content=params.get('_preload_content', True),
|
|
443
|
+
_request_timeout=params.get('_request_timeout'),
|
|
444
|
+
_request_out=params.get('_request_out'),
|
|
445
|
+
collection_formats=collection_formats)
|
|
446
|
+
|
|
447
|
+
def modify_staffing_pool(self, pool_id, body, **kwargs): # noqa: E501
|
|
448
|
+
"""Modify
|
|
449
|
+
|
|
450
|
+
Modify a staffing pool.
|
|
451
|
+
This method makes a synchronous HTTP request by default.
|
|
452
|
+
|
|
453
|
+
:param str pool_id: (required)
|
|
454
|
+
:param StaffingPoolModify body: (required)
|
|
455
|
+
:param bool async_: Perform the request asynchronously
|
|
456
|
+
:return: StaffingPool
|
|
457
|
+
"""
|
|
458
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
459
|
+
kwargs['_return_http_data_only'] = True
|
|
460
|
+
|
|
461
|
+
if kwargs.get('async_'):
|
|
462
|
+
return self.modify_staffing_pool_with_http_info(pool_id, body, **kwargs) # noqa: E501
|
|
463
|
+
else:
|
|
464
|
+
(data) = self.modify_staffing_pool_with_http_info(pool_id, body, **kwargs) # noqa: E501
|
|
465
|
+
if (
|
|
466
|
+
data
|
|
467
|
+
and hasattr(data, 'return_value')
|
|
468
|
+
and not ignore_simplified_return_value
|
|
469
|
+
):
|
|
470
|
+
return data.return_value()
|
|
471
|
+
return data
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
def modify_staffing_pool_with_http_info(self, pool_id, body, **kwargs): # noqa: E501
|
|
475
|
+
"""Modify
|
|
476
|
+
|
|
477
|
+
Modify a staffing pool.
|
|
478
|
+
This method makes a synchronous HTTP request by default.
|
|
479
|
+
|
|
480
|
+
:param str pool_id: (required)
|
|
481
|
+
:param StaffingPoolModify body: (required)
|
|
482
|
+
:param bool async_: Perform the request asynchronously
|
|
483
|
+
:return: StaffingPool
|
|
484
|
+
"""
|
|
485
|
+
|
|
486
|
+
all_params = ['pool_id','body',] # noqa: E501
|
|
487
|
+
all_params.append('async_')
|
|
488
|
+
all_params.append('_return_http_data_only')
|
|
489
|
+
all_params.append('_preload_content')
|
|
490
|
+
all_params.append('_request_timeout')
|
|
491
|
+
all_params.append('_request_out')
|
|
492
|
+
|
|
493
|
+
params = locals()
|
|
494
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
495
|
+
if key not in all_params:
|
|
496
|
+
raise TypeError(
|
|
497
|
+
"Got an unexpected keyword argument '%s'"
|
|
498
|
+
" to method modify_staffing_pool" % key
|
|
499
|
+
)
|
|
500
|
+
params[key] = val
|
|
501
|
+
del params['kwargs']
|
|
502
|
+
# verify the required parameter 'pool_id' is set
|
|
503
|
+
if ('pool_id' not in params or
|
|
504
|
+
params['pool_id'] is None):
|
|
505
|
+
raise ValueError("Missing the required parameter `pool_id` when calling `modify_staffing_pool`") # noqa: E501
|
|
506
|
+
# verify the required parameter 'body' is set
|
|
507
|
+
if ('body' not in params or
|
|
508
|
+
params['body'] is None):
|
|
509
|
+
raise ValueError("Missing the required parameter `body` when calling `modify_staffing_pool`") # noqa: E501
|
|
510
|
+
check_filename_params(params)
|
|
511
|
+
|
|
512
|
+
collection_formats = {}
|
|
513
|
+
|
|
514
|
+
path_params = {}
|
|
515
|
+
if 'pool_id' in params:
|
|
516
|
+
path_params['pool_id'] = params['pool_id'] # noqa: E501
|
|
517
|
+
|
|
518
|
+
query_params = []
|
|
519
|
+
|
|
520
|
+
header_params = {}
|
|
521
|
+
|
|
522
|
+
form_params = []
|
|
523
|
+
local_var_files = {}
|
|
524
|
+
|
|
525
|
+
body_params = None
|
|
526
|
+
if 'body' in params:
|
|
527
|
+
if 'StaffingPoolModify'.startswith('union'):
|
|
528
|
+
body_type = type(params['body'])
|
|
529
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
530
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
531
|
+
else:
|
|
532
|
+
body_params = params['body']
|
|
533
|
+
else:
|
|
534
|
+
body_params = flywheel.models.StaffingPoolModify.positional_to_model(params['body'])
|
|
535
|
+
# HTTP header `Accept`
|
|
536
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
537
|
+
['application/json']) # noqa: E501
|
|
538
|
+
|
|
539
|
+
# HTTP header `Content-Type`
|
|
540
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
541
|
+
['application/json']) # noqa: E501
|
|
542
|
+
|
|
543
|
+
# Authentication setting
|
|
544
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
545
|
+
|
|
546
|
+
return self.api_client.call_api(
|
|
547
|
+
'/staffing_pools/{pool_id}', 'PUT',
|
|
548
|
+
path_params,
|
|
549
|
+
query_params,
|
|
550
|
+
header_params,
|
|
551
|
+
body=body_params,
|
|
552
|
+
post_params=form_params,
|
|
553
|
+
files=local_var_files,
|
|
554
|
+
response_type='StaffingPool', # noqa: E501
|
|
555
|
+
auth_settings=auth_settings,
|
|
556
|
+
async_=params.get('async_'),
|
|
557
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
558
|
+
_preload_content=params.get('_preload_content', True),
|
|
559
|
+
_request_timeout=params.get('_request_timeout'),
|
|
560
|
+
_request_out=params.get('_request_out'),
|
|
561
|
+
collection_formats=collection_formats)
|
|
562
|
+
|
|
563
|
+
def set_user_staffing_pools(self, user_id, body, **kwargs): # noqa: E501
|
|
564
|
+
"""Set User Staffing Pools
|
|
565
|
+
|
|
566
|
+
Add a user to multiple staffing pools.
|
|
567
|
+
This method makes a synchronous HTTP request by default.
|
|
568
|
+
|
|
569
|
+
:param str user_id: (required)
|
|
570
|
+
:param StaffingPoolList body: (required)
|
|
571
|
+
:param bool async_: Perform the request asynchronously
|
|
572
|
+
:return: None
|
|
573
|
+
"""
|
|
574
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
575
|
+
kwargs['_return_http_data_only'] = True
|
|
576
|
+
|
|
577
|
+
if kwargs.get('async_'):
|
|
578
|
+
return self.set_user_staffing_pools_with_http_info(user_id, body, **kwargs) # noqa: E501
|
|
579
|
+
else:
|
|
580
|
+
(data) = self.set_user_staffing_pools_with_http_info(user_id, body, **kwargs) # noqa: E501
|
|
581
|
+
if (
|
|
582
|
+
data
|
|
583
|
+
and hasattr(data, 'return_value')
|
|
584
|
+
and not ignore_simplified_return_value
|
|
585
|
+
):
|
|
586
|
+
return data.return_value()
|
|
587
|
+
return data
|
|
588
|
+
|
|
589
|
+
|
|
590
|
+
def set_user_staffing_pools_with_http_info(self, user_id, body, **kwargs): # noqa: E501
|
|
591
|
+
"""Set User Staffing Pools
|
|
592
|
+
|
|
593
|
+
Add a user to multiple staffing pools.
|
|
594
|
+
This method makes a synchronous HTTP request by default.
|
|
595
|
+
|
|
596
|
+
:param str user_id: (required)
|
|
597
|
+
:param StaffingPoolList body: (required)
|
|
598
|
+
:param bool async_: Perform the request asynchronously
|
|
599
|
+
:return: None
|
|
600
|
+
"""
|
|
601
|
+
|
|
602
|
+
all_params = ['user_id','body',] # noqa: E501
|
|
603
|
+
all_params.append('async_')
|
|
604
|
+
all_params.append('_return_http_data_only')
|
|
605
|
+
all_params.append('_preload_content')
|
|
606
|
+
all_params.append('_request_timeout')
|
|
607
|
+
all_params.append('_request_out')
|
|
608
|
+
|
|
609
|
+
params = locals()
|
|
610
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
611
|
+
if key not in all_params:
|
|
612
|
+
raise TypeError(
|
|
613
|
+
"Got an unexpected keyword argument '%s'"
|
|
614
|
+
" to method set_user_staffing_pools" % key
|
|
615
|
+
)
|
|
616
|
+
params[key] = val
|
|
617
|
+
del params['kwargs']
|
|
618
|
+
# verify the required parameter 'user_id' is set
|
|
619
|
+
if ('user_id' not in params or
|
|
620
|
+
params['user_id'] is None):
|
|
621
|
+
raise ValueError("Missing the required parameter `user_id` when calling `set_user_staffing_pools`") # noqa: E501
|
|
622
|
+
# verify the required parameter 'body' is set
|
|
623
|
+
if ('body' not in params or
|
|
624
|
+
params['body'] is None):
|
|
625
|
+
raise ValueError("Missing the required parameter `body` when calling `set_user_staffing_pools`") # noqa: E501
|
|
626
|
+
check_filename_params(params)
|
|
627
|
+
|
|
628
|
+
collection_formats = {}
|
|
629
|
+
|
|
630
|
+
path_params = {}
|
|
631
|
+
if 'user_id' in params:
|
|
632
|
+
path_params['user_id'] = params['user_id'] # noqa: E501
|
|
633
|
+
|
|
634
|
+
query_params = []
|
|
635
|
+
|
|
636
|
+
header_params = {}
|
|
637
|
+
|
|
638
|
+
form_params = []
|
|
639
|
+
local_var_files = {}
|
|
640
|
+
|
|
641
|
+
body_params = None
|
|
642
|
+
if 'body' in params:
|
|
643
|
+
if 'StaffingPoolList'.startswith('union'):
|
|
644
|
+
body_type = type(params['body'])
|
|
645
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
646
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
647
|
+
else:
|
|
648
|
+
body_params = params['body']
|
|
649
|
+
else:
|
|
650
|
+
body_params = flywheel.models.StaffingPoolList.positional_to_model(params['body'])
|
|
651
|
+
# HTTP header `Accept`
|
|
652
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
653
|
+
['application/json']) # noqa: E501
|
|
654
|
+
|
|
655
|
+
# HTTP header `Content-Type`
|
|
656
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
657
|
+
['application/json']) # noqa: E501
|
|
658
|
+
|
|
659
|
+
# Authentication setting
|
|
660
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
661
|
+
|
|
662
|
+
return self.api_client.call_api(
|
|
663
|
+
'/staffing_pools/users/{user_id}/staffing_pools', 'PUT',
|
|
664
|
+
path_params,
|
|
665
|
+
query_params,
|
|
666
|
+
header_params,
|
|
667
|
+
body=body_params,
|
|
668
|
+
post_params=form_params,
|
|
669
|
+
files=local_var_files,
|
|
670
|
+
response_type=None, # noqa: E501
|
|
671
|
+
auth_settings=auth_settings,
|
|
672
|
+
async_=params.get('async_'),
|
|
673
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
674
|
+
_preload_content=params.get('_preload_content', True),
|
|
675
|
+
_request_timeout=params.get('_request_timeout'),
|
|
676
|
+
_request_out=params.get('_request_out'),
|
|
677
|
+
collection_formats=collection_formats)
|