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,22 @@
1
+ from enum import Enum
2
+ from functools import lru_cache
3
+ from typing import cast
4
+
5
+ from ..extensions import Enums
6
+
7
+
8
+ class RnaSequenceWithEntityTypeEntityType(Enums.KnownString):
9
+ RNA_SEQUENCE = "rna_sequence"
10
+
11
+ def __str__(self) -> str:
12
+ return str(self.value)
13
+
14
+ @staticmethod
15
+ @lru_cache(maxsize=None)
16
+ def of_unknown(val: str) -> "RnaSequenceWithEntityTypeEntityType":
17
+ if not isinstance(val, str):
18
+ raise ValueError(
19
+ f"Value of RnaSequenceWithEntityTypeEntityType must be a string (encountered: {val})"
20
+ )
21
+ newcls = Enum("RnaSequenceWithEntityTypeEntityType", {"_UNKNOWN": val}, type=Enums.UnknownString) # type: ignore
22
+ return cast(RnaSequenceWithEntityTypeEntityType, getattr(newcls, "_UNKNOWN"))
@@ -2839,7 +2839,7 @@ components:
2839
2839
  description: The path of the web URL, omitting the tenant domain
2840
2840
  type: string
2841
2841
  webURL:
2842
- description: URL of the protein.
2842
+ description: URL of the AA sequence.
2843
2843
  example: https://benchling.com/benchling/f/lib_55UxcIps-registry/prtn_7nMBOMm0-kedchain11/edit"
2844
2844
  format: uri
2845
2845
  readOnly: true
@@ -2926,6 +2926,16 @@ components:
2926
2926
  deprecated: true
2927
2927
  type: string
2928
2928
  type: object
2929
+ AaSequenceWithEntityType:
2930
+ allOf:
2931
+ - $ref: '#/components/schemas/AaSequence'
2932
+ - properties:
2933
+ entityType:
2934
+ enum:
2935
+ - aa_sequence
2936
+ type: string
2937
+ type: object
2938
+ type: object
2929
2939
  AccessPoliciesPaginatedList:
2930
2940
  additionalProperties: false
2931
2941
  properties:
@@ -3872,6 +3882,16 @@ components:
3872
3882
  allOf:
3873
3883
  - $ref: '#/components/schemas/EntityUpsertBaseRequest'
3874
3884
  - $ref: '#/components/schemas/CustomEntityBaseRequestForCreate'
3885
+ CustomEntityWithEntityType:
3886
+ allOf:
3887
+ - $ref: '#/components/schemas/CustomEntity'
3888
+ - properties:
3889
+ entityType:
3890
+ enum:
3891
+ - custom_entity
3892
+ type: string
3893
+ type: object
3894
+ type: object
3875
3895
  CustomField:
3876
3896
  properties:
3877
3897
  value:
@@ -4408,6 +4428,16 @@ components:
4408
4428
  chemical modifications
4409
4429
  example: RNA1{d(A)p.d(C)[Ssp].d(T)p.d(T)p.d(T)p.d(T)p.d(T)p}$$$$V2.0
4410
4430
  type: string
4431
+ DnaOligoWithEntityType:
4432
+ allOf:
4433
+ - $ref: '#/components/schemas/DnaOligo'
4434
+ - properties:
4435
+ entityType:
4436
+ enum:
4437
+ - dna_oligo
4438
+ type: string
4439
+ type: object
4440
+ type: object
4411
4441
  DnaSequence:
4412
4442
  properties:
4413
4443
  aliases:
@@ -4637,6 +4667,16 @@ components:
4637
4667
  minimum: -1
4638
4668
  type: integer
4639
4669
  type: object
4670
+ DnaSequenceWithEntityType:
4671
+ allOf:
4672
+ - $ref: '#/components/schemas/DnaSequence'
4673
+ - properties:
4674
+ entityType:
4675
+ enum:
4676
+ - dna_sequence
4677
+ type: string
4678
+ type: object
4679
+ type: object
4640
4680
  DropdownDependency:
