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

from __future__ import annotations
from .organizationrole import OrganizationRole
from .user import User, UserTypedDict
from datetime import datetime
from factify.types import BaseModel
from typing_extensions import TypedDict


class OrganizationMemberTypedDict(TypedDict):
    r"""OrganizationMember represents a member of an organization."""

    joined_at: datetime
    r"""When the member joined the organization."""
    role: OrganizationRole
    user: UserTypedDict
    r"""User represents a human user account.
    Returned by GetUser (endpoint deferred).
    """


class OrganizationMember(BaseModel):
    r"""OrganizationMember represents a member of an organization."""

    joined_at: datetime
    r"""When the member joined the organization."""

    role: OrganizationRole

    user: User
    r"""User represents a human user account.
    Returned by GetUser (endpoint deferred).
    """
