# 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 .....payers.resources.v_3.types.payer_uuid import PayerUuid
from .rate_entry import RateEntry


class ValidationError_OverlappingRateEntries(UniversalBaseModel):
    type: typing.Literal["overlapping_rate_entries"] = "overlapping_rate_entries"
    message: str
    rate_a: RateEntry
    rate_b: RateEntry

    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 ValidationError_VersionConflict(UniversalBaseModel):
    type: typing.Literal["version_conflict"] = "version_conflict"
    entity_name: str

    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 ValidationError_OrganizationProviderNotFound(UniversalBaseModel):
    type: typing.Literal["organization_provider_not_found"] = "organization_provider_not_found"
    id: str

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

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

    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 ValidationError_PayerPlanGroupNotFound(UniversalBaseModel):
    type: typing.Literal["payer_plan_group_not_found"] = "payer_plan_group_not_found"
    id: str

    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 ValidationError_PayerPlanGroupDoesNotMatchRatePayer(UniversalBaseModel):
    type: typing.Literal["payer_plan_group_does_not_match_rate_payer"] = "payer_plan_group_does_not_match_rate_payer"
    rate_payer_uuid: PayerUuid
    payer_plan_group_payer_uuid: PayerUuid

    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


ValidationError = typing.Union[
    ValidationError_OverlappingRateEntries,
    ValidationError_VersionConflict,
    ValidationError_OrganizationProviderNotFound,
    ValidationError_DuplicateRate,
    ValidationError_EmptyEntries,
    ValidationError_PayerPlanGroupNotFound,
    ValidationError_PayerPlanGroupDoesNotMatchRatePayer,
]
