"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""

from __future__ import annotations
from .sortdirection import SortDirection
from apideck_unify.types import BaseModel
from apideck_unify.utils import FieldMetadata
from enum import Enum
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class ProjectsSortSortBy(str, Enum):
    r"""The field to sort by"""

    NAME = "name"
    STATUS = "status"
    START_DATE = "start_date"
    END_DATE = "end_date"
    BUDGET_AMOUNT = "budget_amount"
    ACTUAL_AMOUNT = "actual_amount"
    CREATED_AT = "created_at"
    UPDATED_AT = "updated_at"


class ProjectsSortTypedDict(TypedDict):
    by: NotRequired[ProjectsSortSortBy]
    r"""The field to sort by"""
    direction: NotRequired[SortDirection]
    r"""The direction in which to sort the results"""


class ProjectsSort(BaseModel):
    by: Annotated[Optional[ProjectsSortSortBy], FieldMetadata(query=True)] = None
    r"""The field to sort by"""

    direction: Annotated[Optional[SortDirection], FieldMetadata(query=True)] = (
        SortDirection.ASC
    )
    r"""The direction in which to sort the results"""
