# 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 RetrieveFacts(BaseModel):
    retrieve_facts: Optional["RetrieveFactsRetrieveFacts"] = Field(
        alias="retrieveFacts"
    )


class RetrieveFactsRetrieveFacts(BaseModel):
    results: Optional[list[Optional["RetrieveFactsRetrieveFactsResults"]]]


class RetrieveFactsRetrieveFactsResults(BaseModel):
    fact: "RetrieveFactsRetrieveFactsResultsFact"
    relevance: Optional[float]
    content: Optional["RetrieveFactsRetrieveFactsResultsContent"]


class RetrieveFactsRetrieveFactsResultsFact(BaseModel):
    id: str
    creation_date: Any = Field(alias="creationDate")
    owner: "RetrieveFactsRetrieveFactsResultsFactOwner"
    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["RetrieveFactsRetrieveFactsResultsFactMentions"]]]
    assertions: Optional[
        list[Optional["RetrieveFactsRetrieveFactsResultsFactAssertions"]]
    ]
    feeds: Optional[list[Optional["RetrieveFactsRetrieveFactsResultsFactFeeds"]]]
    content: Optional["RetrieveFactsRetrieveFactsResultsFactContent"]
    conversation: Optional["RetrieveFactsRetrieveFactsResultsFactConversation"]
    persona: Optional["RetrieveFactsRetrieveFactsResultsFactPersona"]
    source_type: Optional[SourceTypes] = Field(alias="sourceType")
    category: Optional[FactCategory]
    confidence: Optional[float]


class RetrieveFactsRetrieveFactsResultsFactOwner(BaseModel):
    id: str


class RetrieveFactsRetrieveFactsResultsFactMentions(BaseModel):
    type: Optional[ObservableTypes]
    observable: Optional["RetrieveFactsRetrieveFactsResultsFactMentionsObservable"]
    start: Optional[int]
    end: Optional[int]


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


class RetrieveFactsRetrieveFactsResultsFactAssertions(BaseModel):
    text: str
    mentions: Optional[
        list[Optional["RetrieveFactsRetrieveFactsResultsFactAssertionsMentions"]]
    ]


class RetrieveFactsRetrieveFactsResultsFactAssertionsMentions(BaseModel):
    type: Optional[ObservableTypes]
    observable: Optional[
        "RetrieveFactsRetrieveFactsResultsFactAssertionsMentionsObservable"
    ]
    start: Optional[int]
    end: Optional[int]


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


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


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


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


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


class RetrieveFactsRetrieveFactsResultsContent(BaseModel):
    id: str


RetrieveFacts.model_rebuild()
RetrieveFactsRetrieveFacts.model_rebuild()
RetrieveFactsRetrieveFactsResults.model_rebuild()
RetrieveFactsRetrieveFactsResultsFact.model_rebuild()
RetrieveFactsRetrieveFactsResultsFactMentions.model_rebuild()
RetrieveFactsRetrieveFactsResultsFactAssertions.model_rebuild()
RetrieveFactsRetrieveFactsResultsFactAssertionsMentions.model_rebuild()
