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

from __future__ import annotations
from .addorganizationmemberresponse import (
    AddOrganizationMemberResponse,
    AddOrganizationMemberResponseTypedDict,
)
from .organizationrole import OrganizationRole
from factify.types import BaseModel
from factify.utils import FieldMetadata, PathParamMetadata, RequestMetadata
from typing import Dict, List
from typing_extensions import Annotated, TypedDict


class AddOrganizationMemberAddOrganizationMemberRequestTypedDict(TypedDict):
    r"""AddOrganizationMemberRequest identifies a user to add as a member."""

    role: OrganizationRole
    user_id: str
    r"""User account ID of the member to add.
    Pattern: user_[0-9a-hjkmnp-tv-z]{26}
    """


class AddOrganizationMemberAddOrganizationMemberRequest(BaseModel):
    r"""AddOrganizationMemberRequest identifies a user to add as a member."""

    role: OrganizationRole

    user_id: str
    r"""User account ID of the member to add.
    Pattern: user_[0-9a-hjkmnp-tv-z]{26}
    """


class AddOrganizationMemberRequestTypedDict(TypedDict):
    organization_id: str
    r"""Organization to add the member to.
    Pattern: org_[0-9a-hjkmnp-tv-z]{26}
    """
    body: AddOrganizationMemberAddOrganizationMemberRequestTypedDict


class AddOrganizationMemberRequest(BaseModel):
    organization_id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""Organization to add the member to.
    Pattern: org_[0-9a-hjkmnp-tv-z]{26}
    """

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


class AddOrganizationMemberResponseResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: AddOrganizationMemberResponseTypedDict


class AddOrganizationMemberResponseResponse(BaseModel):
    headers: Dict[str, List[str]]

    result: AddOrganizationMemberResponse
