# This file was auto-generated by Fern from our API Definition.

from __future__ import annotations

import typing

from .create_amino_acid_sequence import CreateAminoAcidSequence
from .create_amino_acid_structure import CreateAminoAcidStructure
from .create_chemical import CreateChemical
from .create_control import CreateControl
from .create_rna_sequence import CreateRnaSequence


class CreateEntity_AaSequence(CreateAminoAcidSequence):
    type: typing.Literal["aa_sequence"] = "aa_sequence"

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True


class CreateEntity_AaStructure(CreateAminoAcidStructure):
    type: typing.Literal["aa_structure"] = "aa_structure"

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True


class CreateEntity_ChemicalMolecule(CreateChemical):
    type: typing.Literal["chemical_molecule"] = "chemical_molecule"

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True


class CreateEntity_Control(CreateControl):
    type: typing.Literal["control"] = "control"

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True


class CreateEntity_RnaSequence(CreateRnaSequence):
    type: typing.Literal["rna_sequence"] = "rna_sequence"

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True
        populate_by_name = True


CreateEntity = typing.Union[
    CreateEntity_AaSequence,
    CreateEntity_AaStructure,
    CreateEntity_ChemicalMolecule,
    CreateEntity_Control,
    CreateEntity_RnaSequence,
]
