flywheel-sdk 21.0.0rc0__py2.py3-none-any.whl → 21.1.0rc0__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) 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/{create_report_input.py → core_models_audit_trail_create_report_input.py} +24 -24
  19. flywheel/models/{modify_report_input.py → core_models_audit_trail_modify_report_input.py} +8 -8
  20. flywheel/models/{parent_type.py → core_models_search_parent_type.py} +1 -1
  21. flywheel/models/core_workflows_form_responses_models_form_parents.py +162 -0
  22. flywheel/models/core_workflows_form_responses_models_form_response_output.py +438 -0
  23. flywheel/models/core_workflows_reader_models_reader_task_parents.py +268 -0
  24. flywheel/models/current_user_output.py +31 -4
  25. flywheel/models/custom_field.py +404 -0
  26. flywheel/models/custom_form.py +242 -0
  27. flywheel/models/e_signature.py +241 -0
  28. flywheel/models/field_type.py +35 -0
  29. flywheel/models/form_response_base.py +310 -0
  30. flywheel/models/form_response_create.py +192 -0
  31. flywheel/models/libs_workflows_models_parent_type.py +31 -0
  32. flywheel/models/libs_workflows_models_task_status.py +31 -0
  33. flywheel/models/modify_user_input.py +31 -4
  34. flywheel/models/page_generic_form_response_output.py +217 -0
  35. flywheel/models/page_generic_protocol.py +242 -0
  36. flywheel/models/page_generic_reader_task_output.py +242 -0
  37. flywheel/models/page_generic_staffing_pool.py +242 -0
  38. flywheel/models/protocol.py +511 -0
  39. flywheel/models/protocol_e_signature_config.py +190 -0
  40. flywheel/models/protocol_input.py +352 -0
  41. flywheel/models/protocol_modify.py +275 -0
  42. flywheel/models/protocol_status.py +29 -0
  43. flywheel/models/reader_batch_create.py +460 -0
  44. flywheel/models/reader_task.py +723 -0
  45. flywheel/models/reader_task_config.py +188 -0
  46. flywheel/models/reader_task_create.py +541 -0
  47. flywheel/models/reader_task_modify.py +274 -0
  48. flywheel/models/reader_task_output.py +750 -0
  49. flywheel/models/reader_task_parent_details.py +295 -0
  50. flywheel/models/save_search_parent.py +4 -4
  51. flywheel/models/select_item.py +189 -0
  52. flywheel/models/staffing_pool.py +322 -0
  53. flywheel/models/staffing_pool_create.py +215 -0
  54. flywheel/models/staffing_pool_list.py +163 -0
  55. flywheel/models/staffing_pool_modify.py +217 -0
  56. flywheel/models/status_transitions.py +244 -0
  57. flywheel/models/task_assign.py +192 -0
  58. flywheel/models/task_facet.py +28 -0
  59. flywheel/models/task_parent_ref.py +243 -0
  60. flywheel/models/task_parent_ref_input.py +217 -0
  61. flywheel/models/task_priority.py +30 -0
  62. flywheel/models/task_submission.py +188 -0
  63. flywheel/models/user_input.py +31 -4
  64. flywheel/models/validation_rule.py +189 -0
  65. {flywheel_sdk-21.0.0rc0.dist-info → flywheel_sdk-21.1.0rc0.dist-info}/METADATA +1 -1
  66. {flywheel_sdk-21.0.0rc0.dist-info → flywheel_sdk-21.1.0rc0.dist-info}/RECORD +69 -21
  67. {flywheel_sdk-21.0.0rc0.dist-info → flywheel_sdk-21.1.0rc0.dist-info}/WHEEL +0 -0
  68. {flywheel_sdk-21.0.0rc0.dist-info → flywheel_sdk-21.1.0rc0.dist-info}/licenses/LICENSE.txt +0 -0
  69. {flywheel_sdk-21.0.0rc0.dist-info → flywheel_sdk-21.1.0rc0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,243 @@
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.libs_workflows_models_parent_type import LibsWorkflowsModelsParentType # noqa: F401,E501
22
+
23
+ class TaskParentRef(object):
24
+
25
+ swagger_types = {
26
+ 'label': 'str',
27
+ 'version': 'int',
28
+ 'type': 'LibsWorkflowsModelsParentType',
29
+ 'id': 'str'
30
+ }
31
+
32
+ attribute_map = {
33
+ 'label': 'label',
34
+ 'version': 'version',
35
+ 'type': 'type',
36
+ 'id': 'id'
37
+ }
38
+
39
+ rattribute_map = {
40
+ 'label': 'label',
41
+ 'version': 'version',
42
+ 'type': 'type',
43
+ 'id': 'id'
44
+ }
45
+
46
+ def __init__(self, label=None, version=None, type=None, id=None): # noqa: E501
47
+ """TaskParentRef - a model defined in Swagger"""
48
+ super(TaskParentRef, self).__init__()
49
+
50
+ self._label = None
51
+ self._version = None
52
+ self._type = None
53
+ self._id = None
54
+ self.discriminator = None
55
+ self.alt_discriminator = None
56
+
57
+ self.label = label
58
+ if version is not None:
59
+ self.version = version
60
+ self.type = type
61
+ self.id = id
62
+
63
+ @property
64
+ def label(self):
65
+ """Gets the label of this TaskParentRef.
66
+
67
+
68
+ :return: The label of this TaskParentRef.
69
+ :rtype: str
70
+ """
71
+ return self._label
72
+
73
+ @label.setter
74
+ def label(self, label):
75
+ """Sets the label of this TaskParentRef.
76
+
77
+
78
+ :param label: The label of this TaskParentRef. # noqa: E501
79
+ :type: str
80
+ """
81
+
82
+ self._label = label
83
+
84
+ @property
85
+ def version(self):
86
+ """Gets the version of this TaskParentRef.
87
+
88
+
89
+ :return: The version of this TaskParentRef.
90
+ :rtype: int
91
+ """
92
+ return self._version
93
+
94
+ @version.setter
95
+ def version(self, version):
96
+ """Sets the version of this TaskParentRef.
97
+
98
+
99
+ :param version: The version of this TaskParentRef. # noqa: E501
100
+ :type: int
101
+ """
102
+
103
+ self._version = version
104
+
105
+ @property
106
+ def type(self):
107
+ """Gets the type of this TaskParentRef.
108
+
109
+
110
+ :return: The type of this TaskParentRef.
111
+ :rtype: LibsWorkflowsModelsParentType
112
+ """
113
+ return self._type
114
+
115
+ @type.setter
116
+ def type(self, type):
117
+ """Sets the type of this TaskParentRef.
118
+
119
+
120
+ :param type: The type of this TaskParentRef. # noqa: E501
121
+ :type: LibsWorkflowsModelsParentType
122
+ """
123
+
124
+ self._type = type
125
+
126
+ @property
127
+ def id(self):
128
+ """Gets the id of this TaskParentRef.
129
+
130
+
131
+ :return: The id of this TaskParentRef.
132
+ :rtype: str
133
+ """
134
+ return self._id
135
+
136
+ @id.setter
137
+ def id(self, id):
138
+ """Sets the id of this TaskParentRef.
139
+
140
+
141
+ :param id: The id of this TaskParentRef. # noqa: E501
142
+ :type: str
143
+ """
144
+
145
+ self._id = id
146
+
147
+
148
+ @staticmethod
149
+ def positional_to_model(value):
150
+ """Converts a positional argument to a model value"""
151
+ return value
152
+
153
+ def return_value(self):
154
+ """Unwraps return value from model"""
155
+ return self
156
+
157
+ def to_dict(self):
158
+ """Returns the model properties as a dict"""
159
+ result = {}
160
+
161
+ for attr, _ in six.iteritems(self.swagger_types):
162
+ value = getattr(self, attr)
163
+ if isinstance(value, list):
164
+ result[attr] = list(map(
165
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
166
+ value
167
+ ))
168
+ elif hasattr(value, "to_dict"):
169
+ result[attr] = value.to_dict()
170
+ elif isinstance(value, dict):
171
+ result[attr] = dict(map(
172
+ lambda item: (item[0], item[1].to_dict())
173
+ if hasattr(item[1], "to_dict") else item,
174
+ value.items()
175
+ ))
176
+ else:
177
+ result[attr] = value
178
+
179
+ return result
180
+
181
+ def to_str(self):
182
+ """Returns the string representation of the model"""
183
+ return pprint.pformat(self.to_dict())
184
+
185
+ def __repr__(self):
186
+ """For `print` and `pprint`"""
187
+ return self.to_str()
188
+
189
+ def __eq__(self, other):
190
+ """Returns true if both objects are equal"""
191
+ if not isinstance(other, TaskParentRef):
192
+ return False
193
+
194
+ return self.__dict__ == other.__dict__
195
+
196
+ def __ne__(self, other):
197
+ """Returns true if both objects are not equal"""
198
+ return not self == other
199
+
200
+ # Container emulation
201
+ def __getitem__(self, key):
202
+ """Returns the value of key"""
203
+ key = self._map_key(key)
204
+ return getattr(self, key)
205
+
206
+ def __setitem__(self, key, value):
207
+ """Sets the value of key"""
208
+ key = self._map_key(key)
209
+ setattr(self, key, value)
210
+
211
+ def __contains__(self, key):
212
+ """Checks if the given value is a key in this object"""
213
+ key = self._map_key(key, raise_on_error=False)
214
+ return key is not None
215
+
216
+ def keys(self):
217
+ """Returns the list of json properties in the object"""
218
+ return self.__class__.rattribute_map.keys()
219
+
220
+ def values(self):
221
+ """Returns the list of values in the object"""
222
+ for key in self.__class__.attribute_map.keys():
223
+ yield getattr(self, key)
224
+
225
+ def items(self):
226
+ """Returns the list of json property to value mapping"""
227
+ for key, prop in self.__class__.rattribute_map.items():
228
+ yield key, getattr(self, prop)
229
+
230
+ def get(self, key, default=None):
231
+ """Get the value of the provided json property, or default"""
232
+ key = self._map_key(key, raise_on_error=False)
233
+ if key:
234
+ return getattr(self, key, default)
235
+ return default
236
+
237
+ def _map_key(self, key, raise_on_error=True):
238
+ result = self.__class__.rattribute_map.get(key)
239
+ if result is None:
240
+ if raise_on_error:
241
+ raise AttributeError('Invalid attribute name: {}'.format(key))
242
+ return None
243
+ return '_' + result
@@ -0,0 +1,217 @@
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.libs_workflows_models_parent_type import LibsWorkflowsModelsParentType # noqa: F401,E501
22
+
23
+ class TaskParentRefInput(object):
24
+
25
+ swagger_types = {
26
+ 'type': 'LibsWorkflowsModelsParentType',
27
+ 'version': 'int',
28
+ 'id': 'str'
29
+ }
30
+
31
+ attribute_map = {
32
+ 'type': 'type',
33
+ 'version': 'version',
34
+ 'id': 'id'
35
+ }
36
+
37
+ rattribute_map = {
38
+ 'type': 'type',
39
+ 'version': 'version',
40
+ 'id': 'id'
41
+ }
42
+
43
+ def __init__(self, type=None, version=None, id=None): # noqa: E501
44
+ """TaskParentRefInput - a model defined in Swagger"""
45
+ super(TaskParentRefInput, self).__init__()
46
+
47
+ self._type = None
48
+ self._version = None
49
+ self._id = None
50
+ self.discriminator = None
51
+ self.alt_discriminator = None
52
+
53
+ self.type = type
54
+ if version is not None:
55
+ self.version = version
56
+ self.id = id
57
+
58
+ @property
59
+ def type(self):
60
+ """Gets the type of this TaskParentRefInput.
61
+
62
+
63
+ :return: The type of this TaskParentRefInput.
64
+ :rtype: LibsWorkflowsModelsParentType
65
+ """
66
+ return self._type
67
+
68
+ @type.setter
69
+ def type(self, type):
70
+ """Sets the type of this TaskParentRefInput.
71
+
72
+
73
+ :param type: The type of this TaskParentRefInput. # noqa: E501
74
+ :type: LibsWorkflowsModelsParentType
75
+ """
76
+
77
+ self._type = type
78
+
79
+ @property
80
+ def version(self):
81
+ """Gets the version of this TaskParentRefInput.
82
+
83
+
84
+ :return: The version of this TaskParentRefInput.
85
+ :rtype: int
86
+ """
87
+ return self._version
88
+
89
+ @version.setter
90
+ def version(self, version):
91
+ """Sets the version of this TaskParentRefInput.
92
+
93
+
94
+ :param version: The version of this TaskParentRefInput. # noqa: E501
95
+ :type: int
96
+ """
97
+
98
+ self._version = version
99
+
100
+ @property
101
+ def id(self):
102
+ """Gets the id of this TaskParentRefInput.
103
+
104
+
105
+ :return: The id of this TaskParentRefInput.
106
+ :rtype: str
107
+ """
108
+ return self._id
109
+
110
+ @id.setter
111
+ def id(self, id):
112
+ """Sets the id of this TaskParentRefInput.
113
+
114
+
115
+ :param id: The id of this TaskParentRefInput. # noqa: E501
116
+ :type: str
117
+ """
118
+
119
+ self._id = id
120
+
121
+
122
+ @staticmethod
123
+ def positional_to_model(value):
124
+ """Converts a positional argument to a model value"""
125
+ return value
126
+
127
+ def return_value(self):
128
+ """Unwraps return value from model"""
129
+ return self
130
+
131
+ def to_dict(self):
132
+ """Returns the model properties as a dict"""
133
+ result = {}
134
+
135
+ for attr, _ in six.iteritems(self.swagger_types):
136
+ value = getattr(self, attr)
137
+ if isinstance(value, list):
138
+ result[attr] = list(map(
139
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
140
+ value
141
+ ))
142
+ elif hasattr(value, "to_dict"):
143
+ result[attr] = value.to_dict()
144
+ elif isinstance(value, dict):
145
+ result[attr] = dict(map(
146
+ lambda item: (item[0], item[1].to_dict())
147
+ if hasattr(item[1], "to_dict") else item,
148
+ value.items()
149
+ ))
150
+ else:
151
+ result[attr] = value
152
+
153
+ return result
154
+
155
+ def to_str(self):
156
+ """Returns the string representation of the model"""
157
+ return pprint.pformat(self.to_dict())
158
+
159
+ def __repr__(self):
160
+ """For `print` and `pprint`"""
161
+ return self.to_str()
162
+
163
+ def __eq__(self, other):
164
+ """Returns true if both objects are equal"""
165
+ if not isinstance(other, TaskParentRefInput):
166
+ return False
167
+
168
+ return self.__dict__ == other.__dict__
169
+
170
+ def __ne__(self, other):
171
+ """Returns true if both objects are not equal"""
172
+ return not self == other
173
+
174
+ # Container emulation
175
+ def __getitem__(self, key):
176
+ """Returns the value of key"""
177
+ key = self._map_key(key)
178
+ return getattr(self, key)
179
+
180
+ def __setitem__(self, key, value):
181
+ """Sets the value of key"""
182
+ key = self._map_key(key)
183
+ setattr(self, key, value)
184
+
185
+ def __contains__(self, key):
186
+ """Checks if the given value is a key in this object"""
187
+ key = self._map_key(key, raise_on_error=False)
188
+ return key is not None
189
+
190
+ def keys(self):
191
+ """Returns the list of json properties in the object"""
192
+ return self.__class__.rattribute_map.keys()
193
+
194
+ def values(self):
195
+ """Returns the list of values in the object"""
196
+ for key in self.__class__.attribute_map.keys():
197
+ yield getattr(self, key)
198
+
199
+ def items(self):
200
+ """Returns the list of json property to value mapping"""
201
+ for key, prop in self.__class__.rattribute_map.items():
202
+ yield key, getattr(self, prop)
203
+
204
+ def get(self, key, default=None):
205
+ """Get the value of the provided json property, or default"""
206
+ key = self._map_key(key, raise_on_error=False)
207
+ if key:
208
+ return getattr(self, key, default)
209
+ return default
210
+
211
+ def _map_key(self, key, raise_on_error=True):
212
+ result = self.__class__.rattribute_map.get(key)
213
+ if result is None:
214
+ if raise_on_error:
215
+ raise AttributeError('Invalid attribute name: {}'.format(key))
216
+ return None
217
+ return '_' + result
@@ -0,0 +1,30 @@
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 TaskPriority(str, enum.Enum):
24
+ BLOCKER = "blocker"
25
+ HIGH = "high"
26
+ MEDIUM = "medium"
27
+ LOW = "low"
28
+
29
+ def __str__(self):
30
+ return self.value
@@ -0,0 +1,188 @@
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 TaskSubmission(object):
22
+
23
+ swagger_types = {
24
+ 'mfa_code': 'str',
25
+ 'reason': 'str'
26
+ }
27
+
28
+ attribute_map = {
29
+ 'mfa_code': 'mfa_code',
30
+ 'reason': 'reason'
31
+ }
32
+
33
+ rattribute_map = {
34
+ 'mfa_code': 'mfa_code',
35
+ 'reason': 'reason'
36
+ }
37
+
38
+ def __init__(self, mfa_code=None, reason=None): # noqa: E501
39
+ """TaskSubmission - a model defined in Swagger"""
40
+ super(TaskSubmission, self).__init__()
41
+
42
+ self._mfa_code = None
43
+ self._reason = None
44
+ self.discriminator = None
45
+ self.alt_discriminator = None
46
+
47
+ self.mfa_code = mfa_code
48
+ self.reason = reason
49
+
50
+ @property
51
+ def mfa_code(self):
52
+ """Gets the mfa_code of this TaskSubmission.
53
+
54
+
55
+ :return: The mfa_code of this TaskSubmission.
56
+ :rtype: str
57
+ """
58
+ return self._mfa_code
59
+
60
+ @mfa_code.setter
61
+ def mfa_code(self, mfa_code):
62
+ """Sets the mfa_code of this TaskSubmission.
63
+
64
+
65
+ :param mfa_code: The mfa_code of this TaskSubmission. # noqa: E501
66
+ :type: str
67
+ """
68
+
69
+ self._mfa_code = mfa_code
70
+
71
+ @property
72
+ def reason(self):
73
+ """Gets the reason of this TaskSubmission.
74
+
75
+
76
+ :return: The reason of this TaskSubmission.
77
+ :rtype: str
78
+ """
79
+ return self._reason
80
+
81
+ @reason.setter
82
+ def reason(self, reason):
83
+ """Sets the reason of this TaskSubmission.
84
+
85
+
86
+ :param reason: The reason of this TaskSubmission. # noqa: E501
87
+ :type: str
88
+ """
89
+
90
+ self._reason = reason
91
+
92
+
93
+ @staticmethod
94
+ def positional_to_model(value):
95
+ """Converts a positional argument to a model value"""
96
+ return value
97
+
98
+ def return_value(self):
99
+ """Unwraps return value from model"""
100
+ return self
101
+
102
+ def to_dict(self):
103
+ """Returns the model properties as a dict"""
104
+ result = {}
105
+
106
+ for attr, _ in six.iteritems(self.swagger_types):
107
+ value = getattr(self, attr)
108
+ if isinstance(value, list):
109
+ result[attr] = list(map(
110
+ lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
111
+ value
112
+ ))
113
+ elif hasattr(value, "to_dict"):
114
+ result[attr] = value.to_dict()
115
+ elif isinstance(value, dict):
116
+ result[attr] = dict(map(
117
+ lambda item: (item[0], item[1].to_dict())
118
+ if hasattr(item[1], "to_dict") else item,
119
+ value.items()
120
+ ))
121
+ else:
122
+ result[attr] = value
123
+
124
+ return result
125
+
126
+ def to_str(self):
127
+ """Returns the string representation of the model"""
128
+ return pprint.pformat(self.to_dict())
129
+
130
+ def __repr__(self):
131
+ """For `print` and `pprint`"""
132
+ return self.to_str()
133
+
134
+ def __eq__(self, other):
135
+ """Returns true if both objects are equal"""
136
+ if not isinstance(other, TaskSubmission):
137
+ return False
138
+
139
+ return self.__dict__ == other.__dict__
140
+
141
+ def __ne__(self, other):
142
+ """Returns true if both objects are not equal"""
143
+ return not self == other
144
+
145
+ # Container emulation
146
+ def __getitem__(self, key):
147
+ """Returns the value of key"""
148
+ key = self._map_key(key)
149
+ return getattr(self, key)
150
+
151
+ def __setitem__(self, key, value):
152
+ """Sets the value of key"""
153
+ key = self._map_key(key)
154
+ setattr(self, key, value)
155
+
156
+ def __contains__(self, key):
157
+ """Checks if the given value is a key in this object"""
158
+ key = self._map_key(key, raise_on_error=False)
159
+ return key is not None
160
+
161
+ def keys(self):
162
+ """Returns the list of json properties in the object"""
163
+ return self.__class__.rattribute_map.keys()
164
+
165
+ def values(self):
166
+ """Returns the list of values in the object"""
167
+ for key in self.__class__.attribute_map.keys():
168
+ yield getattr(self, key)
169
+
170
+ def items(self):
171
+ """Returns the list of json property to value mapping"""
172
+ for key, prop in self.__class__.rattribute_map.items():
173
+ yield key, getattr(self, prop)
174
+
175
+ def get(self, key, default=None):
176
+ """Get the value of the provided json property, or default"""
177
+ key = self._map_key(key, raise_on_error=False)
178
+ if key:
179
+ return getattr(self, key, default)
180
+ return default
181
+
182
+ def _map_key(self, key, raise_on_error=True):
183
+ result = self.__class__.rattribute_map.get(key)
184
+ if result is None:
185
+ if raise_on_error:
186
+ raise AttributeError('Invalid attribute name: {}'.format(key))
187
+ return None
188
+ return '_' + result