# 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 QueryFacts(BaseModel):
    facts: Optional["QueryFactsFacts"]


class QueryFactsFacts(BaseModel):
    results: Optional[list[Optional["QueryFactsFactsResults"]]]


class QueryFactsFactsResults(BaseModel):
    id: str
    creation_date: Any = Field(alias="creationDate")
    owner: "QueryFactsFactsResultsOwner"
    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["QueryFactsFactsResultsMentions"]]]
    assertions: Optional[list[Optional["QueryFactsFactsResultsAssertions"]]]
    feeds: Optional[list[Optional["QueryFactsFactsResultsFeeds"]]]
    content: Optional["QueryFactsFactsResultsContent"]
    conversation: Optional["QueryFactsFactsResultsConversation"]
    persona: Optional["QueryFactsFactsResultsPersona"]
    source_type: Optional[SourceTypes] = Field(alias="sourceType")
    category: Optional[FactCategory]
    confidence: Optional[float]


class QueryFactsFactsResultsOwner(BaseModel):
    id: str


class QueryFactsFactsResultsMentions(BaseModel):
    type: Optional[ObservableTypes]
    observable: Optional["QueryFactsFactsResultsMentionsObservable"]
    start: Optional[int]
    end: Optional[int]


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


class QueryFactsFactsResultsAssertions(BaseModel):
    text: str
    mentions: Optional[list[Optional["QueryFactsFactsResultsAssertionsMentions"]]]


class QueryFactsFactsResultsAssertionsMentions(BaseModel):
    type: Optional[ObservableTypes]
    observable: Optional["QueryFactsFactsResultsAssertionsMentionsObservable"]
    start: Optional[int]
    end: Optional[int]


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


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


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


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


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


QueryFacts.model_rebuild()
QueryFactsFacts.model_rebuild()
QueryFactsFactsResults.model_rebuild()
QueryFactsFactsResultsMentions.model_rebuild()
QueryFactsFactsResultsAssertions.model_rebuild()
QueryFactsFactsResultsAssertionsMentions.model_rebuild()
