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

from __future__ import annotations
from .customcontroldto import CustomControlDto, CustomControlDtoTypedDict
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


CustomStepUpsertDtoControlValuesTypedDict = TypeAliasType(
    "CustomStepUpsertDtoControlValuesTypedDict",
    Union[CustomControlDtoTypedDict, Dict[str, Any]],
)
r"""Control values for the Custom step."""


CustomStepUpsertDtoControlValues = TypeAliasType(
    "CustomStepUpsertDtoControlValues", Union[CustomControlDto, Dict[str, Any]]
)
r"""Control values for the Custom step."""


class CustomStepUpsertDtoTypedDict(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[CustomStepUpsertDtoControlValuesTypedDict]
    r"""Control values for the Custom step."""


class CustomStepUpsertDto(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[CustomStepUpsertDtoControlValues],
        pydantic.Field(alias="controlValues"),
    ] = None
    r"""Control values for the Custom step."""