4641
4681
  additionalProperties: false
4642
4682
  allOf:
@@ -4685,13 +4725,26 @@ components:
4685
4725
  type: array
4686
4726
  type: object
4687
4727
  Entity:
4728
+ discriminator:
4729
+ mapping:
4730
+ aa_sequence: '#/components/schemas/AaSequenceWithEntityType'
4731
+ custom_entity: '#/components/schemas/CustomEntityWithEntityType'
4732
+ dna_oligo: '#/components/schemas/DnaOligoWithEntityType'
4733
+ dna_sequence: '#/components/schemas/DnaSequenceWithEntityType'
4734
+ mixture: '#/components/schemas/MixtureWithEntityType'
4735
+ molecule: '#/components/schemas/MoleculeWithEntityType'
4736
+ rna_oligo: '#/components/schemas/RnaOligoWithEntityType'
4737
+ rna_sequence: '#/components/schemas/RnaSequenceWithEntityType'
4738
+ propertyName: entityType
4688
4739
  oneOf:
4689
- - $ref: '#/components/schemas/DnaSequence'
4690
- - $ref: '#/components/schemas/AaSequence'
4691
- - $ref: '#/components/schemas/Mixture'
4692
- - $ref: '#/components/schemas/DnaOligo'
4693
- - $ref: '#/components/schemas/RnaOligo'
4694
- - $ref: '#/components/schemas/CustomEntity'
4740
+ - $ref: '#/components/schemas/DnaSequenceWithEntityType'
4741
+ - $ref: '#/components/schemas/RnaSequenceWithEntityType'
4742
+ - $ref: '#/components/schemas/AaSequenceWithEntityType'
4743
+ - $ref: '#/components/schemas/MixtureWithEntityType'
4744
+ - $ref: '#/components/schemas/DnaOligoWithEntityType'
4745
+ - $ref: '#/components/schemas/RnaOligoWithEntityType'
4746
+ - $ref: '#/components/schemas/MoleculeWithEntityType'
4747
+ - $ref: '#/components/schemas/CustomEntityWithEntityType'
4695
4748
  type: object
4696
4749
  EntityBulkUpsertBaseRequest:
4697
4750
  allOf:
@@ -6268,6 +6321,16 @@ components:
6268
6321
  - mixture_prep_table
6269
6322
  type: string
6270
6323
  type: object
6324
+ MixtureWithEntityType:
6325
+ allOf:
6326
+ - $ref: '#/components/schemas/Mixture'
6327
+ - properties:
6328
+ entityType:
6329
+ enum:
6330
+ - mixture
6331
+ type: string
6332
+ type: object
6333
+ type: object
6271
6334
  Molecule:
6272
6335
  additionalProperties: false
6273
6336
  properties:
@@ -6437,6 +6500,16 @@ components:
6437
6500
  allOf:
6438
6501
  - $ref: '#/components/schemas/EntityUpsertBaseRequest'
6439
6502
  - $ref: '#/components/schemas/MoleculeBaseRequestForCreate'
6503
+ MoleculeWithEntityType:
6504
+ allOf:
6505
+ - $ref: '#/components/schemas/Molecule'
6506
+ - properties:
6507
+ entityType:
6508
+ enum:
6509
+ - molecule
6510
+ type: string
6511
+ type: object
6512
+ type: object
6440
6513
  NotFoundError:
6441
6514
  properties:
6442
6515
  error:
@@ -6973,6 +7046,143 @@ components:
6973
7046
  nucleotideType:
6974
7047
  example: RNA
6975
7048
  type: string
