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

from ..core.pydantic_utilities import UniversalBaseModel
import typing
import pydantic
from .error_detail import ErrorDetail
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ErrorModel(UniversalBaseModel):
    detail: typing.Optional[str] = pydantic.Field(default=None)
    """
    A human-readable explanation specific to this occurrence of the problem.
    """

    errors: typing.Optional[typing.List[ErrorDetail]] = pydantic.Field(default=None)
    """
    Optional list of individual error details
    """

    instance: typing.Optional[str] = pydantic.Field(default=None)
    """
    A URI reference that identifies the specific occurrence of the problem.
    """

    status: typing.Optional[int] = pydantic.Field(default=None)
    """
    HTTP status code
    """

    title: typing.Optional[str] = pydantic.Field(default=None)
    """
    A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
    """

    type: typing.Optional[str] = pydantic.Field(default=None)
    """
    A URI reference to human-readable documentation for the error.
    """

    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
