flywheel-sdk 21.0.0rc0__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.
Files changed (71) hide show
  1. flywheel/__init__.py +51 -3
  2. flywheel/api/__init__.py +5 -0
  3. flywheel/api/audit_trail_api.py +8 -8
  4. flywheel/api/container_tasks_api.py +137 -0
  5. flywheel/api/form_responses_api.py +579 -0
  6. flywheel/api/jobs_api.py +97 -0
  7. flywheel/api/protocols_api.py +757 -0
  8. flywheel/api/staffing_pools_api.py +677 -0
  9. flywheel/api/tasks_api.py +897 -0
  10. flywheel/api_client.py +1 -1
  11. flywheel/configuration.py +2 -2
  12. flywheel/flywheel.py +369 -3
  13. flywheel/models/__init__.py +47 -4
  14. flywheel/models/action.py +3 -0
  15. flywheel/models/assignee.py +190 -0
  16. flywheel/models/assignee_type.py +28 -0
  17. flywheel/models/batch_create_filters.py +218 -0
  18. flywheel/models/container_type.py +1 -0
  19. flywheel/models/{create_report_input.py → core_models_audit_trail_create_report_input.py} +24 -24
  20. flywheel/models/{modify_report_input.py → core_models_audit_trail_modify_report_input.py} +8 -8
  21. flywheel/models/{parent_type.py → core_models_search_parent_type.py} +1 -1
  22. flywheel/models/core_workflows_form_responses_models_form_parents.py +162 -0
  23. flywheel/models/core_workflows_form_responses_models_form_response_output.py +438 -0
  24. flywheel/models/core_workflows_reader_models_reader_task_parents.py +268 -0
  25. flywheel/models/current_user_output.py +31 -4
  26. flywheel/models/custom_field.py +404 -0
  27. flywheel/models/custom_form.py +242 -0
  28. flywheel/models/e_signature.py +241 -0
  29. flywheel/models/features.py +1 -28
  30. flywheel/models/field_type.py +35 -0
  31. flywheel/models/form_response_base.py +310 -0
  32. flywheel/models/form_response_create.py +192 -0
  33. flywheel/models/libs_workflows_models_parent_type.py +31 -0
  34. flywheel/models/libs_workflows_models_task_status.py +31 -0
  35. flywheel/models/modify_user_input.py +31 -4
  36. flywheel/models/page_generic_form_response_output.py +217 -0
  37. flywheel/models/page_generic_protocol.py +242 -0
  38. flywheel/models/page_generic_reader_task_output.py +242 -0
  39. flywheel/models/page_generic_staffing_pool.py +242 -0
  40. flywheel/models/protocol.py +511 -0
  41. flywheel/models/protocol_e_signature_config.py +190 -0
  42. flywheel/models/protocol_input.py +352 -0
  43. flywheel/models/protocol_modify.py +275 -0
  44. flywheel/models/protocol_status.py +29 -0
  45. flywheel/models/reader_batch_create.py +460 -0
  46. flywheel/models/reader_task.py +723 -0
  47. flywheel/models/reader_task_config.py +188 -0
  48. flywheel/models/reader_task_create.py +541 -0
  49. flywheel/models/reader_task_modify.py +274 -0
  50. flywheel/models/reader_task_output.py +750 -0
  51. flywheel/models/reader_task_parent_details.py +295 -0
  52. flywheel/models/save_search_parent.py +4 -4
  53. flywheel/models/select_item.py +189 -0
  54. flywheel/models/staffing_pool.py +322 -0
  55. flywheel/models/staffing_pool_create.py +215 -0
  56. flywheel/models/staffing_pool_list.py +163 -0
  57. flywheel/models/staffing_pool_modify.py +217 -0
  58. flywheel/models/status_transitions.py +244 -0
  59. flywheel/models/task_assign.py +192 -0
  60. flywheel/models/task_facet.py +28 -0
  61. flywheel/models/task_parent_ref.py +243 -0
  62. flywheel/models/task_parent_ref_input.py +217 -0
  63. flywheel/models/task_priority.py +30 -0
  64. flywheel/models/task_submission.py +188 -0
  65. flywheel/models/user_input.py +31 -4
  66. flywheel/models/validation_rule.py +189 -0
  67. {flywheel_sdk-21.0.0rc0.dist-info → flywheel_sdk-21.1.0.dist-info}/METADATA +1 -1
  68. {flywheel_sdk-21.0.0rc0.dist-info → flywheel_sdk-21.1.0.dist-info}/RECORD +71 -23
  69. {flywheel_sdk-21.0.0rc0.dist-info → flywheel_sdk-21.1.0.dist-info}/WHEEL +0 -0
  70. {flywheel_sdk-21.0.0rc0.dist-info → flywheel_sdk-21.1.0.dist-info}/licenses/LICENSE.txt +0 -0
  71. {flywheel_sdk-21.0.0rc0.dist-info → flywheel_sdk-21.1.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,579 @@
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 FormResponsesApi(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_task_response(self, task_id, body, **kwargs): # noqa: E501
35
+ """Create a new response for a task using its protocol's form schema
36
+
37
+ Create a new response for a task using its protocol's form schema. Responses can be saved multiple times before submission. Each response is validated against the form schema defined in the protocol.
38
+ This method makes a synchronous HTTP request by default.
39
+
40
+ :param str task_id: (required)
41
+ :param FormResponseCreate body: (required)
42
+ :param bool async_: Perform the request asynchronously
43
+ :return: CoreWorkflowsFormResponsesModelsFormResponseOutput
44
+ """
45
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
46
+ kwargs['_return_http_data_only'] = True
47
+
48
+ if kwargs.get('async_'):
49
+ return self.create_task_response_with_http_info(task_id, body, **kwargs) # noqa: E501
50
+ else:
51
+ (data) = self.create_task_response_with_http_info(task_id, body, **kwargs) # noqa: E501
52
+ if (
53
+ data
54
+ and hasattr(data, 'return_value')
55
+ and not ignore_simplified_return_value
56
+ ):
57
+ return data.return_value()
58
+ return data
59
+
60
+
61
+ def create_task_response_with_http_info(self, task_id, body, **kwargs): # noqa: E501
62
+ """Create a new response for a task using its protocol's form schema
63
+
64
+ Create a new response for a task using its protocol's form schema. Responses can be saved multiple times before submission. Each response is validated against the form schema defined in the protocol.
65
+ This method makes a synchronous HTTP request by default.
66
+
67
+ :param str task_id: (required)
68
+ :param FormResponseCreate body: (required)
69
+ :param bool async_: Perform the request asynchronously
70
+ :return: CoreWorkflowsFormResponsesModelsFormResponseOutput
71
+ """
72
+
73
+ all_params = ['task_id','body',] # noqa: E501
74
+ all_params.append('async_')
75
+ all_params.append('_return_http_data_only')
76
+ all_params.append('_preload_content')
77
+ all_params.append('_request_timeout')
78
+ all_params.append('_request_out')
79
+
80
+ params = locals()
81
+ for key, val in six.iteritems(params['kwargs']):
82
+ if key not in all_params:
83
+ raise TypeError(
84
+ "Got an unexpected keyword argument '%s'"
85
+ " to method create_task_response" % key
86
+ )
87
+ params[key] = val
88
+ del params['kwargs']
89
+ # verify the required parameter 'task_id' is set
90
+ if ('task_id' not in params or
91
+ params['task_id'] is None):
92
+ raise ValueError("Missing the required parameter `task_id` when calling `create_task_response`") # noqa: E501
93
+ # verify the required parameter 'body' is set
94
+ if ('body' not in params or
95
+ params['body'] is None):
96
+ raise ValueError("Missing the required parameter `body` when calling `create_task_response`") # noqa: E501
97
+ check_filename_params(params)
98
+
99
+ collection_formats = {}
100
+
101
+ path_params = {}
102
+ if 'task_id' in params:
103
+ path_params['task_id'] = params['task_id'] # noqa: E501
104
+
105
+ query_params = []
106
+
107
+ header_params = {}
108
+
109
+ form_params = []
110
+ local_var_files = {}
111
+
112
+ body_params = None
113
+ if 'body' in params:
114
+ if 'FormResponseCreate'.startswith('union'):
115
+ body_type = type(params['body'])
116
+ if getattr(body_type, 'positional_to_model', None):
117
+ body_params = body_type.positional_to_model(params['body'])
118
+ else:
119
+ body_params = params['body']
120
+ else:
121
+ body_params = flywheel.models.FormResponseCreate.positional_to_model(params['body'])
122
+ # HTTP header `Accept`
123
+ header_params['Accept'] = self.api_client.select_header_accept(
124
+ ['application/json']) # noqa: E501
125
+
126
+ # HTTP header `Content-Type`
127
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
128
+ ['application/json']) # noqa: E501
129
+
130
+ # Authentication setting
131
+ auth_settings = ['ApiKey'] # noqa: E501
132
+
133
+ return self.api_client.call_api(
134
+ '/tasks/{task_id}/responses', 'POST',
135
+ path_params,
136
+ query_params,
137
+ header_params,
138
+ body=body_params,
139
+ post_params=form_params,
140
+ files=local_var_files,
141
+ response_type='CoreWorkflowsFormResponsesModelsFormResponseOutput', # noqa: E501
142
+ auth_settings=auth_settings,
143
+ async_=params.get('async_'),
144
+ _return_http_data_only=params.get('_return_http_data_only'),
145
+ _preload_content=params.get('_preload_content', True),
146
+ _request_timeout=params.get('_request_timeout'),
147
+ _request_out=params.get('_request_out'),
148
+ collection_formats=collection_formats)
149
+
150
+ def get_response(self, response_id, **kwargs): # noqa: E501
151
+ """Retrieve a specific response
152
+
153
+ Retrieve a specific response.
154
+ This method makes a synchronous HTTP request by default.
155
+
156
+ :param str response_id: (required)
157
+ :param bool async_: Perform the request asynchronously
158
+ :return: CoreWorkflowsFormResponsesModelsFormResponseOutput
159
+ """
160
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
161
+ kwargs['_return_http_data_only'] = True
162
+
163
+ if kwargs.get('async_'):
164
+ return self.get_response_with_http_info(response_id, **kwargs) # noqa: E501
165
+ else:
166
+ (data) = self.get_response_with_http_info(response_id, **kwargs) # noqa: E501
167
+ if (
168
+ data
169
+ and hasattr(data, 'return_value')
170
+ and not ignore_simplified_return_value
171
+ ):
172
+ return data.return_value()
173
+ return data
174
+
175
+
176
+ def get_response_with_http_info(self, response_id, **kwargs): # noqa: E501
177
+ """Retrieve a specific response
178
+
179
+ Retrieve a specific response.
180
+ This method makes a synchronous HTTP request by default.
181
+
182
+ :param str response_id: (required)
183
+ :param bool async_: Perform the request asynchronously
184
+ :return: CoreWorkflowsFormResponsesModelsFormResponseOutput
185
+ """
186
+
187
+ all_params = ['response_id',] # noqa: E501
188
+ all_params.append('async_')
189
+ all_params.append('_return_http_data_only')
190
+ all_params.append('_preload_content')
191
+ all_params.append('_request_timeout')
192
+ all_params.append('_request_out')
193
+
194
+ params = locals()
195
+ for key, val in six.iteritems(params['kwargs']):
196
+ if key not in all_params:
197
+ raise TypeError(
198
+ "Got an unexpected keyword argument '%s'"
199
+ " to method get_response" % key
200
+ )
201
+ params[key] = val
202
+ del params['kwargs']
203
+ # verify the required parameter 'response_id' is set
204
+ if ('response_id' not in params or
205
+ params['response_id'] is None):
206
+ raise ValueError("Missing the required parameter `response_id` when calling `get_response`") # noqa: E501
207
+ check_filename_params(params)
208
+
209
+ collection_formats = {}
210
+
211
+ path_params = {}
212
+ if 'response_id' in params:
213
+ path_params['response_id'] = params['response_id'] # noqa: E501
214
+
215
+ query_params = []
216
+
217
+ header_params = {}
218
+
219
+ form_params = []
220
+ local_var_files = {}
221
+
222
+ body_params = None
223
+ # HTTP header `Accept`
224
+ header_params['Accept'] = self.api_client.select_header_accept(
225
+ ['application/json']) # noqa: E501
226
+
227
+ # Authentication setting
228
+ auth_settings = ['ApiKey'] # noqa: E501
229
+
230
+ return self.api_client.call_api(
231
+ '/responses/{response_id}', 'GET',
232
+ path_params,
233
+ query_params,
234
+ header_params,
235
+ body=body_params,
236
+ post_params=form_params,
237
+ files=local_var_files,
238
+ response_type='CoreWorkflowsFormResponsesModelsFormResponseOutput', # noqa: E501
239
+ auth_settings=auth_settings,
240
+ async_=params.get('async_'),
241
+ _return_http_data_only=params.get('_return_http_data_only'),
242
+ _preload_content=params.get('_preload_content', True),
243
+ _request_timeout=params.get('_request_timeout'),
244
+ _request_out=params.get('_request_out'),
245
+ collection_formats=collection_formats)
246
+
247
+ def list_task_responses(self, task_id, **kwargs): # noqa: E501
248
+ """List all responses for a given task
249
+
250
+ List all responses for a given task.
251
+ This method makes a synchronous HTTP request by default.
252
+
253
+ :param str task_id: (required)
254
+ :param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
255
+ :param str sort: The sort fields and order. (e.g. label:asc,created:desc)
256
+ :param int limit: The maximum number of entries to return.
257
+ :param int skip: The number of entries to skip.
258
+ :param int page: The page number (i.e. skip limit*page entries)
259
+ :param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
260
+ :param bool async_: Perform the request asynchronously
261
+ :return: PageGenericFormResponseOutput
262
+ """
263
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
264
+ kwargs['_return_http_data_only'] = True
265
+
266
+ if kwargs.get('async_'):
267
+ return self.list_task_responses_with_http_info(task_id, **kwargs) # noqa: E501
268
+ else:
269
+ (data) = self.list_task_responses_with_http_info(task_id, **kwargs) # noqa: E501
270
+ if (
271
+ data
272
+ and hasattr(data, 'return_value')
273
+ and not ignore_simplified_return_value
274
+ ):
275
+ return data.return_value()
276
+ return data
277
+
278
+
279
+ def list_task_responses_with_http_info(self, task_id, **kwargs): # noqa: E501
280
+ """List all responses for a given task
281
+
282
+ List all responses for a given task.
283
+ This method makes a synchronous HTTP request by default.
284
+
285
+ :param str task_id: (required)
286
+ :param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
287
+ :param str sort: The sort fields and order. (e.g. label:asc,created:desc)
288
+ :param int limit: The maximum number of entries to return.
289
+ :param int skip: The number of entries to skip.
290
+ :param int page: The page number (i.e. skip limit*page entries)
291
+ :param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
292
+ :param bool async_: Perform the request asynchronously
293
+ :return: PageGenericFormResponseOutput
294
+ """
295
+
296
+ all_params = ['task_id','filter','sort','limit','skip','page','after_id',] # noqa: E501
297
+ all_params.append('async_')
298
+ all_params.append('_return_http_data_only')
299
+ all_params.append('_preload_content')
300
+ all_params.append('_request_timeout')
301
+ all_params.append('_request_out')
302
+
303
+ params = locals()
304
+ for key, val in six.iteritems(params['kwargs']):
305
+ if key not in all_params:
306
+ raise TypeError(
307
+ "Got an unexpected keyword argument '%s'"
308
+ " to method list_task_responses" % key
309
+ )
310
+ params[key] = val
311
+ del params['kwargs']
312
+ # verify the required parameter 'task_id' is set
313
+ if ('task_id' not in params or
314
+ params['task_id'] is None):
315
+ raise ValueError("Missing the required parameter `task_id` when calling `list_task_responses`") # noqa: E501
316
+ check_filename_params(params)
317
+
318
+ collection_formats = {}
319
+
320
+ path_params = {}
321
+ if 'task_id' in params:
322
+ path_params['task_id'] = params['task_id'] # noqa: E501
323
+
324
+ query_params = []
325
+ if 'filter' in params:
326
+ query_params.append(('filter', params['filter'])) # noqa: E501
327
+ if 'sort' in params:
328
+ query_params.append(('sort', params['sort'])) # noqa: E501
329
+ if 'limit' in params:
330
+ query_params.append(('limit', params['limit'])) # noqa: E501
331
+ if 'skip' in params:
332
+ query_params.append(('skip', params['skip'])) # noqa: E501
333
+ if 'page' in params:
334
+ query_params.append(('page', params['page'])) # noqa: E501
335
+ if 'after_id' in params:
336
+ query_params.append(('after_id', params['after_id'])) # noqa: E501
337
+
338
+ header_params = {}
339
+
340
+ form_params = []
341
+ local_var_files = {}
342
+
343
+ body_params = None
344
+ # HTTP header `Accept`
345
+ header_params['Accept'] = self.api_client.select_header_accept(
346
+ ['application/json']) # noqa: E501
347
+
348
+ # Authentication setting
349
+ auth_settings = ['ApiKey'] # noqa: E501
350
+
351
+ return self.api_client.call_api(
352
+ '/tasks/{task_id}/responses', 'GET',
353
+ path_params,
354
+ query_params,
355
+ header_params,
356
+ body=body_params,
357
+ post_params=form_params,
358
+ files=local_var_files,
359
+ response_type='PageGenericFormResponseOutput', # noqa: E501
360
+ auth_settings=auth_settings,
361
+ async_=params.get('async_'),
362
+ _return_http_data_only=params.get('_return_http_data_only'),
363
+ _preload_content=params.get('_preload_content', True),
364
+ _request_timeout=params.get('_request_timeout'),
365
+ _request_out=params.get('_request_out'),
366
+ collection_formats=collection_formats)
367
+
368
+ def submit_response(self, response_id, **kwargs): # noqa: E501
369
+ """Submit a response. Validate against form schema and lock it
370
+
371
+ Submit a response. Validate against form schema and lock it. Once submitted: - submitted flag is set to true - submitted_at timestamp is recorded - origin is set to the submitting user - further edits are disabled
372
+ This method makes a synchronous HTTP request by default.
373
+
374
+ :param str response_id: (required)
375
+ :param bool async_: Perform the request asynchronously
376
+ :return: CoreWorkflowsFormResponsesModelsFormResponseOutput
377
+ """
378
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
379
+ kwargs['_return_http_data_only'] = True
380
+
381
+ if kwargs.get('async_'):
382
+ return self.submit_response_with_http_info(response_id, **kwargs) # noqa: E501
383
+ else:
384
+ (data) = self.submit_response_with_http_info(response_id, **kwargs) # noqa: E501
385
+ if (
386
+ data
387
+ and hasattr(data, 'return_value')
388
+ and not ignore_simplified_return_value
389
+ ):
390
+ return data.return_value()
391
+ return data
392
+
393
+
394
+ def submit_response_with_http_info(self, response_id, **kwargs): # noqa: E501
395
+ """Submit a response. Validate against form schema and lock it
396
+
397
+ Submit a response. Validate against form schema and lock it. Once submitted: - submitted flag is set to true - submitted_at timestamp is recorded - origin is set to the submitting user - further edits are disabled
398
+ This method makes a synchronous HTTP request by default.
399
+
400
+ :param str response_id: (required)
401
+ :param bool async_: Perform the request asynchronously
402
+ :return: CoreWorkflowsFormResponsesModelsFormResponseOutput
403
+ """
404
+
405
+ all_params = ['response_id',] # noqa: E501
406
+ all_params.append('async_')
407
+ all_params.append('_return_http_data_only')
408
+ all_params.append('_preload_content')
409
+ all_params.append('_request_timeout')
410
+ all_params.append('_request_out')
411
+
412
+ params = locals()
413
+ for key, val in six.iteritems(params['kwargs']):
414
+ if key not in all_params:
415
+ raise TypeError(
416
+ "Got an unexpected keyword argument '%s'"
417
+ " to method submit_response" % key
418
+ )
419
+ params[key] = val
420
+ del params['kwargs']
421
+ # verify the required parameter 'response_id' is set
422
+ if ('response_id' not in params or
423
+ params['response_id'] is None):
424
+ raise ValueError("Missing the required parameter `response_id` when calling `submit_response`") # noqa: E501
425
+ check_filename_params(params)
426
+
427
+ collection_formats = {}
428
+
429
+ path_params = {}
430
+ if 'response_id' in params:
431
+ path_params['response_id'] = params['response_id'] # noqa: E501
432
+
433
+ query_params = []
434
+
435
+ header_params = {}
436
+
437
+ form_params = []
438
+ local_var_files = {}
439
+
440
+ body_params = None
441
+ # HTTP header `Accept`
442
+ header_params['Accept'] = self.api_client.select_header_accept(
443
+ ['application/json']) # noqa: E501
444
+
445
+ # Authentication setting
446
+ auth_settings = ['ApiKey'] # noqa: E501
447
+
448
+ return self.api_client.call_api(
449
+ '/responses/{response_id}/submit', 'POST',
450
+ path_params,
451
+ query_params,
452
+ header_params,
453
+ body=body_params,
454
+ post_params=form_params,
455
+ files=local_var_files,
456
+ response_type='CoreWorkflowsFormResponsesModelsFormResponseOutput', # noqa: E501
457
+ auth_settings=auth_settings,
458
+ async_=params.get('async_'),
459
+ _return_http_data_only=params.get('_return_http_data_only'),
460
+ _preload_content=params.get('_preload_content', True),
461
+ _request_timeout=params.get('_request_timeout'),
462
+ _request_out=params.get('_request_out'),
463
+ collection_formats=collection_formats)
464
+
465
+ def update_response(self, response_id, body, **kwargs): # noqa: E501
466
+ """Update a response only if not submitted
467
+
468
+ Update a response only if not submitted. Responses can be saved multiple times before submission. Once submitted, further edits are disabled.
469
+ This method makes a synchronous HTTP request by default.
470
+
471
+ :param str response_id: (required)
472
+ :param FormResponseBase body: (required)
473
+ :param bool async_: Perform the request asynchronously
474
+ :return: CoreWorkflowsFormResponsesModelsFormResponseOutput
475
+ """
476
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
477
+ kwargs['_return_http_data_only'] = True
478
+
479
+ if kwargs.get('async_'):
480
+ return self.update_response_with_http_info(response_id, body, **kwargs) # noqa: E501
481
+ else:
482
+ (data) = self.update_response_with_http_info(response_id, body, **kwargs) # noqa: E501
483
+ if (
484
+ data
485
+ and hasattr(data, 'return_value')
486
+ and not ignore_simplified_return_value
487
+ ):
488
+ return data.return_value()
489
+ return data
490
+
491
+
492
+ def update_response_with_http_info(self, response_id, body, **kwargs): # noqa: E501
493
+ """Update a response only if not submitted
494
+
495
+ Update a response only if not submitted. Responses can be saved multiple times before submission. Once submitted, further edits are disabled.
496
+ This method makes a synchronous HTTP request by default.
497
+
498
+ :param str response_id: (required)
499
+ :param FormResponseBase body: (required)
500
+ :param bool async_: Perform the request asynchronously
501
+ :return: CoreWorkflowsFormResponsesModelsFormResponseOutput
502
+ """
503
+
504
+ all_params = ['response_id','body',] # noqa: E501
505
+ all_params.append('async_')
506
+ all_params.append('_return_http_data_only')
507
+ all_params.append('_preload_content')
508
+ all_params.append('_request_timeout')
509
+ all_params.append('_request_out')
510
+
511
+ params = locals()
512
+ for key, val in six.iteritems(params['kwargs']):
513
+ if key not in all_params:
514
+ raise TypeError(
515
+ "Got an unexpected keyword argument '%s'"
516
+ " to method update_response" % key
517
+ )
518
+ params[key] = val
519
+ del params['kwargs']
520
+ # verify the required parameter 'response_id' is set
521
+ if ('response_id' not in params or
522
+ params['response_id'] is None):
523
+ raise ValueError("Missing the required parameter `response_id` when calling `update_response`") # noqa: E501
524
+ # verify the required parameter 'body' is set
525
+ if ('body' not in params or
526
+ params['body'] is None):
527
+ raise ValueError("Missing the required parameter `body` when calling `update_response`") # noqa: E501
528
+ check_filename_params(params)
529
+
530
+ collection_formats = {}
531
+
532
+ path_params = {}
533
+ if 'response_id' in params:
534
+ path_params['response_id'] = params['response_id'] # noqa: E501
535
+
536
+ query_params = []
537
+
538
+ header_params = {}
539
+
540
+ form_params = []
541
+ local_var_files = {}
542
+
543
+ body_params = None
544
+ if 'body' in params:
545
+ if 'FormResponseBase'.startswith('union'):
546
+ body_type = type(params['body'])
547
+ if getattr(body_type, 'positional_to_model', None):
548
+ body_params = body_type.positional_to_model(params['body'])
549
+ else:
550
+ body_params = params['body']
551
+ else:
552
+ body_params = flywheel.models.FormResponseBase.positional_to_model(params['body'])
553
+ # HTTP header `Accept`
554
+ header_params['Accept'] = self.api_client.select_header_accept(
555
+ ['application/json']) # noqa: E501
556
+
557
+ # HTTP header `Content-Type`
558
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
559
+ ['application/json']) # noqa: E501
560
+
561
+ # Authentication setting
562
+ auth_settings = ['ApiKey'] # noqa: E501
563
+
564
+ return self.api_client.call_api(
565
+ '/responses/{response_id}', 'PATCH',
566
+ path_params,
567
+ query_params,
568
+ header_params,
569
+ body=body_params,
570
+ post_params=form_params,
571
+ files=local_var_files,
572
+ response_type='CoreWorkflowsFormResponsesModelsFormResponseOutput', # noqa: E501
573
+ auth_settings=auth_settings,
574
+ async_=params.get('async_'),
575
+ _return_http_data_only=params.get('_return_http_data_only'),
576
+ _preload_content=params.get('_preload_content', True),
577
+ _request_timeout=params.get('_request_timeout'),
578
+ _request_out=params.get('_request_out'),
579
+ collection_formats=collection_formats)
flywheel/api/jobs_api.py CHANGED
@@ -1597,6 +1597,103 @@ class JobsApi(object):
1597
1597
  _request_out=params.get('_request_out'),
