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

from __future__ import annotations
from .organizationrole import OrganizationRole
from .updateorganizationmemberresponse import (
    UpdateOrganizationMemberResponse,
    UpdateOrganizationMemberResponseTypedDict,
)
from factify.types import BaseModel
from factify.utils import FieldMetadata, PathParamMetadata, RequestMetadata
from typing import Dict, List
from typing_extensions import Annotated, TypedDict


class UpdateOrganizationMemberUpdateOrganizationMemberRequestTypedDict(TypedDict):
    r"""UpdateOrganizationMemberRequest identifies a member and the new role."""

    role: OrganizationRole


class UpdateOrganizationMemberUpdateOrganizationMemberRequest(BaseModel):
    r"""UpdateOrganizationMemberRequest identifies a member and the new role."""

    role: OrganizationRole


class UpdateOrganizationMemberRequestTypedDict(TypedDict):
    organization_id: str
    r"""Organization the member belongs to.
    Pattern: org_[0-9a-hjkmnp-tv-z]{26}
    """
    user_id: str
    r"""User account ID of the member to update.
    Pattern: user_[0-9a-hjkmnp-tv-z]{26}
    """
    body: UpdateOrganizationMemberUpdateOrganizationMemberRequestTypedDict


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

    user_id: Annotated[
        str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False))
    ]
    r"""User account ID of the member to update.
    Pattern: user_[0-9a-hjkmnp-tv-z]{26}
    """

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


class UpdateOrganizationMemberResponseResponseTypedDict(TypedDict):
    headers: Dict[str, List[str]]
    result: UpdateOrganizationMemberResponseTypedDict


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

    result: UpdateOrganizationMemberResponse
