benchling-api-client 2.0.414__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.
Files changed (56) hide show
  1. benchling_api_client/models/container_content.py +183 -26
  2. benchling_api_client/models/entity.py +19 -7
  3. benchling_api_client/models/entity_or_inaccessible_resource.py +19 -7
  4. benchling_api_client/models/field_type.py +1 -0
  5. benchling_api_client/models/molecule_with_entity_type.py +787 -0
  6. benchling_api_client/models/molecule_with_entity_type_entity_type.py +22 -0
  7. benchling_api_client/models/registered_entities_list.py +89 -32
  8. benchling_api_client/models/request_response_samples_item_entity.py +216 -74
  9. benchling_api_client/models/rna_sequence_with_entity_type.py +1151 -0
  10. benchling_api_client/models/rna_sequence_with_entity_type_entity_type.py +22 -0
  11. benchling_api_client/models/simple_field_definition_type.py +1 -0
  12. benchling_api_client/v2/alpha/models/app_config_field_type.py +1 -0
  13. benchling_api_client/v2/alpha/models/field_type.py +1 -0
  14. benchling_api_client/v2/alpha/openapi.yaml +2 -0
  15. benchling_api_client/v2/beta/models/aa_sequence_with_entity_type.py +865 -0
  16. benchling_api_client/v2/beta/models/aa_sequence_with_entity_type_entity_type.py +22 -0
  17. benchling_api_client/v2/beta/models/app_config_field_type.py +1 -0
  18. benchling_api_client/v2/beta/models/container_content.py +183 -26
  19. benchling_api_client/v2/beta/models/custom_entity_creator.py +2 -100
  20. benchling_api_client/v2/beta/models/custom_entity_with_entity_type.py +747 -0
  21. benchling_api_client/v2/beta/models/custom_entity_with_entity_type_entity_type.py +22 -0
  22. benchling_api_client/v2/beta/models/dna_oligo_with_entity_type.py +972 -0
  23. benchling_api_client/v2/beta/models/dna_oligo_with_entity_type_entity_type.py +22 -0
  24. benchling_api_client/v2/beta/models/dna_sequence_with_entity_type.py +1102 -0
  25. benchling_api_client/v2/beta/models/dna_sequence_with_entity_type_entity_type.py +22 -0
  26. benchling_api_client/v2/beta/models/entity.py +19 -7
  27. benchling_api_client/v2/beta/models/entity_or_inaccessible_resource.py +19 -7
  28. benchling_api_client/v2/beta/models/field_type.py +1 -0
  29. benchling_api_client/v2/beta/models/mixture_creator.py +2 -100
  30. benchling_api_client/v2/beta/models/mixture_with_entity_type.py +867 -0
  31. benchling_api_client/v2/beta/models/mixture_with_entity_type_entity_type.py +22 -0
  32. benchling_api_client/v2/beta/models/molecule_with_entity_type.py +787 -0
  33. benchling_api_client/v2/beta/models/molecule_with_entity_type_entity_type.py +22 -0
  34. benchling_api_client/v2/beta/models/rna_oligo_with_entity_type.py +972 -0
  35. benchling_api_client/v2/beta/models/rna_oligo_with_entity_type_entity_type.py +22 -0
  36. benchling_api_client/v2/beta/models/rna_sequence.py +1109 -0
  37. benchling_api_client/v2/beta/models/rna_sequence_part.py +183 -0
  38. benchling_api_client/v2/beta/models/rna_sequence_with_entity_type.py +1151 -0
  39. benchling_api_client/v2/beta/models/rna_sequence_with_entity_type_entity_type.py +22 -0
  40. benchling_api_client/v2/beta/openapi.yaml +218 -6
  41. benchling_api_client/v2/stable/models/container_content.py +183 -26
  42. benchling_api_client/v2/stable/models/entity.py +19 -7
  43. benchling_api_client/v2/stable/models/entity_or_inaccessible_resource.py +19 -7
  44. benchling_api_client/v2/stable/models/field_type.py +1 -0
  45. benchling_api_client/v2/stable/models/molecule_with_entity_type.py +787 -0
  46. benchling_api_client/v2/stable/models/molecule_with_entity_type_entity_type.py +22 -0
  47. benchling_api_client/v2/stable/models/registered_entities_list.py +89 -32
  48. benchling_api_client/v2/stable/models/request_response_samples_item_entity.py +216 -74
  49. benchling_api_client/v2/stable/models/rna_sequence_with_entity_type.py +1151 -0
  50. benchling_api_client/v2/stable/models/rna_sequence_with_entity_type_entity_type.py +22 -0
  51. benchling_api_client/v2/stable/models/simple_field_definition_type.py +1 -0
  52. benchling_api_client/v2/stable/openapi.yaml +42 -22
  53. {benchling_api_client-2.0.414.dist-info → benchling_api_client-2.0.416.dist-info}/METADATA +1 -1
  54. {benchling_api_client-2.0.414.dist-info → benchling_api_client-2.0.416.dist-info}/RECORD +56 -30
  55. {benchling_api_client-2.0.414.dist-info → benchling_api_client-2.0.416.dist-info}/LICENSE +0 -0
  56. {benchling_api_client-2.0.414.dist-info → benchling_api_client-2.0.416.dist-info}/WHEEL +0 -0
