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

from ...core.pydantic_utilities import UniversalBaseModel
import typing
from ...shared_types.types.match_strength_enum import MatchStrengthEnum
from .attribute_values import AttributeValues
from .project_risk_category import ProjectRiskCategory
from .project_risk_factor import ProjectRiskFactor
from .upstream_info import UpstreamInfo
from .tag_response import TagResponse
from ...shared_types.types.case_status import CaseStatus
from .project_entity_match_response import ProjectEntityMatchResponse
from ...core.pydantic_utilities import IS_PYDANTIC_V2
import pydantic


class ProjectEntityResponse(UniversalBaseModel):
    project_entity_id: str
    project_id: str
    label: str
    upload_ids: typing.List[str]
    strength: MatchStrengthEnum
    created_at: str
    attributes: typing.Dict[str, AttributeValues]
    countries: typing.List[str]
    risk_categories: typing.List[ProjectRiskCategory]
    risk_factors: typing.List[ProjectRiskFactor]
    upstream: UpstreamInfo
    tags: typing.List[TagResponse]
    case: typing.Optional[CaseStatus] = None
    matches: typing.List[ProjectEntityMatchResponse]
    updated_at: typing.Optional[str] = None

    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
