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

from __future__ import annotations
from enum import Enum
import pydantic
from ship24.types import BaseModel
from ship24.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata
from typing import Dict, List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class ResendWebhooksSearchBy(str, Enum):
    r"""Parameter allowing to search either by `trackerId`or `clientTrackerId`. Default behavior is by `trackerId`."""

    TRACKER_ID = "trackerId"
    CLIENT_TRACKER_ID = "clientTrackerId"


class ResendWebhooksRequestTypedDict(TypedDict):
    tracker_id: str
    r"""**Required** Id of the tracker, provided by Ship24 at creation. `clientTrackerId` can also be used in this field by employing the `searchBy` parameter."""
    search_by: NotRequired[ResendWebhooksSearchBy]
    r"""Parameter allowing to search either by `trackerId`or `clientTrackerId`. Default behavior is by `trackerId`."""


class ResendWebhooksRequest(BaseModel):
    tracker_id: Annotated[
        str,
        pydantic.Field(alias="trackerId"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]
    r"""**Required** Id of the tracker, provided by Ship24 at creation. `clientTrackerId` can also be used in this field by employing the `searchBy` parameter."""

    search_by: Annotated[
        Optional[ResendWebhooksSearchBy],
        pydantic.Field(alias="searchBy"),
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ] = None
    r"""Parameter allowing to search either by `trackerId`or `clientTrackerId`. Default behavior is by `trackerId`."""


class ResendWebhooksSummaryTypedDict(TypedDict):
    total_resent: NotRequired[str]
    r"""The total number of events resent."""


class ResendWebhooksSummary(BaseModel):
    total_resent: Annotated[Optional[str], pydantic.Field(alias="totalResent")] = None
    r"""The total number of events resent."""


class ResendWebhooksDataTypedDict(TypedDict):
    summary: NotRequired[ResendWebhooksSummaryTypedDict]


class ResendWebhooksData(BaseModel):
    summary: Optional[ResendWebhooksSummary] = None


class ResendWebhooksResponseBodyTypedDict(TypedDict):
    r"""Created"""

    data: NotRequired[ResendWebhooksDataTypedDict]


class ResendWebhooksResponseBody(BaseModel):
    r"""Created"""

    data: Optional[ResendWebhooksData] = None


class ResendWebhooksResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: ResendWebhooksResponseBodyTypedDict


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

    result: ResendWebhooksResponseBody
