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

from __future__ import annotations

import typing

import pydantic
import typing_extensions
from ........core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .copay_estimation_recommendation_payload import CopayEstimationRecommendationPayload
from .medicare_advantage_recommendation_payload import MedicareAdvantageRecommendationPayload
from .user_configured_prompts_recommendation_payload import UserConfiguredPromptsRecommendationPayload


class EligibilityRecommendationPayload_MedicareAdvantage(UniversalBaseModel):
    type: typing.Literal["MEDICARE_ADVANTAGE"] = "MEDICARE_ADVANTAGE"
    payload: MedicareAdvantageRecommendationPayload

    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 EligibilityRecommendationPayload_CoordinationOfBenefits(UniversalBaseModel):
    type: typing.Literal["COORDINATION_OF_BENEFITS"] = "COORDINATION_OF_BENEFITS"
    payload: typing.Any

    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 EligibilityRecommendationPayload_CopayEstimation(UniversalBaseModel):
    type: typing.Literal["COPAY_ESTIMATION"] = "COPAY_ESTIMATION"
    payload: CopayEstimationRecommendationPayload

    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 EligibilityRecommendationPayload_UserConfiguredPrompts(UniversalBaseModel):
    type: typing.Literal["USER_CONFIGURED_PROMPTS"] = "USER_CONFIGURED_PROMPTS"
    payload: UserConfiguredPromptsRecommendationPayload

    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


EligibilityRecommendationPayload = typing_extensions.Annotated[
    typing.Union[
        EligibilityRecommendationPayload_MedicareAdvantage,
        EligibilityRecommendationPayload_CoordinationOfBenefits,
        EligibilityRecommendationPayload_CopayEstimation,
        EligibilityRecommendationPayload_UserConfiguredPrompts,
    ],
    pydantic.Field(discriminator="type"),
]
