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

from __future__ import annotations
from .event import Event, EventTypedDict
from .shipment import Shipment, ShipmentTypedDict
from .statistics import Statistics, StatisticsTypedDict
from .tracker import Tracker, TrackerTypedDict
import pydantic
from ship24.types import BaseModel
from ship24.utils import FieldMetadata, PathParamMetadata
from typing import Dict, List, Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class GetTrackingResultsOfTrackersByTrackingNumberRequestTypedDict(TypedDict):
    tracking_number: str
    r"""**Required** Tracking number of the parcel."""


class GetTrackingResultsOfTrackersByTrackingNumberRequest(BaseModel):
    tracking_number: Annotated[
        str,
        pydantic.Field(alias="trackingNumber"),
        FieldMetadata(path=PathParamMetadata(style="simple", explode=False)),
    ]
    r"""**Required** Tracking number of the parcel."""


class GetTrackingResultsOfTrackersByTrackingNumberTrackingTypedDict(TypedDict):
    tracker: NotRequired[TrackerTypedDict]
    shipment: NotRequired[ShipmentTypedDict]
    events: NotRequired[List[EventTypedDict]]
    statistics: NotRequired[StatisticsTypedDict]


class GetTrackingResultsOfTrackersByTrackingNumberTracking(BaseModel):
    tracker: Optional[Tracker] = None

    shipment: Optional[Shipment] = None

    events: Optional[List[Event]] = None

    statistics: Optional[Statistics] = None


class GetTrackingResultsOfTrackersByTrackingNumberDataTypedDict(TypedDict):
    trackings: NotRequired[
        List[GetTrackingResultsOfTrackersByTrackingNumberTrackingTypedDict]
    ]


class GetTrackingResultsOfTrackersByTrackingNumberData(BaseModel):
    trackings: Optional[List[GetTrackingResultsOfTrackersByTrackingNumberTracking]] = (
        None
    )


class GetTrackingResultsOfTrackersByTrackingNumberResponseBodyTypedDict(TypedDict):
    r"""OK"""

    data: NotRequired[GetTrackingResultsOfTrackersByTrackingNumberDataTypedDict]


class GetTrackingResultsOfTrackersByTrackingNumberResponseBody(BaseModel):
    r"""OK"""

    data: Optional[GetTrackingResultsOfTrackersByTrackingNumberData] = None


class GetTrackingResultsOfTrackersByTrackingNumberResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: GetTrackingResultsOfTrackersByTrackingNumberResponseBodyTypedDict


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

    result: GetTrackingResultsOfTrackersByTrackingNumberResponseBody