7049
+ RnaOligoWithEntityType:
7050
+ allOf:
7051
+ - $ref: '#/components/schemas/RnaOligo'
7052
+ - properties:
7053
+ entityType:
7054
+ enum:
7055
+ - rna_oligo
7056
+ type: string
7057
+ type: object
7058
+ type: object
7059
+ RnaSequence:
7060
+ properties:
7061
+ aliases:
7062
+ items:
7063
+ type: string
7064
+ type: array
7065
+ alignmentIds:
7066
+ description: API IDs of Nucleotide Alignments involving the RNA sequence
7067
+ items:
7068
+ type: string
7069
+ type: array
7070
+ annotations:
7071
+ items:
7072
+ $ref: '#/components/schemas/RnaAnnotation'
7073
+ type: array
7074
+ apiURL:
7075
+ description: The canonical url of the RNA Sequence in the API.
7076
+ example: https://benchling.com/api/v2/rna-sequences/seq_asZya4lk
7077
+ format: uri
7078
+ readOnly: true
7079
+ type: string
7080
+ archiveRecord:
7081
+ allOf:
7082
+ - $ref: '#/components/schemas/ArchiveRecord'
7083
+ nullable: true
7084
+ authors:
7085
+ items:
7086
+ $ref: '#/components/schemas/UserSummary'
7087
+ type: array
7088
+ bases:
7089
+ type: string
7090
+ createdAt:
7091
+ format: date-time
7092
+ readOnly: true
7093
+ type: string
7094
+ creator:
7095
+ $ref: '#/components/schemas/UserSummary'
7096
+ customFields:
7097
+ $ref: '#/components/schemas/CustomFields'
7098
+ customNotation:
7099
+ description: Representation of the RNA Sequence in the custom notation specified
7100
+ in the request. Null if no notation was specified.
7101
+ nullable: true
7102
+ type: string
7103
+ customNotationName:
7104
+ description: Name of the custom notation specified in the request. Null
7105
+ if no notation was specified.
7106
+ nullable: true
7107
+ type: string
7108
+ entityRegistryId:
7109
+ nullable: true
7110
+ type: string
7111
+ fields:
7112
+ $ref: '#/components/schemas/Fields'
7113
+ folderId:
7114
+ nullable: true
7115
+ type: string
7116
+ helm:
7117
+ description: Representation of the RNA Sequence in HELM syntax, including
7118
+ any chemical modifications.
7119
+ example: RNA1{r(A)p.r(C)[Ssp].r(U)p.r(U)p.r(U)p.r(U)p.r(U)p}$$$$V2.0
7120
+ nullable: true
7121
+ type: string
7122
+ id:
7123
+ type: string
7124
+ isCircular:
7125
+ example: false
7126
+ type: boolean
7127
+ length:
7128
+ type: integer
7129
+ modifiedAt:
7130
+ format: date-time
7131
+ readOnly: true
7132
+ type: string
7133
+ name:
7134
+ type: string
7135
+ parts:
7136
+ items:
7137
+ $ref: '#/components/schemas/RnaSequencePart'
7138
+ type: array
7139
+ primers:
7140
+ items:
7141
+ $ref: '#/components/schemas/Primer'
7142
+ type: array
7143
+ registrationOrigin:
7144
+ allOf:
7145
+ - $ref: '#/components/schemas/RegistrationOrigin'
7146
+ nullable: true
7147
+ readOnly: true
7148
+ registryId:
7149
+ nullable: true
7150
+ type: string
7151
+ schema:
7152
+ allOf:
7153
+ - $ref: '#/components/schemas/SchemaSummary'
7154
+ nullable: true
7155
+ translations:
7156
+ items:
7157
+ $ref: '#/components/schemas/Translation'
7158
+ type: array
7159
+ url:
7160
+ description: The path of the web URL, omitting the tenant domain
7161
+ type: string
7162
+ webURL:
7163
+ readOnly: true
7164
+ type: string
7165
+ type: object
7166
+ RnaSequencePart:
7167
+ allOf:
7168
+ - $ref: '#/components/schemas/NucleotideSequencePart'
7169
+ - properties:
7170
+ strand:
7171
+ example: 1
7172
+ maximum: 1
7173
+ minimum: 1
7174
+ type: integer
7175
+ type: object
7176
+ RnaSequenceWithEntityType:
7177
+ allOf:
7178
+ - $ref: '#/components/schemas/RnaSequence'
7179
+ - properties:
7180
+ entityType:
7181
+ enum:
7182
+ - rna_sequence
7183
+ type: string
7184
+ type: object
7185
+ type: object
6976
7186
  SampleRestrictionStatus:
