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

from __future__ import annotations

import typing

from .checkpoint_data import CheckpointData
from .file_data import FileData
from .latent_data import LatentData
from .lora_data import LoraData
from .textual_inversion_data import TextualInversionData
from .vae_data import VaeData


class Data_Checkpoint(CheckpointData):
    asset_type: typing.Literal["checkpoint"] = "checkpoint"

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


class Data_File(FileData):
    asset_type: typing.Literal["file"] = "file"

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


class Data_Latent(LatentData):
    asset_type: typing.Literal["latent"] = "latent"

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


class Data_Lora(LoraData):
    asset_type: typing.Literal["lora"] = "lora"

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


class Data_TextualInversion(TextualInversionData):
    asset_type: typing.Literal["textual_inversion"] = "textual_inversion"

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


class Data_Vae(VaeData):
    asset_type: typing.Literal["vae"] = "vae"

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


Data = typing.Union[Data_Checkpoint, Data_File, Data_Latent, Data_Lora, Data_TextualInversion, Data_Vae]
