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

from __future__ import annotations
from .monthlytypeenum import MonthlyTypeEnum
from .ordinalenum import OrdinalEnum
from .ordinalvalueenum import OrdinalValueEnum
from enum import Enum
from novu_py.types import BaseModel
import pydantic
from typing import List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class DigestTimedConfigDtoWeekDays(str, Enum):
    MONDAY = "monday"
    TUESDAY = "tuesday"
    WEDNESDAY = "wednesday"
    THURSDAY = "thursday"
    FRIDAY = "friday"
    SATURDAY = "saturday"
    SUNDAY = "sunday"


class DigestTimedConfigDtoTypedDict(TypedDict):
    at_time: NotRequired[str]
    r"""Time at which the digest is triggered"""
    week_days: NotRequired[List[DigestTimedConfigDtoWeekDays]]
    r"""Days of the week for the digest"""
    month_days: NotRequired[List[float]]
    r"""Specific days of the month for the digest"""
    ordinal: NotRequired[OrdinalEnum]
    r"""Ordinal position for the digest"""
    ordinal_value: NotRequired[OrdinalValueEnum]
    r"""Value of the ordinal"""
    monthly_type: NotRequired[MonthlyTypeEnum]
    r"""Type of monthly schedule"""
    cron_expression: NotRequired[str]
    r"""Cron expression for scheduling"""
    until_date: NotRequired[str]
    r"""Until date for scheduling"""


class DigestTimedConfigDto(BaseModel):
    at_time: Annotated[Optional[str], pydantic.Field(alias="atTime")] = None
    r"""Time at which the digest is triggered"""

    week_days: Annotated[
        Optional[List[DigestTimedConfigDtoWeekDays]], pydantic.Field(alias="weekDays")
    ] = None
    r"""Days of the week for the digest"""

    month_days: Annotated[Optional[List[float]], pydantic.Field(alias="monthDays")] = (
        None
    )
    r"""Specific days of the month for the digest"""

    ordinal: Optional[OrdinalEnum] = None
    r"""Ordinal position for the digest"""

    ordinal_value: Annotated[
        Optional[OrdinalValueEnum], pydantic.Field(alias="ordinalValue")
    ] = None
    r"""Value of the ordinal"""

    monthly_type: Annotated[
        Optional[MonthlyTypeEnum], pydantic.Field(alias="monthlyType")
    ] = None
    r"""Type of monthly schedule"""

    cron_expression: Annotated[
        Optional[str], pydantic.Field(alias="cronExpression")
    ] = None
    r"""Cron expression for scheduling"""

    until_date: Annotated[Optional[str], pydantic.Field(alias="untilDate")] = None
    r"""Until date for scheduling"""
