# 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 .issue_tag import IssueTag
from .property_key import PropertyKey


class Issue(UniversalBaseModel):
    """
    Represents an error encountered while parsing a value to match the schema
    """

    tag: IssueTag = pydantic.Field()
    """
    The tag identifying the type of parse issue
    """

    path: typing.List[PropertyKey] = pydantic.Field()
    """
    The path to the property where the issue occurred
    """

    message: str = pydantic.Field()
    """
    A descriptive message explaining the issue
    """

    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
