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

import datetime as dt
import typing

import pydantic
import typing_extensions
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.serialization import FieldMetadata
from ..core.unchecked_base_model import UncheckedBaseModel
from .legacy_list_processors_processor_version import LegacyListProcessorsProcessorVersion
from .legacy_processor_type import LegacyProcessorType


class LegacyListProcessorsProcessor(UncheckedBaseModel):
    object: typing.Literal["document_processor"] = pydantic.Field(default="document_processor")
    """
    The type of response. In this case, it will always be `"document_processor"`.
    """

    id: str = pydantic.Field()
    """
    The ID of the processor.
    
    Example: `"ex_Xj8mK2pL9nR4vT7qY5wZ"`
    """

    name: str = pydantic.Field()
    """
    The name of the processor.
    
    Example: `"Invoice Processor"`
    """

    type: LegacyProcessorType
    versions: typing.List[LegacyListProcessorsProcessorVersion] = pydantic.Field()
    """
    Array of all versions for this processor
    """

    created_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="createdAt")] = pydantic.Field(
        alias="createdAt"
    )
    """
    The time (in UTC) at which the processor was created. Will follow the RFC 3339 format.
    
    Example: `"2024-03-21T15:30:00Z"`
    """

    updated_at: typing_extensions.Annotated[dt.datetime, FieldMetadata(alias="updatedAt")] = pydantic.Field(
        alias="updatedAt"
    )
    """
    The time (in UTC) at which the processor was last updated. Will follow the RFC 3339 format.
    
    Example: `"2024-03-21T16:45:00Z"`
    """

    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
