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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from .error_response_error import ErrorResponseError


class ErrorResponse(UniversalBaseModel):
    error: typing.Optional[ErrorResponseError] = pydantic.Field(default=None)
    """
    Error indicator or error message
    """

    code: typing.Optional[str] = pydantic.Field(default=None)
    """
    Machine-readable error code
    """

    message: typing.Optional[str] = pydantic.Field(default=None)
    """
    Human-readable error description
    """

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

    tier: typing.Optional[str] = pydantic.Field(default=None)
    """
    API tier of the caller (present on limit errors)
    """

    your_count: typing.Optional[int] = pydantic.Field(default=None)
    """
    Number of items submitted (present on count limit errors)
    """

    hint: typing.Optional[str] = pydantic.Field(default=None)
    """
    Upgrade guidance
    """

    support: typing.Optional[str] = pydantic.Field(default=None)
    """
    Support email for assistance
    """

    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
