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,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.fields import Fields
11
+ from ..models.oligo_nucleotide_type import OligoNucleotideType
12
+ from ..models.registration_origin import RegistrationOrigin
13
+ from ..models.rna_annotation import RnaAnnotation
14
+ from ..models.rna_oligo_with_entity_type_entity_type import RnaOligoWithEntityTypeEntityType
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="RnaOligoWithEntityType")
20
+
21
+
22
+ @attr.s(auto_attribs=True, repr=False)
23
+ class RnaOligoWithEntityType:
24
+ """ """
25
+
26
+ _entity_type: Union[Unset, RnaOligoWithEntityTypeEntityType] = UNSET
27
+ _annotations: Union[Unset, List[RnaAnnotation]] = 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
+ _nucleotide_type: Union[Unset, OligoNucleotideType] = UNSET
34
+ _aliases: Union[Unset, List[str]] = UNSET
35
+ _archive_record: Union[Unset, None, ArchiveRecord] = UNSET
36
+ _authors: Union[Unset, List[UserSummary]] = UNSET
37
+ _created_at: Union[Unset, datetime.datetime] = UNSET
38
+ _creator: Union[Unset, UserSummary] = UNSET
39
+ _custom_fields: Union[Unset, CustomFields] = UNSET
40
+ _entity_registry_id: Union[Unset, None, str] = UNSET
41
+ _fields: Union[Unset, Fields] = UNSET
42
+ _folder_id: Union[Unset, None, str] = UNSET
43
+ _id: Union[Unset, str] = UNSET
44
+ _length: Union[Unset, int] = UNSET
45
+ _modified_at: Union[Unset, datetime.datetime] = UNSET
46
+ _name: Union[Unset, str] = 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("nucleotide_type={}".format(repr(self._nucleotide_type)))
63
+ fields.append("aliases={}".format(repr(self._aliases)))
64
+ fields.append("archive_record={}".format(repr(self._archive_record)))
65
+ fields.append("authors={}".format(repr(self._authors)))
66
+ fields.append("created_at={}".format(repr(self._created_at)))
67
+ fields.append("creator={}".format(repr(self._creator)))
68
+ fields.append("custom_fields={}".format(repr(self._custom_fields)))
69
+ fields.append("entity_registry_id={}".format(repr(self._entity_registry_id)))
70
+ fields.append("fields={}".format(repr(self._fields)))
71
+ fields.append("folder_id={}".format(repr(self._folder_id)))
72
+ fields.append("id={}".format(repr(self._id)))
73
+ fields.append("length={}".format(repr(self._length)))
74
+ fields.append("modified_at={}".format(repr(self._modified_at)))
75
+ fields.append("name={}".format(repr(self._name)))
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 "RnaOligoWithEntityType({})".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
+ nucleotide_type: Union[Unset, int] = UNSET
102
+ if not isinstance(self._nucleotide_type, Unset):
103
+ nucleotide_type = self._nucleotide_type.value
104
+
105
+ aliases: Union[Unset, List[Any]] = UNSET
106
+ if not isinstance(self._aliases, Unset):
107
+ aliases = self._aliases
108
+
109
+ archive_record: Union[Unset, None, Dict[str, Any]] = UNSET
110
+ if not isinstance(self._archive_record, Unset):
111
+ archive_record = self._archive_record.to_dict() if self._archive_record else None
112
+
113
+ authors: Union[Unset, List[Any]] = UNSET
114
+ if not isinstance(self._authors, Unset):
115
+ authors = []
116
+ for authors_item_data in self._authors:
117
+ authors_item = authors_item_data.to_dict()
118
+
119
+ authors.append(authors_item)
120
+
121
+ created_at: Union[Unset, str] = UNSET
122
+ if not isinstance(self._created_at, Unset):
123
+ created_at = self._created_at.isoformat()
124
+
125
+ creator: Union[Unset, Dict[str, Any]] = UNSET
126
+ if not isinstance(self._creator, Unset):
127
+ creator = self._creator.to_dict()
128
+
129
+ custom_fields: Union[Unset, Dict[str, Any]] = UNSET
130
+ if not isinstance(self._custom_fields, Unset):
131
+ custom_fields = self._custom_fields.to_dict()
132
+
133
+ entity_registry_id = self._entity_registry_id
134
+ fields: Union[Unset, Dict[str, Any]] = UNSET
135
+ if not isinstance(self._fields, Unset):
136
+ fields = self._fields.to_dict()
137
+
138
+ folder_id = self._folder_id
139
+ id = self._id
140
+ length = self._length
141
+ modified_at: Union[Unset, str] = UNSET
142
+ if not isinstance(self._modified_at, Unset):
143
+ modified_at = self._modified_at.isoformat()
144
+
145
+ name = self._name
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 nucleotide_type is not UNSET:
175
+ field_dict["nucleotideType"] = nucleotide_type
176
+ if aliases is not UNSET:
177
+ field_dict["aliases"] = aliases
178
+ if archive_record is not UNSET:
179
+ field_dict["archiveRecord"] = archive_record
180
+ if authors is not UNSET:
181
+ field_dict["authors"] = authors
182
+ if created_at is not UNSET:
183
+ field_dict["createdAt"] = created_at
184
+ if creator is not UNSET:
185
+ field_dict["creator"] = creator
186
+ if custom_fields is not UNSET:
187
+ field_dict["customFields"] = custom_fields
188
+ if entity_registry_id is not UNSET:
189
+ field_dict["entityRegistryId"] = entity_registry_id
190
+ if fields is not UNSET:
191
+ field_dict["fields"] = fields
192
+ if folder_id is not UNSET:
193
+ field_dict["folderId"] = folder_id
194
+ if id is not UNSET:
195
+ field_dict["id"] = id
196
+ if length is not UNSET:
197
+ field_dict["length"] = length
198
+ if modified_at is not UNSET:
199
+ field_dict["modifiedAt"] = modified_at
200
+ if name is not UNSET:
201
+ field_dict["name"] = name
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, RnaOligoWithEntityTypeEntityType]:
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 = RnaOligoWithEntityTypeEntityType(_entity_type)
223
+ except ValueError:
224
+ entity_type = RnaOligoWithEntityTypeEntityType.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, RnaOligoWithEntityTypeEntityType], UNSET)
234
+
235
+ def get_annotations() -> Union[Unset, List[RnaAnnotation]]:
236
+ annotations = []
237
+ _annotations = d.pop("annotations")
238
+ for annotations_item_data in _annotations or []:
239
+ annotations_item = RnaAnnotation.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[RnaAnnotation]], 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_nucleotide_type() -> Union[Unset, OligoNucleotideType]:
308
+ nucleotide_type = UNSET
309
+ _nucleotide_type = d.pop("nucleotideType")
310
+ if _nucleotide_type is not None and _nucleotide_type is not UNSET:
311
+ try:
312
+ nucleotide_type = OligoNucleotideType(_nucleotide_type)
313
+ except ValueError:
314
+ nucleotide_type = OligoNucleotideType.of_unknown(_nucleotide_type)
315
+
316
+ return nucleotide_type
317
+
318
+ try:
319
+ nucleotide_type = get_nucleotide_type()
320
+ except KeyError:
321
+ if strict:
322
+ raise
323
+ nucleotide_type = cast(Union[Unset, OligoNucleotideType], UNSET)
324
+
325
+ def get_aliases() -> Union[Unset, List[str]]:
326
+ aliases = cast(List[str], d.pop("aliases"))
327
+
328
+ return aliases
329
+
330
+ try:
331
+ aliases = get_aliases()
332
+ except KeyError:
333
+ if strict:
334
+ raise
335
+ aliases = cast(Union[Unset, List[str]], UNSET)
336
+
337
+ def get_archive_record() -> Union[Unset, None, ArchiveRecord]:
338
+ archive_record = None
339
+ _archive_record = d.pop("archiveRecord")
340
+
341
+ if _archive_record is not None and not isinstance(_archive_record, Unset):
342
+ archive_record = ArchiveRecord.from_dict(_archive_record)
343
+
344
+ return archive_record
345
+
346
+ try:
347
+ archive_record = get_archive_record()
348
+ except KeyError:
349
+ if strict:
350
+ raise
351
+ archive_record = cast(Union[Unset, None, ArchiveRecord], UNSET)
352
+
353
+ def get_authors() -> Union[Unset, List[UserSummary]]:
354
+ authors = []
355
+ _authors = d.pop("authors")
356
+ for authors_item_data in _authors or []:
357
+ authors_item = UserSummary.from_dict(authors_item_data, strict=False)
358
+
359
+ authors.append(authors_item)
360
+
361
+ return authors
362
+
363
+ try:
364
+ authors = get_authors()
365
+ except KeyError:
366
+ if strict:
367
+ raise
368
+ authors = cast(Union[Unset, List[UserSummary]], UNSET)
369
+
370
+ def get_created_at() -> Union[Unset, datetime.datetime]:
371
+ created_at: Union[Unset, datetime.datetime] = UNSET
372
+ _created_at = d.pop("createdAt")
373
+ if _created_at is not None and not isinstance(_created_at, Unset):
374
+ created_at = isoparse(cast(str, _created_at))
375
+
376
+ return created_at
377
+
378
+ try:
379
+ created_at = get_created_at()
380
+ except KeyError:
381
+ if strict:
382
+ raise
383
+ created_at = cast(Union[Unset, datetime.datetime], UNSET)
384
+
385
+ def get_creator() -> Union[Unset, UserSummary]:
386
+ creator: Union[Unset, Union[Unset, UserSummary]] = UNSET
387
+ _creator = d.pop("creator")
388
+
389
+ if not isinstance(_creator, Unset):
390
+ creator = UserSummary.from_dict(_creator)
391
+
392
+ return creator
393
+
394
+ try:
395
+ creator = get_creator()
396
+ except KeyError:
397
+ if strict:
398
+ raise
399
+ creator = cast(Union[Unset, UserSummary], UNSET)
400
+
401
+ def get_custom_fields() -> Union[Unset, CustomFields]:
402
+ custom_fields: Union[Unset, Union[Unset, CustomFields]] = UNSET
403
+ _custom_fields = d.pop("customFields")
404
+
405
+ if not isinstance(_custom_fields, Unset):
406
+ custom_fields = CustomFields.from_dict(_custom_fields)
407
+
408
+ return custom_fields
409
+
410
+ try:
411
+ custom_fields = get_custom_fields()
412
+ except KeyError:
413
+ if strict:
414
+ raise
415
+ custom_fields = cast(Union[Unset, CustomFields], UNSET)
416
+
417
+ def get_entity_registry_id() -> Union[Unset, None, str]:
418
+ entity_registry_id = d.pop("entityRegistryId")
419
+ return entity_registry_id
420
+
421
+ try:
422
+ entity_registry_id = get_entity_registry_id()
423
+ except KeyError:
424
+ if strict:
425
+ raise
426
+ entity_registry_id = cast(Union[Unset, None, str], UNSET)
427
+
428
+ def get_fields() -> Union[Unset, Fields]:
429
+ fields: Union[Unset, Union[Unset, Fields]] = UNSET
430
+ _fields = d.pop("fields")
431
+
432
+ if not isinstance(_fields, Unset):
433
+ fields = Fields.from_dict(_fields)
434
+
435
+ return fields
436
+
437
+ try:
438
+ fields = get_fields()
439
+ except KeyError:
440
+ if strict:
441
+ raise
442
+ fields = cast(Union[Unset, Fields], UNSET)
443
+
444
+ def get_folder_id() -> Union[Unset, None, str]:
445
+ folder_id = d.pop("folderId")
446
+ return folder_id
447
+
448
+ try:
449
+ folder_id = get_folder_id()
450
+ except KeyError:
451
+ if strict:
452
+ raise
453
+ folder_id = cast(Union[Unset, None, str], UNSET)
454
+
455
+ def get_id() -> Union[Unset, str]:
456
+ id = d.pop("id")
457
+ return id
458
+
459
+ try:
460
+ id = get_id()
461
+ except KeyError:
462
+ if strict:
463
+ raise
464
+ id = cast(Union[Unset, str], UNSET)
465
+
466
+ def get_length() -> Union[Unset, int]:
467
+ length = d.pop("length")
468
+ return length
469
+
470
+ try:
471
+ length = get_length()
472
+ except KeyError:
473
+ if strict:
474
+ raise
475
+ length = cast(Union[Unset, int], UNSET)
476
+
477
+ def get_modified_at() -> Union[Unset, datetime.datetime]:
478
+ modified_at: Union[Unset, datetime.datetime] = UNSET
479
+ _modified_at = d.pop("modifiedAt")
480
+ if _modified_at is not None and not isinstance(_modified_at, Unset):
481
+ modified_at = isoparse(cast(str, _modified_at))
482
+
483
+ return modified_at
484
+
485
+ try:
486
+ modified_at = get_modified_at()
487
+ except KeyError:
488
+ if strict:
489
+ raise
490
+ modified_at = cast(Union[Unset, datetime.datetime], UNSET)
491
+
492
+ def get_name() -> Union[Unset, str]:
493
+ name = d.pop("name")
494
+ return name
495
+
496
+ try:
497
+ name = get_name()
498
+ except KeyError:
499
+ if strict:
500
+ raise
501
+ name = cast(Union[Unset, str], 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
+ rna_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
+ nucleotide_type=nucleotide_type,
566
+ aliases=aliases,
567
+ archive_record=archive_record,
568
+ authors=authors,
569
+ created_at=created_at,
570
+ creator=creator,
571
+ custom_fields=custom_fields,
572
+ entity_registry_id=entity_registry_id,
573
+ fields=fields,
574
+ folder_id=folder_id,
575
+ id=id,
576
+ length=length,
577
+ modified_at=modified_at,
578
+ name=name,
579
+ registration_origin=registration_origin,
580
+ registry_id=registry_id,
581
+ schema=schema,
582
+ web_url=web_url,
583
+ )
584
+
585
+ rna_oligo_with_entity_type.additional_properties = d
586
+ return rna_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) -> RnaOligoWithEntityTypeEntityType:
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: RnaOligoWithEntityTypeEntityType) -> 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[RnaAnnotation]:
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[RnaAnnotation]) -> 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 nucleotide_type(self) -> OligoNucleotideType:
713
+ """ Nucleotide type of the Oligo. """
714
+ if isinstance(self._nucleotide_type, Unset):
715
+ raise NotPresentError(self, "nucleotide_type")
716
+ return self._nucleotide_type
717
+
718
+ @nucleotide_type.setter
719
+ def nucleotide_type(self, value: OligoNucleotideType) -> None:
720
+ self._nucleotide_type = value
721
+
722
+ @nucleotide_type.deleter
723
+ def nucleotide_type(self) -> None:
724
+ self._nucleotide_type = UNSET
725
+
726
+ @property
727
+ def aliases(self) -> List[str]:
728
+ """ Array of aliases """
729
+ if isinstance(self._aliases, Unset):
730
+ raise NotPresentError(self, "aliases")
731
+ return self._aliases
732
+
733
+ @aliases.setter
734
+ def aliases(self, value: List[str]) -> None:
735
+ self._aliases = value
736
+
737
+ @aliases.deleter
738
+ def aliases(self) -> None:
739
+ self._aliases = UNSET
740
+
741
+ @property
742
+ def archive_record(self) -> Optional[ArchiveRecord]:
743
+ if isinstance(self._archive_record, Unset):
744
+ raise NotPresentError(self, "archive_record")
745
+ return self._archive_record
746
+
747
+ @archive_record.setter
748
+ def archive_record(self, value: Optional[ArchiveRecord]) -> None:
749
+ self._archive_record = value
750
+
751
+ @archive_record.deleter
752
+ def archive_record(self) -> None:
753
+ self._archive_record = UNSET
754
+
755
+ @property
756
+ def authors(self) -> List[UserSummary]:
757
+ if isinstance(self._authors, Unset):
758
+ raise NotPresentError(self, "authors")
759
+ return self._authors
760
+
761
+ @authors.setter
762
+ def authors(self, value: List[UserSummary]) -> None:
763
+ self._authors = value
764
+
765
+ @authors.deleter
766
+ def authors(self) -> None:
767
+ self._authors = UNSET
768
+
769
+ @property
770
+ def created_at(self) -> datetime.datetime:
771
+ """ DateTime the Oligo was created. """
772
+ if isinstance(self._created_at, Unset):
773
+ raise NotPresentError(self, "created_at")
774
+ return self._created_at
775
+
776
+ @created_at.setter
777
+ def created_at(self, value: datetime.datetime) -> None:
778
+ self._created_at = value
779
+
780
+ @created_at.deleter
781
+ def created_at(self) -> None:
782
+ self._created_at = UNSET
783
+
784
+ @property
785
+ def creator(self) -> UserSummary:
786
+ if isinstance(self._creator, Unset):
787
+ raise NotPresentError(self, "creator")
788
+ return self._creator
789
+
790
+ @creator.setter
791
+ def creator(self, value: UserSummary) -> None:
792
+ self._creator = value
793
+
794
+ @creator.deleter
795
+ def creator(self) -> None:
796
+ self._creator = UNSET
797
+
798
+ @property
799
+ def custom_fields(self) -> CustomFields:
800
+ if isinstance(self._custom_fields, Unset):
801
+ raise NotPresentError(self, "custom_fields")
802
+ return self._custom_fields
803
+
804
+ @custom_fields.setter
805
+ def custom_fields(self, value: CustomFields) -> None:
806
+ self._custom_fields = value
807
+
808
+ @custom_fields.deleter
809
+ def custom_fields(self) -> None:
810
+ self._custom_fields = UNSET
811
+
812
+ @property
813
+ def entity_registry_id(self) -> Optional[str]:
814
+ """ Registry ID of the Oligo if registered. """
815
+ if isinstance(self._entity_registry_id, Unset):
816
+ raise NotPresentError(self, "entity_registry_id")
817
+ return self._entity_registry_id
818
+
819
+ @entity_registry_id.setter
820
+ def entity_registry_id(self, value: Optional[str]) -> None:
821
+ self._entity_registry_id = value
822
+
823
+ @entity_registry_id.deleter
824
+ def entity_registry_id(self) -> None:
825
+ self._entity_registry_id = UNSET
826
+
827
+ @property
828
+ def fields(self) -> Fields:
829
+ if isinstance(self._fields, Unset):
830
+ raise NotPresentError(self, "fields")
831
+ return self._fields
832
+
833
+ @fields.setter
834
+ def fields(self, value: Fields) -> None:
835
+ self._fields = value
836
+
837
+ @fields.deleter
838
+ def fields(self) -> None:
839
+ self._fields = UNSET
840
+
841
+ @property
842
+ def folder_id(self) -> Optional[str]:
843
+ """ ID of the folder that contains the Oligo. """
844
+ if isinstance(self._folder_id, Unset):
845
+ raise NotPresentError(self, "folder_id")
846
+ return self._folder_id
847
+
848
+ @folder_id.setter
849
+ def folder_id(self, value: Optional[str]) -> None:
850
+ self._folder_id = value
851
+
852
+ @folder_id.deleter
853
+ def folder_id(self) -> None:
854
+ self._folder_id = UNSET
855
+
856
+ @property
857
+ def id(self) -> str:
858
+ """ ID of the Oligo. """
859
+ if isinstance(self._id, Unset):
860
+ raise NotPresentError(self, "id")
861
+ return self._id
862
+
863
+ @id.setter
864
+ def id(self, value: str) -> None:
865
+ self._id = value
866
+
867
+ @id.deleter
868
+ def id(self) -> None:
869
+ self._id = UNSET
870
+
871
+ @property
872
+ def length(self) -> int:
873
+ """ Number of bases in the Oligo. """
874
+ if isinstance(self._length, Unset):
875
+ raise NotPresentError(self, "length")
876
+ return self._length
877
+
878
+ @length.setter
879
+ def length(self, value: int) -> None:
880
+ self._length = value
881
+
882
+ @length.deleter
883
+ def length(self) -> None:
884
+ self._length = UNSET
885
+
886
+ @property
887
+ def modified_at(self) -> datetime.datetime:
888
+ """ DateTime the Oligo was last modified. """
889
+ if isinstance(self._modified_at, Unset):
890
+ raise NotPresentError(self, "modified_at")
891
+ return self._modified_at
892
+
893
+ @modified_at.setter
894
+ def modified_at(self, value: datetime.datetime) -> None:
895
+ self._modified_at = value
896
+
897
+ @modified_at.deleter
898
+ def modified_at(self) -> None:
899
+ self._modified_at = UNSET
900
+
901
+ @property
902
+ def name(self) -> str:
903
+ """ Name of the Oligo. """
904
+ if isinstance(self._name, Unset):
905
+ raise NotPresentError(self, "name")
906
+ return self._name
907
+
908
+ @name.setter
909
+ def name(self, value: str) -> None:
910
+ self._name = value
911
+
912
+ @name.deleter
913
+ def name(self) -> None:
914
+ self._name = 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