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

from typing import Any, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import EntityState, FactCategory, ObservableTypes, SourceTypes


class QueryFactsClusters(BaseModel):
    facts: Optional["QueryFactsClustersFacts"]


class QueryFactsClustersFacts(BaseModel):
    results: Optional[list[Optional["QueryFactsClustersFactsResults"]]]
    clusters: Optional[list[Optional["QueryFactsClustersFactsClusters"]]]


class QueryFactsClustersFactsResults(BaseModel):
    id: str
    creation_date: Any = Field(alias="creationDate")
    owner: "QueryFactsClustersFactsResultsOwner"
    state: EntityState
    text: str
    valid_at: Optional[Any] = Field(alias="validAt")
    invalid_at: Optional[Any] = Field(alias="invalidAt")
    relevance: Optional[float]
    mentions: Optional[list[Optional["QueryFactsClustersFactsResultsMentions"]]]
    assertions: Optional[list[Optional["QueryFactsClustersFactsResultsAssertions"]]]
    feeds: Optional[list[Optional["QueryFactsClustersFactsResultsFeeds"]]]
    content: Optional["QueryFactsClustersFactsResultsContent"]
    conversation: Optional["QueryFactsClustersFactsResultsConversation"]
    persona: Optional["QueryFactsClustersFactsResultsPersona"]
    source_type: Optional[SourceTypes] = Field(alias="sourceType")
    category: Optional[FactCategory]
    confidence: Optional[float]


class QueryFactsClustersFactsResultsOwner(BaseModel):
    id: str


class QueryFactsClustersFactsResultsMentions(BaseModel):
    type: Optional[ObservableTypes]
    observable: Optional["QueryFactsClustersFactsResultsMentionsObservable"]
    start: Optional[int]
    end: Optional[int]


class QueryFactsClustersFactsResultsMentionsObservable(BaseModel):
    id: str
    name: Optional[str]


class QueryFactsClustersFactsResultsAssertions(BaseModel):
    text: str
    mentions: Optional[
        list[Optional["QueryFactsClustersFactsResultsAssertionsMentions"]]
    ]


class QueryFactsClustersFactsResultsAssertionsMentions(BaseModel):
    type: Optional[ObservableTypes]
    observable: Optional["QueryFactsClustersFactsResultsAssertionsMentionsObservable"]
    start: Optional[int]
    end: Optional[int]


class QueryFactsClustersFactsResultsAssertionsMentionsObservable(BaseModel):
    id: str
    name: Optional[str]


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


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


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


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


class QueryFactsClustersFactsClusters(BaseModel):
    entities: list["QueryFactsClustersFactsClustersEntities"]
    similarity: Optional[float]


class QueryFactsClustersFactsClustersEntities(BaseModel):
    id: str
    name: Optional[str]


QueryFactsClusters.model_rebuild()
QueryFactsClustersFacts.model_rebuild()
QueryFactsClustersFactsResults.model_rebuild()
QueryFactsClustersFactsResultsMentions.model_rebuild()
QueryFactsClustersFactsResultsAssertions.model_rebuild()
QueryFactsClustersFactsResultsAssertionsMentions.model_rebuild()
QueryFactsClustersFactsClusters.model_rebuild()
