# 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_custom_property_input_request_body import OrderCustomPropertyInputRequestBody
from .order_quantity_input_request_body import OrderQuantityInputRequestBody
from .order_task_request_body import OrderTaskRequestBody


class OrderInputObjectRequestBody(UniversalBaseModel):
    """
    Input object for creating orders
    """

    custom_properties: typing_extensions.Annotated[
        typing.Optional[typing.List[OrderCustomPropertyInputRequestBody]],
        FieldMetadata(alias="customProperties"),
        pydantic.Field(alias="customProperties", description="An array of custom property values for the order"),
    ] = None
    customer_order_id: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="customerOrderId"),
        pydantic.Field(alias="customerOrderId", description="The customer-provided identifier for the order"),
    ]
    delivery: typing.Optional[OrderTaskRequestBody] = None
    hub_id: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="hubId"),
        pydantic.Field(alias="hubId", description="The ID of the hub the order belongs to"),
    ]
    pickup: typing.Optional[OrderTaskRequestBody] = None
    plan_id: typing_extensions.Annotated[
        str,
        FieldMetadata(alias="planId"),
        pydantic.Field(alias="planId", description="The ID of the plan the order belongs to"),
    ]
    priority: typing.Optional[int] = pydantic.Field(default=None)
    """
    Priority of the order (e.g., 1 for high, 5 for low)
    """

    quantities: typing.Optional[typing.List[OrderQuantityInputRequestBody]] = pydantic.Field(default=None)
    """
    An array of quantities for the order
    """

    skills_required: typing_extensions.Annotated[
        typing.Optional[typing.List[str]],
        FieldMetadata(alias="skillsRequired"),
        pydantic.Field(alias="skillsRequired", description="An array of skill IDs required to fulfill the order"),
    ] = 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
