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

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


class GetContactByExternalIDRequestTypedDict(TypedDict):
    ext_id: str
    r"""External (custom) ID of the contact to fetch."""


class GetContactByExternalIDRequest(BaseModel):
    ext_id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""External (custom) ID of the contact to fetch."""


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


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