"""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 GetPermissionRequestTypedDict(TypedDict):
    permission_id: str


class GetPermissionRequest(BaseModel):
    permission_id: Annotated[
        str,
        pydantic.Field(alias="permissionId"),
        FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
    ]


class GetPermissionResponseBodyTypedDict(TypedDict):
    r"""The Role"""

    id: str
    r"""The id of the permission"""
    name: str
    r"""The name of the permission."""
    description: NotRequired[str]
    r"""The description of what this permission does. This is just for your team, your users will not see this."""


class GetPermissionResponseBody(BaseModel):
    r"""The Role"""

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

    name: str
    r"""The name of the permission."""

    description: Optional[str] = None
    r"""The description of what this permission does. This is just for your team, your users will not see this."""


class GetPermissionResponseTypedDict(TypedDict):
    http_meta: HTTPMetadataTypedDict
    object: NotRequired[GetPermissionResponseBodyTypedDict]
    r"""The Role"""


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

    object: Optional[GetPermissionResponseBody] = None
    r"""The Role"""
