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

from __future__ import annotations
from .inappcontroldto import InAppControlDto, InAppControlDtoTypedDict
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


InAppStepUpsertDtoControlValuesTypedDict = TypeAliasType(
    "InAppStepUpsertDtoControlValuesTypedDict",
    Union[InAppControlDtoTypedDict, Dict[str, Any]],
)
r"""Control values for the In-App step."""


InAppStepUpsertDtoControlValues = TypeAliasType(
    "InAppStepUpsertDtoControlValues", Union[InAppControlDto, Dict[str, Any]]
)
r"""Control values for the In-App step."""


class InAppStepUpsertDtoTypedDict(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[InAppStepUpsertDtoControlValuesTypedDict]
    r"""Control values for the In-App step."""


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