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