# 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 GetFact(BaseModel):
    fact: Optional["GetFactFact"]


class GetFactFact(BaseModel):
    id: str
    creation_date: Any = Field(alias="creationDate")
    owner: "GetFactFactOwner"
    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["GetFactFactMentions"]]]
    assertions: Optional[list[Optional["GetFactFactAssertions"]]]
    feeds: Optional[list[Optional["GetFactFactFeeds"]]]
    content: Optional["GetFactFactContent"]
    conversation: Optional["GetFactFactConversation"]
    persona: Optional["GetFactFactPersona"]
    source_type: Optional[SourceTypes] = Field(alias="sourceType")
    category: Optional[FactCategory]
    confidence: Optional[float]


class GetFactFactOwner(BaseModel):
    id: str


class GetFactFactMentions(BaseModel):
    type: Optional[ObservableTypes]
    observable: Optional["GetFactFactMentionsObservable"]
    start: Optional[int]
    end: Optional[int]


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


class GetFactFactAssertions(BaseModel):
    text: str
    mentions: Optional[list[Optional["GetFactFactAssertionsMentions"]]]


class GetFactFactAssertionsMentions(BaseModel):
    type: Optional[ObservableTypes]
    observable: Optional["GetFactFactAssertionsMentionsObservable"]
    start: Optional[int]
    end: Optional[int]


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


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


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


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


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


GetFact.model_rebuild()
GetFactFact.model_rebuild()
GetFactFactMentions.model_rebuild()
GetFactFactAssertions.model_rebuild()
GetFactFactAssertionsMentions.model_rebuild()
