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

from __future__ import annotations
from .delaycontroldto import DelayControlDto, DelayControlDtoTypedDict
from .steptypeenum import StepTypeEnum
from novu_py.types import BaseModel
import pydantic
from typing import Any, Dict, Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict


DelayStepUpsertDtoControlValuesTypedDict = TypeAliasType(
    "DelayStepUpsertDtoControlValuesTypedDict",
    Union[DelayControlDtoTypedDict, Dict[str, Any]],
)
r"""Control values for the Delay step."""


DelayStepUpsertDtoControlValues = TypeAliasType(
    "DelayStepUpsertDtoControlValues", Union[DelayControlDto, Dict[str, Any]]
)
r"""Control values for the Delay step."""


class DelayStepUpsertDtoTypedDict(TypedDict):
    name: str
    r"""Name of the step"""
    type: StepTypeEnum
    r"""Type of the step"""
    id: NotRequired[str]
    r"""Database identifier of the step. Used for updating the step."""
    step_id: NotRequired[str]
    r"""Unique identifier for the step"""
    control_values: NotRequired[DelayStepUpsertDtoControlValuesTypedDict]
    r"""Control values for the Delay step."""


class DelayStepUpsertDto(BaseModel):
    name: str
    r"""Name of the step"""

    type: StepTypeEnum
    r"""Type of the step"""

    id: Annotated[Optional[str], pydantic.Field(alias="_id")] = None
    r"""Database identifier of the step. Used for updating the step."""

    step_id: Annotated[Optional[str], pydantic.Field(alias="stepId")] = None
    r"""Unique identifier for the step"""

    control_values: Annotated[
        Optional[DelayStepUpsertDtoControlValues], pydantic.Field(alias="controlValues")
    ] = None
    r"""Control values for the Delay step."""
