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

from __future__ import annotations
from .v4_participantgroup import V4ParticipantGroup, V4ParticipantGroupTypedDict
from .v4_shifttimeslot import V4ShiftTimeSlot, V4ShiftTimeSlotTypedDict
import pydantic
from squadcast_sdk.types import BaseModel
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class V4CreateRotationRequestTypedDict(TypedDict):
    name: str
    start_date: str
    period: str
    change_participants_frequency: int
    change_participants_unit: str
    participant_groups: List[V4ParticipantGroupTypedDict]
    color: NotRequired[str]
    custom_period_frequency: NotRequired[int]
    custom_period_unit: NotRequired[str]
    shift_time_slots: NotRequired[List[V4ShiftTimeSlotTypedDict]]
    end_date: NotRequired[str]
    ends_after_iterations: NotRequired[int]


class V4CreateRotationRequest(BaseModel):
    name: str

    start_date: Annotated[str, pydantic.Field(alias="startDate")]

    period: str

    change_participants_frequency: Annotated[
        int, pydantic.Field(alias="changeParticipantsFrequency")
    ]

    change_participants_unit: Annotated[
        str, pydantic.Field(alias="changeParticipantsUnit")
    ]

    participant_groups: Annotated[
        List[V4ParticipantGroup], pydantic.Field(alias="participantGroups")
    ]

    color: Optional[str] = None

    custom_period_frequency: Annotated[
        Optional[int], pydantic.Field(alias="customPeriodFrequency")
    ] = None

    custom_period_unit: Annotated[
        Optional[str], pydantic.Field(alias="customPeriodUnit")
    ] = None

    shift_time_slots: Annotated[
        Optional[List[V4ShiftTimeSlot]], pydantic.Field(alias="shiftTimeSlots")
    ] = None

    end_date: Annotated[Optional[str], pydantic.Field(alias="endDate")] = None

    ends_after_iterations: Annotated[
        Optional[int], pydantic.Field(alias="endsAfterIterations")
    ] = None