6977
7187
  enum:
6978
7188
  - RESTRICTED
@@ -7684,8 +7894,8 @@ tags:
7684
7894
  assigned to access an item.
7685
7895
  name: Collaborations
7686
7896
  - description: 'Benchling supports custom entities for biological entities that are
7687
- neither sequences or proteins. Custom entities must have an entity schema set
7688
- and can have both schema fields and custom fields.
7897
+ neither DNA, RNA, nor AA sequences. Custom entities must have an entity schema
7898
+ set and can have both schema fields and custom fields.
7689
7899
 
7690
7900
  '
7691
7901
  name: Custom Entities
@@ -809,7 +809,7 @@ class AaSequence:
809
809
 
810
810
  @property
811
811
  def web_url(self) -> str:
812
- """ URL of the protein. """
812
+ """ URL of the AA sequence. """
813
813
  if isinstance(self._web_url, Unset):
814
814
  raise NotPresentError(self, "web_url")
815
815
  return self._web_url
@@ -851,7 +851,7 @@ class AaSequenceWithEntityType:
851
851
 
852
852
  @property
853
853
  def web_url(self) -> str:
854
- """ URL of the protein. """
854
+ """ URL of the AA sequence. """
855
855
  if isinstance(self._web_url, Unset):
856
856
  raise NotPresentError(self, "web_url")
857
857
  return self._web_url
@@ -3,15 +3,17 @@ from typing import Any, cast, Dict, List, Optional, Type, TypeVar, Union
3
3
  import attr
4
4
 
5
5
  from ..extensions import NotPresentError, UnknownType
6
- from ..models.aa_sequence import AaSequence
6
+ from ..models.aa_sequence_with_entity_type import AaSequenceWithEntityType
7
7
  from ..models.batch import Batch
8
- from ..models.custom_entity import CustomEntity
9
- from ..models.dna_oligo import DnaOligo
10
- from ..models.dna_sequence import DnaSequence
8
+ from ..models.custom_entity_with_entity_type import CustomEntityWithEntityType
9
+ from ..models.dna_oligo_with_entity_type import DnaOligoWithEntityType
10
+ from ..models.dna_sequence_with_entity_type import DnaSequenceWithEntityType
11
11
  from ..models.inaccessible_resource import InaccessibleResource
12
12
  from ..models.measurement import Measurement
13
- from ..models.mixture import Mixture
14
- from ..models.rna_oligo import RnaOligo
13
+ from ..models.mixture_with_entity_type import MixtureWithEntityType
14
+ from ..models.molecule_with_entity_type import MoleculeWithEntityType
15
+ from ..models.rna_oligo_with_entity_type import RnaOligoWithEntityType
16
+ from ..models.rna_sequence_with_entity_type import RnaSequenceWithEntityType
15
17
  from ..types import UNSET, Unset
16
18
 
17
19
  T = TypeVar("T", bound="ContainerContent")
@@ -26,7 +28,17 @@ class ContainerContent:
26
28
  _entity: Union[
27
29
  Unset,
28
30
  None,
29
- Union[DnaSequence, AaSequence, Mixture, DnaOligo, RnaOligo, CustomEntity, UnknownType],
31
+ Union[
32
+ DnaSequenceWithEntityType,
33
+ RnaSequenceWithEntityType,
34
+ AaSequenceWithEntityType,
35
+ MixtureWithEntityType,
36
+ DnaOligoWithEntityType,
37
+ RnaOligoWithEntityType,
38
+ MoleculeWithEntityType,
39
+ CustomEntityWithEntityType,
40
+ UnknownType,
41
+ ],
30
42
  InaccessibleResource,
31
43
  UnknownType,
32
44
  ] = UNSET
@@ -68,19 +80,25 @@ class ContainerContent:
68
80
  elif isinstance(self._entity, object):
