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

from __future__ import annotations
from tofupilot.v2.types import BaseModel
from tofupilot.v2.utils import FieldMetadata, PathParamMetadata, RequestMetadata
from typing_extensions import Annotated, TypedDict


class UnitAddChildRequestBodyTypedDict(TypedDict):
    child_serial_number: str
    r"""Serial number of the sub-unit to add"""


class UnitAddChildRequestBody(BaseModel):
    child_serial_number: str
    r"""Serial number of the sub-unit to add"""


class UnitAddChildRequestTypedDict(TypedDict):
    serial_number: str
    r"""Serial number of the parent unit"""
    request_body: UnitAddChildRequestBodyTypedDict


class UnitAddChildRequest(BaseModel):
    serial_number: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""Serial number of the parent unit"""

    request_body: Annotated[
        UnitAddChildRequestBody,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]


class UnitAddChildResponseTypedDict(TypedDict):
    r"""Child units added successfully"""

    id: str
    r"""ID of the updated unit"""


class UnitAddChildResponse(BaseModel):
    r"""Child units added successfully"""

    id: str
    r"""ID of the updated unit"""
