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.
- 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.0rc0.dist-info → flywheel_sdk-21.1.0.dist-info}/METADATA +1 -1
- {flywheel_sdk-21.0.0rc0.dist-info → flywheel_sdk-21.1.0.dist-info}/RECORD +71 -23
- {flywheel_sdk-21.0.0rc0.dist-info → flywheel_sdk-21.1.0.dist-info}/WHEEL +0 -0
- {flywheel_sdk-21.0.0rc0.dist-info → flywheel_sdk-21.1.0.dist-info}/licenses/LICENSE.txt +0 -0
- {flywheel_sdk-21.0.0rc0.dist-info → flywheel_sdk-21.1.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,241 @@
|
|
|
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
|
+
## NOTE: This file is auto generated by the swagger code generator program.
|
|
15
|
+
## Do not edit the file manually.
|
|
16
|
+
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import six
|
|
20
|
+
|
|
21
|
+
class ESignature(object):
|
|
22
|
+
|
|
23
|
+
swagger_types = {
|
|
24
|
+
'user_id': 'str',
|
|
25
|
+
'timestamp': 'datetime',
|
|
26
|
+
'reason': 'str',
|
|
27
|
+
'mfa_verified': 'bool'
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
attribute_map = {
|
|
31
|
+
'user_id': 'user_id',
|
|
32
|
+
'timestamp': 'timestamp',
|
|
33
|
+
'reason': 'reason',
|
|
34
|
+
'mfa_verified': 'mfa_verified'
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
rattribute_map = {
|
|
38
|
+
'user_id': 'user_id',
|
|
39
|
+
'timestamp': 'timestamp',
|
|
40
|
+
'reason': 'reason',
|
|
41
|
+
'mfa_verified': 'mfa_verified'
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
def __init__(self, user_id=None, timestamp=None, reason=None, mfa_verified=True): # noqa: E501
|
|
45
|
+
"""ESignature - a model defined in Swagger"""
|
|
46
|
+
super(ESignature, self).__init__()
|
|
47
|
+
|
|
48
|
+
self._user_id = None
|
|
49
|
+
self._timestamp = None
|
|
50
|
+
self._reason = None
|
|
51
|
+
self._mfa_verified = None
|
|
52
|
+
self.discriminator = None
|
|
53
|
+
self.alt_discriminator = None
|
|
54
|
+
|
|
55
|
+
self.user_id = user_id
|
|
56
|
+
self.timestamp = timestamp
|
|
57
|
+
self.reason = reason
|
|
58
|
+
if mfa_verified is not None:
|
|
59
|
+
self.mfa_verified = mfa_verified
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def user_id(self):
|
|
63
|
+
"""Gets the user_id of this ESignature.
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
:return: The user_id of this ESignature.
|
|
67
|
+
:rtype: str
|
|
68
|
+
"""
|
|
69
|
+
return self._user_id
|
|
70
|
+
|
|
71
|
+
@user_id.setter
|
|
72
|
+
def user_id(self, user_id):
|
|
73
|
+
"""Sets the user_id of this ESignature.
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
:param user_id: The user_id of this ESignature. # noqa: E501
|
|
77
|
+
:type: str
|
|
78
|
+
"""
|
|
79
|
+
|
|
80
|
+
self._user_id = user_id
|
|
81
|
+
|
|
82
|
+
@property
|
|
83
|
+
def timestamp(self):
|
|
84
|
+
"""Gets the timestamp of this ESignature.
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
:return: The timestamp of this ESignature.
|
|
88
|
+
:rtype: datetime
|
|
89
|
+
"""
|
|
90
|
+
return self._timestamp
|
|
91
|
+
|
|
92
|
+
@timestamp.setter
|
|
93
|
+
def timestamp(self, timestamp):
|
|
94
|
+
"""Sets the timestamp of this ESignature.
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
:param timestamp: The timestamp of this ESignature. # noqa: E501
|
|
98
|
+
:type: datetime
|
|
99
|
+
"""
|
|
100
|
+
|
|
101
|
+
self._timestamp = timestamp
|
|
102
|
+
|
|
103
|
+
@property
|
|
104
|
+
def reason(self):
|
|
105
|
+
"""Gets the reason of this ESignature.
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
:return: The reason of this ESignature.
|
|
109
|
+
:rtype: str
|
|
110
|
+
"""
|
|
111
|
+
return self._reason
|
|
112
|
+
|
|
113
|
+
@reason.setter
|
|
114
|
+
def reason(self, reason):
|
|
115
|
+
"""Sets the reason of this ESignature.
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
:param reason: The reason of this ESignature. # noqa: E501
|
|
119
|
+
:type: str
|
|
120
|
+
"""
|
|
121
|
+
|
|
122
|
+
self._reason = reason
|
|
123
|
+
|
|
124
|
+
@property
|
|
125
|
+
def mfa_verified(self):
|
|
126
|
+
"""Gets the mfa_verified of this ESignature.
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
:return: The mfa_verified of this ESignature.
|
|
130
|
+
:rtype: bool
|
|
131
|
+
"""
|
|
132
|
+
return self._mfa_verified
|
|
133
|
+
|
|
134
|
+
@mfa_verified.setter
|
|
135
|
+
def mfa_verified(self, mfa_verified):
|
|
136
|
+
"""Sets the mfa_verified of this ESignature.
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
:param mfa_verified: The mfa_verified of this ESignature. # noqa: E501
|
|
140
|
+
:type: bool
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
self._mfa_verified = mfa_verified
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
@staticmethod
|
|
147
|
+
def positional_to_model(value):
|
|
148
|
+
"""Converts a positional argument to a model value"""
|
|
149
|
+
return value
|
|
150
|
+
|
|
151
|
+
def return_value(self):
|
|
152
|
+
"""Unwraps return value from model"""
|
|
153
|
+
return self
|
|
154
|
+
|
|
155
|
+
def to_dict(self):
|
|
156
|
+
"""Returns the model properties as a dict"""
|
|
157
|
+
result = {}
|
|
158
|
+
|
|
159
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
160
|
+
value = getattr(self, attr)
|
|
161
|
+
if isinstance(value, list):
|
|
162
|
+
result[attr] = list(map(
|
|
163
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
164
|
+
value
|
|
165
|
+
))
|
|
166
|
+
elif hasattr(value, "to_dict"):
|
|
167
|
+
result[attr] = value.to_dict()
|
|
168
|
+
elif isinstance(value, dict):
|
|
169
|
+
result[attr] = dict(map(
|
|
170
|
+
lambda item: (item[0], item[1].to_dict())
|
|
171
|
+
if hasattr(item[1], "to_dict") else item,
|
|
172
|
+
value.items()
|
|
173
|
+
))
|
|
174
|
+
else:
|
|
175
|
+
result[attr] = value
|
|
176
|
+
|
|
177
|
+
return result
|
|
178
|
+
|
|
179
|
+
def to_str(self):
|
|
180
|
+
"""Returns the string representation of the model"""
|
|
181
|
+
return pprint.pformat(self.to_dict())
|
|
182
|
+
|
|
183
|
+
def __repr__(self):
|
|
184
|
+
"""For `print` and `pprint`"""
|
|
185
|
+
return self.to_str()
|
|
186
|
+
|
|
187
|
+
def __eq__(self, other):
|
|
188
|
+
"""Returns true if both objects are equal"""
|
|
189
|
+
if not isinstance(other, ESignature):
|
|
190
|
+
return False
|
|
191
|
+
|
|
192
|
+
return self.__dict__ == other.__dict__
|
|
193
|
+
|
|
194
|
+
def __ne__(self, other):
|
|
195
|
+
"""Returns true if both objects are not equal"""
|
|
196
|
+
return not self == other
|
|
197
|
+
|
|
198
|
+
# Container emulation
|
|
199
|
+
def __getitem__(self, key):
|
|
200
|
+
"""Returns the value of key"""
|
|
201
|
+
key = self._map_key(key)
|
|
202
|
+
return getattr(self, key)
|
|
203
|
+
|
|
204
|
+
def __setitem__(self, key, value):
|
|
205
|
+
"""Sets the value of key"""
|
|
206
|
+
key = self._map_key(key)
|
|
207
|
+
setattr(self, key, value)
|
|
208
|
+
|
|
209
|
+
def __contains__(self, key):
|
|
210
|
+
"""Checks if the given value is a key in this object"""
|
|
211
|
+
key = self._map_key(key, raise_on_error=False)
|
|
212
|
+
return key is not None
|
|
213
|
+
|
|
214
|
+
def keys(self):
|
|
215
|
+
"""Returns the list of json properties in the object"""
|
|
216
|
+
return self.__class__.rattribute_map.keys()
|
|
217
|
+
|
|
218
|
+
def values(self):
|
|
219
|
+
"""Returns the list of values in the object"""
|
|
220
|
+
for key in self.__class__.attribute_map.keys():
|
|
221
|
+
yield getattr(self, key)
|
|
222
|
+
|
|
223
|
+
def items(self):
|
|
224
|
+
"""Returns the list of json property to value mapping"""
|
|
225
|
+
for key, prop in self.__class__.rattribute_map.items():
|
|
226
|
+
yield key, getattr(self, prop)
|
|
227
|
+
|
|
228
|
+
def get(self, key, default=None):
|
|
229
|
+
"""Get the value of the provided json property, or default"""
|
|
230
|
+
key = self._map_key(key, raise_on_error=False)
|
|
231
|
+
if key:
|
|
232
|
+
return getattr(self, key, default)
|
|
233
|
+
return default
|
|
234
|
+
|
|
235
|
+
def _map_key(self, key, raise_on_error=True):
|
|
236
|
+
result = self.__class__.rattribute_map.get(key)
|
|
237
|
+
if result is None:
|
|
238
|
+
if raise_on_error:
|
|
239
|
+
raise AttributeError('Invalid attribute name: {}'.format(key))
|
|
240
|
+
return None
|
|
241
|
+
return '_' + result
|
flywheel/models/features.py
CHANGED
|
@@ -80,7 +80,6 @@ class Features(object):
|
|
|
80
80
|
'url_access_apps': 'bool',
|
|
81
81
|
'userpilot': 'bool',
|
|
82
82
|
'validate_classification': 'bool',
|
|
83
|
-
'viewer_annotations_v3': 'bool',
|
|
84
83
|
'engine_validate_classification': 'bool',
|
|
85
84
|
'virus_scan': 'bool',
|
|
86
85
|
'legacy_dicom_uploader': 'bool',
|
|
@@ -147,7 +146,6 @@ class Features(object):
|
|
|
147
146
|
'url_access_apps': 'url_access_apps',
|
|
148
147
|
'userpilot': 'userpilot',
|
|
149
148
|
'validate_classification': 'validate_classification',
|
|
150
|
-
'viewer_annotations_v3': 'viewer_annotations_v3',
|
|
151
149
|
'engine_validate_classification': 'engine_validate_classification',
|
|
152
150
|
'virus_scan': 'virus_scan',
|
|
153
151
|
'legacy_dicom_uploader': 'legacy_dicom_uploader',
|
|
@@ -214,14 +212,13 @@ class Features(object):
|
|
|
214
212
|
'url_access_apps': 'url_access_apps',
|
|
215
213
|
'userpilot': 'userpilot',
|
|
216
214
|
'validate_classification': 'validate_classification',
|
|
217
|
-
'viewer_annotations_v3': 'viewer_annotations_v3',
|
|
218
215
|
'engine_validate_classification': 'engine_validate_classification',
|
|
219
216
|
'virus_scan': 'virus_scan',
|
|
220
217
|
'legacy_dicom_uploader': 'legacy_dicom_uploader',
|
|
221
218
|
'tasks_refactor': 'tasks_refactor'
|
|
222
219
|
}
|
|
223
220
|
|
|
224
|
-
def __init__(self, api_enabled_gear_rules=True, auth0=None, audit_trail=False, azureml_integration=False, cold_job_logs=False, collections=False, copy_by_reference=True, core_api=True, crawler=False, cvat=False, data_views_non_21_cfr=True, default_viewer_apps=True, deid_log=False, deid_profile=False, dimse=False, elastic_search_primary=False, exchange=False, case_uploader=False, exchange_admin=False, external_routing=False, gear_access=True, google_analytics=True, healthcare_api=False, job_ask=True, job_prioritization=True, job_tickets=True, jupyter_integration=False, jupyterhub_external_storage=True, ldap_sync=False, multifactor_auth=False, multipart_signed_url=True, multiproject=False, ohif_multi_subject_view=False, ohif_meteor=False, ohif_react=False, ohif_slice_order=None, ohif_v2_adhoc_indexing=True, ohif_v3=True, ohif_v3_default_app=False, ohif_v3_readonly=False, project_export=True, project_import=True, project_list_uses_stats=False, project_locking=False, reader_tasks=False, rts_sync=False, sentry_logging=None, session_templates_non_21_cfr=True, shared_projects=False, signed_url=False, study_task_status=False, tagging=False, tags_in_lists=True, task_manager_data_views=True, transform_search_fields=True, unsafe_login=False, url_access_apps=False, userpilot=None, validate_classification=True,
|
|
221
|
+
def __init__(self, api_enabled_gear_rules=True, auth0=None, audit_trail=False, azureml_integration=False, cold_job_logs=False, collections=False, copy_by_reference=True, core_api=True, crawler=False, cvat=False, data_views_non_21_cfr=True, default_viewer_apps=True, deid_log=False, deid_profile=False, dimse=False, elastic_search_primary=False, exchange=False, case_uploader=False, exchange_admin=False, external_routing=False, gear_access=True, google_analytics=True, healthcare_api=False, job_ask=True, job_prioritization=True, job_tickets=True, jupyter_integration=False, jupyterhub_external_storage=True, ldap_sync=False, multifactor_auth=False, multipart_signed_url=True, multiproject=False, ohif_multi_subject_view=False, ohif_meteor=False, ohif_react=False, ohif_slice_order=None, ohif_v2_adhoc_indexing=True, ohif_v3=True, ohif_v3_default_app=False, ohif_v3_readonly=False, project_export=True, project_import=True, project_list_uses_stats=False, project_locking=False, reader_tasks=False, rts_sync=False, sentry_logging=None, session_templates_non_21_cfr=True, shared_projects=False, signed_url=False, study_task_status=False, tagging=False, tags_in_lists=True, task_manager_data_views=True, transform_search_fields=True, unsafe_login=False, url_access_apps=False, userpilot=None, validate_classification=True, engine_validate_classification=False, virus_scan=False, legacy_dicom_uploader=False, tasks_refactor=False): # noqa: E501
|
|
225
222
|
"""Features - a model defined in Swagger"""
|
|
226
223
|
super(Features, self).__init__()
|
|
227
224
|
|
|
@@ -284,7 +281,6 @@ class Features(object):
|
|
|
284
281
|
self._url_access_apps = None
|
|
285
282
|
self._userpilot = None
|
|
286
283
|
self._validate_classification = None
|
|
287
|
-
self._viewer_annotations_v3 = None
|
|
288
284
|
self._engine_validate_classification = None
|
|
289
285
|
self._virus_scan = None
|
|
290
286
|
self._legacy_dicom_uploader = None
|
|
@@ -410,8 +406,6 @@ class Features(object):
|
|
|
410
406
|
self.userpilot = userpilot
|
|
411
407
|
if validate_classification is not None:
|
|
412
408
|
self.validate_classification = validate_classification
|
|
413
|
-
if viewer_annotations_v3 is not None:
|
|
414
|
-
self.viewer_annotations_v3 = viewer_annotations_v3
|
|
415
409
|
if engine_validate_classification is not None:
|
|
416
410
|
self.engine_validate_classification = engine_validate_classification
|
|
417
411
|
if virus_scan is not None:
|
|
@@ -1660,27 +1654,6 @@ class Features(object):
|
|
|
1660
1654
|
|
|
1661
1655
|
self._validate_classification = validate_classification
|
|
1662
1656
|
|
|
1663
|
-
@property
|
|
1664
|
-
def viewer_annotations_v3(self):
|
|
1665
|
-
"""Gets the viewer_annotations_v3 of this Features.
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
:return: The viewer_annotations_v3 of this Features.
|
|
1669
|
-
:rtype: bool
|
|
1670
|
-
"""
|
|
1671
|
-
return self._viewer_annotations_v3
|
|
1672
|
-
|
|
1673
|
-
@viewer_annotations_v3.setter
|
|
1674
|
-
def viewer_annotations_v3(self, viewer_annotations_v3):
|
|
1675
|
-
"""Sets the viewer_annotations_v3 of this Features.
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
:param viewer_annotations_v3: The viewer_annotations_v3 of this Features. # noqa: E501
|
|
1679
|
-
:type: bool
|
|
1680
|
-
"""
|
|
1681
|
-
|
|
1682
|
-
self._viewer_annotations_v3 = viewer_annotations_v3
|
|
1683
|
-
|
|
1684
1657
|
@property
|
|
1685
1658
|
def engine_validate_classification(self):
|
|
1686
1659
|
"""Gets the engine_validate_classification of this Features.
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
## NOTE: This file is auto generated by the swagger code generator program.
|
|
15
|
+
## Do not edit the file manually.
|
|
16
|
+
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import six
|
|
20
|
+
|
|
21
|
+
import enum
|
|
22
|
+
|
|
23
|
+
class FieldType(str, enum.Enum):
|
|
24
|
+
CHECKBOX = "checkbox"
|
|
25
|
+
SWITCH = "switch"
|
|
26
|
+
RADIO = "radio"
|
|
27
|
+
TEXT = "text"
|
|
28
|
+
TEXT_AREA = "text-area"
|
|
29
|
+
DATE = "date"
|
|
30
|
+
PHONE = "phone"
|
|
31
|
+
SELECT = "select"
|
|
32
|
+
PARAGRAPH = "paragraph"
|
|
33
|
+
|
|
34
|
+
def __str__(self):
|
|
35
|
+
return self.value
|
|
@@ -0,0 +1,310 @@
|
|
|
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
|
+
## NOTE: This file is auto generated by the swagger code generator program.
|
|
15
|
+
## Do not edit the file manually.
|
|
16
|
+
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import six
|
|
20
|
+
|
|
21
|
+
class FormResponseBase(object):
|
|
22
|
+
|
|
23
|
+
swagger_types = {
|
|
24
|
+
'task_id': 'str',
|
|
25
|
+
'protocol_id': 'str',
|
|
26
|
+
'data': 'object',
|
|
27
|
+
'submitted': 'bool',
|
|
28
|
+
'submitted_at': 'datetime',
|
|
29
|
+
'modified': 'datetime'
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
attribute_map = {
|
|
33
|
+
'task_id': 'task_id',
|
|
34
|
+
'protocol_id': 'protocol_id',
|
|
35
|
+
'data': 'data',
|
|
36
|
+
'submitted': 'submitted',
|
|
37
|
+
'submitted_at': 'submitted_at',
|
|
38
|
+
'modified': 'modified'
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
rattribute_map = {
|
|
42
|
+
'task_id': 'task_id',
|
|
43
|
+
'protocol_id': 'protocol_id',
|
|
44
|
+
'data': 'data',
|
|
45
|
+
'submitted': 'submitted',
|
|
46
|
+
'submitted_at': 'submitted_at',
|
|
47
|
+
'modified': 'modified'
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
def __init__(self, task_id=None, protocol_id=None, data=None, submitted=None, submitted_at=None, modified=None): # noqa: E501
|
|
51
|
+
"""FormResponseBase - a model defined in Swagger"""
|
|
52
|
+
super(FormResponseBase, self).__init__()
|
|
53
|
+
|
|
54
|
+
self._task_id = None
|
|
55
|
+
self._protocol_id = None
|
|
56
|
+
self._data = None
|
|
57
|
+
self._submitted = None
|
|
58
|
+
self._submitted_at = None
|
|
59
|
+
self._modified = None
|
|
60
|
+
self.discriminator = None
|
|
61
|
+
self.alt_discriminator = None
|
|
62
|
+
|
|
63
|
+
if task_id is not None:
|
|
64
|
+
self.task_id = task_id
|
|
65
|
+
if protocol_id is not None:
|
|
66
|
+
self.protocol_id = protocol_id
|
|
67
|
+
if data is not None:
|
|
68
|
+
self.data = data
|
|
69
|
+
if submitted is not None:
|
|
70
|
+
self.submitted = submitted
|
|
71
|
+
if submitted_at is not None:
|
|
72
|
+
self.submitted_at = submitted_at
|
|
73
|
+
if modified is not None:
|
|
74
|
+
self.modified = modified
|
|
75
|
+
|
|
76
|
+
@property
|
|
77
|
+
def task_id(self):
|
|
78
|
+
"""Gets the task_id of this FormResponseBase.
|
|
79
|
+
|
|
80
|
+
ID of the task this response is linked to
|
|
81
|
+
|
|
82
|
+
:return: The task_id of this FormResponseBase.
|
|
83
|
+
:rtype: str
|
|
84
|
+
"""
|
|
85
|
+
return self._task_id
|
|
86
|
+
|
|
87
|
+
@task_id.setter
|
|
88
|
+
def task_id(self, task_id):
|
|
89
|
+
"""Sets the task_id of this FormResponseBase.
|
|
90
|
+
|
|
91
|
+
ID of the task this response is linked to
|
|
92
|
+
|
|
93
|
+
:param task_id: The task_id of this FormResponseBase. # noqa: E501
|
|
94
|
+
:type: str
|
|
95
|
+
"""
|
|
96
|
+
|
|
97
|
+
self._task_id = task_id
|
|
98
|
+
|
|
99
|
+
@property
|
|
100
|
+
def protocol_id(self):
|
|
101
|
+
"""Gets the protocol_id of this FormResponseBase.
|
|
102
|
+
|
|
103
|
+
ID of the protocol this response is for
|
|
104
|
+
|
|
105
|
+
:return: The protocol_id of this FormResponseBase.
|
|
106
|
+
:rtype: str
|
|
107
|
+
"""
|
|
108
|
+
return self._protocol_id
|
|
109
|
+
|
|
110
|
+
@protocol_id.setter
|
|
111
|
+
def protocol_id(self, protocol_id):
|
|
112
|
+
"""Sets the protocol_id of this FormResponseBase.
|
|
113
|
+
|
|
114
|
+
ID of the protocol this response is for
|
|
115
|
+
|
|
116
|
+
:param protocol_id: The protocol_id of this FormResponseBase. # noqa: E501
|
|
117
|
+
:type: str
|
|
118
|
+
"""
|
|
119
|
+
|
|
120
|
+
self._protocol_id = protocol_id
|
|
121
|
+
|
|
122
|
+
@property
|
|
123
|
+
def data(self):
|
|
124
|
+
"""Gets the data of this FormResponseBase.
|
|
125
|
+
|
|
126
|
+
User's form input data
|
|
127
|
+
|
|
128
|
+
:return: The data of this FormResponseBase.
|
|
129
|
+
:rtype: object
|
|
130
|
+
"""
|
|
131
|
+
return self._data
|
|
132
|
+
|
|
133
|
+
@data.setter
|
|
134
|
+
def data(self, data):
|
|
135
|
+
"""Sets the data of this FormResponseBase.
|
|
136
|
+
|
|
137
|
+
User's form input data
|
|
138
|
+
|
|
139
|
+
:param data: The data of this FormResponseBase. # noqa: E501
|
|
140
|
+
:type: object
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
self._data = data
|
|
144
|
+
|
|
145
|
+
@property
|
|
146
|
+
def submitted(self):
|
|
147
|
+
"""Gets the submitted of this FormResponseBase.
|
|
148
|
+
|
|
149
|
+
Whether the response has been submitted
|
|
150
|
+
|
|
151
|
+
:return: The submitted of this FormResponseBase.
|
|
152
|
+
:rtype: bool
|
|
153
|
+
"""
|
|
154
|
+
return self._submitted
|
|
155
|
+
|
|
156
|
+
@submitted.setter
|
|
157
|
+
def submitted(self, submitted):
|
|
158
|
+
"""Sets the submitted of this FormResponseBase.
|
|
159
|
+
|
|
160
|
+
Whether the response has been submitted
|
|
161
|
+
|
|
162
|
+
:param submitted: The submitted of this FormResponseBase. # noqa: E501
|
|
163
|
+
:type: bool
|
|
164
|
+
"""
|
|
165
|
+
|
|
166
|
+
self._submitted = submitted
|
|
167
|
+
|
|
168
|
+
@property
|
|
169
|
+
def submitted_at(self):
|
|
170
|
+
"""Gets the submitted_at of this FormResponseBase.
|
|
171
|
+
|
|
172
|
+
Timestamp of submission if submitted
|
|
173
|
+
|
|
174
|
+
:return: The submitted_at of this FormResponseBase.
|
|
175
|
+
:rtype: datetime
|
|
176
|
+
"""
|
|
177
|
+
return self._submitted_at
|
|
178
|
+
|
|
179
|
+
@submitted_at.setter
|
|
180
|
+
def submitted_at(self, submitted_at):
|
|
181
|
+
"""Sets the submitted_at of this FormResponseBase.
|
|
182
|
+
|
|
183
|
+
Timestamp of submission if submitted
|
|
184
|
+
|
|
185
|
+
:param submitted_at: The submitted_at of this FormResponseBase. # noqa: E501
|
|
186
|
+
:type: datetime
|
|
187
|
+
"""
|
|
188
|
+
|
|
189
|
+
self._submitted_at = submitted_at
|
|
190
|
+
|
|
191
|
+
@property
|
|
192
|
+
def modified(self):
|
|
193
|
+
"""Gets the modified of this FormResponseBase.
|
|
194
|
+
|
|
195
|
+
Last modification timestamp
|
|
196
|
+
|
|
197
|
+
:return: The modified of this FormResponseBase.
|
|
198
|
+
:rtype: datetime
|
|
199
|
+
"""
|
|
200
|
+
return self._modified
|
|
201
|
+
|
|
202
|
+
@modified.setter
|
|
203
|
+
def modified(self, modified):
|
|
204
|
+
"""Sets the modified of this FormResponseBase.
|
|
205
|
+
|
|
206
|
+
Last modification timestamp
|
|
207
|
+
|
|
208
|
+
:param modified: The modified of this FormResponseBase. # noqa: E501
|
|
209
|
+
:type: datetime
|
|
210
|
+
"""
|
|
211
|
+
|
|
212
|
+
self._modified = modified
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
@staticmethod
|
|
216
|
+
def positional_to_model(value):
|
|
217
|
+
"""Converts a positional argument to a model value"""
|
|
218
|
+
return value
|
|
219
|
+
|
|
220
|
+
def return_value(self):
|
|
221
|
+
"""Unwraps return value from model"""
|
|
222
|
+
return self
|
|
223
|
+
|
|
224
|
+
def to_dict(self):
|
|
225
|
+
"""Returns the model properties as a dict"""
|
|
226
|
+
result = {}
|
|
227
|
+
|
|
228
|
+
for attr, _ in six.iteritems(self.swagger_types):
|
|
229
|
+
value = getattr(self, attr)
|
|
230
|
+
if isinstance(value, list):
|
|
231
|
+
result[attr] = list(map(
|
|
232
|
+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
233
|
+
value
|
|
234
|
+
))
|
|
235
|
+
elif hasattr(value, "to_dict"):
|
|
236
|
+
result[attr] = value.to_dict()
|
|
237
|
+
elif isinstance(value, dict):
|
|
238
|
+
result[attr] = dict(map(
|
|
239
|
+
lambda item: (item[0], item[1].to_dict())
|
|
240
|
+
if hasattr(item[1], "to_dict") else item,
|
|
241
|
+
value.items()
|
|
242
|
+
))
|
|
243
|
+
else:
|
|
244
|
+
result[attr] = value
|
|
245
|
+
|
|
246
|
+
return result
|
|
247
|
+
|
|
248
|
+
def to_str(self):
|
|
249
|
+
"""Returns the string representation of the model"""
|
|
250
|
+
return pprint.pformat(self.to_dict())
|
|
251
|
+
|
|
252
|
+
def __repr__(self):
|
|
253
|
+
"""For `print` and `pprint`"""
|
|
254
|
+
return self.to_str()
|
|
255
|
+
|
|
256
|
+
def __eq__(self, other):
|
|
257
|
+
"""Returns true if both objects are equal"""
|
|
258
|
+
if not isinstance(other, FormResponseBase):
|
|
259
|
+
return False
|
|
260
|
+
|
|
261
|
+
return self.__dict__ == other.__dict__
|
|
262
|
+
|
|
263
|
+
def __ne__(self, other):
|
|
264
|
+
"""Returns true if both objects are not equal"""
|
|
265
|
+
return not self == other
|
|
266
|
+
|
|
267
|
+
# Container emulation
|
|
268
|
+
def __getitem__(self, key):
|
|
269
|
+
"""Returns the value of key"""
|
|
270
|
+
key = self._map_key(key)
|
|
271
|
+
return getattr(self, key)
|
|
272
|
+
|
|
273
|
+
def __setitem__(self, key, value):
|
|
274
|
+
"""Sets the value of key"""
|
|
275
|
+
key = self._map_key(key)
|
|
276
|
+
setattr(self, key, value)
|
|
277
|
+
|
|
278
|
+
def __contains__(self, key):
|
|
279
|
+
"""Checks if the given value is a key in this object"""
|
|
280
|
+
key = self._map_key(key, raise_on_error=False)
|
|
281
|
+
return key is not None
|
|
282
|
+
|
|
283
|
+
def keys(self):
|
|
284
|
+
"""Returns the list of json properties in the object"""
|
|
285
|
+
return self.__class__.rattribute_map.keys()
|
|
286
|
+
|
|
287
|
+
def values(self):
|
|
288
|
+
"""Returns the list of values in the object"""
|
|
289
|
+
for key in self.__class__.attribute_map.keys():
|
|
290
|
+
yield getattr(self, key)
|
|
291
|
+
|
|
292
|
+
def items(self):
|
|
293
|
+
"""Returns the list of json property to value mapping"""
|
|
294
|
+
for key, prop in self.__class__.rattribute_map.items():
|
|
295
|
+
yield key, getattr(self, prop)
|
|
296
|
+
|
|
297
|
+
def get(self, key, default=None):
|
|
298
|
+
"""Get the value of the provided json property, or default"""
|
|
299
|
+
key = self._map_key(key, raise_on_error=False)
|
|
300
|
+
if key:
|
|
301
|
+
return getattr(self, key, default)
|
|
302
|
+
return default
|
|
303
|
+
|
|
304
|
+
def _map_key(self, key, raise_on_error=True):
|
|
305
|
+
result = self.__class__.rattribute_map.get(key)
|
|
306
|
+
if result is None:
|
|
307
|
+
if raise_on_error:
|
|
308
|
+
raise AttributeError('Invalid attribute name: {}'.format(key))
|
|
309
|
+
return None
|
|
310
|
+
return '_' + result
|