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

from __future__ import annotations

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .client_facing_at_home_phlebotomy_order import ClientFacingAtHomePhlebotomyOrder
from .client_facing_testkit_order import ClientFacingTestkitOrder
from .client_facing_walk_in_test_order import ClientFacingWalkInTestOrder


class ClientFacingOrderDetails_WalkInTest(UniversalBaseModel):
    type: typing.Literal["walk_in_test"] = "walk_in_test"
    data: typing.Optional[ClientFacingWalkInTestOrder] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow


class ClientFacingOrderDetails_Testkit(UniversalBaseModel):
    type: typing.Literal["testkit"] = "testkit"
    data: typing.Optional[ClientFacingTestkitOrder] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow


class ClientFacingOrderDetails_AtHomePhlebotomy(UniversalBaseModel):
    type: typing.Literal["at_home_phlebotomy"] = "at_home_phlebotomy"
    data: typing.Optional[ClientFacingAtHomePhlebotomyOrder] = None

    if IS_PYDANTIC_V2:
        model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True)  # type: ignore # Pydantic v2
    else:

        class Config:
            frozen = True
            smart_union = True
            extra = pydantic.Extra.allow


ClientFacingOrderDetails = typing.Union[
    ClientFacingOrderDetails_WalkInTest, ClientFacingOrderDetails_Testkit, ClientFacingOrderDetails_AtHomePhlebotomy
]
