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.
- benchling_api_client/models/container_content.py +183 -26
- benchling_api_client/models/entity.py +19 -7
- benchling_api_client/models/entity_or_inaccessible_resource.py +19 -7
- benchling_api_client/models/field_type.py +1 -0
- benchling_api_client/models/molecule_with_entity_type.py +787 -0
- benchling_api_client/models/molecule_with_entity_type_entity_type.py +22 -0
- benchling_api_client/models/registered_entities_list.py +89 -32
- benchling_api_client/models/request_response_samples_item_entity.py +216 -74
- benchling_api_client/models/rna_sequence_with_entity_type.py +1151 -0
- benchling_api_client/models/rna_sequence_with_entity_type_entity_type.py +22 -0
- benchling_api_client/models/simple_field_definition_type.py +1 -0
- benchling_api_client/v2/alpha/models/app_config_field_type.py +1 -0
- benchling_api_client/v2/alpha/models/field_type.py +1 -0
- benchling_api_client/v2/alpha/openapi.yaml +2 -0
- benchling_api_client/v2/beta/models/aa_sequence_with_entity_type.py +865 -0
- benchling_api_client/v2/beta/models/aa_sequence_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/models/app_config_field_type.py +1 -0
- benchling_api_client/v2/beta/models/container_content.py +183 -26
- benchling_api_client/v2/beta/models/custom_entity_creator.py +2 -100
- benchling_api_client/v2/beta/models/custom_entity_with_entity_type.py +747 -0
- benchling_api_client/v2/beta/models/custom_entity_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/models/dna_oligo_with_entity_type.py +972 -0
- benchling_api_client/v2/beta/models/dna_oligo_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/models/dna_sequence_with_entity_type.py +1102 -0
- benchling_api_client/v2/beta/models/dna_sequence_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/models/entity.py +19 -7
- benchling_api_client/v2/beta/models/entity_or_inaccessible_resource.py +19 -7
- benchling_api_client/v2/beta/models/field_type.py +1 -0
- benchling_api_client/v2/beta/models/mixture_creator.py +2 -100
- benchling_api_client/v2/beta/models/mixture_with_entity_type.py +867 -0
- benchling_api_client/v2/beta/models/mixture_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/models/molecule_with_entity_type.py +787 -0
- benchling_api_client/v2/beta/models/molecule_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/models/rna_oligo_with_entity_type.py +972 -0
- benchling_api_client/v2/beta/models/rna_oligo_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/models/rna_sequence.py +1109 -0
- benchling_api_client/v2/beta/models/rna_sequence_part.py +183 -0
- benchling_api_client/v2/beta/models/rna_sequence_with_entity_type.py +1151 -0
- benchling_api_client/v2/beta/models/rna_sequence_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/beta/openapi.yaml +218 -6
- benchling_api_client/v2/stable/models/container_content.py +183 -26
- benchling_api_client/v2/stable/models/entity.py +19 -7
- benchling_api_client/v2/stable/models/entity_or_inaccessible_resource.py +19 -7
- benchling_api_client/v2/stable/models/field_type.py +1 -0
- benchling_api_client/v2/stable/models/molecule_with_entity_type.py +787 -0
- benchling_api_client/v2/stable/models/molecule_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/stable/models/registered_entities_list.py +89 -32
- benchling_api_client/v2/stable/models/request_response_samples_item_entity.py +216 -74
- benchling_api_client/v2/stable/models/rna_sequence_with_entity_type.py +1151 -0
- benchling_api_client/v2/stable/models/rna_sequence_with_entity_type_entity_type.py +22 -0
- benchling_api_client/v2/stable/models/simple_field_definition_type.py +1 -0
- benchling_api_client/v2/stable/openapi.yaml +42 -22
- {benchling_api_client-2.0.414.dist-info → benchling_api_client-2.0.416.dist-info}/METADATA +1 -1
- {benchling_api_client-2.0.414.dist-info → benchling_api_client-2.0.416.dist-info}/RECORD +56 -30
- {benchling_api_client-2.0.414.dist-info → benchling_api_client-2.0.416.dist-info}/LICENSE +0 -0
- {benchling_api_client-2.0.414.dist-info → benchling_api_client-2.0.416.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"))
|
|
@@ -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:
|
|
@@ -3021,6 +3031,7 @@ components:
|
|
|
3021
3031
|
- custom_entity_link
|
|
3022
3032
|
- entity_link
|
|
3023
3033
|
- mixture_link
|
|
3034
|
+
- molecule_link
|
|
3024
3035
|
- dropdown
|
|
3025
3036
|
- part_link
|
|
3026
3037
|
- translation_link
|
|
@@ -3871,6 +3882,16 @@ components:
|
|
|
3871
3882
|
allOf:
|
|
3872
3883
|
- $ref: '#/components/schemas/EntityUpsertBaseRequest'
|
|
3873
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
|
|
3874
3895
|
CustomField:
|
|
3875
3896
|
properties:
|
|
3876
3897
|
value:
|
|
@@ -4407,6 +4428,16 @@ components:
|
|
|
4407
4428
|
chemical modifications
|
|
4408
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
|
|
4409
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
|
|
4410
4441
|
DnaSequence:
|
|
4411
4442
|
properties:
|
|
4412
4443
|
aliases:
|
|
@@ -4636,6 +4667,16 @@ components:
|
|
|
4636
4667
|
minimum: -1
|
|
4637
4668
|
type: integer
|
|
4638
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
|
|
4639
4680
|
DropdownDependency:
|
|
4640
4681
|
additionalProperties: false
|
|
4641
4682
|
allOf:
|
|
@@ -4684,13 +4725,26 @@ components:
|
|
|
4684
4725
|
type: array
|
|
4685
4726
|
type: object
|
|
4686
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
|
|
4687
4739
|
oneOf:
|
|
4688
|
-
- $ref: '#/components/schemas/
|
|
4689
|
-
- $ref: '#/components/schemas/
|
|
4690
|
-
- $ref: '#/components/schemas/
|
|
4691
|
-
- $ref: '#/components/schemas/
|
|
4692
|
-
- $ref: '#/components/schemas/
|
|
4693
|
-
- $ref: '#/components/schemas/
|
|
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'
|
|
4694
4748
|
type: object
|
|
4695
4749
|
EntityBulkUpsertBaseRequest:
|
|
4696
4750
|
allOf:
|
|
@@ -5423,6 +5477,7 @@ components:
|
|
|
5423
5477
|
- custom_entity_link
|
|
5424
5478
|
- entity_link
|
|
5425
5479
|
- mixture_link
|
|
5480
|
+
- molecule_link
|
|
5426
5481
|
- dropdown
|
|
5427
5482
|
- part_link
|
|
5428
5483
|
- translation_link
|
|
@@ -6266,6 +6321,16 @@ components:
|
|
|
6266
6321
|
- mixture_prep_table
|
|
6267
6322
|
type: string
|
|
6268
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
|
|
6269
6334
|
Molecule:
|
|
6270
6335
|
additionalProperties: false
|
|
6271
6336
|
properties:
|
|
@@ -6435,6 +6500,16 @@ components:
|
|
|
6435
6500
|
allOf:
|
|
6436
6501
|
- $ref: '#/components/schemas/EntityUpsertBaseRequest'
|
|
6437
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
|
|
6438
6513
|
NotFoundError:
|
|
6439
6514
|
properties:
|
|
6440
6515
|
error:
|
|
@@ -6971,6 +7046,143 @@ components:
|
|
|
6971
7046
|
nucleotideType:
|
|
6972
7047
|
example: RNA
|
|
6973
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
|
|
6974
7186
|
SampleRestrictionStatus:
|
|
6975
7187
|
enum:
|
|
6976
7188
|
- RESTRICTED
|
|
@@ -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.
|
|
6
|
+
from ..models.aa_sequence_with_entity_type import AaSequenceWithEntityType
|
|
7
7
|
from ..models.batch import Batch
|
|
8
|
-
from ..models.
|
|
9
|
-
from ..models.
|
|
10
|
-
from ..models.
|
|
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.
|
|
14
|
-
from ..models.
|
|
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[
|
|
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,
|
|
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,
|
|
92
|
+
elif isinstance(self._entity, MixtureWithEntityType):
|
|
75
93
|
entity = self._entity.to_dict()
|
|
76
94
|
|
|
77
|
-
elif isinstance(self._entity,
|
|
95
|
+
elif isinstance(self._entity, DnaOligoWithEntityType):
|
|
78
96
|
entity = self._entity.to_dict()
|
|
79
97
|
|
|
80
|
-
elif isinstance(self._entity,
|
|
98
|
+
elif isinstance(self._entity, RnaOligoWithEntityType):
|
|
81
99
|
entity = self._entity.to_dict()
|
|
82
100
|
|
|
83
|
-
elif isinstance(self._entity,
|
|
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[
|
|
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[
|
|
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[
|
|
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
|
-
|
|
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
|
-
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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[
|
|
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[
|
|
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[
|
|
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
|
]
|
|
@@ -1,11 +1,23 @@
|
|
|
1
1
|
from typing import Union
|
|
2
2
|
|
|
3
3
|
from ..extensions import UnknownType
|
|
4
|
-
from ..models.
|
|
5
|
-
from ..models.
|
|
6
|
-
from ..models.
|
|
7
|
-
from ..models.
|
|
8
|
-
from ..models.
|
|
9
|
-
from ..models.
|
|
4
|
+
from ..models.aa_sequence_with_entity_type import AaSequenceWithEntityType
|
|
5
|
+
from ..models.custom_entity_with_entity_type import CustomEntityWithEntityType
|
|
6
|
+
from ..models.dna_oligo_with_entity_type import DnaOligoWithEntityType
|
|
7
|
+
from ..models.dna_sequence_with_entity_type import DnaSequenceWithEntityType
|
|
8
|
+
from ..models.mixture_with_entity_type import MixtureWithEntityType
|
|
9
|
+
from ..models.molecule_with_entity_type import MoleculeWithEntityType
|
|
10
|
+
from ..models.rna_oligo_with_entity_type import RnaOligoWithEntityType
|
|
11
|
+
from ..models.rna_sequence_with_entity_type import RnaSequenceWithEntityType
|
|
10
12
|
|
|
11
|
-
Entity = Union[
|
|
13
|
+
Entity = Union[
|
|
14
|
+
DnaSequenceWithEntityType,
|
|
15
|
+
RnaSequenceWithEntityType,
|
|
16
|
+
AaSequenceWithEntityType,
|
|
17
|
+
MixtureWithEntityType,
|
|
18
|
+
DnaOligoWithEntityType,
|
|
19
|
+
RnaOligoWithEntityType,
|
|
20
|
+
MoleculeWithEntityType,
|
|
21
|
+
CustomEntityWithEntityType,
|
|
22
|
+
UnknownType,
|
|
23
|
+
]
|