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

from __future__ import annotations
from .grouppreferencefilterdto import (
    GroupPreferenceFilterDto,
    GroupPreferenceFilterDtoTypedDict,
)
from .workflowpreferencerequestdto import (
    WorkflowPreferenceRequestDto,
    WorkflowPreferenceRequestDtoTypedDict,
)
from novu_py.types import BaseModel
from typing import List, Optional, Union
from typing_extensions import NotRequired, TypeAliasType, TypedDict


UpdateTopicSubscriptionRequestDtoPreferencesTypedDict = TypeAliasType(
    "UpdateTopicSubscriptionRequestDtoPreferencesTypedDict",
    Union[
        WorkflowPreferenceRequestDtoTypedDict, GroupPreferenceFilterDtoTypedDict, str
    ],
)


UpdateTopicSubscriptionRequestDtoPreferences = TypeAliasType(
    "UpdateTopicSubscriptionRequestDtoPreferences",
    Union[WorkflowPreferenceRequestDto, GroupPreferenceFilterDto, str],
)


class UpdateTopicSubscriptionRequestDtoTypedDict(TypedDict):
    name: NotRequired[str]
    r"""The name of the subscription"""
    preferences: NotRequired[
        List[UpdateTopicSubscriptionRequestDtoPreferencesTypedDict]
    ]
    r"""The preferences of the topic. Can be a simple workflow ID string, workflow preference object, or group filter object"""


class UpdateTopicSubscriptionRequestDto(BaseModel):
    name: Optional[str] = None
    r"""The name of the subscription"""

    preferences: Optional[List[UpdateTopicSubscriptionRequestDtoPreferences]] = None
    r"""The preferences of the topic. Can be a simple workflow ID string, workflow preference object, or group filter object"""
