# 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 .order_task_custom_property_object_response_body import OrderTaskCustomPropertyObjectResponseBody
from .order_task_skill_object_response_body import OrderTaskSkillObjectResponseBody
from .quantity_object_response_body import QuantityObjectResponseBody


class OrderTaskObjectResponseBody(UniversalBaseModel):
    """
    Order task object with detailed information
    """

    custom_properties: typing_extensions.Annotated[
        typing.Optional[typing.List[OrderTaskCustomPropertyObjectResponseBody]],
        FieldMetadata(alias="customProperties"),
        pydantic.Field(alias="customProperties", description="List of custom properties for the order"),
    ] = None
    id: str = pydantic.Field()
    """
    The order identifier
    """

    quantities: typing.Optional[typing.List[QuantityObjectResponseBody]] = pydantic.Field(default=None)
    """
    List of quantity information for the order
    """

    required_skills: typing_extensions.Annotated[
        typing.Optional[typing.List[OrderTaskSkillObjectResponseBody]],
        FieldMetadata(alias="requiredSkills"),
        pydantic.Field(alias="requiredSkills", description="List of required skills for the order"),
    ] = None
    service_window: typing_extensions.Annotated[
        typing.Optional[str],
        FieldMetadata(alias="serviceWindow"),
        pydantic.Field(alias="serviceWindow", description="The service window time range"),
    ] = None
    type: str = pydantic.Field()
    """
    The task type (pickup or delivery)
    """

    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
