# Generated by ariadne-codegen
# Source: ./documents

from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import (
    ContentTypes,
    ConversationRoleTypes,
    ConversationTypes,
    EntityState,
    FileTypes,
    ModelServiceTypes,
    ObservableTypes,
)


class GetConversation(BaseModel):
    conversation: Optional["GetConversationConversation"]


class GetConversationConversation(BaseModel):
    id: str
    name: str
    creation_date: Any = Field(alias="creationDate")
    owner: "GetConversationConversationOwner"
    state: EntityState
    correlation_id: Optional[str] = Field(alias="correlationId")
    type: Optional[ConversationTypes]
    messages: Optional[List[Optional["GetConversationConversationMessages"]]]
    specification: Optional["GetConversationConversationSpecification"]
    filter: Optional["GetConversationConversationFilter"]


class GetConversationConversationOwner(BaseModel):
    id: str


class GetConversationConversationMessages(BaseModel):
    role: ConversationRoleTypes
    author: Optional[str]
    message: str
    citations: Optional[List[Optional["GetConversationConversationMessagesCitations"]]]
    tokens: int
    throughput: Optional[float]
    completion_time: Optional[Any] = Field(alias="completionTime")
    timestamp: Any
    model_service: Optional[ModelServiceTypes] = Field(alias="modelService")
    model: Optional[str]


class GetConversationConversationMessagesCitations(BaseModel):
    content: Optional["GetConversationConversationMessagesCitationsContent"]
    index: Optional[int]
    text: Optional[str]
    start_time: Optional[Any] = Field(alias="startTime")
    end_time: Optional[Any] = Field(alias="endTime")
    page_number: Optional[int] = Field(alias="pageNumber")
    frame_number: Optional[int] = Field(alias="frameNumber")


class GetConversationConversationMessagesCitationsContent(BaseModel):
    id: str
    name: str
    state: EntityState
    type: Optional[ContentTypes]
    file_type: Optional[FileTypes] = Field(alias="fileType")
    file_name: Optional[str] = Field(alias="fileName")
    original_date: Optional[Any] = Field(alias="originalDate")
    uri: Optional[Any]


class GetConversationConversationSpecification(BaseModel):
    id: str
    name: str


class GetConversationConversationFilter(BaseModel):
    date_range: Optional["GetConversationConversationFilterDateRange"] = Field(
        alias="dateRange"
    )
    creation_date_range: Optional[
        "GetConversationConversationFilterCreationDateRange"
    ] = Field(alias="creationDateRange")
    types: Optional[List[ContentTypes]]
    file_types: Optional[List[Optional[FileTypes]]] = Field(alias="fileTypes")
    contents: Optional[List["GetConversationConversationFilterContents"]]
    feeds: Optional[List["GetConversationConversationFilterFeeds"]]
    workflows: Optional[List["GetConversationConversationFilterWorkflows"]]
    collections: Optional[List["GetConversationConversationFilterCollections"]]
    observations: Optional[List["GetConversationConversationFilterObservations"]]


class GetConversationConversationFilterDateRange(BaseModel):
    from_: Optional[Any] = Field(alias="from")
    to: Optional[Any]


class GetConversationConversationFilterCreationDateRange(BaseModel):
    from_: Optional[Any] = Field(alias="from")
    to: Optional[Any]


class GetConversationConversationFilterContents(BaseModel):
    id: str


class GetConversationConversationFilterFeeds(BaseModel):
    id: str


class GetConversationConversationFilterWorkflows(BaseModel):
    id: str


class GetConversationConversationFilterCollections(BaseModel):
    id: str


class GetConversationConversationFilterObservations(BaseModel):
    type: ObservableTypes
    observable: "GetConversationConversationFilterObservationsObservable"
    states: Optional[List[Optional[EntityState]]]


class GetConversationConversationFilterObservationsObservable(BaseModel):
    id: str


GetConversation.model_rebuild()
GetConversationConversation.model_rebuild()
GetConversationConversationMessages.model_rebuild()
GetConversationConversationMessagesCitations.model_rebuild()
GetConversationConversationFilter.model_rebuild()
GetConversationConversationFilterObservations.model_rebuild()
