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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel


class DubbingError(UncheckedBaseModel):
    code: str = pydantic.Field()
    """
    Stable identifier for the failure, safe to branch on. New codes are added over time, so treat an unrecognized value as 'internal_error'.
    """

    message: str = pydantic.Field()
    """
    Human-readable description of the failure, for display. The wording may change at any time; branch on `code` instead.
    """

    retryable: bool = pydantic.Field()
    """
    Whether resubmitting the same input could succeed. False means the failure describes the input or the account, so an identical retry will fail the same way.
    """

    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
