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

import typing

import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
from .cron_trigger_config_action import CronTriggerConfigAction
from .trigger_status import TriggerStatus


class CronTriggerConfig(UncheckedBaseModel):
    trigger_display_name: typing.Optional[str] = None
    trigger_type: typing.Literal["cron"] = "cron"
    action: CronTriggerConfigAction
    status: typing.Optional[TriggerStatus] = None
    cron_expression: str
    timezone: typing.Optional[str] = None
    trigger_inputs: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = 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
