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

from ...core.pydantic_utilities import UniversalBaseModel
from ...generated_types.types.entities import Entities
import typing
from ...shared_types.types.identifier import Identifier
from ...generated_types.types.country import Country
from .match_explanation import MatchExplanation
from .match_strength import MatchStrength
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class ResolutionResult(UniversalBaseModel):
    profile: str
    score: float
    entity_id: str
    label: str
    type: Entities
    identifiers: typing.List[Identifier]
    psa_id: typing.Optional[float] = None
    addresses: typing.List[str]
    countries: typing.List[Country]
    sources: typing.List[str]
    typed_matched_queries: typing.List[str]
    matched_queries: typing.List[str]
    highlight: typing.Dict[str, typing.List[str]]
    explanation: typing.Dict[str, typing.List[MatchExplanation]]
    match_strength: MatchStrength

    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
