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

from __future__ import annotations
from .httpmetadata import HTTPMetadata, HTTPMetadataTypedDict
from enum import Enum
import pydantic
from typing import Optional, Union
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
from unkey_py.types import BaseModel


class Description2(str, Enum):
    UNKNOWN = ""


CreateRoleDescriptionTypedDict = TypeAliasType(
    "CreateRoleDescriptionTypedDict", Union[str, Description2]
)
r"""Explain what this role does. This is just for your team, your users will not see this."""


CreateRoleDescription = TypeAliasType("CreateRoleDescription", Union[str, Description2])
r"""Explain what this role does. This is just for your team, your users will not see this."""


class CreateRoleRequestBodyTypedDict(TypedDict):
    name: str
    r"""The unique name of your role."""
    description: NotRequired[CreateRoleDescriptionTypedDict]
    r"""Explain what this role does. This is just for your team, your users will not see this."""


class CreateRoleRequestBody(BaseModel):
    name: str
    r"""The unique name of your role."""

    description: Optional[CreateRoleDescription] = None
    r"""Explain what this role does. This is just for your team, your users will not see this."""


class CreateRoleResponseBodyTypedDict(TypedDict):
    r"""Sucessfully created a role"""

    role_id: str
    r"""The id of the role. This is used internally"""


class CreateRoleResponseBody(BaseModel):
    r"""Sucessfully created a role"""

    role_id: Annotated[str, pydantic.Field(alias="roleId")]
    r"""The id of the role. This is used internally"""


class CreateRoleResponseTypedDict(TypedDict):
    http_meta: HTTPMetadataTypedDict
    object: NotRequired[CreateRoleResponseBodyTypedDict]
    r"""Sucessfully created a role"""


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

    object: Optional[CreateRoleResponseBody] = None
    r"""Sucessfully created a role"""
