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