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

from __future__ import annotations
from ascend_sdk.models.components import (
    basket as components_basket,
    basketcreate as components_basketcreate,
    httpmetadata as components_httpmetadata,
    status as components_status,
)
from ascend_sdk.types import BaseModel
from ascend_sdk.utils import FieldMetadata, PathParamMetadata, RequestMetadata
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict


class BasketOrdersServiceCreateBasketRequestTypedDict(TypedDict):
    correspondent_id: str
    r"""The correspondent id."""
    basket_create: components_basketcreate.BasketCreateTypedDict


class BasketOrdersServiceCreateBasketRequest(BaseModel):
    correspondent_id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""The correspondent id."""

    basket_create: Annotated[
        components_basketcreate.BasketCreate,
        FieldMetadata(request=RequestMetadata(media_type="application/json")),
    ]


class BasketOrdersServiceCreateBasketResponseTypedDict(TypedDict):
    http_meta: components_httpmetadata.HTTPMetadataTypedDict
    basket: NotRequired[components_basket.BasketTypedDict]
    r"""OK"""
    status: NotRequired[components_status.StatusTypedDict]
    r"""INVALID_ARGUMENT: There was an issue with one or more fields in the request.  The message field will contain details about which field failed validation and why."""


class BasketOrdersServiceCreateBasketResponse(BaseModel):
    http_meta: Annotated[
        Optional[components_httpmetadata.HTTPMetadata], pydantic.Field(exclude=True)
    ] = None

    basket: Optional[components_basket.Basket] = None
    r"""OK"""

    status: Optional[components_status.Status] = None
    r"""INVALID_ARGUMENT: There was an issue with one or more fields in the request.  The message field will contain details about which field failed validation and why."""
