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

from __future__ import annotations
from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict
import pydantic
from typing import Optional
from typing_extensions import Annotated, NotRequired, TypedDict
from unkey_py.types import BaseModel
from unkey_py.utils import FieldMetadata, QueryParamMetadata


class GetAPIRequestTypedDict(TypedDict):
    api_id: str


class GetAPIRequest(BaseModel):
    api_id: Annotated[
        str,
        pydantic.Field(alias="apiId"),
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ]


class GetAPIResponseBodyTypedDict(TypedDict):
    r"""The configuration for an api"""

    id: str
    r"""The id of the key"""
    workspace_id: str
    r"""The id of the workspace that owns the api"""
    name: NotRequired[str]
    r"""The name of the api. This is internal and your users will not see this."""


class GetAPIResponseBody(BaseModel):
    r"""The configuration for an api"""

    id: str
    r"""The id of the key"""

    workspace_id: Annotated[str, pydantic.Field(alias="workspaceId")]
    r"""The id of the workspace that owns the api"""

    name: Optional[str] = None
    r"""The name of the api. This is internal and your users will not see this."""


class GetAPIResponseTypedDict(TypedDict):
    http_meta: HTTPMetadataTypedDict
    object: NotRequired[GetAPIResponseBodyTypedDict]
    r"""The configuration for an api"""


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

    object: Optional[GetAPIResponseBody] = None
    r"""The configuration for an api"""
