# 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 SimilarDocument(UniversalBaseModel):
    """
    The data model for a similar document in the `Search similar` articles request.
    """

    id: str = pydantic.Field()
    """
    The unique identifier of the similar document.
    """

    score: float = pydantic.Field()
    """
    The relevance score of the similar document.
    """

    title: str = pydantic.Field()
    """
    The title of the similar document.
    """

    link: str = pydantic.Field()
    """
    The link to the similar document.
    """

    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
