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

from __future__ import annotations

import typing

from .amino_acid_sequence import AminoAcidSequence
from .amino_acid_structure import AminoAcidStructure
from .cell_line import CellLine
from .chemical_molecule import ChemicalMolecule
from .control import Control
from .custom_entity import CustomEntity
from .dna_sequence import DnaSequence
from .rna_sequence import RnaSequence


class Entity_AaSequence(AminoAcidSequence):
    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 Entity_AaStructure(AminoAcidStructure):
    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 Entity_CellLine(CellLine):
    type: typing.Literal["cell_line"] = "cell_line"

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


class Entity_ChemicalMolecule(ChemicalMolecule):
    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 Entity_Control(Control):
    type: typing.Literal["control"] = "control"

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


class Entity_Entity(CustomEntity):
    type: typing.Literal["entity"] = "entity"

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


class Entity_DnaSequence(DnaSequence):
    type: typing.Literal["dna_sequence"] = "dna_sequence"

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


class Entity_RnaSequence(RnaSequence):
    type: typing.Literal["rna_sequence"] = "rna_sequence"

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


"""
import datetime

from sphinxbio.shared import Creator, Entity_AaSequence

Entity_AaSequence(
    id="seq_12345",
    campaign_id="camp_67890",
    creator=Creator(
        id="user_123",
        email="researcher@example.com",
    ),
    created_at=datetime.datetime.fromisoformat(
        "2023-01-01 00:00:00+00:00",
    ),
    updated_at=datetime.datetime.fromisoformat(
        "2023-01-02 00:00:00+00:00",
    ),
    name="Hemoglobin Subunit Beta",
    amino_acids="MVHLTPEEKSAVTALWGKVNVDEVGGEALGRLLVVYPWTQRFFESFGDLSTPDAVMGNPKVKAHGKKVLGAFSDGLAHLDNLKGTFATLSELHCDKLHVDPENFRLLGNVLVCVLAHHFGKEFTPPVQAAYQKVVAGVANALAHKYH",
    is_control=False,
)
"""
Entity = typing.Union[
    Entity_AaSequence,
    Entity_AaStructure,
    Entity_CellLine,
    Entity_ChemicalMolecule,
    Entity_Control,
    Entity_Entity,
    Entity_DnaSequence,
    Entity_RnaSequence,
]
