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,322 @@
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
+ from flywheel.models.origin import Origin # noqa: F401,E501
22
+
23
+ class StaffingPool(object):
24
+
25
+ swagger_types = {
26
+ 'id': 'str',
27
+ 'users': 'list[str]',
28
+ 'created': 'datetime',
29
+ 'description': 'str',
30
+ 'modified': 'datetime',
31
+ 'label': 'str',
32
+ 'origin': 'Origin'
33
+ }
34
+
35
+ attribute_map = {
36
+ 'id': '_id',
37
+ 'users': 'users',
38
+ 'created': 'created',
39
+ 'description': 'description',
40
+ 'modified': 'modified',
41
+ 'label': 'label',
42
+ 'origin': 'origin'
43
+ }
44
+
45
+ rattribute_map = {
46
+ '_id': 'id',
47
+ 'users': 'users',
48
+ 'created': 'created',
49
+ 'description': 'description',
50
+ 'modified': 'modified',
51
+ 'label': 'label',
52
+ 'origin': 'origin'
53
+ }
54
+
55
+ def __init__(self, id=None, users=None, created=None, description=None, modified=None, label=None, origin=None): # noqa: E501
56
+ """StaffingPool - a model defined in Swagger"""
57
+ super(StaffingPool, self).__init__()
58
+
59
+ self._id = None
60
+ self._users = None
61
+ self._created = None
62
+ self._description = None
63
+ self._modified = None
64
+ self._label = None
65
+ self._origin = None
66
+ self.discriminator = None
67
+ self.alt_discriminator = None
68
+
69
+ self.id = id
70
+ self.users = users
71
+ if created is not None:
72
+ self.created = created
73
+ self.description = description
74
+ if modified is not None:
75
+ self.modified = modified
76
+ self.label = label
77
+ self.origin = origin
78
+
79
+ @property
80
+ def id(self):
81
+ """Gets the id of this StaffingPool.
82
+
83
+
84
+ :return: The id of this StaffingPool.
85
+ :rtype: str
86
+ """
87
+ return self._id
88
+
89
+ @id.setter
90
+ def id(self, id):
91
+ """Sets the id of this StaffingPool.
92
+
93
+
94
+ :param id: The id of this StaffingPool. # noqa: E501
95
+ :type: str
96
+ """
97
+
98
+ self._id = id
99
+
100
+ @property
101
+ def users(self):
102
+ """Gets the users of this StaffingPool.
103
+
104
+
105
+ :return: The users of this StaffingPool.
106
+ :rtype: list[str]
107
+ """
108
+ return self._users
109
+
110
+ @users.setter
111
+ def users(self, users):
112
+ """Sets the users of this StaffingPool.
113
+
114
+
115
+ :param users: The users of this StaffingPool. # noqa: E501
116
+ :type: list[str]
117
+ """
118
+
119
+ self._users = users
120
+
121
+ @property
122
+ def created(self):
123
+ """Gets the created of this StaffingPool.
124
+
125
+
126
+ :return: The created of this StaffingPool.
127
+ :rtype: datetime
128
+ """
129
+ return self._created
130
+
131
+ @created.setter
132
+ def created(self, created):
133
+ """Sets the created of this StaffingPool.
134
+
135
+
136
+ :param created: The created of this StaffingPool. # noqa: E501
137
+ :type: datetime
138
+ """
139
+
140
+ self._created = created
141
+
142
+ @property
143
+ def description(self):
144
+ """Gets the description of this StaffingPool.
145
+
146
+
147
+ :return: The description of this StaffingPool.
148
+ :rtype: str
149
+ """
150
+ return self._description
151
+
152
+ @description.setter
153
+ def description(self, description):
154
+ """Sets the description of this StaffingPool.
155
+
156
+
157
+ :param description: The description of this StaffingPool. # noqa: E501
158
+ :type: str
159
+ """
160
+
161
+ self._description = description
162
+
163
+ @property
164
+ def modified(self):
165
+ """Gets the modified of this StaffingPool.
166
+
167
+
168
+ :return: The modified of this StaffingPool.
169
+ :rtype: datetime
170
+ """
171
+ return self._modified
172
+
173
+ @modified.setter
174
+ def modified(self, modified):
175
+ """Sets the modified of this StaffingPool.
176
+
177
+
178
+ :param modified: The modified of this StaffingPool. # noqa: E501
179
+ :type: datetime
180
+ """
181
+
182
+ self._modified = modified
183
+
184
+ @property
185
+ def label(self):
186
+ """Gets the label of this StaffingPool.
187
+
188
+
189
+ :return: The label of this StaffingPool.
190
+ :rtype: str
191
+ """
192
+ return self._label
193
+
194
+ @label.setter
195
+ def label(self, label):
196
+ """Sets the label of this StaffingPool.
197
+
198
+
199
+ :param label: The label of this StaffingPool. # noqa: E501
200
+ :type: str
201
+ """
202
+
203
+ self._label = label
204
+
205
+ @property
206
+ def origin(self):
207
+ """Gets the origin of this StaffingPool.
208
+
209
+
210
+ :return: The origin of this StaffingPool.
211
+ :rtype: Origin
212
+ """
213
+ return self._origin
214
+
215
+ @origin.setter
216
+ def origin(self, origin):
217
+ """Sets the origin of this StaffingPool.
218
+
219
+
220
+ :param origin: The origin of this StaffingPool. # noqa: E501
221
+ :type: Origin
222
+ """
223
+
224
+ self._origin = origin
225
+
226
+
227
+ @staticmethod
228
+ def positional_to_model(value):
229
+ """Converts a positional argument to a model value"""
230
+ return value
231
+
232
+ def return_value(self):
233
+ """Unwraps return value from model"""
234
+ return self
235
+
236
+ def to_dict(self):
237
+ """Returns the model properties as a dict"""
238
+ result = {}
239
+
240
+ for attr, _ in six.iteritems(self.swagger_types):
241
+ value = getattr(self, attr)
242
+ if isinstance(value, list):
243
+ result[attr] = list(map(
244
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
245
+ value
246
+ ))
247
+ elif hasattr(value, "to_dict"):
248
+ result[attr] = value.to_dict()
249
+ elif isinstance(value, dict):
250
+ result[attr] = dict(map(
251
+ lambda item: (item[0], item[1].to_dict())
252
+ if hasattr(item[1], "to_dict") else item,
253
+ value.items()
254
+ ))
255
+ else:
256
+ result[attr] = value
257
+
258
+ return result
259
+
260
+ def to_str(self):
261
+ """Returns the string representation of the model"""
262
+ return pprint.pformat(self.to_dict())
263
+
264
+ def __repr__(self):
265
+ """For `print` and `pprint`"""
266
+ return self.to_str()
267
+
268
+ def __eq__(self, other):
269
+ """Returns true if both objects are equal"""
270
+ if not isinstance(other, StaffingPool):
271
+ return False
272
+
273
+ return self.__dict__ == other.__dict__
274
+
275
+ def __ne__(self, other):
276
+ """Returns true if both objects are not equal"""
277
+ return not self == other
278
+
279
+ # Container emulation
280
+ def __getitem__(self, key):
281
+ """Returns the value of key"""
282
+ key = self._map_key(key)
283
+ return getattr(self, key)
284
+
285
+ def __setitem__(self, key, value):
286
+ """Sets the value of key"""
287
+ key = self._map_key(key)
288
+ setattr(self, key, value)
289
+
290
+ def __contains__(self, key):
291
+ """Checks if the given value is a key in this object"""
292
+ key = self._map_key(key, raise_on_error=False)
293
+ return key is not None
294
+
295
+ def keys(self):
296
+ """Returns the list of json properties in the object"""
297
+ return self.__class__.rattribute_map.keys()
298
+
299
+ def values(self):
300
+ """Returns the list of values in the object"""
301
+ for key in self.__class__.attribute_map.keys():
302
+ yield getattr(self, key)
303
+
304
+ def items(self):
305
+ """Returns the list of json property to value mapping"""
306
+ for key, prop in self.__class__.rattribute_map.items():
307
+ yield key, getattr(self, prop)
308
+
309
+ def get(self, key, default=None):
310
+ """Get the value of the provided json property, or default"""
311
+ key = self._map_key(key, raise_on_error=False)
312
+ if key:
313
+ return getattr(self, key, default)
314
+ return default
315
+
316
+ def _map_key(self, key, raise_on_error=True):
317
+ result = self.__class__.rattribute_map.get(key)
318
+ if result is None:
319
+ if raise_on_error:
320
+ raise AttributeError('Invalid attribute name: {}'.format(key))
321
+ return None
322
+ return '_' + result
@@ -0,0 +1,215 @@
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 StaffingPoolCreate(object):
22
+
23
+ swagger_types = {
24
+ 'users': 'list[str]',
25
+ 'label': 'str',
26
+ 'description': 'str'
27
+ }
28
+
29
+ attribute_map = {
30
+ 'users': 'users',
31
+ 'label': 'label',
32
+ 'description': 'description'
33
+ }
34
+
35
+ rattribute_map = {
36
+ 'users': 'users',
37
+ 'label': 'label',
38
+ 'description': 'description'
39
+ }
40
+
41
+ def __init__(self, users=None, label=None, description=''): # noqa: E501
42
+ """StaffingPoolCreate - a model defined in Swagger"""
43
+ super(StaffingPoolCreate, self).__init__()
44
+
45
+ self._users = None
46
+ self._label = None
47
+ self._description = None
48
+ self.discriminator = None
49
+ self.alt_discriminator = None
50
+
51
+ self.users = users
52
+ self.label = label
53
+ if description is not None:
54
+ self.description = description
55
+
56
+ @property
57
+ def users(self):
58
+ """Gets the users of this StaffingPoolCreate.
59
+
60
+
61
+ :return: The users of this StaffingPoolCreate.
62
+ :rtype: list[str]
63
+ """
64
+ return self._users
65
+
66
+ @users.setter
67
+ def users(self, users):
68
+ """Sets the users of this StaffingPoolCreate.
69
+
70
+
71
+ :param users: The users of this StaffingPoolCreate. # noqa: E501
72
+ :type: list[str]
73
+ """
74
+
75
+ self._users = users
76
+
77
+ @property
78
+ def label(self):
79
+ """Gets the label of this StaffingPoolCreate.
80
+
81
+
82
+ :return: The label of this StaffingPoolCreate.
83
+ :rtype: str
84
+ """
85
+ return self._label
86
+
87
+ @label.setter
88
+ def label(self, label):
89
+ """Sets the label of this StaffingPoolCreate.
90
+
91
+
92
+ :param label: The label of this StaffingPoolCreate. # noqa: E501
93
+ :type: str
94
+ """
95
+
96
+ self._label = label
97
+
98
+ @property
99
+ def description(self):
100
+ """Gets the description of this StaffingPoolCreate.
101
+
102
+
103
+ :return: The description of this StaffingPoolCreate.
104
+ :rtype: str
105
+ """
106
+ return self._description
107
+
108
+ @description.setter
109
+ def description(self, description):
110
+ """Sets the description of this StaffingPoolCreate.
111
+
112
+
113
+ :param description: The description of this StaffingPoolCreate. # noqa: E501
114
+ :type: str
115
+ """
116
+
117
+ self._description = description
118
+
119
+
120
+ @staticmethod
121
+ def positional_to_model(value):
122
+ """Converts a positional argument to a model value"""
123
+ return value
124
+
125
+ def return_value(self):
126
+ """Unwraps return value from model"""
127
+ return self
128
+
129
+ def to_dict(self):
130
+ """Returns the model properties as a dict"""
131
+ result = {}
132
+
133
+ for attr, _ in six.iteritems(self.swagger_types):
134
+ value = getattr(self, attr)
135
+ if isinstance(value, list):
136
+ result[attr] = list(map(
137
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
138
+ value
139
+ ))
140
+ elif hasattr(value, "to_dict"):
141
+ result[attr] = value.to_dict()
142
+ elif isinstance(value, dict):
143
+ result[attr] = dict(map(
144
+ lambda item: (item[0], item[1].to_dict())
145
+ if hasattr(item[1], "to_dict") else item,
146
+ value.items()
147
+ ))
148
+ else:
149
+ result[attr] = value
150
+
151
+ return result
152
+
153
+ def to_str(self):
154
+ """Returns the string representation of the model"""
155
+ return pprint.pformat(self.to_dict())
156
+
157
+ def __repr__(self):
158
+ """For `print` and `pprint`"""
159
+ return self.to_str()
160
+
161
+ def __eq__(self, other):
162
+ """Returns true if both objects are equal"""
163
+ if not isinstance(other, StaffingPoolCreate):
164
+ return False
165
+
166
+ return self.__dict__ == other.__dict__
167
+
168
+ def __ne__(self, other):
169
+ """Returns true if both objects are not equal"""
170
+ return not self == other
171
+
172
+ # Container emulation
173
+ def __getitem__(self, key):
174
+ """Returns the value of key"""
175
+ key = self._map_key(key)
176
+ return getattr(self, key)
177
+
178
+ def __setitem__(self, key, value):
179
+ """Sets the value of key"""
180
+ key = self._map_key(key)
181
+ setattr(self, key, value)
182
+
183
+ def __contains__(self, key):
184
+ """Checks if the given value is a key in this object"""
185
+ key = self._map_key(key, raise_on_error=False)
186
+ return key is not None
187
+
188
+ def keys(self):
189
+ """Returns the list of json properties in the object"""
190
+ return self.__class__.rattribute_map.keys()
191
+
192
+ def values(self):
193
+ """Returns the list of values in the object"""
194
+ for key in self.__class__.attribute_map.keys():
195
+ yield getattr(self, key)
196
+
197
+ def items(self):
198
+ """Returns the list of json property to value mapping"""
199
+ for key, prop in self.__class__.rattribute_map.items():
200
+ yield key, getattr(self, prop)
201
+
202
+ def get(self, key, default=None):
203
+ """Get the value of the provided json property, or default"""
204
+ key = self._map_key(key, raise_on_error=False)
205
+ if key:
206
+ return getattr(self, key, default)
207
+ return default
208
+
209
+ def _map_key(self, key, raise_on_error=True):
210
+ result = self.__class__.rattribute_map.get(key)
211
+ if result is None:
212
+ if raise_on_error:
213
+ raise AttributeError('Invalid attribute name: {}'.format(key))
214
+ return None
215
+ return '_' + result
@@ -0,0 +1,163 @@
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 StaffingPoolList(object):
22
+
23
+ swagger_types = {
24
+ 'pools': 'list[str]'
25
+ }
26
+
27
+ attribute_map = {
28
+ 'pools': 'pools'
29
+ }
30
+
31
+ rattribute_map = {
32
+ 'pools': 'pools'
33
+ }
34
+
35
+ def __init__(self, pools=None): # noqa: E501
36
+ """StaffingPoolList - a model defined in Swagger"""
37
+ super(StaffingPoolList, self).__init__()
38
+
39
+ self._pools = None
40
+ self.discriminator = None
41
+ self.alt_discriminator = None
42
+
43
+ if pools is not None:
44
+ self.pools = pools
45
+
46
+ @property
47
+ def pools(self):
48
+ """Gets the pools of this StaffingPoolList.
49
+
50
+
51
+ :return: The pools of this StaffingPoolList.
52
+ :rtype: list[str]
53
+ """
54
+ return self._pools
55
+
56
+ @pools.setter
57
+ def pools(self, pools):
58
+ """Sets the pools of this StaffingPoolList.
59
+
60
+
61
+ :param pools: The pools of this StaffingPoolList. # noqa: E501
62
+ :type: list[str]
63
+ """
64
+
65
+ self._pools = pools
66
+
67
+
68
+ @staticmethod
69
+ def positional_to_model(value):
70
+ """Converts a positional argument to a model value"""
71
+ return value
72
+
73
+ def return_value(self):
74
+ """Unwraps return value from model"""
75
+ return self
76
+
77
+ def to_dict(self):
78
+ """Returns the model properties as a dict"""
79
+ result = {}
80
+
81
+ for attr, _ in six.iteritems(self.swagger_types):
82
+ value = getattr(self, attr)
83
+ if isinstance(value, list):
84
+ result[attr] = list(map(
85
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
86
+ value
87
+ ))
88
+ elif hasattr(value, "to_dict"):
89
+ result[attr] = value.to_dict()
90
+ elif isinstance(value, dict):
91
+ result[attr] = dict(map(
92
+ lambda item: (item[0], item[1].to_dict())
93
+ if hasattr(item[1], "to_dict") else item,
94
+ value.items()
95
+ ))
96
+ else:
97
+ result[attr] = value
98
+
99
+ return result
100
+
101
+ def to_str(self):
102
+ """Returns the string representation of the model"""
103
+ return pprint.pformat(self.to_dict())
104
+
105
+ def __repr__(self):
106
+ """For `print` and `pprint`"""
107
+ return self.to_str()
108
+
109
+ def __eq__(self, other):
110
+ """Returns true if both objects are equal"""
111
+ if not isinstance(other, StaffingPoolList):
112
+ return False
113
+
114
+ return self.__dict__ == other.__dict__
115
+
116
+ def __ne__(self, other):
117
+ """Returns true if both objects are not equal"""
118
+ return not self == other
119
+
120
+ # Container emulation
121
+ def __getitem__(self, key):
122
+ """Returns the value of key"""
123
+ key = self._map_key(key)
124
+ return getattr(self, key)
125
+
126
+ def __setitem__(self, key, value):
127
+ """Sets the value of key"""
128
+ key = self._map_key(key)
129
+ setattr(self, key, value)
130
+
131
+ def __contains__(self, key):
132
+ """Checks if the given value is a key in this object"""
133
+ key = self._map_key(key, raise_on_error=False)
134
+ return key is not None
135
+
136
+ def keys(self):
137
+ """Returns the list of json properties in the object"""
138
+ return self.__class__.rattribute_map.keys()
139
+
140
+ def values(self):
141
+ """Returns the list of values in the object"""
142
+ for key in self.__class__.attribute_map.keys():
143
+ yield getattr(self, key)
144
+
145
+ def items(self):
146
+ """Returns the list of json property to value mapping"""
147
+ for key, prop in self.__class__.rattribute_map.items():
148
+ yield key, getattr(self, prop)
149
+
150
+ def get(self, key, default=None):
151
+ """Get the value of the provided json property, or default"""
152
+ key = self._map_key(key, raise_on_error=False)
153
+ if key:
154
+ return getattr(self, key, default)
155
+ return default
156
+
157
+ def _map_key(self, key, raise_on_error=True):
158
+ result = self.__class__.rattribute_map.get(key)
159
+ if result is None:
160
+ if raise_on_error:
161
+ raise AttributeError('Invalid attribute name: {}'.format(key))
162
+ return None
163
+ return '_' + result