benchling-api-client 2.0.418__py3-none-any.whl → 2.0.420__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.
- benchling_api_client/models/box_creation_table_note_part.py +31 -0
- benchling_api_client/models/inventory_container_table_note_part.py +31 -0
- benchling_api_client/models/inventory_plate_table_note_part.py +31 -0
- benchling_api_client/models/lookup_table_note_part.py +32 -0
- benchling_api_client/models/mixture_prep_table_note_part.py +31 -0
- benchling_api_client/models/plate_creation_table_note_part.py +31 -0
- benchling_api_client/models/registration_table_note_part.py +31 -0
- benchling_api_client/models/results_table_note_part.py +31 -0
- benchling_api_client/models/structured_table_api_identifiers.py +32 -0
- benchling_api_client/v2/alpha/models/box_creation_table_note_part.py +31 -0
- benchling_api_client/v2/alpha/models/inventory_container_table_note_part.py +31 -0
- benchling_api_client/v2/alpha/models/inventory_plate_table_note_part.py +31 -0
- benchling_api_client/v2/alpha/models/lookup_table_note_part.py +32 -0
- benchling_api_client/v2/alpha/models/mixture_prep_table_note_part.py +31 -0
- benchling_api_client/v2/alpha/models/plate_creation_table_note_part.py +31 -0
- benchling_api_client/v2/alpha/models/registration_table_note_part.py +31 -0
- benchling_api_client/v2/alpha/models/results_table_note_part.py +31 -0
- benchling_api_client/v2/alpha/models/structured_table_api_identifiers.py +32 -0
- benchling_api_client/v2/alpha/openapi.yaml +2 -0
- benchling_api_client/v2/beta/models/box_creation_table_note_part.py +31 -0
- benchling_api_client/v2/beta/models/entry_beta_review_record.py +49 -0
- benchling_api_client/v2/beta/models/entry_review_process.py +252 -0
- benchling_api_client/v2/beta/models/entry_review_process_completion_status.py +27 -0
- benchling_api_client/v2/beta/models/entry_review_process_stages_item.py +211 -0
- benchling_api_client/v2/beta/models/entry_review_process_stages_item_action_label.py +27 -0
- benchling_api_client/v2/beta/models/entry_review_process_stages_item_reviewers_item.py +195 -0
- benchling_api_client/v2/beta/models/entry_review_process_stages_item_reviewers_item_status.py +25 -0
- benchling_api_client/v2/beta/models/entry_review_process_type.py +22 -0
- benchling_api_client/v2/beta/models/inventory_container_table_note_part.py +31 -0
- benchling_api_client/v2/beta/models/inventory_plate_table_note_part.py +31 -0
- benchling_api_client/v2/beta/models/lookup_table_note_part.py +32 -0
- benchling_api_client/v2/beta/models/mixture_prep_table_note_part.py +31 -0
- benchling_api_client/v2/beta/models/plate_creation_table_note_part.py +31 -0
- benchling_api_client/v2/beta/models/registration_table_note_part.py +31 -0
- benchling_api_client/v2/beta/models/results_table_note_part.py +31 -0
- benchling_api_client/v2/beta/models/structured_table_api_identifiers.py +32 -0
- benchling_api_client/v2/beta/models/worksheet_review_changes_review_record.py +49 -0
- benchling_api_client/v2/beta/openapi.yaml +78 -0
- benchling_api_client/v2/stable/models/box_creation_table_note_part.py +31 -0
- benchling_api_client/v2/stable/models/inventory_container_table_note_part.py +31 -0
- benchling_api_client/v2/stable/models/inventory_plate_table_note_part.py +31 -0
- benchling_api_client/v2/stable/models/lookup_table_note_part.py +32 -0
- benchling_api_client/v2/stable/models/mixture_prep_table_note_part.py +31 -0
- benchling_api_client/v2/stable/models/plate_creation_table_note_part.py +31 -0
- benchling_api_client/v2/stable/models/registration_table_note_part.py +31 -0
- benchling_api_client/v2/stable/models/results_table_note_part.py +31 -0
- benchling_api_client/v2/stable/models/structured_table_api_identifiers.py +32 -0
- benchling_api_client/v2/stable/openapi.yaml +2 -0
- {benchling_api_client-2.0.418.dist-info → benchling_api_client-2.0.420.dist-info}/METADATA +1 -1
- {benchling_api_client-2.0.418.dist-info → benchling_api_client-2.0.420.dist-info}/RECORD +52 -45
- {benchling_api_client-2.0.418.dist-info → benchling_api_client-2.0.420.dist-info}/LICENSE +0 -0
- {benchling_api_client-2.0.418.dist-info → benchling_api_client-2.0.420.dist-info}/WHEEL +0 -0
|
@@ -18,6 +18,7 @@ class BoxCreationTableNotePart:
|
|
|
18
18
|
_type: Union[Unset, BoxCreationTableNotePartType] = UNSET
|
|
19
19
|
_api_id: Union[Unset, str] = UNSET
|
|
20
20
|
_columns: Union[Unset, List[StructuredTableColumnInfo]] = UNSET
|
|
21
|
+
_name: Union[Unset, str] = UNSET
|
|
21
22
|
_indentation: Union[Unset, int] = 0
|
|
22
23
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
23
24
|
|
|
@@ -27,6 +28,7 @@ class BoxCreationTableNotePart:
|
|
|
27
28
|
fields.append("type={}".format(repr(self._type)))
|
|
28
29
|
fields.append("api_id={}".format(repr(self._api_id)))
|
|
29
30
|
fields.append("columns={}".format(repr(self._columns)))
|
|
31
|
+
fields.append("name={}".format(repr(self._name)))
|
|
30
32
|
fields.append("indentation={}".format(repr(self._indentation)))
|
|
31
33
|
fields.append("additional_properties={}".format(repr(self.additional_properties)))
|
|
32
34
|
return "BoxCreationTableNotePart({})".format(", ".join(fields))
|
|
@@ -46,6 +48,7 @@ class BoxCreationTableNotePart:
|
|
|
46
48
|
|
|
47
49
|
columns.append(columns_item)
|
|
48
50
|
|
|
51
|
+
name = self._name
|
|
49
52
|
indentation = self._indentation
|
|
50
53
|
|
|
51
54
|
field_dict: Dict[str, Any] = {}
|
|
@@ -59,6 +62,8 @@ class BoxCreationTableNotePart:
|
|
|
59
62
|
field_dict["apiId"] = api_id
|
|
60
63
|
if columns is not UNSET:
|
|
61
64
|
field_dict["columns"] = columns
|
|
65
|
+
if name is not UNSET:
|
|
66
|
+
field_dict["name"] = name
|
|
62
67
|
if indentation is not UNSET:
|
|
63
68
|
field_dict["indentation"] = indentation
|
|
64
69
|
|
|
@@ -125,6 +130,17 @@ class BoxCreationTableNotePart:
|
|
|
125
130
|
raise
|
|
126
131
|
columns = cast(Union[Unset, List[StructuredTableColumnInfo]], UNSET)
|
|
127
132
|
|
|
133
|
+
def get_name() -> Union[Unset, str]:
|
|
134
|
+
name = d.pop("name")
|
|
135
|
+
return name
|
|
136
|
+
|
|
137
|
+
try:
|
|
138
|
+
name = get_name()
|
|
139
|
+
except KeyError:
|
|
140
|
+
if strict:
|
|
141
|
+
raise
|
|
142
|
+
name = cast(Union[Unset, str], UNSET)
|
|
143
|
+
|
|
128
144
|
def get_indentation() -> Union[Unset, int]:
|
|
129
145
|
indentation = d.pop("indentation")
|
|
130
146
|
return indentation
|
|
@@ -141,6 +157,7 @@ class BoxCreationTableNotePart:
|
|
|
141
157
|
type=type,
|
|
142
158
|
api_id=api_id,
|
|
143
159
|
columns=columns,
|
|
160
|
+
name=name,
|
|
144
161
|
indentation=indentation,
|
|
145
162
|
)
|
|
146
163
|
|
|
@@ -222,6 +239,20 @@ class BoxCreationTableNotePart:
|
|
|
222
239
|
def columns(self) -> None:
|
|
223
240
|
self._columns = UNSET
|
|
224
241
|
|
|
242
|
+
@property
|
|
243
|
+
def name(self) -> str:
|
|
244
|
+
if isinstance(self._name, Unset):
|
|
245
|
+
raise NotPresentError(self, "name")
|
|
246
|
+
return self._name
|
|
247
|
+
|
|
248
|
+
@name.setter
|
|
249
|
+
def name(self, value: str) -> None:
|
|
250
|
+
self._name = value
|
|
251
|
+
|
|
252
|
+
@name.deleter
|
|
253
|
+
def name(self) -> None:
|
|
254
|
+
self._name = UNSET
|
|
255
|
+
|
|
225
256
|
@property
|
|
226
257
|
def indentation(self) -> int:
|
|
227
258
|
"""All notes have an indentation level - the default is 0 for no indent. For lists, indentation gives notes hierarchy - a bulleted list with children is modeled as one note part with indentation 1 followed by note parts with indentation 2, for example."""
|
|
@@ -4,6 +4,7 @@ import attr
|
|
|
4
4
|
|
|
5
5
|
from ..extensions import NotPresentError
|
|
6
6
|
from ..models.entry_beta_review_record_status import EntryBetaReviewRecordStatus
|
|
7
|
+
from ..models.entry_review_process import EntryReviewProcess
|
|
7
8
|
from ..models.review_change import ReviewChange
|
|
8
9
|
from ..types import UNSET, Unset
|
|
9
10
|
|
|
@@ -16,6 +17,7 @@ class EntryBetaReviewRecord:
|
|
|
16
17
|
|
|
17
18
|
_comment: Union[Unset, str] = UNSET
|
|
18
19
|
_review_changes: Union[Unset, List[ReviewChange]] = UNSET
|
|
20
|
+
_review_processes: Union[Unset, None, List[EntryReviewProcess]] = UNSET
|
|
19
21
|
_status: Union[Unset, EntryBetaReviewRecordStatus] = UNSET
|
|
20
22
|
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
21
23
|
|
|
@@ -23,6 +25,7 @@ class EntryBetaReviewRecord:
|
|
|
23
25
|
fields = []
|
|
24
26
|
fields.append("comment={}".format(repr(self._comment)))
|
|
25
27
|
fields.append("review_changes={}".format(repr(self._review_changes)))
|
|
28
|
+
fields.append("review_processes={}".format(repr(self._review_processes)))
|
|
26
29
|
fields.append("status={}".format(repr(self._status)))
|
|
27
30
|
fields.append("additional_properties={}".format(repr(self.additional_properties)))
|
|
28
31
|
return "EntryBetaReviewRecord({})".format(", ".join(fields))
|
|
@@ -37,6 +40,17 @@ class EntryBetaReviewRecord:
|
|
|
37
40
|
|
|
38
41
|
review_changes.append(review_changes_item)
|
|
39
42
|
|
|
43
|
+
review_processes: Union[Unset, None, List[Any]] = UNSET
|
|
44
|
+
if not isinstance(self._review_processes, Unset):
|
|
45
|
+
if self._review_processes is None:
|
|
46
|
+
review_processes = None
|
|
47
|
+
else:
|
|
48
|
+
review_processes = []
|
|
49
|
+
for review_processes_item_data in self._review_processes:
|
|
50
|
+
review_processes_item = review_processes_item_data.to_dict()
|
|
51
|
+
|
|
52
|
+
review_processes.append(review_processes_item)
|
|
53
|
+
|
|
40
54
|
status: Union[Unset, int] = UNSET
|
|
41
55
|
if not isinstance(self._status, Unset):
|
|
42
56
|
status = self._status.value
|
|
@@ -48,6 +62,8 @@ class EntryBetaReviewRecord:
|
|
|
48
62
|
field_dict["comment"] = comment
|
|
49
63
|
if review_changes is not UNSET:
|
|
50
64
|
field_dict["reviewChanges"] = review_changes
|
|
65
|
+
if review_processes is not UNSET:
|
|
66
|
+
field_dict["reviewProcesses"] = review_processes
|
|
51
67
|
if status is not UNSET:
|
|
52
68
|
field_dict["status"] = status
|
|
53
69
|
|
|
@@ -85,6 +101,23 @@ class EntryBetaReviewRecord:
|
|
|
85
101
|
raise
|
|
86
102
|
review_changes = cast(Union[Unset, List[ReviewChange]], UNSET)
|
|
87
103
|
|
|
104
|
+
def get_review_processes() -> Union[Unset, None, List[EntryReviewProcess]]:
|
|
105
|
+
review_processes = []
|
|
106
|
+
_review_processes = d.pop("reviewProcesses")
|
|
107
|
+
for review_processes_item_data in _review_processes or []:
|
|
108
|
+
review_processes_item = EntryReviewProcess.from_dict(review_processes_item_data, strict=False)
|
|
109
|
+
|
|
110
|
+
review_processes.append(review_processes_item)
|
|
111
|
+
|
|
112
|
+
return review_processes
|
|
113
|
+
|
|
114
|
+
try:
|
|
115
|
+
review_processes = get_review_processes()
|
|
116
|
+
except KeyError:
|
|
117
|
+
if strict:
|
|
118
|
+
raise
|
|
119
|
+
review_processes = cast(Union[Unset, None, List[EntryReviewProcess]], UNSET)
|
|
120
|
+
|
|
88
121
|
def get_status() -> Union[Unset, EntryBetaReviewRecordStatus]:
|
|
89
122
|
status = UNSET
|
|
90
123
|
_status = d.pop("status")
|
|
@@ -106,6 +139,7 @@ class EntryBetaReviewRecord:
|
|
|
106
139
|
entry_beta_review_record = cls(
|
|
107
140
|
comment=comment,
|
|
108
141
|
review_changes=review_changes,
|
|
142
|
+
review_processes=review_processes,
|
|
109
143
|
status=status,
|
|
110
144
|
)
|
|
111
145
|
|
|
@@ -161,6 +195,21 @@ class EntryBetaReviewRecord:
|
|
|
161
195
|
def review_changes(self) -> None:
|
|
162
196
|
self._review_changes = UNSET
|
|
163
197
|
|
|
198
|
+
@property
|
|
199
|
+
def review_processes(self) -> Optional[List[EntryReviewProcess]]:
|
|
200
|
+
""" Review Processes associated with the Entry """
|
|
201
|
+
if isinstance(self._review_processes, Unset):
|
|
202
|
+
raise NotPresentError(self, "review_processes")
|
|
203
|
+
return self._review_processes
|
|
204
|
+
|
|
205
|
+
@review_processes.setter
|
|
206
|
+
def review_processes(self, value: Optional[List[EntryReviewProcess]]) -> None:
|
|
207
|
+
self._review_processes = value
|
|
208
|
+
|
|
209
|
+
@review_processes.deleter
|
|
210
|
+
def review_processes(self) -> None:
|
|
211
|
+
self._review_processes = UNSET
|
|
212
|
+
|
|
164
213
|
@property
|
|
165
214
|
def status(self) -> EntryBetaReviewRecordStatus:
|
|
166
215
|
""" Review Status of the entry """
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
from typing import Any, cast, Dict, List, Optional, Type, TypeVar, Union
|
|
2
|
+
|
|
3
|
+
import attr
|
|
4
|
+
|
|
5
|
+
from ..extensions import NotPresentError
|
|
6
|
+
from ..models.entry_review_process_completion_status import EntryReviewProcessCompletionStatus
|
|
7
|
+
from ..models.entry_review_process_stages_item import EntryReviewProcessStagesItem
|
|
8
|
+
from ..models.entry_review_process_type import EntryReviewProcessType
|
|
9
|
+
from ..types import UNSET, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="EntryReviewProcess")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@attr.s(auto_attribs=True, repr=False)
|
|
15
|
+
class EntryReviewProcess:
|
|
16
|
+
""" """
|
|
17
|
+
|
|
18
|
+
_completion_status: Union[Unset, EntryReviewProcessCompletionStatus] = UNSET
|
|
19
|
+
_id: Union[Unset, str] = UNSET
|
|
20
|
+
_name: Union[Unset, str] = UNSET
|
|
21
|
+
_stages: Union[Unset, List[EntryReviewProcessStagesItem]] = UNSET
|
|
22
|
+
_type: Union[Unset, EntryReviewProcessType] = UNSET
|
|
23
|
+
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
24
|
+
|
|
25
|
+
def __repr__(self):
|
|
26
|
+
fields = []
|
|
27
|
+
fields.append("completion_status={}".format(repr(self._completion_status)))
|
|
28
|
+
fields.append("id={}".format(repr(self._id)))
|
|
29
|
+
fields.append("name={}".format(repr(self._name)))
|
|
30
|
+
fields.append("stages={}".format(repr(self._stages)))
|
|
31
|
+
fields.append("type={}".format(repr(self._type)))
|
|
32
|
+
fields.append("additional_properties={}".format(repr(self.additional_properties)))
|
|
33
|
+
return "EntryReviewProcess({})".format(", ".join(fields))
|
|
34
|
+
|
|
35
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
36
|
+
completion_status: Union[Unset, int] = UNSET
|
|
37
|
+
if not isinstance(self._completion_status, Unset):
|
|
38
|
+
completion_status = self._completion_status.value
|
|
39
|
+
|
|
40
|
+
id = self._id
|
|
41
|
+
name = self._name
|
|
42
|
+
stages: Union[Unset, List[Any]] = UNSET
|
|
43
|
+
if not isinstance(self._stages, Unset):
|
|
44
|
+
stages = []
|
|
45
|
+
for stages_item_data in self._stages:
|
|
46
|
+
stages_item = stages_item_data.to_dict()
|
|
47
|
+
|
|
48
|
+
stages.append(stages_item)
|
|
49
|
+
|
|
50
|
+
type: Union[Unset, int] = UNSET
|
|
51
|
+
if not isinstance(self._type, Unset):
|
|
52
|
+
type = self._type.value
|
|
53
|
+
|
|
54
|
+
field_dict: Dict[str, Any] = {}
|
|
55
|
+
field_dict.update(self.additional_properties)
|
|
56
|
+
# Allow the model to serialize even if it was created outside of the constructor, circumventing validation
|
|
57
|
+
if completion_status is not UNSET:
|
|
58
|
+
field_dict["completionStatus"] = completion_status
|
|
59
|
+
if id is not UNSET:
|
|
60
|
+
field_dict["id"] = id
|
|
61
|
+
if name is not UNSET:
|
|
62
|
+
field_dict["name"] = name
|
|
63
|
+
if stages is not UNSET:
|
|
64
|
+
field_dict["stages"] = stages
|
|
65
|
+
if type is not UNSET:
|
|
66
|
+
field_dict["type"] = type
|
|
67
|
+
|
|
68
|
+
return field_dict
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any], strict: bool = False) -> T:
|
|
72
|
+
d = src_dict.copy()
|
|
73
|
+
|
|
74
|
+
def get_completion_status() -> Union[Unset, EntryReviewProcessCompletionStatus]:
|
|
75
|
+
completion_status = UNSET
|
|
76
|
+
_completion_status = d.pop("completionStatus")
|
|
77
|
+
if _completion_status is not None and _completion_status is not UNSET:
|
|
78
|
+
try:
|
|
79
|
+
completion_status = EntryReviewProcessCompletionStatus(_completion_status)
|
|
80
|
+
except ValueError:
|
|
81
|
+
completion_status = EntryReviewProcessCompletionStatus.of_unknown(_completion_status)
|
|
82
|
+
|
|
83
|
+
return completion_status
|
|
84
|
+
|
|
85
|
+
try:
|
|
86
|
+
completion_status = get_completion_status()
|
|
87
|
+
except KeyError:
|
|
88
|
+
if strict:
|
|
89
|
+
raise
|
|
90
|
+
completion_status = cast(Union[Unset, EntryReviewProcessCompletionStatus], UNSET)
|
|
91
|
+
|
|
92
|
+
def get_id() -> Union[Unset, str]:
|
|
93
|
+
id = d.pop("id")
|
|
94
|
+
return id
|
|
95
|
+
|
|
96
|
+
try:
|
|
97
|
+
id = get_id()
|
|
98
|
+
except KeyError:
|
|
99
|
+
if strict:
|
|
100
|
+
raise
|
|
101
|
+
id = cast(Union[Unset, str], UNSET)
|
|
102
|
+
|
|
103
|
+
def get_name() -> Union[Unset, str]:
|
|
104
|
+
name = d.pop("name")
|
|
105
|
+
return name
|
|
106
|
+
|
|
107
|
+
try:
|
|
108
|
+
name = get_name()
|
|
109
|
+
except KeyError:
|
|
110
|
+
if strict:
|
|
111
|
+
raise
|
|
112
|
+
name = cast(Union[Unset, str], UNSET)
|
|
113
|
+
|
|
114
|
+
def get_stages() -> Union[Unset, List[EntryReviewProcessStagesItem]]:
|
|
115
|
+
stages = []
|
|
116
|
+
_stages = d.pop("stages")
|
|
117
|
+
for stages_item_data in _stages or []:
|
|
118
|
+
stages_item = EntryReviewProcessStagesItem.from_dict(stages_item_data, strict=False)
|
|
119
|
+
|
|
120
|
+
stages.append(stages_item)
|
|
121
|
+
|
|
122
|
+
return stages
|
|
123
|
+
|
|
124
|
+
try:
|
|
125
|
+
stages = get_stages()
|
|
126
|
+
except KeyError:
|
|
127
|
+
if strict:
|
|
128
|
+
raise
|
|
129
|
+
stages = cast(Union[Unset, List[EntryReviewProcessStagesItem]], UNSET)
|
|
130
|
+
|
|
131
|
+
def get_type() -> Union[Unset, EntryReviewProcessType]:
|
|
132
|
+
type = UNSET
|
|
133
|
+
_type = d.pop("type")
|
|
134
|
+
if _type is not None and _type is not UNSET:
|
|
135
|
+
try:
|
|
136
|
+
type = EntryReviewProcessType(_type)
|
|
137
|
+
except ValueError:
|
|
138
|
+
type = EntryReviewProcessType.of_unknown(_type)
|
|
139
|
+
|
|
140
|
+
return type
|
|
141
|
+
|
|
142
|
+
try:
|
|
143
|
+
type = get_type()
|
|
144
|
+
except KeyError:
|
|
145
|
+
if strict:
|
|
146
|
+
raise
|
|
147
|
+
type = cast(Union[Unset, EntryReviewProcessType], UNSET)
|
|
148
|
+
|
|
149
|
+
entry_review_process = cls(
|
|
150
|
+
completion_status=completion_status,
|
|
151
|
+
id=id,
|
|
152
|
+
name=name,
|
|
153
|
+
stages=stages,
|
|
154
|
+
type=type,
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
entry_review_process.additional_properties = d
|
|
158
|
+
return entry_review_process
|
|
159
|
+
|
|
160
|
+
@property
|
|
161
|
+
def additional_keys(self) -> List[str]:
|
|
162
|
+
return list(self.additional_properties.keys())
|
|
163
|
+
|
|
164
|
+
def __getitem__(self, key: str) -> Any:
|
|
165
|
+
return self.additional_properties[key]
|
|
166
|
+
|
|
167
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
168
|
+
self.additional_properties[key] = value
|
|
169
|
+
|
|
170
|
+
def __delitem__(self, key: str) -> None:
|
|
171
|
+
del self.additional_properties[key]
|
|
172
|
+
|
|
173
|
+
def __contains__(self, key: str) -> bool:
|
|
174
|
+
return key in self.additional_properties
|
|
175
|
+
|
|
176
|
+
def get(self, key, default=None) -> Optional[Any]:
|
|
177
|
+
return self.additional_properties.get(key, default)
|
|
178
|
+
|
|
179
|
+
@property
|
|
180
|
+
def completion_status(self) -> EntryReviewProcessCompletionStatus:
|
|
181
|
+
""" State of the Entry at the end of the Review Process """
|
|
182
|
+
if isinstance(self._completion_status, Unset):
|
|
183
|
+
raise NotPresentError(self, "completion_status")
|
|
184
|
+
return self._completion_status
|
|
185
|
+
|
|
186
|
+
@completion_status.setter
|
|
187
|
+
def completion_status(self, value: EntryReviewProcessCompletionStatus) -> None:
|
|
188
|
+
self._completion_status = value
|
|
189
|
+
|
|
190
|
+
@completion_status.deleter
|
|
191
|
+
def completion_status(self) -> None:
|
|
192
|
+
self._completion_status = UNSET
|
|
193
|
+
|
|
194
|
+
@property
|
|
195
|
+
def id(self) -> str:
|
|
196
|
+
""" ID of the Review Process """
|
|
197
|
+
if isinstance(self._id, Unset):
|
|
198
|
+
raise NotPresentError(self, "id")
|
|
199
|
+
return self._id
|
|
200
|
+
|
|
201
|
+
@id.setter
|
|
202
|
+
def id(self, value: str) -> None:
|
|
203
|
+
self._id = value
|
|
204
|
+
|
|
205
|
+
@id.deleter
|
|
206
|
+
def id(self) -> None:
|
|
207
|
+
self._id = UNSET
|
|
208
|
+
|
|
209
|
+
@property
|
|
210
|
+
def name(self) -> str:
|
|
211
|
+
""" Name of the Review Process """
|
|
212
|
+
if isinstance(self._name, Unset):
|
|
213
|
+
raise NotPresentError(self, "name")
|
|
214
|
+
return self._name
|
|
215
|
+
|
|
216
|
+
@name.setter
|
|
217
|
+
def name(self, value: str) -> None:
|
|
218
|
+
self._name = value
|
|
219
|
+
|
|
220
|
+
@name.deleter
|
|
221
|
+
def name(self) -> None:
|
|
222
|
+
self._name = UNSET
|
|
223
|
+
|
|
224
|
+
@property
|
|
225
|
+
def stages(self) -> List[EntryReviewProcessStagesItem]:
|
|
226
|
+
""" Array of Stages for the Review Process """
|
|
227
|
+
if isinstance(self._stages, Unset):
|
|
228
|
+
raise NotPresentError(self, "stages")
|
|
229
|
+
return self._stages
|
|
230
|
+
|
|
231
|
+
@stages.setter
|
|
232
|
+
def stages(self, value: List[EntryReviewProcessStagesItem]) -> None:
|
|
233
|
+
self._stages = value
|
|
234
|
+
|
|
235
|
+
@stages.deleter
|
|
236
|
+
def stages(self) -> None:
|
|
237
|
+
self._stages = UNSET
|
|
238
|
+
|
|
239
|
+
@property
|
|
240
|
+
def type(self) -> EntryReviewProcessType:
|
|
241
|
+
""" Type of the Review Process """
|
|
242
|
+
if isinstance(self._type, Unset):
|
|
243
|
+
raise NotPresentError(self, "type")
|
|
244
|
+
return self._type
|
|
245
|
+
|
|
246
|
+
@type.setter
|
|
247
|
+
def type(self, value: EntryReviewProcessType) -> None:
|
|
248
|
+
self._type = value
|
|
249
|
+
|
|
250
|
+
@type.deleter
|
|
251
|
+
def type(self) -> None:
|
|
252
|
+
self._type = UNSET
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from functools import lru_cache
|
|
3
|
+
from typing import cast
|
|
4
|
+
|
|
5
|
+
from ..extensions import Enums
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class EntryReviewProcessCompletionStatus(Enums.KnownString):
|
|
9
|
+
APPROVED = "APPROVED"
|
|
10
|
+
COMPLETED = "COMPLETED"
|
|
11
|
+
ACCEPTED = "ACCEPTED"
|
|
12
|
+
REVIEWED = "REVIEWED"
|
|
13
|
+
WITNESSED = "WITNESSED"
|
|
14
|
+
SELF_REVIEWED = "SELF_REVIEWED"
|
|
15
|
+
|
|
16
|
+
def __str__(self) -> str:
|
|
17
|
+
return str(self.value)
|
|
18
|
+
|
|
19
|
+
@staticmethod
|
|
20
|
+
@lru_cache(maxsize=None)
|
|
21
|
+
def of_unknown(val: str) -> "EntryReviewProcessCompletionStatus":
|
|
22
|
+
if not isinstance(val, str):
|
|
23
|
+
raise ValueError(
|
|
24
|
+
f"Value of EntryReviewProcessCompletionStatus must be a string (encountered: {val})"
|
|
25
|
+
)
|
|
26
|
+
newcls = Enum("EntryReviewProcessCompletionStatus", {"_UNKNOWN": val}, type=Enums.UnknownString) # type: ignore
|
|
27
|
+
return cast(EntryReviewProcessCompletionStatus, getattr(newcls, "_UNKNOWN"))
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
from typing import Any, cast, Dict, List, Optional, Type, TypeVar, Union
|
|
2
|
+
|
|
3
|
+
import attr
|
|
4
|
+
|
|
5
|
+
from ..extensions import NotPresentError
|
|
6
|
+
from ..models.entry_review_process_stages_item_action_label import EntryReviewProcessStagesItemActionLabel
|
|
7
|
+
from ..models.entry_review_process_stages_item_reviewers_item import EntryReviewProcessStagesItemReviewersItem
|
|
8
|
+
from ..types import UNSET, Unset
|
|
9
|
+
|
|
10
|
+
T = TypeVar("T", bound="EntryReviewProcessStagesItem")
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
@attr.s(auto_attribs=True, repr=False)
|
|
14
|
+
class EntryReviewProcessStagesItem:
|
|
15
|
+
""" """
|
|
16
|
+
|
|
17
|
+
_action_label: Union[Unset, EntryReviewProcessStagesItemActionLabel] = UNSET
|
|
18
|
+
_id: Union[Unset, str] = UNSET
|
|
19
|
+
_name: Union[Unset, str] = UNSET
|
|
20
|
+
_reviewers: Union[Unset, List[EntryReviewProcessStagesItemReviewersItem]] = UNSET
|
|
21
|
+
additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
|
|
22
|
+
|
|
23
|
+
def __repr__(self):
|
|
24
|
+
fields = []
|
|
25
|
+
fields.append("action_label={}".format(repr(self._action_label)))
|
|
26
|
+
fields.append("id={}".format(repr(self._id)))
|
|
27
|
+
fields.append("name={}".format(repr(self._name)))
|
|
28
|
+
fields.append("reviewers={}".format(repr(self._reviewers)))
|
|
29
|
+
fields.append("additional_properties={}".format(repr(self.additional_properties)))
|
|
30
|
+
return "EntryReviewProcessStagesItem({})".format(", ".join(fields))
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
33
|
+
action_label: Union[Unset, int] = UNSET
|
|
34
|
+
if not isinstance(self._action_label, Unset):
|
|
35
|
+
action_label = self._action_label.value
|
|
36
|
+
|
|
37
|
+
id = self._id
|
|
38
|
+
name = self._name
|
|
39
|
+
reviewers: Union[Unset, List[Any]] = UNSET
|
|
40
|
+
if not isinstance(self._reviewers, Unset):
|
|
41
|
+
reviewers = []
|
|
42
|
+
for reviewers_item_data in self._reviewers:
|
|
43
|
+
reviewers_item = reviewers_item_data.to_dict()
|
|
44
|
+
|
|
45
|
+
reviewers.append(reviewers_item)
|
|
46
|
+
|
|
47
|
+
field_dict: Dict[str, Any] = {}
|
|
48
|
+
field_dict.update(self.additional_properties)
|
|
49
|
+
# Allow the model to serialize even if it was created outside of the constructor, circumventing validation
|
|
50
|
+
if action_label is not UNSET:
|
|
51
|
+
field_dict["actionLabel"] = action_label
|
|
52
|
+
if id is not UNSET:
|
|
53
|
+
field_dict["id"] = id
|
|
54
|
+
if name is not UNSET:
|
|
55
|
+
field_dict["name"] = name
|
|
56
|
+
if reviewers is not UNSET:
|
|
57
|
+
field_dict["reviewers"] = reviewers
|
|
58
|
+
|
|
59
|
+
return field_dict
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any], strict: bool = False) -> T:
|
|
63
|
+
d = src_dict.copy()
|
|
64
|
+
|
|
65
|
+
def get_action_label() -> Union[Unset, EntryReviewProcessStagesItemActionLabel]:
|
|
66
|
+
action_label = UNSET
|
|
67
|
+
_action_label = d.pop("actionLabel")
|
|
68
|
+
if _action_label is not None and _action_label is not UNSET:
|
|
69
|
+
try:
|
|
70
|
+
action_label = EntryReviewProcessStagesItemActionLabel(_action_label)
|
|
71
|
+
except ValueError:
|
|
72
|
+
action_label = EntryReviewProcessStagesItemActionLabel.of_unknown(_action_label)
|
|
73
|
+
|
|
74
|
+
return action_label
|
|
75
|
+
|
|
76
|
+
try:
|
|
77
|
+
action_label = get_action_label()
|
|
78
|
+
except KeyError:
|
|
79
|
+
if strict:
|
|
80
|
+
raise
|
|
81
|
+
action_label = cast(Union[Unset, EntryReviewProcessStagesItemActionLabel], UNSET)
|
|
82
|
+
|
|
83
|
+
def get_id() -> Union[Unset, str]:
|
|
84
|
+
id = d.pop("id")
|
|
85
|
+
return id
|
|
86
|
+
|
|
87
|
+
try:
|
|
88
|
+
id = get_id()
|
|
89
|
+
except KeyError:
|
|
90
|
+
if strict:
|
|
91
|
+
raise
|
|
92
|
+
id = cast(Union[Unset, str], UNSET)
|
|
93
|
+
|
|
94
|
+
def get_name() -> Union[Unset, str]:
|
|
95
|
+
name = d.pop("name")
|
|
96
|
+
return name
|
|
97
|
+
|
|
98
|
+
try:
|
|
99
|
+
name = get_name()
|
|
100
|
+
except KeyError:
|
|
101
|
+
if strict:
|
|
102
|
+
raise
|
|
103
|
+
name = cast(Union[Unset, str], UNSET)
|
|
104
|
+
|
|
105
|
+
def get_reviewers() -> Union[Unset, List[EntryReviewProcessStagesItemReviewersItem]]:
|
|
106
|
+
reviewers = []
|
|
107
|
+
_reviewers = d.pop("reviewers")
|
|
108
|
+
for reviewers_item_data in _reviewers or []:
|
|
109
|
+
reviewers_item = EntryReviewProcessStagesItemReviewersItem.from_dict(
|
|
110
|
+
reviewers_item_data, strict=False
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
reviewers.append(reviewers_item)
|
|
114
|
+
|
|
115
|
+
return reviewers
|
|
116
|
+
|
|
117
|
+
try:
|
|
118
|
+
reviewers = get_reviewers()
|
|
119
|
+
except KeyError:
|
|
120
|
+
if strict:
|
|
121
|
+
raise
|
|
122
|
+
reviewers = cast(Union[Unset, List[EntryReviewProcessStagesItemReviewersItem]], UNSET)
|
|
123
|
+
|
|
124
|
+
entry_review_process_stages_item = cls(
|
|
125
|
+
action_label=action_label,
|
|
126
|
+
id=id,
|
|
127
|
+
name=name,
|
|
128
|
+
reviewers=reviewers,
|
|
129
|
+
)
|
|
130
|
+
|
|
131
|
+
entry_review_process_stages_item.additional_properties = d
|
|
132
|
+
return entry_review_process_stages_item
|
|
133
|
+
|
|
134
|
+
@property
|
|
135
|
+
def additional_keys(self) -> List[str]:
|
|
136
|
+
return list(self.additional_properties.keys())
|
|
137
|
+
|
|
138
|
+
def __getitem__(self, key: str) -> Any:
|
|
139
|
+
return self.additional_properties[key]
|
|
140
|
+
|
|
141
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
142
|
+
self.additional_properties[key] = value
|
|
143
|
+
|
|
144
|
+
def __delitem__(self, key: str) -> None:
|
|
145
|
+
del self.additional_properties[key]
|
|
146
|
+
|
|
147
|
+
def __contains__(self, key: str) -> bool:
|
|
148
|
+
return key in self.additional_properties
|
|
149
|
+
|
|
150
|
+
def get(self, key, default=None) -> Optional[Any]:
|
|
151
|
+
return self.additional_properties.get(key, default)
|
|
152
|
+
|
|
153
|
+
@property
|
|
154
|
+
def action_label(self) -> EntryReviewProcessStagesItemActionLabel:
|
|
155
|
+
""" Action reviewer is doing during the review """
|
|
156
|
+
if isinstance(self._action_label, Unset):
|
|
157
|
+
raise NotPresentError(self, "action_label")
|
|
158
|
+
return self._action_label
|
|
159
|
+
|
|
160
|
+
@action_label.setter
|
|
161
|
+
def action_label(self, value: EntryReviewProcessStagesItemActionLabel) -> None:
|
|
162
|
+
self._action_label = value
|
|
163
|
+
|
|
164
|
+
@action_label.deleter
|
|
165
|
+
def action_label(self) -> None:
|
|
166
|
+
self._action_label = UNSET
|
|
167
|
+
|
|
168
|
+
@property
|
|
169
|
+
def id(self) -> str:
|
|
170
|
+
""" ID of the Review Stage """
|
|
171
|
+
if isinstance(self._id, Unset):
|
|
172
|
+
raise NotPresentError(self, "id")
|
|
173
|
+
return self._id
|
|
174
|
+
|
|
175
|
+
@id.setter
|
|
176
|
+
def id(self, value: str) -> None:
|
|
177
|
+
self._id = value
|
|
178
|
+
|
|
179
|
+
@id.deleter
|
|
180
|
+
def id(self) -> None:
|
|
181
|
+
self._id = UNSET
|
|
182
|
+
|
|
183
|
+
@property
|
|
184
|
+
def name(self) -> str:
|
|
185
|
+
""" Name of the Review Stage """
|
|
186
|
+
if isinstance(self._name, Unset):
|
|
187
|
+
raise NotPresentError(self, "name")
|
|
188
|
+
return self._name
|
|
189
|
+
|
|
190
|
+
@name.setter
|
|
191
|
+
def name(self, value: str) -> None:
|
|
192
|
+
self._name = value
|
|
193
|
+
|
|
194
|
+
@name.deleter
|
|
195
|
+
def name(self) -> None:
|
|
196
|
+
self._name = UNSET
|
|
197
|
+
|
|
198
|
+
@property
|
|
199
|
+
def reviewers(self) -> List[EntryReviewProcessStagesItemReviewersItem]:
|
|
200
|
+
""" Reviewers for the Review Stage """
|
|
201
|
+
if isinstance(self._reviewers, Unset):
|
|
202
|
+
raise NotPresentError(self, "reviewers")
|
|
203
|
+
return self._reviewers
|
|
204
|
+
|
|
205
|
+
@reviewers.setter
|
|
206
|
+
def reviewers(self, value: List[EntryReviewProcessStagesItemReviewersItem]) -> None:
|
|
207
|
+
self._reviewers = value
|
|
208
|
+
|
|
209
|
+
@reviewers.deleter
|
|
210
|
+
def reviewers(self) -> None:
|
|
211
|
+
self._reviewers = UNSET
|