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

from __future__ import annotations
from .subscriptionresponsedto import (
    SubscriptionResponseDto,
    SubscriptionResponseDtoTypedDict,
)
from .updatetopicsubscriptionrequestdto import (
    UpdateTopicSubscriptionRequestDto,
    UpdateTopicSubscriptionRequestDtoTypedDict,
)
from novu_py.types import BaseModel
from novu_py.utils import (
    FieldMetadata,
    HeaderMetadata,
    PathParamMetadata,
    RequestMetadata,
)
import pydantic
from typing import Dict, List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class TopicsControllerUpdateTopicSubscriptionRequestTypedDict(TypedDict):
    topic_key: str
    r"""The key identifier of the topic"""
    identifier: str
    r"""The unique identifier of the subscription"""
    update_topic_subscription_request_dto: UpdateTopicSubscriptionRequestDtoTypedDict
    idempotency_key: NotRequired[str]
    r"""A header for idempotency purposes"""


class TopicsControllerUpdateTopicSubscriptionRequest(BaseModel):
    topic_key: Annotated[
        str,
        pydantic.Field(alias="topicKey"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]
    r"""The key identifier of the topic"""

    identifier: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""The unique identifier of the subscription"""

    update_topic_subscription_request_dto: Annotated[
        UpdateTopicSubscriptionRequestDto,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]

    idempotency_key: Annotated[
        Optional[str],
        pydantic.Field(alias="idempotency-key"),
        FieldMetadata(header=HeaderMetadata(style="simple", explode=False)),
    ] = None
    r"""A header for idempotency purposes"""


class TopicsControllerUpdateTopicSubscriptionResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: SubscriptionResponseDtoTypedDict


class TopicsControllerUpdateTopicSubscriptionResponse(BaseModel):
    headers: Dict[str, List[str]]

    result: SubscriptionResponseDto