1598
1598
  collection_formats=collection_formats)
1599
1599
 
1600
+ def heartbeat_job(self, job_id, **kwargs): # noqa: E501
1601
+ """Heartbeat a running job to update its modified timestamp.
1602
+
1603
+ Updates the modified timestamp for a running job without changing its state. Used by engines to keep jobs alive.
1604
+ This method makes a synchronous HTTP request by default.
1605
+
1606
+ :param str job_id: (required)
1607
+ :param bool async_: Perform the request asynchronously
1608
+ :return: ModifiedResult
1609
+ """
1610
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1611
+ kwargs['_return_http_data_only'] = True
1612
+
1613
+ if kwargs.get('async_'):
1614
+ return self.heartbeat_job_with_http_info(job_id, **kwargs) # noqa: E501
1615
+ else:
1616
+ (data) = self.heartbeat_job_with_http_info(job_id, **kwargs) # noqa: E501
1617
+ if (
1618
+ data
1619
+ and hasattr(data, 'return_value')
1620
+ and not ignore_simplified_return_value
1621
+ ):
1622
+ return data.return_value()
1623
+ return data
1624
+
1625
+
1626
+ def heartbeat_job_with_http_info(self, job_id, **kwargs): # noqa: E501
1627
+ """Heartbeat a running job to update its modified timestamp.
1628
+
1629
+ Updates the modified timestamp for a running job without changing its state. Used by engines to keep jobs alive.
1630
+ This method makes a synchronous HTTP request by default.
1631
+
1632
+ :param str job_id: (required)
1633
+ :param bool async_: Perform the request asynchronously
1634
+ :return: ModifiedResult
1635
+ """
1636
+
1637
+ all_params = ['job_id',] # noqa: E501
1638
+ all_params.append('async_')
1639
+ all_params.append('_return_http_data_only')
1640
+ all_params.append('_preload_content')
1641
+ all_params.append('_request_timeout')
1642
+ all_params.append('_request_out')
1643
+
1644
+ params = locals()
1645
+ for key, val in six.iteritems(params['kwargs']):
1646
+ if key not in all_params:
1647
+ raise TypeError(
1648
+ "Got an unexpected keyword argument '%s'"
1649
+ " to method heartbeat_job" % key
1650
+ )
1651
+ params[key] = val
1652
+ del params['kwargs']
1653
+ # verify the required parameter 'job_id' is set
1654
+ if ('job_id' not in params or
1655
+ params['job_id'] is None):
1656
+ raise ValueError("Missing the required parameter `job_id` when calling `heartbeat_job`") # noqa: E501
1657
+ check_filename_params(params)
1658
+
1659
+ collection_formats = {}
1660
+
1661
+ path_params = {}
1662
+ if 'job_id' in params:
1663
+ path_params['job_id'] = params['job_id'] # noqa: E501
1664
+
1665
+ query_params = []
1666
+
1667
+ header_params = {}
1668
+
1669
+ form_params = []
1670
+ local_var_files = {}
1671
+
1672
+ body_params = None
1673
+ # HTTP header `Accept`
1674
+ header_params['Accept'] = self.api_client.select_header_accept(
1675
+ ['application/json']) # noqa: E501
1676
+
1677
+ # Authentication setting
1678
+ auth_settings = ['ApiKey'] # noqa: E501
1679
+
1680
+ return self.api_client.call_api(
1681
+ '/jobs/{job_id}/heartbeat', 'PUT',
1682
+ path_params,
1683
+ query_params,
1684
+ header_params,
1685
+ body=body_params,
1686
+ post_params=form_params,
1687
+ files=local_var_files,
1688
+ response_type='ModifiedResult', # noqa: E501
1689
+ auth_settings=auth_settings,
1690
+ async_=params.get('async_'),
1691
+ _return_http_data_only=params.get('_return_http_data_only'),
1692
+ _preload_content=params.get('_preload_content', True),
1693
+ _request_timeout=params.get('_request_timeout'),
1694
+ _request_out=params.get('_request_out'),
1695
+ collection_formats=collection_formats)
1696
+
1600
1697
  def modify_job(self, job_id, body, **kwargs): # noqa: E501
1601
1698
  """Update a job.
1602
1699