69
81
  if isinstance(self._entity, UnknownType):
70
82
  entity = self._entity.value
71
- elif isinstance(self._entity, DnaSequence):
83
+ elif isinstance(self._entity, DnaSequenceWithEntityType):
84
+ entity = self._entity.to_dict()
85
+
86
+ elif isinstance(self._entity, RnaSequenceWithEntityType):
87
+ entity = self._entity.to_dict()
88
+
89
+ elif isinstance(self._entity, AaSequenceWithEntityType):
72
90
  entity = self._entity.to_dict()
73
91
 
74
- elif isinstance(self._entity, AaSequence):
92
+ elif isinstance(self._entity, MixtureWithEntityType):
75
93
  entity = self._entity.to_dict()
76
94
 
77
- elif isinstance(self._entity, Mixture):
95
+ elif isinstance(self._entity, DnaOligoWithEntityType):
78
96
  entity = self._entity.to_dict()
79
97
 
80
- elif isinstance(self._entity, DnaOligo):
98
+ elif isinstance(self._entity, RnaOligoWithEntityType):
81
99
  entity = self._entity.to_dict()
82
100
 
83
- elif isinstance(self._entity, RnaOligo):
101
+ elif isinstance(self._entity, MoleculeWithEntityType):
84
102
  entity = self._entity.to_dict()
85
103
 
86
104
  else:
@@ -162,7 +180,17 @@ class ContainerContent:
162
180
  def get_entity() -> Union[
163
181
  Unset,
164
182
  None,
165
- Union[DnaSequence, AaSequence, Mixture, DnaOligo, RnaOligo, CustomEntity, UnknownType],
183
+ Union[
184
+ DnaSequenceWithEntityType,
185
+ RnaSequenceWithEntityType,
186
+ AaSequenceWithEntityType,
187
+ MixtureWithEntityType,
188
+ DnaOligoWithEntityType,
189
+ RnaOligoWithEntityType,
190
+ MoleculeWithEntityType,
191
+ CustomEntityWithEntityType,
192
+ UnknownType,
193
+ ],
166
194
  InaccessibleResource,
167
195
  UnknownType,
168
196
  ]:
@@ -171,14 +199,34 @@ class ContainerContent:
171
199
  ) -> Union[
172
200
  Unset,
173
201
  None,
174
- Union[DnaSequence, AaSequence, Mixture, DnaOligo, RnaOligo, CustomEntity, UnknownType],
202
+ Union[
203
+ DnaSequenceWithEntityType,
204
+ RnaSequenceWithEntityType,
205
+ AaSequenceWithEntityType,
206
+ MixtureWithEntityType,
207
+ DnaOligoWithEntityType,
208
+ RnaOligoWithEntityType,
209
+ MoleculeWithEntityType,
210
+ CustomEntityWithEntityType,
211
+ UnknownType,
212
+ ],
175
213
  InaccessibleResource,
176
214
  UnknownType,
177
215
  ]:
178
216
  entity: Union[
179
217
  Unset,
180
218
  None,
181
- Union[DnaSequence, AaSequence, Mixture, DnaOligo, RnaOligo, CustomEntity, UnknownType],
219
+ Union[
220
+ DnaSequenceWithEntityType,
221
+ RnaSequenceWithEntityType,
222
+ AaSequenceWithEntityType,
223
+ MixtureWithEntityType,
224
+ DnaOligoWithEntityType,
225
+ RnaOligoWithEntityType,
226
+ MoleculeWithEntityType,
227
+ CustomEntityWithEntityType,
228
+ UnknownType,
229
+ ],
182
230
  InaccessibleResource,
183
231
  UnknownType,
184
232
  ]
