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

import typing

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


class V2InternalServerError(UniversalBaseModel):
    """
    Internal server error response (HTTP 500) returned when an unexpected error occurs. Follows RFC 7807 Problem Details format.

    Examples
    --------
    from payabli.v_2_money_in_types import V2InternalServerError

    V2InternalServerError(
        title="Internal Server Error",
        status=500,
        detail="An unexpected error occurred while processing your request",
        instance="/api/v2/MoneyIn/getpaid",
    )
    """

    title: str = pydantic.Field()
    """
    Always "Internal Server Error" for 500 errors.
    """

    status: int = pydantic.Field()
    """
    HTTP status code, always 500 for internal errors.
    """

    detail: str = pydantic.Field()
    """
    Additional details about the internal error.
    """

    instance: str = pydantic.Field()
    """
    Request URL that caused 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
