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

from __future__ import annotations
from .contact import Contact, ContactTypedDict
from .contactresponse import ContactResponse, ContactResponseTypedDict
from .errorresponse import ErrorResponse, ErrorResponseTypedDict
from postivo_client.types import BaseModel
from postivo_client.utils import FieldMetadata, PathParamMetadata, RequestMetadata
from typing import Dict, List, Union
from typing_extensions import Annotated, TypeAliasType, TypedDict


class UpdateContactRequestTypedDict(TypedDict):
    id: int
    r"""ID of the contact to update."""
    contact: ContactTypedDict
    r"""A `Contact` object with the updated fields."""


class UpdateContactRequest(BaseModel):
    id: Annotated[
        int, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""ID of the contact to update."""

    contact: Annotated[
        Contact, FieldMetadata(request=RequestMetadata(media_type="application/json"))
    ]
    r"""A `Contact` object with the updated fields."""


UpdateContactResponseResultTypedDict = TypeAliasType(
    "UpdateContactResponseResultTypedDict",
    Union[ErrorResponseTypedDict, ContactResponseTypedDict],
)


UpdateContactResponseResult = TypeAliasType(
    "UpdateContactResponseResult", Union[ErrorResponse, ContactResponse]
)


class UpdateContactResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: UpdateContactResponseResultTypedDict


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

    result: UpdateContactResponseResult
