# Generated by ariadne-codegen
# Source: exponent/core/graphql/operations

from typing import Annotated, Any, Literal, Optional, Union
from uuid import UUID

from pydantic import Field

from .base_model import BaseModel
from .enums import PRStatus


class Chats(BaseModel):
    chats: Union["ChatsChatsUnauthenticatedError", "ChatsChatsChats"] = Field(
        discriminator="typename__"
    )


class ChatsChatsUnauthenticatedError(BaseModel):
    typename__: Literal["UnauthenticatedError"] = Field(alias="__typename")
    message: str


class ChatsChatsChats(BaseModel):
    typename__: Literal["Chats"] = Field(alias="__typename")
    chats: list["ChatsChatsChatsChats"]


class ChatsChatsChatsChats(BaseModel):
    chat_uuid: UUID = Field(alias="chatUuid")
    name: Optional[str]
    subtitle: Optional[str]
    is_shared: bool = Field(alias="isShared")
    is_started: bool = Field(alias="isStarted")
    updated_at: Any = Field(alias="updatedAt")
    pr_status: list[
        Annotated[
            Union[
                "ChatsChatsChatsChatsPrStatusPRInfo",
                "ChatsChatsChatsChatsPrStatusNotFoundError",
            ],
            Field(discriminator="typename__"),
        ]
    ] = Field(alias="prStatus")


class ChatsChatsChatsChatsPrStatusPRInfo(BaseModel):
    typename__: Literal["PRInfo"] = Field(alias="__typename")
    number: int
    title: str
    status: PRStatus


class ChatsChatsChatsChatsPrStatusNotFoundError(BaseModel):
    typename__: Literal["NotFoundError"] = Field(alias="__typename")


Chats.model_rebuild()
ChatsChatsChats.model_rebuild()
ChatsChatsChatsChats.model_rebuild()
