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