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

from ..core.unchecked_base_model import UncheckedBaseModel
import typing
from .scheduled_shift_sort_field import ScheduledShiftSortField
import pydantic
from .sort_order import SortOrder
from ..core.pydantic_utilities import IS_PYDANTIC_V2


class ScheduledShiftSort(UncheckedBaseModel):
    """
    Defines sort criteria for a [SearchScheduledShifts](api-endpoint:Labor-SearchScheduledShifts)
    request.
    """

    field: typing.Optional[ScheduledShiftSortField] = pydantic.Field(default=None)
    """
    The field to sort on. The default value is `START_AT`.
    See [ScheduledShiftSortField](#type-scheduledshiftsortfield) for possible values
    """

    order: typing.Optional[SortOrder] = pydantic.Field(default=None)
    """
    The order in which results are returned. The default value is `ASC`.
    See [SortOrder](#type-sortorder) for possible values
    """

    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
