benchling-api-client 2.0.415__py3-none-any.whl → 2.0.416__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/container_content.py +183 -26
- benchling_api_client/models/entity.py +19 -7
- benchling_api_client/models/entity_or_inaccessible_resource.py +19 -7
- benchling_api_client/models/molecule_with_entity_type.py +787 -0
- benchling_api_client/models/molecule_with_entity_type_entity_type.py +22 -0
- benchling_api_client/models/registered_entities_list.py +89 -32
- benchling_api_client/models/request_response_samples_item_entity.py +216 -74
- benchling_api_client/models/rna_sequence_with_entity_type.py +1151 -0
- benchling_api_client/models/rna_sequence_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/models/aa_sequence_with_entity_type.py +865 -0
- benchling_api_client/v2/beta/models/aa_sequence_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/models/container_content.py +183 -26
- benchling_api_client/v2/beta/models/custom_entity_creator.py +2 -100
- benchling_api_client/v2/beta/models/custom_entity_with_entity_type.py +747 -0
- benchling_api_client/v2/beta/models/custom_entity_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/models/dna_oligo_with_entity_type.py +972 -0
- benchling_api_client/v2/beta/models/dna_oligo_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/models/dna_sequence_with_entity_type.py +1102 -0
- benchling_api_client/v2/beta/models/dna_sequence_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/models/entity.py +19 -7
- benchling_api_client/v2/beta/models/entity_or_inaccessible_resource.py +19 -7
- benchling_api_client/v2/beta/models/mixture_creator.py +2 -100
- benchling_api_client/v2/beta/models/mixture_with_entity_type.py +867 -0
- benchling_api_client/v2/beta/models/mixture_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/models/molecule_with_entity_type.py +787 -0
- benchling_api_client/v2/beta/models/molecule_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/models/rna_oligo_with_entity_type.py +972 -0
- benchling_api_client/v2/beta/models/rna_oligo_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/models/rna_sequence.py +1109 -0
- benchling_api_client/v2/beta/models/rna_sequence_part.py +183 -0
- benchling_api_client/v2/beta/models/rna_sequence_with_entity_type.py +1151 -0
- benchling_api_client/v2/beta/models/rna_sequence_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/openapi.yaml +216 -6
- benchling_api_client/v2/stable/models/container_content.py +183 -26
- benchling_api_client/v2/stable/models/entity.py +19 -7
- benchling_api_client/v2/stable/models/entity_or_inaccessible_resource.py +19 -7
- benchling_api_client/v2/stable/models/molecule_with_entity_type.py +787 -0
- benchling_api_client/v2/stable/models/molecule_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/stable/models/registered_entities_list.py +89 -32
- benchling_api_client/v2/stable/models/request_response_samples_item_entity.py +216 -74
- benchling_api_client/v2/stable/models/rna_sequence_with_entity_type.py +1151 -0
- benchling_api_client/v2/stable/models/rna_sequence_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/stable/openapi.yaml +40 -22
- {benchling_api_client-2.0.415.dist-info → benchling_api_client-2.0.416.dist-info}/METADATA +1 -1
- {benchling_api_client-2.0.415.dist-info → benchling_api_client-2.0.416.dist-info}/RECORD +47 -21
- {benchling_api_client-2.0.415.dist-info → benchling_api_client-2.0.416.dist-info}/LICENSE +0 -0
- {benchling_api_client-2.0.415.dist-info → benchling_api_client-2.0.416.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
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 MoleculeWithEntityTypeEntityType(Enums.KnownString):
|
|
9
|
+
MOLECULE = "molecule"
|
|
10
|
+
|
|
11
|
+
def __str__(self) -> str:
|
|
12
|
+
return str(self.value)
|
|
13
|
+
|
|
14
|
+
@staticmethod
|
|
15
|
+
@lru_cache(maxsize=None)
|
|
16
|
+
def of_unknown(val: str) -> "MoleculeWithEntityTypeEntityType":
|
|
17
|
+
if not isinstance(val, str):
|
|
18
|
+
raise ValueError(
|
|
19
|
+
f"Value of MoleculeWithEntityTypeEntityType must be a string (encountered: {val})"
|
|
20
|
+
)
|
|
21
|
+
newcls = Enum("MoleculeWithEntityTypeEntityType", {"_UNKNOWN": val}, type=Enums.UnknownString) # type: ignore
|
|
22
|
+
return cast(MoleculeWithEntityTypeEntityType, getattr(newcls, "_UNKNOWN"))
|
|
@@ -8,7 +8,9 @@ from ..models.custom_entity_with_entity_type import CustomEntityWithEntityType
|
|
|
8
8
|
from ..models.dna_oligo_with_entity_type import DnaOligoWithEntityType
|
|
9
9
|
from ..models.dna_sequence_with_entity_type import DnaSequenceWithEntityType
|
|
10
10
|
from ..models.mixture_with_entity_type import MixtureWithEntityType
|
|
11
|
+
from ..models.molecule_with_entity_type import MoleculeWithEntityType
|
|
11
12
|
from ..models.rna_oligo_with_entity_type import RnaOligoWithEntityType
|
|
13
|
+
from ..models.rna_sequence_with_entity_type import RnaSequenceWithEntityType
|
|
12
14
|
from ..types import UNSET, Unset
|
|
13
15
|
|
|
14
16
|
T = TypeVar("T", bound="RegisteredEntitiesList")
|
|
@@ -23,11 +25,13 @@ class RegisteredEntitiesList:
|
|
|
23
25
|
List[
|
|
24
26
|
Union[
|
|
25
27
|
DnaSequenceWithEntityType,
|
|
26
|
-
|
|
28
|
+
RnaSequenceWithEntityType,
|
|
27
29
|
AaSequenceWithEntityType,
|
|
28
30
|
MixtureWithEntityType,
|
|
29
31
|
DnaOligoWithEntityType,
|
|
30
32
|
RnaOligoWithEntityType,
|
|
33
|
+
MoleculeWithEntityType,
|
|
34
|
+
CustomEntityWithEntityType,
|
|
31
35
|
UnknownType,
|
|
32
36
|
]
|
|
33
37
|
],
|
|
@@ -50,7 +54,7 @@ class RegisteredEntitiesList:
|
|
|
50
54
|
elif isinstance(entities_item_data, DnaSequenceWithEntityType):
|
|
51
55
|
entities_item = entities_item_data.to_dict()
|
|
52
56
|
|
|
53
|
-
elif isinstance(entities_item_data,
|
|
57
|
+
elif isinstance(entities_item_data, RnaSequenceWithEntityType):
|
|
54
58
|
entities_item = entities_item_data.to_dict()
|
|
55
59
|
|
|
56
60
|
elif isinstance(entities_item_data, AaSequenceWithEntityType):
|
|
@@ -62,6 +66,12 @@ class RegisteredEntitiesList:
|
|
|
62
66
|
elif isinstance(entities_item_data, DnaOligoWithEntityType):
|
|
63
67
|
entities_item = entities_item_data.to_dict()
|
|
64
68
|
|
|
69
|
+
elif isinstance(entities_item_data, RnaOligoWithEntityType):
|
|
70
|
+
entities_item = entities_item_data.to_dict()
|
|
71
|
+
|
|
72
|
+
elif isinstance(entities_item_data, MoleculeWithEntityType):
|
|
73
|
+
entities_item = entities_item_data.to_dict()
|
|
74
|
+
|
|
65
75
|
else:
|
|
66
76
|
entities_item = entities_item_data.to_dict()
|
|
67
77
|
|
|
@@ -84,11 +94,13 @@ class RegisteredEntitiesList:
|
|
|
84
94
|
List[
|
|
85
95
|
Union[
|
|
86
96
|
DnaSequenceWithEntityType,
|
|
87
|
-
|
|
97
|
+
RnaSequenceWithEntityType,
|
|
88
98
|
AaSequenceWithEntityType,
|
|
89
99
|
MixtureWithEntityType,
|
|
90
100
|
DnaOligoWithEntityType,
|
|
91
101
|
RnaOligoWithEntityType,
|
|
102
|
+
MoleculeWithEntityType,
|
|
103
|
+
CustomEntityWithEntityType,
|
|
92
104
|
UnknownType,
|
|
93
105
|
]
|
|
94
106
|
],
|
|
@@ -101,96 +113,135 @@ class RegisteredEntitiesList:
|
|
|
101
113
|
data: Union[Dict[str, Any]]
|
|
102
114
|
) -> Union[
|
|
103
115
|
DnaSequenceWithEntityType,
|
|
104
|
-
|
|
116
|
+
RnaSequenceWithEntityType,
|
|
105
117
|
AaSequenceWithEntityType,
|
|
106
118
|
MixtureWithEntityType,
|
|
107
119
|
DnaOligoWithEntityType,
|
|
108
120
|
RnaOligoWithEntityType,
|
|
121
|
+
MoleculeWithEntityType,
|
|
122
|
+
CustomEntityWithEntityType,
|
|
109
123
|
UnknownType,
|
|
110
124
|
]:
|
|
111
125
|
entities_item: Union[
|
|
112
126
|
DnaSequenceWithEntityType,
|
|
113
|
-
|
|
127
|
+
RnaSequenceWithEntityType,
|
|
114
128
|
AaSequenceWithEntityType,
|
|
115
129
|
MixtureWithEntityType,
|
|
116
130
|
DnaOligoWithEntityType,
|
|
117
131
|
RnaOligoWithEntityType,
|
|
132
|
+
MoleculeWithEntityType,
|
|
133
|
+
CustomEntityWithEntityType,
|
|
118
134
|
UnknownType,
|
|
119
135
|
]
|
|
120
136
|
discriminator_value: str = cast(str, data.get("entityType"))
|
|
121
137
|
if discriminator_value is not None:
|
|
138
|
+
entity: Union[
|
|
139
|
+
DnaSequenceWithEntityType,
|
|
140
|
+
RnaSequenceWithEntityType,
|
|
141
|
+
AaSequenceWithEntityType,
|
|
142
|
+
MixtureWithEntityType,
|
|
143
|
+
DnaOligoWithEntityType,
|
|
144
|
+
RnaOligoWithEntityType,
|
|
145
|
+
MoleculeWithEntityType,
|
|
146
|
+
CustomEntityWithEntityType,
|
|
147
|
+
UnknownType,
|
|
148
|
+
]
|
|
122
149
|
if discriminator_value == "aa_sequence":
|
|
123
|
-
|
|
150
|
+
entity = AaSequenceWithEntityType.from_dict(data, strict=False)
|
|
124
151
|
|
|
125
|
-
return
|
|
152
|
+
return entity
|
|
126
153
|
if discriminator_value == "custom_entity":
|
|
127
|
-
|
|
154
|
+
entity = CustomEntityWithEntityType.from_dict(data, strict=False)
|
|
128
155
|
|
|
129
|
-
return
|
|
156
|
+
return entity
|
|
130
157
|
if discriminator_value == "dna_oligo":
|
|
131
|
-
|
|
158
|
+
entity = DnaOligoWithEntityType.from_dict(data, strict=False)
|
|
132
159
|
|
|
133
|
-
return
|
|
160
|
+
return entity
|
|
134
161
|
if discriminator_value == "dna_sequence":
|
|
135
|
-
|
|
162
|
+
entity = DnaSequenceWithEntityType.from_dict(data, strict=False)
|
|
136
163
|
|
|
137
|
-
return
|
|
164
|
+
return entity
|
|
138
165
|
if discriminator_value == "mixture":
|
|
139
|
-
|
|
166
|
+
entity = MixtureWithEntityType.from_dict(data, strict=False)
|
|
140
167
|
|
|
141
|
-
return
|
|
168
|
+
return entity
|
|
169
|
+
if discriminator_value == "molecule":
|
|
170
|
+
entity = MoleculeWithEntityType.from_dict(data, strict=False)
|
|
171
|
+
|
|
172
|
+
return entity
|
|
142
173
|
if discriminator_value == "rna_oligo":
|
|
143
|
-
|
|
174
|
+
entity = RnaOligoWithEntityType.from_dict(data, strict=False)
|
|
175
|
+
|
|
176
|
+
return entity
|
|
177
|
+
if discriminator_value == "rna_sequence":
|
|
178
|
+
entity = RnaSequenceWithEntityType.from_dict(data, strict=False)
|
|
144
179
|
|
|
145
|
-
return
|
|
180
|
+
return entity
|
|
146
181
|
|
|
147
182
|
return UnknownType(value=data)
|
|
148
183
|
try:
|
|
149
184
|
if not isinstance(data, dict):
|
|
150
185
|
raise TypeError()
|
|
151
|
-
|
|
186
|
+
entity = DnaSequenceWithEntityType.from_dict(data, strict=True)
|
|
187
|
+
|
|
188
|
+
return entity
|
|
189
|
+
except: # noqa: E722
|
|
190
|
+
pass
|
|
191
|
+
try:
|
|
192
|
+
if not isinstance(data, dict):
|
|
193
|
+
raise TypeError()
|
|
194
|
+
entity = RnaSequenceWithEntityType.from_dict(data, strict=True)
|
|
195
|
+
|
|
196
|
+
return entity
|
|
197
|
+
except: # noqa: E722
|
|
198
|
+
pass
|
|
199
|
+
try:
|
|
200
|
+
if not isinstance(data, dict):
|
|
201
|
+
raise TypeError()
|
|
202
|
+
entity = AaSequenceWithEntityType.from_dict(data, strict=True)
|
|
152
203
|
|
|
153
|
-
return
|
|
204
|
+
return entity
|
|
154
205
|
except: # noqa: E722
|
|
155
206
|
pass
|
|
156
207
|
try:
|
|
157
208
|
if not isinstance(data, dict):
|
|
158
209
|
raise TypeError()
|
|
159
|
-
|
|
210
|
+
entity = MixtureWithEntityType.from_dict(data, strict=True)
|
|
160
211
|
|
|
161
|
-
return
|
|
212
|
+
return entity
|
|
162
213
|
except: # noqa: E722
|
|
163
214
|
pass
|
|
164
215
|
try:
|
|
165
216
|
if not isinstance(data, dict):
|
|
166
217
|
raise TypeError()
|
|
167
|
-
|
|
218
|
+
entity = DnaOligoWithEntityType.from_dict(data, strict=True)
|
|
168
219
|
|
|
169
|
-
return
|
|
220
|
+
return entity
|
|
170
221
|
except: # noqa: E722
|
|
171
222
|
pass
|
|
172
223
|
try:
|
|
173
224
|
if not isinstance(data, dict):
|
|
174
225
|
raise TypeError()
|
|
175
|
-
|
|
226
|
+
entity = RnaOligoWithEntityType.from_dict(data, strict=True)
|
|
176
227
|
|
|
177
|
-
return
|
|
228
|
+
return entity
|
|
178
229
|
except: # noqa: E722
|
|
179
230
|
pass
|
|
180
231
|
try:
|
|
181
232
|
if not isinstance(data, dict):
|
|
182
233
|
raise TypeError()
|
|
183
|
-
|
|
234
|
+
entity = MoleculeWithEntityType.from_dict(data, strict=True)
|
|
184
235
|
|
|
185
|
-
return
|
|
236
|
+
return entity
|
|
186
237
|
except: # noqa: E722
|
|
187
238
|
pass
|
|
188
239
|
try:
|
|
189
240
|
if not isinstance(data, dict):
|
|
190
241
|
raise TypeError()
|
|
191
|
-
|
|
242
|
+
entity = CustomEntityWithEntityType.from_dict(data, strict=True)
|
|
192
243
|
|
|
193
|
-
return
|
|
244
|
+
return entity
|
|
194
245
|
except: # noqa: E722
|
|
195
246
|
pass
|
|
196
247
|
return UnknownType(data)
|
|
@@ -212,11 +263,13 @@ class RegisteredEntitiesList:
|
|
|
212
263
|
List[
|
|
213
264
|
Union[
|
|
214
265
|
DnaSequenceWithEntityType,
|
|
215
|
-
|
|
266
|
+
RnaSequenceWithEntityType,
|
|
216
267
|
AaSequenceWithEntityType,
|
|
217
268
|
MixtureWithEntityType,
|
|
218
269
|
DnaOligoWithEntityType,
|
|
219
270
|
RnaOligoWithEntityType,
|
|
271
|
+
MoleculeWithEntityType,
|
|
272
|
+
CustomEntityWithEntityType,
|
|
220
273
|
UnknownType,
|
|
221
274
|
]
|
|
222
275
|
],
|
|
@@ -256,11 +309,13 @@ class RegisteredEntitiesList:
|
|
|
256
309
|
) -> List[
|
|
257
310
|
Union[
|
|
258
311
|
DnaSequenceWithEntityType,
|
|
259
|
-
|
|
312
|
+
RnaSequenceWithEntityType,
|
|
260
313
|
AaSequenceWithEntityType,
|
|
261
314
|
MixtureWithEntityType,
|
|
262
315
|
DnaOligoWithEntityType,
|
|
263
316
|
RnaOligoWithEntityType,
|
|
317
|
+
MoleculeWithEntityType,
|
|
318
|
+
CustomEntityWithEntityType,
|
|
264
319
|
UnknownType,
|
|
265
320
|
]
|
|
266
321
|
]:
|
|
@@ -274,11 +329,13 @@ class RegisteredEntitiesList:
|
|
|
274
329
|
value: List[
|
|
275
330
|
Union[
|
|
276
331
|
DnaSequenceWithEntityType,
|
|
277
|
-
|
|
332
|
+
RnaSequenceWithEntityType,
|
|
278
333
|
AaSequenceWithEntityType,
|
|
279
334
|
MixtureWithEntityType,
|
|
280
335
|
DnaOligoWithEntityType,
|
|
281
336
|
RnaOligoWithEntityType,
|
|
337
|
+
MoleculeWithEntityType,
|
|
338
|
+
CustomEntityWithEntityType,
|
|
282
339
|
UnknownType,
|
|
283
340
|
]
|
|
284
341
|
],
|