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

import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2, UniversalBaseModel
from ..core.serialization import FieldMetadata
from .indexed_asset_status import IndexedAssetStatus
from .indexed_asset_system_metadata import IndexedAssetSystemMetadata


class IndexedAsset(UniversalBaseModel):
    """
    An indexed asset object that contains information about the indexed asset, including its indexing status.
    """

    id: typing_extensions.Annotated[typing.Optional[str], FieldMetadata(alias="_id")] = pydantic.Field(default=None)
    """
    A string representing the unique identifier of your indexed asset.
    """

    created_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    A string indicating the date and time, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"), that the indexing task was created.
    """

    updated_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    A string indicating the date and time, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"), that the indexing task was last updated. The platform updates this field every time the indexing task transitions to a different state.
    """

    indexed_at: typing.Optional[str] = pydantic.Field(default=None)
    """
    A string indicating the date and time, in the RFC 3339 format ("YYYY-MM-DDTHH:mm:ssZ"), that the indexing task has been completed.
    """

    status: typing.Optional[IndexedAssetStatus] = pydantic.Field(default=None)
    """
    The status of the indexing task.
    """

    system_metadata: typing.Optional[IndexedAssetSystemMetadata] = pydantic.Field(default=None)
    """
    System-generated metadata about the indexed asset.
    """

    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
