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

from __future__ import annotations

import typing

import typing_extensions

from .....commons.types.entity_conflict_error_message import EntityConflictErrorMessage
from .....commons.types.entity_not_found_error_message import EntityNotFoundErrorMessage
from .overlapping_rate_entries_error import OverlappingRateEntriesError

try:
    import pydantic.v1 as pydantic  # type: ignore
except ImportError:
    import pydantic  # type: ignore


class ValidationError_OverlappingRateEntries(OverlappingRateEntriesError):
    type: typing_extensions.Literal["overlapping_rate_entries"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class ValidationError_VersionConflict(EntityConflictErrorMessage):
    type: typing_extensions.Literal["version_conflict"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class ValidationError_OrganizationProviderNotFound(EntityNotFoundErrorMessage):
    type: typing_extensions.Literal["organization_provider_not_found"]

    class Config:
        frozen = True
        smart_union = True
        allow_population_by_field_name = True


class ValidationError_DuplicateRate(pydantic.BaseModel):
    type: typing_extensions.Literal["duplicate_rate"]

    class Config:
        frozen = True
        smart_union = True


class ValidationError_EmptyEntries(pydantic.BaseModel):
    type: typing_extensions.Literal["empty_entries"]

    class Config:
        frozen = True
        smart_union = True


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