@@ -191,15 +239,78 @@ class ContainerContent:
191
239
  def _parse_entity_or_inaccessible_resource(
192
240
  data: Union[Dict[str, Any]]
193
241
  ) -> Union[
194
- DnaSequence, AaSequence, Mixture, DnaOligo, RnaOligo, CustomEntity, UnknownType
242
+ DnaSequenceWithEntityType,
243
+ RnaSequenceWithEntityType,
244
+ AaSequenceWithEntityType,
245
+ MixtureWithEntityType,
246
+ DnaOligoWithEntityType,
247
+ RnaOligoWithEntityType,
248
+ MoleculeWithEntityType,
249
+ CustomEntityWithEntityType,
250
+ UnknownType,
195
251
  ]:
196
252
  entity_or_inaccessible_resource: Union[
197
- DnaSequence, AaSequence, Mixture, DnaOligo, RnaOligo, CustomEntity, UnknownType
253
+ DnaSequenceWithEntityType,
254
+ RnaSequenceWithEntityType,
255
+ AaSequenceWithEntityType,
256
+ MixtureWithEntityType,
257
+ DnaOligoWithEntityType,
258
+ RnaOligoWithEntityType,
259
+ MoleculeWithEntityType,
260
+ CustomEntityWithEntityType,
261
+ UnknownType,
198
262
  ]
263
+ discriminator_value: str = cast(str, data.get("entityType"))
264
+ if discriminator_value is not None:
265
+ entity: Union[
266
+ DnaSequenceWithEntityType,
267
+ RnaSequenceWithEntityType,
268
+ AaSequenceWithEntityType,
269
+ MixtureWithEntityType,
270
+ DnaOligoWithEntityType,
271
+ RnaOligoWithEntityType,
272
+ MoleculeWithEntityType,
273
+ CustomEntityWithEntityType,
274
+ UnknownType,
275
+ ]
276
+ if discriminator_value == "aa_sequence":
277
+ entity = AaSequenceWithEntityType.from_dict(data, strict=False)
278
+
279
+ return entity
280
+ if discriminator_value == "custom_entity":
281
+ entity = CustomEntityWithEntityType.from_dict(data, strict=False)
282
+
283
+ return entity
284
+ if discriminator_value == "dna_oligo":
285
+ entity = DnaOligoWithEntityType.from_dict(data, strict=False)
286
+
287
+ return entity
288
+ if discriminator_value == "dna_sequence":
289
+ entity = DnaSequenceWithEntityType.from_dict(data, strict=False)
290
+
291
+ return entity
292
+ if discriminator_value == "mixture":
293
+ entity = MixtureWithEntityType.from_dict(data, strict=False)
294
+
295
+ return entity
296
+ if discriminator_value == "molecule":
297
+ entity = MoleculeWithEntityType.from_dict(data, strict=False)
298
+
299
+ return entity
300
+ if discriminator_value == "rna_oligo":
301
+ entity = RnaOligoWithEntityType.from_dict(data, strict=False)
302
+
303
+ return entity
304
+ if discriminator_value == "rna_sequence":
305
+ entity = RnaSequenceWithEntityType.from_dict(data, strict=False)
306
+
307
+ return entity
308
+
309
+ return UnknownType(value=data)
199
310
  try:
200
311
  if not isinstance(data, dict):
201
312
  raise TypeError()
202
- entity = DnaSequence.from_dict(data, strict=True)
313
+ entity = DnaSequenceWithEntityType.from_dict(data, strict=True)
203
314
 
204
315
  return entity
205
316
  except: # noqa: E722
@@ -207,7 +318,7 @@ class ContainerContent:
207
318
  try:
208
319
  if not isinstance(data, dict):
209
320
  raise TypeError()
210
- entity = AaSequence.from_dict(data, strict=True)
321
+ entity = RnaSequenceWithEntityType.from_dict(data, strict=True)
211
322
 
212
323
  return entity
213
324
  except: # noqa: E722
@@ -215,7 +326,7 @@ class ContainerContent:
215
326
  try:
216
327
  if not isinstance(data, dict):
217
328
  raise TypeError()
218
- entity = Mixture.from_dict(data, strict=True)
329
+ entity = AaSequenceWithEntityType.from_dict(data, strict=True)
219
330
 
220
331
  return entity
221
332
  except: # noqa: E722
