# 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 .catalog_status import CatalogStatus
from .sensitivity_level import SensitivityLevel


class CatalogItemWithGovernance(UniversalBaseModel):
    """
    Catalog item with governance-specific metadata.
    """

    entity_id: str
    title: str
    description: typing.Optional[str] = None
    tags: typing.Optional[typing.List[str]] = None
    asset_type: str
    source_external_id: typing.Optional[str] = None
    source_url: typing.Optional[str] = None
    source_name: typing.Optional[str] = None
    parent_catalog_id: typing.Optional[str] = None
    hierarchy_path: typing.Optional[str] = None
    depth_level: typing.Optional[int] = None
    include_in_rag: typing.Optional[bool] = None
    status: typing.Optional[CatalogStatus] = None
    sensitivity_level: typing.Optional[SensitivityLevel] = None
    id: str
    sync_id: str
    collection_id: str
    entity_db_id: typing.Optional[str] = None
    entity_definition_id: typing.Optional[str] = None
    source_id: typing.Optional[str] = None
    content_hash: typing.Optional[str] = None
    last_content_update: typing.Optional[str] = None
    last_embedded: typing.Optional[str] = None
    chunk_count: typing.Optional[int] = None
    created_at: typing.Optional[str] = None
    modified_at: typing.Optional[str] = None
    created_by: typing.Optional[str] = None
    updated_by: typing.Optional[str] = None
    rag_eligibility: typing.Dict[str, typing.Optional[typing.Any]]
    governance_health: typing.Dict[str, typing.Optional[typing.Any]]
    last_audit_entry: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = 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
