# 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 .....commons.types.insurance_type_code import InsuranceTypeCode


class InsuranceTypes_AllApply(UniversalBaseModel):
    type: typing.Literal["allApply"] = "allApply"

    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 InsuranceTypes_NoneApply(UniversalBaseModel):
    type: typing.Literal["noneApply"] = "noneApply"

    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 InsuranceTypes_TheseApply(UniversalBaseModel):
    value: typing.Set[InsuranceTypeCode]
    type: typing.Literal["theseApply"] = "theseApply"

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

        class Config:
            frozen = True
            smart_union = True


InsuranceTypes = typing.Union[InsuranceTypes_AllApply, InsuranceTypes_NoneApply, InsuranceTypes_TheseApply]
