flywheel-sdk 21.0.0__py2.py3-none-any.whl → 21.1.0__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/container_type.py +1 -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/features.py +1 -28
- 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.0.dist-info}/METADATA +1 -1
- {flywheel_sdk-21.0.0.dist-info → flywheel_sdk-21.1.0.dist-info}/RECORD +71 -23
- {flywheel_sdk-21.0.0.dist-info → flywheel_sdk-21.1.0.dist-info}/WHEEL +0 -0
- {flywheel_sdk-21.0.0.dist-info → flywheel_sdk-21.1.0.dist-info}/licenses/LICENSE.txt +0 -0
- {flywheel_sdk-21.0.0.dist-info → flywheel_sdk-21.1.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,757 @@
|
|
|
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 ProtocolsApi(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 archive_task_protocol(self, protocol_id, **kwargs): # noqa: E501
|
|
35
|
+
"""Archive
|
|
36
|
+
|
|
37
|
+
Archive a protocol.
|
|
38
|
+
This method makes a synchronous HTTP request by default.
|
|
39
|
+
|
|
40
|
+
:param str protocol_id: (required)
|
|
41
|
+
:param bool async_: Perform the request asynchronously
|
|
42
|
+
:return: Protocol
|
|
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.archive_task_protocol_with_http_info(protocol_id, **kwargs) # noqa: E501
|
|
49
|
+
else:
|
|
50
|
+
(data) = self.archive_task_protocol_with_http_info(protocol_id, **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 archive_task_protocol_with_http_info(self, protocol_id, **kwargs): # noqa: E501
|
|
61
|
+
"""Archive
|
|
62
|
+
|
|
63
|
+
Archive a protocol.
|
|
64
|
+
This method makes a synchronous HTTP request by default.
|
|
65
|
+
|
|
66
|
+
:param str protocol_id: (required)
|
|
67
|
+
:param bool async_: Perform the request asynchronously
|
|
68
|
+
:return: Protocol
|
|
69
|
+
"""
|
|
70
|
+
|
|
71
|
+
all_params = ['protocol_id',] # 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 archive_task_protocol" % key
|
|
84
|
+
)
|
|
85
|
+
params[key] = val
|
|
86
|
+
del params['kwargs']
|
|
87
|
+
# verify the required parameter 'protocol_id' is set
|
|
88
|
+
if ('protocol_id' not in params or
|
|
89
|
+
params['protocol_id'] is None):
|
|
90
|
+
raise ValueError("Missing the required parameter `protocol_id` when calling `archive_task_protocol`") # noqa: E501
|
|
91
|
+
check_filename_params(params)
|
|
92
|
+
|
|
93
|
+
collection_formats = {}
|
|
94
|
+
|
|
95
|
+
path_params = {}
|
|
96
|
+
if 'protocol_id' in params:
|
|
97
|
+
path_params['protocol_id'] = params['protocol_id'] # noqa: E501
|
|
98
|
+
|
|
99
|
+
query_params = []
|
|
100
|
+
|
|
101
|
+
header_params = {}
|
|
102
|
+
|
|
103
|
+
form_params = []
|
|
104
|
+
local_var_files = {}
|
|
105
|
+
|
|
106
|
+
body_params = None
|
|
107
|
+
# HTTP header `Accept`
|
|
108
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
109
|
+
['application/json']) # noqa: E501
|
|
110
|
+
|
|
111
|
+
# Authentication setting
|
|
112
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
113
|
+
|
|
114
|
+
return self.api_client.call_api(
|
|
115
|
+
'/protocols/{protocol_id}/archive', 'PUT',
|
|
116
|
+
path_params,
|
|
117
|
+
query_params,
|
|
118
|
+
header_params,
|
|
119
|
+
body=body_params,
|
|
120
|
+
post_params=form_params,
|
|
121
|
+
files=local_var_files,
|
|
122
|
+
response_type='Protocol', # noqa: E501
|
|
123
|
+
auth_settings=auth_settings,
|
|
124
|
+
async_=params.get('async_'),
|
|
125
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
126
|
+
_preload_content=params.get('_preload_content', True),
|
|
127
|
+
_request_timeout=params.get('_request_timeout'),
|
|
128
|
+
_request_out=params.get('_request_out'),
|
|
129
|
+
collection_formats=collection_formats)
|
|
130
|
+
|
|
131
|
+
def create_task_protocol(self, body, **kwargs): # noqa: E501
|
|
132
|
+
"""Create
|
|
133
|
+
|
|
134
|
+
Create a new protocol.
|
|
135
|
+
This method makes a synchronous HTTP request by default.
|
|
136
|
+
|
|
137
|
+
:param ProtocolInput body: (required)
|
|
138
|
+
:param bool async_: Perform the request asynchronously
|
|
139
|
+
:return: Protocol
|
|
140
|
+
"""
|
|
141
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
142
|
+
kwargs['_return_http_data_only'] = True
|
|
143
|
+
|
|
144
|
+
if kwargs.get('async_'):
|
|
145
|
+
return self.create_task_protocol_with_http_info(body, **kwargs) # noqa: E501
|
|
146
|
+
else:
|
|
147
|
+
(data) = self.create_task_protocol_with_http_info(body, **kwargs) # noqa: E501
|
|
148
|
+
if (
|
|
149
|
+
data
|
|
150
|
+
and hasattr(data, 'return_value')
|
|
151
|
+
and not ignore_simplified_return_value
|
|
152
|
+
):
|
|
153
|
+
return data.return_value()
|
|
154
|
+
return data
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
def create_task_protocol_with_http_info(self, body, **kwargs): # noqa: E501
|
|
158
|
+
"""Create
|
|
159
|
+
|
|
160
|
+
Create a new protocol.
|
|
161
|
+
This method makes a synchronous HTTP request by default.
|
|
162
|
+
|
|
163
|
+
:param ProtocolInput body: (required)
|
|
164
|
+
:param bool async_: Perform the request asynchronously
|
|
165
|
+
:return: Protocol
|
|
166
|
+
"""
|
|
167
|
+
|
|
168
|
+
all_params = ['body',] # noqa: E501
|
|
169
|
+
all_params.append('async_')
|
|
170
|
+
all_params.append('_return_http_data_only')
|
|
171
|
+
all_params.append('_preload_content')
|
|
172
|
+
all_params.append('_request_timeout')
|
|
173
|
+
all_params.append('_request_out')
|
|
174
|
+
|
|
175
|
+
params = locals()
|
|
176
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
177
|
+
if key not in all_params:
|
|
178
|
+
raise TypeError(
|
|
179
|
+
"Got an unexpected keyword argument '%s'"
|
|
180
|
+
" to method create_task_protocol" % key
|
|
181
|
+
)
|
|
182
|
+
params[key] = val
|
|
183
|
+
del params['kwargs']
|
|
184
|
+
# verify the required parameter 'body' is set
|
|
185
|
+
if ('body' not in params or
|
|
186
|
+
params['body'] is None):
|
|
187
|
+
raise ValueError("Missing the required parameter `body` when calling `create_task_protocol`") # noqa: E501
|
|
188
|
+
check_filename_params(params)
|
|
189
|
+
|
|
190
|
+
collection_formats = {}
|
|
191
|
+
|
|
192
|
+
path_params = {}
|
|
193
|
+
|
|
194
|
+
query_params = []
|
|
195
|
+
|
|
196
|
+
header_params = {}
|
|
197
|
+
|
|
198
|
+
form_params = []
|
|
199
|
+
local_var_files = {}
|
|
200
|
+
|
|
201
|
+
body_params = None
|
|
202
|
+
if 'body' in params:
|
|
203
|
+
if 'ProtocolInput'.startswith('union'):
|
|
204
|
+
body_type = type(params['body'])
|
|
205
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
206
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
207
|
+
else:
|
|
208
|
+
body_params = params['body']
|
|
209
|
+
else:
|
|
210
|
+
body_params = flywheel.models.ProtocolInput.positional_to_model(params['body'])
|
|
211
|
+
# HTTP header `Accept`
|
|
212
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
213
|
+
['application/json']) # noqa: E501
|
|
214
|
+
|
|
215
|
+
# HTTP header `Content-Type`
|
|
216
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
217
|
+
['application/json']) # noqa: E501
|
|
218
|
+
|
|
219
|
+
# Authentication setting
|
|
220
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
221
|
+
|
|
222
|
+
return self.api_client.call_api(
|
|
223
|
+
'/protocols', 'POST',
|
|
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='Protocol', # 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 delete_task_protocol(self, protocol_id, **kwargs): # noqa: E501
|
|
240
|
+
"""Delete
|
|
241
|
+
|
|
242
|
+
Delete a protocol
|
|
243
|
+
This method makes a synchronous HTTP request by default.
|
|
244
|
+
|
|
245
|
+
:param str protocol_id: (required)
|
|
246
|
+
:param bool async_: Perform the request asynchronously
|
|
247
|
+
:return: None
|
|
248
|
+
"""
|
|
249
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
250
|
+
kwargs['_return_http_data_only'] = True
|
|
251
|
+
|
|
252
|
+
if kwargs.get('async_'):
|
|
253
|
+
return self.delete_task_protocol_with_http_info(protocol_id, **kwargs) # noqa: E501
|
|
254
|
+
else:
|
|
255
|
+
(data) = self.delete_task_protocol_with_http_info(protocol_id, **kwargs) # noqa: E501
|
|
256
|
+
if (
|
|
257
|
+
data
|
|
258
|
+
and hasattr(data, 'return_value')
|
|
259
|
+
and not ignore_simplified_return_value
|
|
260
|
+
):
|
|
261
|
+
return data.return_value()
|
|
262
|
+
return data
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
def delete_task_protocol_with_http_info(self, protocol_id, **kwargs): # noqa: E501
|
|
266
|
+
"""Delete
|
|
267
|
+
|
|
268
|
+
Delete a protocol
|
|
269
|
+
This method makes a synchronous HTTP request by default.
|
|
270
|
+
|
|
271
|
+
:param str protocol_id: (required)
|
|
272
|
+
:param bool async_: Perform the request asynchronously
|
|
273
|
+
:return: None
|
|
274
|
+
"""
|
|
275
|
+
|
|
276
|
+
all_params = ['protocol_id',] # noqa: E501
|
|
277
|
+
all_params.append('async_')
|
|
278
|
+
all_params.append('_return_http_data_only')
|
|
279
|
+
all_params.append('_preload_content')
|
|
280
|
+
all_params.append('_request_timeout')
|
|
281
|
+
all_params.append('_request_out')
|
|
282
|
+
|
|
283
|
+
params = locals()
|
|
284
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
285
|
+
if key not in all_params:
|
|
286
|
+
raise TypeError(
|
|
287
|
+
"Got an unexpected keyword argument '%s'"
|
|
288
|
+
" to method delete_task_protocol" % key
|
|
289
|
+
)
|
|
290
|
+
params[key] = val
|
|
291
|
+
del params['kwargs']
|
|
292
|
+
# verify the required parameter 'protocol_id' is set
|
|
293
|
+
if ('protocol_id' not in params or
|
|
294
|
+
params['protocol_id'] is None):
|
|
295
|
+
raise ValueError("Missing the required parameter `protocol_id` when calling `delete_task_protocol`") # noqa: E501
|
|
296
|
+
check_filename_params(params)
|
|
297
|
+
|
|
298
|
+
collection_formats = {}
|
|
299
|
+
|
|
300
|
+
path_params = {}
|
|
301
|
+
if 'protocol_id' in params:
|
|
302
|
+
path_params['protocol_id'] = params['protocol_id'] # noqa: E501
|
|
303
|
+
|
|
304
|
+
query_params = []
|
|
305
|
+
|
|
306
|
+
header_params = {}
|
|
307
|
+
|
|
308
|
+
form_params = []
|
|
309
|
+
local_var_files = {}
|
|
310
|
+
|
|
311
|
+
body_params = None
|
|
312
|
+
# HTTP header `Accept`
|
|
313
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
314
|
+
['application/json']) # noqa: E501
|
|
315
|
+
|
|
316
|
+
# Authentication setting
|
|
317
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
318
|
+
|
|
319
|
+
return self.api_client.call_api(
|
|
320
|
+
'/protocols/{protocol_id}', 'DELETE',
|
|
321
|
+
path_params,
|
|
322
|
+
query_params,
|
|
323
|
+
header_params,
|
|
324
|
+
body=body_params,
|
|
325
|
+
post_params=form_params,
|
|
326
|
+
files=local_var_files,
|
|
327
|
+
response_type=None, # noqa: E501
|
|
328
|
+
auth_settings=auth_settings,
|
|
329
|
+
async_=params.get('async_'),
|
|
330
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
331
|
+
_preload_content=params.get('_preload_content', True),
|
|
332
|
+
_request_timeout=params.get('_request_timeout'),
|
|
333
|
+
_request_out=params.get('_request_out'),
|
|
334
|
+
collection_formats=collection_formats)
|
|
335
|
+
|
|
336
|
+
def find_task_protocols(self, **kwargs): # noqa: E501
|
|
337
|
+
"""Find All
|
|
338
|
+
|
|
339
|
+
Get a paginated list of protocols.
|
|
340
|
+
This method makes a synchronous HTTP request by default.
|
|
341
|
+
|
|
342
|
+
:param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
|
|
343
|
+
:param str sort: The sort fields and order. (e.g. label:asc,created:desc)
|
|
344
|
+
:param int limit: The maximum number of entries to return.
|
|
345
|
+
:param int skip: The number of entries to skip.
|
|
346
|
+
:param int page: The page number (i.e. skip limit*page entries)
|
|
347
|
+
:param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
|
|
348
|
+
:param bool async_: Perform the request asynchronously
|
|
349
|
+
:return: PageGenericProtocol
|
|
350
|
+
"""
|
|
351
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
352
|
+
kwargs['_return_http_data_only'] = True
|
|
353
|
+
|
|
354
|
+
if kwargs.get('async_'):
|
|
355
|
+
return self.find_task_protocols_with_http_info(**kwargs) # noqa: E501
|
|
356
|
+
else:
|
|
357
|
+
(data) = self.find_task_protocols_with_http_info(**kwargs) # noqa: E501
|
|
358
|
+
if (
|
|
359
|
+
data
|
|
360
|
+
and hasattr(data, 'return_value')
|
|
361
|
+
and not ignore_simplified_return_value
|
|
362
|
+
):
|
|
363
|
+
return data.return_value()
|
|
364
|
+
return data
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
def find_task_protocols_with_http_info(self, **kwargs): # noqa: E501
|
|
368
|
+
"""Find All
|
|
369
|
+
|
|
370
|
+
Get a paginated list of protocols.
|
|
371
|
+
This method makes a synchronous HTTP request by default.
|
|
372
|
+
|
|
373
|
+
:param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
|
|
374
|
+
:param str sort: The sort fields and order. (e.g. label:asc,created:desc)
|
|
375
|
+
:param int limit: The maximum number of entries to return.
|
|
376
|
+
:param int skip: The number of entries to skip.
|
|
377
|
+
:param int page: The page number (i.e. skip limit*page entries)
|
|
378
|
+
:param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
|
|
379
|
+
:param bool async_: Perform the request asynchronously
|
|
380
|
+
:return: PageGenericProtocol
|
|
381
|
+
"""
|
|
382
|
+
|
|
383
|
+
all_params = ['filter','sort','limit','skip','page','after_id',] # noqa: E501
|
|
384
|
+
all_params.append('async_')
|
|
385
|
+
all_params.append('_return_http_data_only')
|
|
386
|
+
all_params.append('_preload_content')
|
|
387
|
+
all_params.append('_request_timeout')
|
|
388
|
+
all_params.append('_request_out')
|
|
389
|
+
|
|
390
|
+
params = locals()
|
|
391
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
392
|
+
if key not in all_params:
|
|
393
|
+
raise TypeError(
|
|
394
|
+
"Got an unexpected keyword argument '%s'"
|
|
395
|
+
" to method find_task_protocols" % key
|
|
396
|
+
)
|
|
397
|
+
params[key] = val
|
|
398
|
+
del params['kwargs']
|
|
399
|
+
check_filename_params(params)
|
|
400
|
+
|
|
401
|
+
collection_formats = {}
|
|
402
|
+
|
|
403
|
+
path_params = {}
|
|
404
|
+
|
|
405
|
+
query_params = []
|
|
406
|
+
if 'filter' in params:
|
|
407
|
+
query_params.append(('filter', params['filter'])) # noqa: E501
|
|
408
|
+
if 'sort' in params:
|
|
409
|
+
query_params.append(('sort', params['sort'])) # noqa: E501
|
|
410
|
+
if 'limit' in params:
|
|
411
|
+
query_params.append(('limit', params['limit'])) # noqa: E501
|
|
412
|
+
if 'skip' in params:
|
|
413
|
+
query_params.append(('skip', params['skip'])) # noqa: E501
|
|
414
|
+
if 'page' in params:
|
|
415
|
+
query_params.append(('page', params['page'])) # noqa: E501
|
|
416
|
+
if 'after_id' in params:
|
|
417
|
+
query_params.append(('after_id', params['after_id'])) # noqa: E501
|
|
418
|
+
|
|
419
|
+
header_params = {}
|
|
420
|
+
|
|
421
|
+
form_params = []
|
|
422
|
+
local_var_files = {}
|
|
423
|
+
|
|
424
|
+
body_params = None
|
|
425
|
+
# HTTP header `Accept`
|
|
426
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
427
|
+
['application/json']) # noqa: E501
|
|
428
|
+
|
|
429
|
+
# Authentication setting
|
|
430
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
431
|
+
|
|
432
|
+
return self.api_client.call_api(
|
|
433
|
+
'/protocols', 'GET',
|
|
434
|
+
path_params,
|
|
435
|
+
query_params,
|
|
436
|
+
header_params,
|
|
437
|
+
body=body_params,
|
|
438
|
+
post_params=form_params,
|
|
439
|
+
files=local_var_files,
|
|
440
|
+
response_type='PageGenericProtocol', # noqa: E501
|
|
441
|
+
auth_settings=auth_settings,
|
|
442
|
+
async_=params.get('async_'),
|
|
443
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
444
|
+
_preload_content=params.get('_preload_content', True),
|
|
445
|
+
_request_timeout=params.get('_request_timeout'),
|
|
446
|
+
_request_out=params.get('_request_out'),
|
|
447
|
+
collection_formats=collection_formats)
|
|
448
|
+
|
|
449
|
+
def get_task_protocol(self, protocol_id, **kwargs): # noqa: E501
|
|
450
|
+
"""Get By Id
|
|
451
|
+
|
|
452
|
+
Get protocol by id.
|
|
453
|
+
This method makes a synchronous HTTP request by default.
|
|
454
|
+
|
|
455
|
+
:param str protocol_id: (required)
|
|
456
|
+
:param bool async_: Perform the request asynchronously
|
|
457
|
+
:return: Protocol
|
|
458
|
+
"""
|
|
459
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
460
|
+
kwargs['_return_http_data_only'] = True
|
|
461
|
+
|
|
462
|
+
if kwargs.get('async_'):
|
|
463
|
+
return self.get_task_protocol_with_http_info(protocol_id, **kwargs) # noqa: E501
|
|
464
|
+
else:
|
|
465
|
+
(data) = self.get_task_protocol_with_http_info(protocol_id, **kwargs) # noqa: E501
|
|
466
|
+
if (
|
|
467
|
+
data
|
|
468
|
+
and hasattr(data, 'return_value')
|
|
469
|
+
and not ignore_simplified_return_value
|
|
470
|
+
):
|
|
471
|
+
return data.return_value()
|
|
472
|
+
return data
|
|
473
|
+
|
|
474
|
+
|
|
475
|
+
def get_task_protocol_with_http_info(self, protocol_id, **kwargs): # noqa: E501
|
|
476
|
+
"""Get By Id
|
|
477
|
+
|
|
478
|
+
Get protocol by id.
|
|
479
|
+
This method makes a synchronous HTTP request by default.
|
|
480
|
+
|
|
481
|
+
:param str protocol_id: (required)
|
|
482
|
+
:param bool async_: Perform the request asynchronously
|
|
483
|
+
:return: Protocol
|
|
484
|
+
"""
|
|
485
|
+
|
|
486
|
+
all_params = ['protocol_id',] # 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 get_task_protocol" % key
|
|
499
|
+
)
|
|
500
|
+
params[key] = val
|
|
501
|
+
del params['kwargs']
|
|
502
|
+
# verify the required parameter 'protocol_id' is set
|
|
503
|
+
if ('protocol_id' not in params or
|
|
504
|
+
params['protocol_id'] is None):
|
|
505
|
+
raise ValueError("Missing the required parameter `protocol_id` when calling `get_task_protocol`") # noqa: E501
|
|
506
|
+
check_filename_params(params)
|
|
507
|
+
|
|
508
|
+
collection_formats = {}
|
|
509
|
+
|
|
510
|
+
path_params = {}
|
|
511
|
+
if 'protocol_id' in params:
|
|
512
|
+
path_params['protocol_id'] = params['protocol_id'] # noqa: E501
|
|
513
|
+
|
|
514
|
+
query_params = []
|
|
515
|
+
|
|
516
|
+
header_params = {}
|
|
517
|
+
|
|
518
|
+
form_params = []
|
|
519
|
+
local_var_files = {}
|
|
520
|
+
|
|
521
|
+
body_params = None
|
|
522
|
+
# HTTP header `Accept`
|
|
523
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
524
|
+
['application/json']) # noqa: E501
|
|
525
|
+
|
|
526
|
+
# Authentication setting
|
|
527
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
528
|
+
|
|
529
|
+
return self.api_client.call_api(
|
|
530
|
+
'/protocols/{protocol_id}', 'GET',
|
|
531
|
+
path_params,
|
|
532
|
+
query_params,
|
|
533
|
+
header_params,
|
|
534
|
+
body=body_params,
|
|
535
|
+
post_params=form_params,
|
|
536
|
+
files=local_var_files,
|
|
537
|
+
response_type='Protocol', # noqa: E501
|
|
538
|
+
auth_settings=auth_settings,
|
|
539
|
+
async_=params.get('async_'),
|
|
540
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
541
|
+
_preload_content=params.get('_preload_content', True),
|
|
542
|
+
_request_timeout=params.get('_request_timeout'),
|
|
543
|
+
_request_out=params.get('_request_out'),
|
|
544
|
+
collection_formats=collection_formats)
|
|
545
|
+
|
|
546
|
+
def modify_task_protocol(self, protocol_id, body, **kwargs): # noqa: E501
|
|
547
|
+
"""Modify
|
|
548
|
+
|
|
549
|
+
Modify a protocol.
|
|
550
|
+
This method makes a synchronous HTTP request by default.
|
|
551
|
+
|
|
552
|
+
:param str protocol_id: (required)
|
|
553
|
+
:param ProtocolModify body: (required)
|
|
554
|
+
:param bool async_: Perform the request asynchronously
|
|
555
|
+
:return: Protocol
|
|
556
|
+
"""
|
|
557
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
558
|
+
kwargs['_return_http_data_only'] = True
|
|
559
|
+
|
|
560
|
+
if kwargs.get('async_'):
|
|
561
|
+
return self.modify_task_protocol_with_http_info(protocol_id, body, **kwargs) # noqa: E501
|
|
562
|
+
else:
|
|
563
|
+
(data) = self.modify_task_protocol_with_http_info(protocol_id, body, **kwargs) # noqa: E501
|
|
564
|
+
if (
|
|
565
|
+
data
|
|
566
|
+
and hasattr(data, 'return_value')
|
|
567
|
+
and not ignore_simplified_return_value
|
|
568
|
+
):
|
|
569
|
+
return data.return_value()
|
|
570
|
+
return data
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
def modify_task_protocol_with_http_info(self, protocol_id, body, **kwargs): # noqa: E501
|
|
574
|
+
"""Modify
|
|
575
|
+
|
|
576
|
+
Modify a protocol.
|
|
577
|
+
This method makes a synchronous HTTP request by default.
|
|
578
|
+
|
|
579
|
+
:param str protocol_id: (required)
|
|
580
|
+
:param ProtocolModify body: (required)
|
|
581
|
+
:param bool async_: Perform the request asynchronously
|
|
582
|
+
:return: Protocol
|
|
583
|
+
"""
|
|
584
|
+
|
|
585
|
+
all_params = ['protocol_id','body',] # noqa: E501
|
|
586
|
+
all_params.append('async_')
|
|
587
|
+
all_params.append('_return_http_data_only')
|
|
588
|
+
all_params.append('_preload_content')
|
|
589
|
+
all_params.append('_request_timeout')
|
|
590
|
+
all_params.append('_request_out')
|
|
591
|
+
|
|
592
|
+
params = locals()
|
|
593
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
594
|
+
if key not in all_params:
|
|
595
|
+
raise TypeError(
|
|
596
|
+
"Got an unexpected keyword argument '%s'"
|
|
597
|
+
" to method modify_task_protocol" % key
|
|
598
|
+
)
|
|
599
|
+
params[key] = val
|
|
600
|
+
del params['kwargs']
|
|
601
|
+
# verify the required parameter 'protocol_id' is set
|
|
602
|
+
if ('protocol_id' not in params or
|
|
603
|
+
params['protocol_id'] is None):
|
|
604
|
+
raise ValueError("Missing the required parameter `protocol_id` when calling `modify_task_protocol`") # noqa: E501
|
|
605
|
+
# verify the required parameter 'body' is set
|
|
606
|
+
if ('body' not in params or
|
|
607
|
+
params['body'] is None):
|
|
608
|
+
raise ValueError("Missing the required parameter `body` when calling `modify_task_protocol`") # noqa: E501
|
|
609
|
+
check_filename_params(params)
|
|
610
|
+
|
|
611
|
+
collection_formats = {}
|
|
612
|
+
|
|
613
|
+
path_params = {}
|
|
614
|
+
if 'protocol_id' in params:
|
|
615
|
+
path_params['protocol_id'] = params['protocol_id'] # noqa: E501
|
|
616
|
+
|
|
617
|
+
query_params = []
|
|
618
|
+
|
|
619
|
+
header_params = {}
|
|
620
|
+
|
|
621
|
+
form_params = []
|
|
622
|
+
local_var_files = {}
|
|
623
|
+
|
|
624
|
+
body_params = None
|
|
625
|
+
if 'body' in params:
|
|
626
|
+
if 'ProtocolModify'.startswith('union'):
|
|
627
|
+
body_type = type(params['body'])
|
|
628
|
+
if getattr(body_type, 'positional_to_model', None):
|
|
629
|
+
body_params = body_type.positional_to_model(params['body'])
|
|
630
|
+
else:
|
|
631
|
+
body_params = params['body']
|
|
632
|
+
else:
|
|
633
|
+
body_params = flywheel.models.ProtocolModify.positional_to_model(params['body'])
|
|
634
|
+
# HTTP header `Accept`
|
|
635
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
636
|
+
['application/json']) # noqa: E501
|
|
637
|
+
|
|
638
|
+
# HTTP header `Content-Type`
|
|
639
|
+
header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
|
|
640
|
+
['application/json']) # noqa: E501
|
|
641
|
+
|
|
642
|
+
# Authentication setting
|
|
643
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
644
|
+
|
|
645
|
+
return self.api_client.call_api(
|
|
646
|
+
'/protocols/{protocol_id}', 'PUT',
|
|
647
|
+
path_params,
|
|
648
|
+
query_params,
|
|
649
|
+
header_params,
|
|
650
|
+
body=body_params,
|
|
651
|
+
post_params=form_params,
|
|
652
|
+
files=local_var_files,
|
|
653
|
+
response_type='Protocol', # noqa: E501
|
|
654
|
+
auth_settings=auth_settings,
|
|
655
|
+
async_=params.get('async_'),
|
|
656
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
657
|
+
_preload_content=params.get('_preload_content', True),
|
|
658
|
+
_request_timeout=params.get('_request_timeout'),
|
|
659
|
+
_request_out=params.get('_request_out'),
|
|
660
|
+
collection_formats=collection_formats)
|
|
661
|
+
|
|
662
|
+
def publish_task_protocol(self, protocol_id, **kwargs): # noqa: E501
|
|
663
|
+
"""Publish
|
|
664
|
+
|
|
665
|
+
Publish a protocol.
|
|
666
|
+
This method makes a synchronous HTTP request by default.
|
|
667
|
+
|
|
668
|
+
:param str protocol_id: (required)
|
|
669
|
+
:param bool async_: Perform the request asynchronously
|
|
670
|
+
:return: Protocol
|
|
671
|
+
"""
|
|
672
|
+
ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
|
|
673
|
+
kwargs['_return_http_data_only'] = True
|
|
674
|
+
|
|
675
|
+
if kwargs.get('async_'):
|
|
676
|
+
return self.publish_task_protocol_with_http_info(protocol_id, **kwargs) # noqa: E501
|
|
677
|
+
else:
|
|
678
|
+
(data) = self.publish_task_protocol_with_http_info(protocol_id, **kwargs) # noqa: E501
|
|
679
|
+
if (
|
|
680
|
+
data
|
|
681
|
+
and hasattr(data, 'return_value')
|
|
682
|
+
and not ignore_simplified_return_value
|
|
683
|
+
):
|
|
684
|
+
return data.return_value()
|
|
685
|
+
return data
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
def publish_task_protocol_with_http_info(self, protocol_id, **kwargs): # noqa: E501
|
|
689
|
+
"""Publish
|
|
690
|
+
|
|
691
|
+
Publish a protocol.
|
|
692
|
+
This method makes a synchronous HTTP request by default.
|
|
693
|
+
|
|
694
|
+
:param str protocol_id: (required)
|
|
695
|
+
:param bool async_: Perform the request asynchronously
|
|
696
|
+
:return: Protocol
|
|
697
|
+
"""
|
|
698
|
+
|
|
699
|
+
all_params = ['protocol_id',] # noqa: E501
|
|
700
|
+
all_params.append('async_')
|
|
701
|
+
all_params.append('_return_http_data_only')
|
|
702
|
+
all_params.append('_preload_content')
|
|
703
|
+
all_params.append('_request_timeout')
|
|
704
|
+
all_params.append('_request_out')
|
|
705
|
+
|
|
706
|
+
params = locals()
|
|
707
|
+
for key, val in six.iteritems(params['kwargs']):
|
|
708
|
+
if key not in all_params:
|
|
709
|
+
raise TypeError(
|
|
710
|
+
"Got an unexpected keyword argument '%s'"
|
|
711
|
+
" to method publish_task_protocol" % key
|
|
712
|
+
)
|
|
713
|
+
params[key] = val
|
|
714
|
+
del params['kwargs']
|
|
715
|
+
# verify the required parameter 'protocol_id' is set
|
|
716
|
+
if ('protocol_id' not in params or
|
|
717
|
+
params['protocol_id'] is None):
|
|
718
|
+
raise ValueError("Missing the required parameter `protocol_id` when calling `publish_task_protocol`") # noqa: E501
|
|
719
|
+
check_filename_params(params)
|
|
720
|
+
|
|
721
|
+
collection_formats = {}
|
|
722
|
+
|
|
723
|
+
path_params = {}
|
|
724
|
+
if 'protocol_id' in params:
|
|
725
|
+
path_params['protocol_id'] = params['protocol_id'] # noqa: E501
|
|
726
|
+
|
|
727
|
+
query_params = []
|
|
728
|
+
|
|
729
|
+
header_params = {}
|
|
730
|
+
|
|
731
|
+
form_params = []
|
|
732
|
+
local_var_files = {}
|
|
733
|
+
|
|
734
|
+
body_params = None
|
|
735
|
+
# HTTP header `Accept`
|
|
736
|
+
header_params['Accept'] = self.api_client.select_header_accept(
|
|
737
|
+
['application/json']) # noqa: E501
|
|
738
|
+
|
|
739
|
+
# Authentication setting
|
|
740
|
+
auth_settings = ['ApiKey'] # noqa: E501
|
|
741
|
+
|
|
742
|
+
return self.api_client.call_api(
|
|
743
|
+
'/protocols/{protocol_id}/publish', 'PUT',
|
|
744
|
+
path_params,
|
|
745
|
+
query_params,
|
|
746
|
+
header_params,
|
|
747
|
+
body=body_params,
|
|
748
|
+
post_params=form_params,
|
|
749
|
+
files=local_var_files,
|
|
750
|
+
response_type='Protocol', # noqa: E501
|
|
751
|
+
auth_settings=auth_settings,
|
|
752
|
+
async_=params.get('async_'),
|
|
753
|
+
_return_http_data_only=params.get('_return_http_data_only'),
|
|
754
|
+
_preload_content=params.get('_preload_content', True),
|
|
755
|
+
_request_timeout=params.get('_request_timeout'),
|
|
756
|
+
_request_out=params.get('_request_out'),
|
|
757
|
+
collection_formats=collection_formats)
|