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

from __future__ import annotations
from .subjecttype import SubjectType
from factify.types import BaseModel
from typing_extensions import TypedDict


class SubjectTypedDict(TypedDict):
    r"""Subject is a lightweight reference to either a user or a bot.
    Used in embedded fields like created_by.
    For full details, call GetUser or GetBot with the subject's id.
    subject_type_matches_id_prefix // id prefix must match type (user_ for user, bot_ for bot)

    """

    id: str
    r"""Unique ID. user_xxx for users, bot_xxx for bots."""
    name: str
    r"""Display name of the user or bot."""
    type: SubjectType


class Subject(BaseModel):
    r"""Subject is a lightweight reference to either a user or a bot.
    Used in embedded fields like created_by.
    For full details, call GetUser or GetBot with the subject's id.
    subject_type_matches_id_prefix // id prefix must match type (user_ for user, bot_ for bot)

    """

    id: str
    r"""Unique ID. user_xxx for users, bot_xxx for bots."""

    name: str
    r"""Display name of the user or bot."""

    type: SubjectType
