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

from __future__ import annotations
from .comment import Comment, CommentTypedDict
from attio.types import BaseModel
from typing import List
from typing_extensions import TypedDict


class ThreadIDTypedDict(TypedDict):
    workspace_id: str
    r"""The ID of the workspace the thread belongs to."""
    thread_id: str
    r"""The ID of the thread."""


class ThreadID(BaseModel):
    workspace_id: str
    r"""The ID of the workspace the thread belongs to."""

    thread_id: str
    r"""The ID of the thread."""


class ThreadTypedDict(TypedDict):
    id: ThreadIDTypedDict
    comments: List[CommentTypedDict]
    r"""An array of comments in the thread, sorted by `created_at`."""
    created_at: str
    r"""When the thread was created."""


class Thread(BaseModel):
    id: ThreadID

    comments: List[Comment]
    r"""An array of comments in the thread, sorted by `created_at`."""

    created_at: str
    r"""When the thread was created."""
