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

from __future__ import annotations
from ......core.pydantic_utilities import UniversalBaseModel
import typing
from .rate_entry import RateEntry
from ......core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


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


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