@@ -223,7 +334,7 @@ class ContainerContent:
223
334
  try:
224
335
  if not isinstance(data, dict):
225
336
  raise TypeError()
226
- entity = DnaOligo.from_dict(data, strict=True)
337
+ entity = MixtureWithEntityType.from_dict(data, strict=True)
227
338
 
228
339
  return entity
229
340
  except: # noqa: E722
@@ -231,7 +342,7 @@ class ContainerContent:
231
342
  try:
232
343
  if not isinstance(data, dict):
233
344
  raise TypeError()
234
- entity = RnaOligo.from_dict(data, strict=True)
345
+ entity = DnaOligoWithEntityType.from_dict(data, strict=True)
235
346
 
236
347
  return entity
237
348
  except: # noqa: E722
@@ -239,7 +350,23 @@ class ContainerContent:
239
350
  try:
240
351
  if not isinstance(data, dict):
241
352
  raise TypeError()
242
- entity = CustomEntity.from_dict(data, strict=True)
353
+ entity = RnaOligoWithEntityType.from_dict(data, strict=True)
354
+
355
+ return entity
356
+ except: # noqa: E722
357
+ pass
358
+ try:
359
+ if not isinstance(data, dict):
360
+ raise TypeError()
361
+ entity = MoleculeWithEntityType.from_dict(data, strict=True)
362
+
363
+ return entity
364
+ except: # noqa: E722
365
+ pass
366
+ try:
367
+ if not isinstance(data, dict):
368
+ raise TypeError()
369
+ entity = CustomEntityWithEntityType.from_dict(data, strict=True)
243
370
 
244
371
  return entity
245
372
  except: # noqa: E722
@@ -274,7 +401,17 @@ class ContainerContent:
274
401
  Union[
275
402
  Unset,
276
403
  None,
277
- Union[DnaSequence, AaSequence, Mixture, DnaOligo, RnaOligo, CustomEntity, UnknownType],
404
+ Union[
405
+ DnaSequenceWithEntityType,
406
+ RnaSequenceWithEntityType,
407
+ AaSequenceWithEntityType,
408
+ MixtureWithEntityType,
409
+ DnaOligoWithEntityType,
410
+ RnaOligoWithEntityType,
411
+ MoleculeWithEntityType,
412
+ CustomEntityWithEntityType,
413
+ UnknownType,
414
+ ],
278
415
  InaccessibleResource,
279
416
  UnknownType,
280
417
  ],
@@ -342,7 +479,17 @@ class ContainerContent:
342
479
  self,
343
480
  ) -> Optional[
344
481
  Union[
345
- Union[DnaSequence, AaSequence, Mixture, DnaOligo, RnaOligo, CustomEntity, UnknownType],
482
+ Union[
483
+ DnaSequenceWithEntityType,
484
+ RnaSequenceWithEntityType,
485
+ AaSequenceWithEntityType,
486
+ MixtureWithEntityType,
487
+ DnaOligoWithEntityType,
488
+ RnaOligoWithEntityType,
489
+ MoleculeWithEntityType,
490
+ CustomEntityWithEntityType,
491
+ UnknownType,
492
+ ],
346
493
  InaccessibleResource,
347
494
  UnknownType,
348
495
  ]
@@ -356,7 +503,17 @@ class ContainerContent:
356
503
  self,
357
504
  value: Optional[
358
505
  Union[
359
- Union[DnaSequence, AaSequence, Mixture, DnaOligo, RnaOligo, CustomEntity, UnknownType],
506
+ Union[
507
+ DnaSequenceWithEntityType,
508
+ RnaSequenceWithEntityType,
509
+ AaSequenceWithEntityType,
510
+ MixtureWithEntityType,
511
+ DnaOligoWithEntityType,
512
+ RnaOligoWithEntityType,
513
+ MoleculeWithEntityType,
514
+ CustomEntityWithEntityType,
515
+ UnknownType,
516
+ ],
360
517
  InaccessibleResource,
361
518
  UnknownType,
362
519
  ]