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

from __future__ import annotations
from .layoutresponsedto import LayoutResponseDto, LayoutResponseDtoTypedDict
from .updatelayoutdto import UpdateLayoutDto, UpdateLayoutDtoTypedDict
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 LayoutsControllerUpdateRequestTypedDict(TypedDict):
    layout_id: str
    update_layout_dto: UpdateLayoutDtoTypedDict
    r"""Layout update details"""
    idempotency_key: NotRequired[str]
    r"""A header for idempotency purposes"""


class LayoutsControllerUpdateRequest(BaseModel):
    layout_id: Annotated[
        str,
        pydantic.Field(alias="layoutId"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]

    update_layout_dto: Annotated[
        UpdateLayoutDto,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]
    r"""Layout update details"""

    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 LayoutsControllerUpdateResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: LayoutResponseDtoTypedDict


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

    result: LayoutResponseDto