@@ -0,0 +1,972 @@
1
+ import datetime
2
+ from typing import Any, cast, Dict, List, Optional, Type, TypeVar, Union
3
+
4
+ import attr
5
+ from dateutil.parser import isoparse
6
+
7
+ from ..extensions import NotPresentError
8
+ from ..models.archive_record import ArchiveRecord
9
+ from ..models.custom_fields import CustomFields
10
+ from ..models.dna_annotation import DnaAnnotation
11
+ from ..models.dna_oligo_with_entity_type_entity_type import DnaOligoWithEntityTypeEntityType
12
+ from ..models.fields import Fields
13
+ from ..models.oligo_nucleotide_type import OligoNucleotideType
14
+ from ..models.registration_origin import RegistrationOrigin
15
+ from ..models.schema_summary import SchemaSummary
16
+ from ..models.user_summary import UserSummary
17
+ from ..types import UNSET, Unset
18
+
19
+ T = TypeVar("T", bound="DnaOligoWithEntityType")
20
+
21
+
22
+ @attr.s(auto_attribs=True, repr=False)
23
+ class DnaOligoWithEntityType:
24
+ """ """
25
+
26
+ _entity_type: Union[Unset, DnaOligoWithEntityTypeEntityType] = UNSET
27
+ _annotations: Union[Unset, List[DnaAnnotation]] = UNSET
28
+ _api_url: Union[Unset, str] = UNSET
29
+ _bases: Union[Unset, str] = UNSET
30
+ _custom_notation: Union[Unset, None, str] = UNSET
31
+ _custom_notation_name: Union[Unset, None, str] = UNSET
32
+ _helm: Union[Unset, str] = UNSET
33
+ _aliases: Union[Unset, List[str]] = UNSET
34
+ _archive_record: Union[Unset, None, ArchiveRecord] = UNSET
35
+ _authors: Union[Unset, List[UserSummary]] = UNSET
36
+ _created_at: Union[Unset, datetime.datetime] = UNSET
37
+ _creator: Union[Unset, UserSummary] = UNSET
38
+ _custom_fields: Union[Unset, CustomFields] = UNSET
39
+ _entity_registry_id: Union[Unset, None, str] = UNSET
40
+ _fields: Union[Unset, Fields] = UNSET
41
+ _folder_id: Union[Unset, None, str] = UNSET
42
+ _id: Union[Unset, str] = UNSET
43
+ _length: Union[Unset, int] = UNSET
44
+ _modified_at: Union[Unset, datetime.datetime] = UNSET
45
+ _name: Union[Unset, str] = UNSET
46
+ _nucleotide_type: Union[Unset, OligoNucleotideType] = UNSET
47
+ _registration_origin: Union[Unset, None, RegistrationOrigin] = UNSET
48
+ _registry_id: Union[Unset, None, str] = UNSET
49
+ _schema: Union[Unset, None, SchemaSummary] = UNSET
50
+ _web_url: Union[Unset, str] = UNSET
51
+ additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
52
+
53
+ def __repr__(self):
54
+ fields = []
55
+ fields.append("entity_type={}".format(repr(self._entity_type)))
56
+ fields.append("annotations={}".format(repr(self._annotations)))
57
+ fields.append("api_url={}".format(repr(self._api_url)))
58
+ fields.append("bases={}".format(repr(self._bases)))
59
+ fields.append("custom_notation={}".format(repr(self._custom_notation)))
60
+ fields.append("custom_notation_name={}".format(repr(self._custom_notation_name)))
61
+ fields.append("helm={}".format(repr(self._helm)))
62
+ fields.append("aliases={}".format(repr(self._aliases)))
63
+ fields.append("archive_record={}".format(repr(self._archive_record)))
64
+ fields.append("authors={}".format(repr(self._authors)))
65
+ fields.append("created_at={}".format(repr(self._created_at)))
66
+ fields.append("creator={}".format(repr(self._creator)))
67
+ fields.append("custom_fields={}".format(repr(self._custom_fields)))
68
+ fields.append("entity_registry_id={}".format(repr(self._entity_registry_id)))
69
+ fields.append("fields={}".format(repr(self._fields)))
70
+ fields.append("folder_id={}".format(repr(self._folder_id)))
71
+ fields.append("id={}".format(repr(self._id)))
72
+ fields.append("length={}".format(repr(self._length)))
73
+ fields.append("modified_at={}".format(repr(self._modified_at)))
74
+ fields.append("name={}".format(repr(self._name)))
75
+ fields.append("nucleotide_type={}".format(repr(self._nucleotide_type)))
76
+ fields.append("registration_origin={}".format(repr(self._registration_origin)))
77
+ fields.append("registry_id={}".format(repr(self._registry_id)))
78
+ fields.append("schema={}".format(repr(self._schema)))
79
+ fields.append("web_url={}".format(repr(self._web_url)))
80
+ fields.append("additional_properties={}".format(repr(self.additional_properties)))
81
+ return "DnaOligoWithEntityType({})".format(", ".join(fields))
82
+
83
+ def to_dict(self) -> Dict[str, Any]:
84
+ entity_type: Union[Unset, int] = UNSET
85
+ if not isinstance(self._entity_type, Unset):
86
+ entity_type = self._entity_type.value
87
+
88
+ annotations: Union[Unset, List[Any]] = UNSET
89
+ if not isinstance(self._annotations, Unset):
90
+ annotations = []
91
+ for annotations_item_data in self._annotations:
92
+ annotations_item = annotations_item_data.to_dict()
93
+
94
+ annotations.append(annotations_item)
95
+
96
+ api_url = self._api_url
97
+ bases = self._bases
98
+ custom_notation = self._custom_notation
99
+ custom_notation_name = self._custom_notation_name
100
+ helm = self._helm
101
+ aliases: Union[Unset, List[Any]] = UNSET
102
+ if not isinstance(self._aliases, Unset):
103
+ aliases = self._aliases
104
+
105
+ archive_record: Union[Unset, None, Dict[str, Any]] = UNSET
106
+ if not isinstance(self._archive_record, Unset):
107
+ archive_record = self._archive_record.to_dict() if self._archive_record else None
108
+
109
+ authors: Union[Unset, List[Any]] = UNSET
110
+ if not isinstance(self._authors, Unset):
111
+ authors = []
112
+ for authors_item_data in self._authors:
113
+ authors_item = authors_item_data.to_dict()
114
+
115
+ authors.append(authors_item)
116
+
117
+ created_at: Union[Unset, str] = UNSET
118
+ if not isinstance(self._created_at, Unset):
119
+ created_at = self._created_at.isoformat()
120
+
121
+ creator: Union[Unset, Dict[str, Any]] = UNSET
122
+ if not isinstance(self._creator, Unset):
123
+ creator = self._creator.to_dict()
124
+
125
+ custom_fields: Union[Unset, Dict[str, Any]] = UNSET
126
+ if not isinstance(self._custom_fields, Unset):
127
+ custom_fields = self._custom_fields.to_dict()
128
+
129
+ entity_registry_id = self._entity_registry_id
130
+ fields: Union[Unset, Dict[str, Any]] = UNSET
131
+ if not isinstance(self._fields, Unset):
132
+ fields = self._fields.to_dict()
133
+
134
+ folder_id = self._folder_id
135
+ id = self._id
136
+ length = self._length
137
+ modified_at: Union[Unset, str] = UNSET
138
+ if not isinstance(self._modified_at, Unset):
139
+ modified_at = self._modified_at.isoformat()
140
+
141
+ name = self._name
142
+ nucleotide_type: Union[Unset, int] = UNSET
143
+ if not isinstance(self._nucleotide_type, Unset):
144
+ nucleotide_type = self._nucleotide_type.value
145
+
146
+ registration_origin: Union[Unset, None, Dict[str, Any]] = UNSET
147
+ if not isinstance(self._registration_origin, Unset):
148
+ registration_origin = self._registration_origin.to_dict() if self._registration_origin else None
149
+
150
+ registry_id = self._registry_id
151
+ schema: Union[Unset, None, Dict[str, Any]] = UNSET
152
+ if not isinstance(self._schema, Unset):
153
+ schema = self._schema.to_dict() if self._schema else None
154
+
155
+ web_url = self._web_url
156
+
157
+ field_dict: Dict[str, Any] = {}
158
+ field_dict.update(self.additional_properties)
159
+ # Allow the model to serialize even if it was created outside of the constructor, circumventing validation
160
+ if entity_type is not UNSET:
161
+ field_dict["entityType"] = entity_type
162
+ if annotations is not UNSET:
163
+ field_dict["annotations"] = annotations
164
+ if api_url is not UNSET:
165
+ field_dict["apiURL"] = api_url
166
+ if bases is not UNSET:
167
+ field_dict["bases"] = bases
168
+ if custom_notation is not UNSET:
169
+ field_dict["customNotation"] = custom_notation
170
+ if custom_notation_name is not UNSET:
171
+ field_dict["customNotationName"] = custom_notation_name
172
+ if helm is not UNSET:
173
+ field_dict["helm"] = helm
174
+ if aliases is not UNSET:
175
+ field_dict["aliases"] = aliases
176
+ if archive_record is not UNSET:
177
+ field_dict["archiveRecord"] = archive_record
178
+ if authors is not UNSET:
179
+ field_dict["authors"] = authors
180
+ if created_at is not UNSET:
181
+ field_dict["createdAt"] = created_at
182
+ if creator is not UNSET:
183
+ field_dict["creator"] = creator
184
+ if custom_fields is not UNSET:
185
+ field_dict["customFields"] = custom_fields
186
+ if entity_registry_id is not UNSET:
187
+ field_dict["entityRegistryId"] = entity_registry_id
188
+ if fields is not UNSET:
189
+ field_dict["fields"] = fields
190
+ if folder_id is not UNSET:
191
+ field_dict["folderId"] = folder_id
192
+ if id is not UNSET:
193
+ field_dict["id"] = id
194
+ if length is not UNSET:
195
+ field_dict["length"] = length
196
+ if modified_at is not UNSET:
197
+ field_dict["modifiedAt"] = modified_at
198
+ if name is not UNSET:
199
+ field_dict["name"] = name
200
+ if nucleotide_type is not UNSET:
201
+ field_dict["nucleotideType"] = nucleotide_type
202
+ if registration_origin is not UNSET:
203
+ field_dict["registrationOrigin"] = registration_origin
204
+ if registry_id is not UNSET:
205
+ field_dict["registryId"] = registry_id
206
+ if schema is not UNSET:
207
+ field_dict["schema"] = schema
208
+ if web_url is not UNSET:
209
+ field_dict["webURL"] = web_url
210
+
211
+ return field_dict
212
+
213
+ @classmethod
214
+ def from_dict(cls: Type[T], src_dict: Dict[str, Any], strict: bool = False) -> T:
215
+ d = src_dict.copy()
216
+
217
+ def get_entity_type() -> Union[Unset, DnaOligoWithEntityTypeEntityType]:
218
+ entity_type = UNSET
219
+ _entity_type = d.pop("entityType")
220
+ if _entity_type is not None and _entity_type is not UNSET:
221
+ try:
222
+ entity_type = DnaOligoWithEntityTypeEntityType(_entity_type)
223
+ except ValueError:
224
+ entity_type = DnaOligoWithEntityTypeEntityType.of_unknown(_entity_type)
225
+
226
+ return entity_type
227
+
228
+ try:
229
+ entity_type = get_entity_type()
230
+ except KeyError:
231
+ if strict:
232
+ raise
233
+ entity_type = cast(Union[Unset, DnaOligoWithEntityTypeEntityType], UNSET)
234
+
235
+ def get_annotations() -> Union[Unset, List[DnaAnnotation]]:
236
+ annotations = []
237
+ _annotations = d.pop("annotations")
238
+ for annotations_item_data in _annotations or []:
239
+ annotations_item = DnaAnnotation.from_dict(annotations_item_data, strict=False)
240
+
241
+ annotations.append(annotations_item)
242
+
243
+ return annotations
244
+
245
+ try:
246
+ annotations = get_annotations()
247
+ except KeyError:
248
+ if strict:
249
+ raise
250
+ annotations = cast(Union[Unset, List[DnaAnnotation]], UNSET)
251
+
252
+ def get_api_url() -> Union[Unset, str]:
253
+ api_url = d.pop("apiURL")
254
+ return api_url
255
+
256
+ try:
257
+ api_url = get_api_url()
258
+ except KeyError:
259
+ if strict:
260
+ raise
261
+ api_url = cast(Union[Unset, str], UNSET)
262
+
263
+ def get_bases() -> Union[Unset, str]:
264
+ bases = d.pop("bases")
265
+ return bases
266
+
267
+ try:
268
+ bases = get_bases()
269
+ except KeyError:
270
+ if strict:
271
+ raise
272
+ bases = cast(Union[Unset, str], UNSET)
273
+
274
+ def get_custom_notation() -> Union[Unset, None, str]:
275
+ custom_notation = d.pop("customNotation")
276
+ return custom_notation
277
+
278
+ try:
279
+ custom_notation = get_custom_notation()
280
+ except KeyError:
281
+ if strict:
282
+ raise
283
+ custom_notation = cast(Union[Unset, None, str], UNSET)
284
+
285
+ def get_custom_notation_name() -> Union[Unset, None, str]:
286
+ custom_notation_name = d.pop("customNotationName")
287
+ return custom_notation_name
288
+
289
+ try:
290
+ custom_notation_name = get_custom_notation_name()
291
+ except KeyError:
292
+ if strict:
293
+ raise
294
+ custom_notation_name = cast(Union[Unset, None, str], UNSET)
295
+
296
+ def get_helm() -> Union[Unset, str]:
297
+ helm = d.pop("helm")
298
+ return helm
299
+
300
+ try:
301
+ helm = get_helm()
302
+ except KeyError:
303
+ if strict:
304
+ raise
305
+ helm = cast(Union[Unset, str], UNSET)
306
+
307
+ def get_aliases() -> Union[Unset, List[str]]:
308
+ aliases = cast(List[str], d.pop("aliases"))
309
+
310
+ return aliases
311
+
312
+ try:
313
+ aliases = get_aliases()
314
+ except KeyError:
315
+ if strict:
316
+ raise
317
+ aliases = cast(Union[Unset, List[str]], UNSET)
318
+
319
+ def get_archive_record() -> Union[Unset, None, ArchiveRecord]:
320
+ archive_record = None
321
+ _archive_record = d.pop("archiveRecord")
322
+
323
+ if _archive_record is not None and not isinstance(_archive_record, Unset):
324
+ archive_record = ArchiveRecord.from_dict(_archive_record)
325
+
326
+ return archive_record
327
+
328
+ try:
329
+ archive_record = get_archive_record()
330
+ except KeyError:
331
+ if strict:
332
+ raise
333
+ archive_record = cast(Union[Unset, None, ArchiveRecord], UNSET)
334
+
335
+ def get_authors() -> Union[Unset, List[UserSummary]]:
336
+ authors = []
337
+ _authors = d.pop("authors")
338
+ for authors_item_data in _authors or []:
339
+ authors_item = UserSummary.from_dict(authors_item_data, strict=False)
340
+
341
+ authors.append(authors_item)
342
+
343
+ return authors
344
+
345
+ try:
346
+ authors = get_authors()
347
+ except KeyError:
348
+ if strict:
349
+ raise
350
+ authors = cast(Union[Unset, List[UserSummary]], UNSET)
351
+
352
+ def get_created_at() -> Union[Unset, datetime.datetime]:
353
+ created_at: Union[Unset, datetime.datetime] = UNSET
354
+ _created_at = d.pop("createdAt")
355
+ if _created_at is not None and not isinstance(_created_at, Unset):
356
+ created_at = isoparse(cast(str, _created_at))
357
+
358
+ return created_at
359
+
360
+ try:
361
+ created_at = get_created_at()
362
+ except KeyError:
363
+ if strict:
364
+ raise
365
+ created_at = cast(Union[Unset, datetime.datetime], UNSET)
366
+
367
+ def get_creator() -> Union[Unset, UserSummary]:
368
+ creator: Union[Unset, Union[Unset, UserSummary]] = UNSET
369
+ _creator = d.pop("creator")
370
+
371
+ if not isinstance(_creator, Unset):
372
+ creator = UserSummary.from_dict(_creator)
373
+
374
+ return creator
375
+
376
+ try:
377
+ creator = get_creator()
378
+ except KeyError:
379
+ if strict:
380
+ raise
381
+ creator = cast(Union[Unset, UserSummary], UNSET)
382
+
383
+ def get_custom_fields() -> Union[Unset, CustomFields]:
384
+ custom_fields: Union[Unset, Union[Unset, CustomFields]] = UNSET
385
+ _custom_fields = d.pop("customFields")
386
+
387
+ if not isinstance(_custom_fields, Unset):
388
+ custom_fields = CustomFields.from_dict(_custom_fields)
389
+
390
+ return custom_fields
391
+
392
+ try:
393
+ custom_fields = get_custom_fields()
394
+ except KeyError:
395
+ if strict:
396
+ raise
397
+ custom_fields = cast(Union[Unset, CustomFields], UNSET)
398
+
399
+ def get_entity_registry_id() -> Union[Unset, None, str]:
400
+ entity_registry_id = d.pop("entityRegistryId")
401
+ return entity_registry_id
402
+
403
+ try:
404
+ entity_registry_id = get_entity_registry_id()
405
+ except KeyError:
406
+ if strict:
407
+ raise
408
+ entity_registry_id = cast(Union[Unset, None, str], UNSET)
409
+
410
+ def get_fields() -> Union[Unset, Fields]:
411
+ fields: Union[Unset, Union[Unset, Fields]] = UNSET
412
+ _fields = d.pop("fields")
413
+
414
+ if not isinstance(_fields, Unset):
415
+ fields = Fields.from_dict(_fields)
416
+
417
+ return fields
418
+
419
+ try:
420
+ fields = get_fields()
421
+ except KeyError:
422
+ if strict:
423
+ raise
424
+ fields = cast(Union[Unset, Fields], UNSET)
425
+
426
+ def get_folder_id() -> Union[Unset, None, str]:
427
+ folder_id = d.pop("folderId")
428
+ return folder_id
429
+
430
+ try:
431
+ folder_id = get_folder_id()
432
+ except KeyError:
433
+ if strict:
434
+ raise
435
+ folder_id = cast(Union[Unset, None, str], UNSET)
436
+
437
+ def get_id() -> Union[Unset, str]:
438
+ id = d.pop("id")
439
+ return id
440
+
441
+ try:
442
+ id = get_id()
443
+ except KeyError:
444
+ if strict:
445
+ raise
446
+ id = cast(Union[Unset, str], UNSET)
447
+
448
+ def get_length() -> Union[Unset, int]:
449
+ length = d.pop("length")
450
+ return length
451
+
452
+ try:
453
+ length = get_length()
454
+ except KeyError:
455
+ if strict:
456
+ raise
457
+ length = cast(Union[Unset, int], UNSET)
458
+
459
+ def get_modified_at() -> Union[Unset, datetime.datetime]:
460
+ modified_at: Union[Unset, datetime.datetime] = UNSET
461
+ _modified_at = d.pop("modifiedAt")
462
+ if _modified_at is not None and not isinstance(_modified_at, Unset):
463
+ modified_at = isoparse(cast(str, _modified_at))
464
+
465
+ return modified_at
466
+
467
+ try:
468
+ modified_at = get_modified_at()
469
+ except KeyError:
470
+ if strict:
471
+ raise
472
+ modified_at = cast(Union[Unset, datetime.datetime], UNSET)
473
+
474
+ def get_name() -> Union[Unset, str]:
475
+ name = d.pop("name")
476
+ return name
477
+
478
+ try:
479
+ name = get_name()
480
+ except KeyError:
481
+ if strict:
482
+ raise
483
+ name = cast(Union[Unset, str], UNSET)
484
+
485
+ def get_nucleotide_type() -> Union[Unset, OligoNucleotideType]:
486
+ nucleotide_type = UNSET
487
+ _nucleotide_type = d.pop("nucleotideType")
488
+ if _nucleotide_type is not None and _nucleotide_type is not UNSET:
489
+ try:
490
+ nucleotide_type = OligoNucleotideType(_nucleotide_type)
491
+ except ValueError:
492
+ nucleotide_type = OligoNucleotideType.of_unknown(_nucleotide_type)
493
+
494
+ return nucleotide_type
495
+
496
+ try:
497
+ nucleotide_type = get_nucleotide_type()
498
+ except KeyError:
499
+ if strict:
500
+ raise
501
+ nucleotide_type = cast(Union[Unset, OligoNucleotideType], UNSET)
502
+
503
+ def get_registration_origin() -> Union[Unset, None, RegistrationOrigin]:
504
+ registration_origin = None
505
+ _registration_origin = d.pop("registrationOrigin")
506
+
507
+ if _registration_origin is not None and not isinstance(_registration_origin, Unset):
508
+ registration_origin = RegistrationOrigin.from_dict(_registration_origin)
509
+
510
+ return registration_origin
511
+
512
+ try:
513
+ registration_origin = get_registration_origin()
514
+ except KeyError:
515
+ if strict:
516
+ raise
517
+ registration_origin = cast(Union[Unset, None, RegistrationOrigin], UNSET)
518
+
519
+ def get_registry_id() -> Union[Unset, None, str]:
520
+ registry_id = d.pop("registryId")
521
+ return registry_id
522
+
523
+ try:
524
+ registry_id = get_registry_id()
525
+ except KeyError:
526
+ if strict:
527
+ raise
528
+ registry_id = cast(Union[Unset, None, str], UNSET)
529
+
530
+ def get_schema() -> Union[Unset, None, SchemaSummary]:
531
+ schema = None
532
+ _schema = d.pop("schema")
533
+
534
+ if _schema is not None and not isinstance(_schema, Unset):
535
+ schema = SchemaSummary.from_dict(_schema)
536
+
537
+ return schema
538
+
539
+ try:
540
+ schema = get_schema()
541
+ except KeyError:
542
+ if strict:
543
+ raise
544
+ schema = cast(Union[Unset, None, SchemaSummary], UNSET)
545
+
546
+ def get_web_url() -> Union[Unset, str]:
547
+ web_url = d.pop("webURL")
548
+ return web_url
549
+
550
+ try:
551
+ web_url = get_web_url()
552
+ except KeyError:
553
+ if strict:
554
+ raise
555
+ web_url = cast(Union[Unset, str], UNSET)
556
+
557
+ dna_oligo_with_entity_type = cls(
558
+ entity_type=entity_type,
559
+ annotations=annotations,
560
+ api_url=api_url,
561
+ bases=bases,
562
+ custom_notation=custom_notation,
563
+ custom_notation_name=custom_notation_name,
564
+ helm=helm,
565
+ aliases=aliases,
566
+ archive_record=archive_record,
567
+ authors=authors,
568
+ created_at=created_at,
569
+ creator=creator,
570
+ custom_fields=custom_fields,
571
+ entity_registry_id=entity_registry_id,
572
+ fields=fields,
573
+ folder_id=folder_id,
574
+ id=id,
575
+ length=length,
576
+ modified_at=modified_at,
577
+ name=name,
578
+ nucleotide_type=nucleotide_type,
579
+ registration_origin=registration_origin,
580
+ registry_id=registry_id,
581
+ schema=schema,
582
+ web_url=web_url,
583
+ )
584
+
585
+ dna_oligo_with_entity_type.additional_properties = d
586
+ return dna_oligo_with_entity_type
587
+
588
+ @property
589
+ def additional_keys(self) -> List[str]:
590
+ return list(self.additional_properties.keys())
591
+
592
+ def __getitem__(self, key: str) -> Any:
593
+ return self.additional_properties[key]
594
+
595
+ def __setitem__(self, key: str, value: Any) -> None:
596
+ self.additional_properties[key] = value
597
+
598
+ def __delitem__(self, key: str) -> None:
599
+ del self.additional_properties[key]
600
+
601
+ def __contains__(self, key: str) -> bool:
602
+ return key in self.additional_properties
603
+
604
+ def get(self, key, default=None) -> Optional[Any]:
605
+ return self.additional_properties.get(key, default)
606
+
607
+ @property
608
+ def entity_type(self) -> DnaOligoWithEntityTypeEntityType:
609
+ if isinstance(self._entity_type, Unset):
610
+ raise NotPresentError(self, "entity_type")
611
+ return self._entity_type
612
+
613
+ @entity_type.setter
614
+ def entity_type(self, value: DnaOligoWithEntityTypeEntityType) -> None:
615
+ self._entity_type = value
616
+
617
+ @entity_type.deleter
618
+ def entity_type(self) -> None:
619
+ self._entity_type = UNSET
620
+
621
+ @property
622
+ def annotations(self) -> List[DnaAnnotation]:
623
+ """ Annotations on the Oligo. """
624
+ if isinstance(self._annotations, Unset):
625
+ raise NotPresentError(self, "annotations")
626
+ return self._annotations
627
+
628
+ @annotations.setter
629
+ def annotations(self, value: List[DnaAnnotation]) -> None:
630
+ self._annotations = value
631
+
632
+ @annotations.deleter
633
+ def annotations(self) -> None:
634
+ self._annotations = UNSET
635
+
636
+ @property
637
+ def api_url(self) -> str:
638
+ """ The canonical url of the Oligo in the API. """
639
+ if isinstance(self._api_url, Unset):
640
+ raise NotPresentError(self, "api_url")
641
+ return self._api_url
642
+
643
+ @api_url.setter
644
+ def api_url(self, value: str) -> None:
645
+ self._api_url = value
646
+
647
+ @api_url.deleter
648
+ def api_url(self) -> None:
649
+ self._api_url = UNSET
650
+
651
+ @property
652
+ def bases(self) -> str:
653
+ """ Base pairs of the Oligo. """
654
+ if isinstance(self._bases, Unset):
655
+ raise NotPresentError(self, "bases")
656
+ return self._bases
657
+
658
+ @bases.setter
659
+ def bases(self, value: str) -> None:
660
+ self._bases = value
661
+
662
+ @bases.deleter
663
+ def bases(self) -> None:
664
+ self._bases = UNSET
665
+
666
+ @property
667
+ def custom_notation(self) -> Optional[str]:
668
+ """ Representation of the oligo in the custom notation specified in the request. Null if no notation was specified. """
669
+ if isinstance(self._custom_notation, Unset):
670
+ raise NotPresentError(self, "custom_notation")
671
+ return self._custom_notation
672
+
673
+ @custom_notation.setter
674
+ def custom_notation(self, value: Optional[str]) -> None:
675
+ self._custom_notation = value
676
+
677
+ @custom_notation.deleter
678
+ def custom_notation(self) -> None:
679
+ self._custom_notation = UNSET
680
+
681
+ @property
682
+ def custom_notation_name(self) -> Optional[str]:
683
+ """ Name of the custom notation specified in the request. Null if no notation was specified. """
684
+ if isinstance(self._custom_notation_name, Unset):
685
+ raise NotPresentError(self, "custom_notation_name")
686
+ return self._custom_notation_name
687
+
688
+ @custom_notation_name.setter
689
+ def custom_notation_name(self, value: Optional[str]) -> None:
690
+ self._custom_notation_name = value
691
+
692
+ @custom_notation_name.deleter
693
+ def custom_notation_name(self) -> None:
694
+ self._custom_notation_name = UNSET
695
+
696
+ @property
697
+ def helm(self) -> str:
698
+ """ Representation of the oligo in HELM syntax, including any chemical modifications """
699
+ if isinstance(self._helm, Unset):
700
+ raise NotPresentError(self, "helm")
701
+ return self._helm
702
+
703
+ @helm.setter
704
+ def helm(self, value: str) -> None:
705
+ self._helm = value
706
+
707
+ @helm.deleter
708
+ def helm(self) -> None:
709
+ self._helm = UNSET
710
+
711
+ @property
712
+ def aliases(self) -> List[str]:
713
+ """ Array of aliases """
714
+ if isinstance(self._aliases, Unset):
715
+ raise NotPresentError(self, "aliases")
716
+ return self._aliases
717
+
718
+ @aliases.setter
719
+ def aliases(self, value: List[str]) -> None:
720
+ self._aliases = value
721
+
722
+ @aliases.deleter
723
+ def aliases(self) -> None:
724
+ self._aliases = UNSET
725
+
726
+ @property
727
+ def archive_record(self) -> Optional[ArchiveRecord]:
728
+ if isinstance(self._archive_record, Unset):
729
+ raise NotPresentError(self, "archive_record")
730
+ return self._archive_record
731
+
732
+ @archive_record.setter
733
+ def archive_record(self, value: Optional[ArchiveRecord]) -> None:
734
+ self._archive_record = value
735
+
736
+ @archive_record.deleter
737
+ def archive_record(self) -> None:
738
+ self._archive_record = UNSET
739
+
740
+ @property
741
+ def authors(self) -> List[UserSummary]:
742
+ if isinstance(self._authors, Unset):
743
+ raise NotPresentError(self, "authors")
744
+ return self._authors
745
+
746
+ @authors.setter
747
+ def authors(self, value: List[UserSummary]) -> None:
748
+ self._authors = value
749
+
750
+ @authors.deleter
751
+ def authors(self) -> None:
752
+ self._authors = UNSET
753
+
754
+ @property
755
+ def created_at(self) -> datetime.datetime:
756
+ """ DateTime the Oligo was created. """
757
+ if isinstance(self._created_at, Unset):
758
+ raise NotPresentError(self, "created_at")
759
+ return self._created_at
760
+
761
+ @created_at.setter
762
+ def created_at(self, value: datetime.datetime) -> None:
763
+ self._created_at = value
764
+
765
+ @created_at.deleter
766
+ def created_at(self) -> None:
767
+ self._created_at = UNSET
768
+
769
+ @property
770
+ def creator(self) -> UserSummary:
771
+ if isinstance(self._creator, Unset):
772
+ raise NotPresentError(self, "creator")
773
+ return self._creator
774
+
775
+ @creator.setter
776
+ def creator(self, value: UserSummary) -> None:
777
+ self._creator = value
778
+
779
+ @creator.deleter
780
+ def creator(self) -> None:
781
+ self._creator = UNSET
782
+
783
+ @property
784
+ def custom_fields(self) -> CustomFields:
785
+ if isinstance(self._custom_fields, Unset):
786
+ raise NotPresentError(self, "custom_fields")
787
+ return self._custom_fields
788
+
789
+ @custom_fields.setter
790
+ def custom_fields(self, value: CustomFields) -> None:
791
+ self._custom_fields = value
792
+
793
+ @custom_fields.deleter
794
+ def custom_fields(self) -> None:
795
+ self._custom_fields = UNSET
796
+
797
+ @property
798
+ def entity_registry_id(self) -> Optional[str]:
799
+ """ Registry ID of the Oligo if registered. """
800
+ if isinstance(self._entity_registry_id, Unset):
801
+ raise NotPresentError(self, "entity_registry_id")
802
+ return self._entity_registry_id
803
+
804
+ @entity_registry_id.setter
805
+ def entity_registry_id(self, value: Optional[str]) -> None:
806
+ self._entity_registry_id = value
807
+
808
+ @entity_registry_id.deleter
809
+ def entity_registry_id(self) -> None:
810
+ self._entity_registry_id = UNSET
811
+
812
+ @property
813
+ def fields(self) -> Fields:
814
+ if isinstance(self._fields, Unset):
815
+ raise NotPresentError(self, "fields")
816
+ return self._fields
817
+
818
+ @fields.setter
819
+ def fields(self, value: Fields) -> None:
820
+ self._fields = value
821
+
822
+ @fields.deleter
823
+ def fields(self) -> None:
824
+ self._fields = UNSET
825
+
826
+ @property
827
+ def folder_id(self) -> Optional[str]:
828
+ """ ID of the folder that contains the Oligo. """
829
+ if isinstance(self._folder_id, Unset):
830
+ raise NotPresentError(self, "folder_id")
831
+ return self._folder_id
832
+
833
+ @folder_id.setter
834
+ def folder_id(self, value: Optional[str]) -> None:
835
+ self._folder_id = value
836
+
837
+ @folder_id.deleter
838
+ def folder_id(self) -> None:
839
+ self._folder_id = UNSET
840
+
841
+ @property
842
+ def id(self) -> str:
843
+ """ ID of the Oligo. """
844
+ if isinstance(self._id, Unset):
845
+ raise NotPresentError(self, "id")
846
+ return self._id
847
+
848
+ @id.setter
849
+ def id(self, value: str) -> None:
850
+ self._id = value
851
+
852
+ @id.deleter
853
+ def id(self) -> None:
854
+ self._id = UNSET
855
+
856
+ @property
857
+ def length(self) -> int:
858
+ """ Number of bases in the Oligo. """
859
+ if isinstance(self._length, Unset):
860
+ raise NotPresentError(self, "length")
861
+ return self._length
862
+
863
+ @length.setter
864
+ def length(self, value: int) -> None:
865
+ self._length = value
866
+
867
+ @length.deleter
868
+ def length(self) -> None:
869
+ self._length = UNSET
870
+
871
+ @property
872
+ def modified_at(self) -> datetime.datetime:
873
+ """ DateTime the Oligo was last modified. """
874
+ if isinstance(self._modified_at, Unset):
875
+ raise NotPresentError(self, "modified_at")
876
+ return self._modified_at
877
+
878
+ @modified_at.setter
879
+ def modified_at(self, value: datetime.datetime) -> None:
880
+ self._modified_at = value
881
+
882
+ @modified_at.deleter
883
+ def modified_at(self) -> None:
884
+ self._modified_at = UNSET
885
+
886
+ @property
887
+ def name(self) -> str:
888
+ """ Name of the Oligo. """
889
+ if isinstance(self._name, Unset):
890
+ raise NotPresentError(self, "name")
891
+ return self._name
892
+
893
+ @name.setter
894
+ def name(self, value: str) -> None:
895
+ self._name = value
896
+
897
+ @name.deleter
898
+ def name(self) -> None:
899
+ self._name = UNSET
900
+
901
+ @property
902
+ def nucleotide_type(self) -> OligoNucleotideType:
903
+ """ Nucleotide type of the Oligo. """
904
+ if isinstance(self._nucleotide_type, Unset):
905
+ raise NotPresentError(self, "nucleotide_type")
906
+ return self._nucleotide_type
907
+
908
+ @nucleotide_type.setter
909
+ def nucleotide_type(self, value: OligoNucleotideType) -> None:
910
+ self._nucleotide_type = value
911
+
912
+ @nucleotide_type.deleter
913
+ def nucleotide_type(self) -> None:
914
+ self._nucleotide_type = UNSET
915
+
916
+ @property
917
+ def registration_origin(self) -> Optional[RegistrationOrigin]:
918
+ if isinstance(self._registration_origin, Unset):
919
+ raise NotPresentError(self, "registration_origin")
920
+ return self._registration_origin
921
+
922
+ @registration_origin.setter
923
+ def registration_origin(self, value: Optional[RegistrationOrigin]) -> None:
924
+ self._registration_origin = value
925
+
926
+ @registration_origin.deleter
927
+ def registration_origin(self) -> None:
928
+ self._registration_origin = UNSET
929
+
930
+ @property
931
+ def registry_id(self) -> Optional[str]:
932
+ """ Registry the Oligo is registered in. """
933
+ if isinstance(self._registry_id, Unset):
934
+ raise NotPresentError(self, "registry_id")
935
+ return self._registry_id
936
+
937
+ @registry_id.setter
938
+ def registry_id(self, value: Optional[str]) -> None:
939
+ self._registry_id = value
940
+
941
+ @registry_id.deleter
942
+ def registry_id(self) -> None:
943
+ self._registry_id = UNSET
944
+
945
+ @property
946
+ def schema(self) -> Optional[SchemaSummary]:
947
+ if isinstance(self._schema, Unset):
948
+ raise NotPresentError(self, "schema")
949
+ return self._schema
950
+
951
+ @schema.setter
952
+ def schema(self, value: Optional[SchemaSummary]) -> None:
953
+ self._schema = value
954
+
955
+ @schema.deleter
956
+ def schema(self) -> None:
957
+ self._schema = UNSET
958
+
959
+ @property
960
+ def web_url(self) -> str:
961
+ """ URL of the Oligo. """
962
+ if isinstance(self._web_url, Unset):
963
+ raise NotPresentError(self, "web_url")
964
+ return self._web_url
965
+
966
+ @web_url.setter
967
+ def web_url(self, value: str) -> None:
968
+ self._web_url = value
969
+
970
+ @web_url.deleter
971
+ def web_url(self) -> None:
972
+ self._web_url = UNSET