# 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, EntityState, FileTypes, ObservableTypes, ViewTypes


class QueryViews(BaseModel):
    views: Optional["QueryViewsViews"]


class QueryViewsViews(BaseModel):
    results: Optional[List["QueryViewsViewsResults"]]


class QueryViewsViewsResults(BaseModel):
    id: str
    name: str
    creation_date: Any = Field(alias="creationDate")
    relevance: Optional[float]
    owner: "QueryViewsViewsResultsOwner"
    state: EntityState
    type: Optional[ViewTypes]
    filter: Optional["QueryViewsViewsResultsFilter"]
    augmented_filter: Optional["QueryViewsViewsResultsAugmentedFilter"] = Field(
        alias="augmentedFilter"
    )


class QueryViewsViewsResultsOwner(BaseModel):
    id: str


class QueryViewsViewsResultsFilter(BaseModel):
    date_range: Optional["QueryViewsViewsResultsFilterDateRange"] = Field(
        alias="dateRange"
    )
    in_last: Optional[Any] = Field(alias="inLast")
    creation_date_range: Optional["QueryViewsViewsResultsFilterCreationDateRange"] = (
        Field(alias="creationDateRange")
    )
    created_in_last: Optional[Any] = Field(alias="createdInLast")
    types: Optional[List[ContentTypes]]
    file_types: Optional[List[Optional[FileTypes]]] = Field(alias="fileTypes")
    formats: Optional[List[Optional[str]]]
    file_extensions: Optional[List[str]] = Field(alias="fileExtensions")
    file_size_range: Optional["QueryViewsViewsResultsFilterFileSizeRange"] = Field(
        alias="fileSizeRange"
    )
    similar_contents: Optional[List["QueryViewsViewsResultsFilterSimilarContents"]] = (
        Field(alias="similarContents")
    )
    contents: Optional[List["QueryViewsViewsResultsFilterContents"]]
    feeds: Optional[List["QueryViewsViewsResultsFilterFeeds"]]
    workflows: Optional[List["QueryViewsViewsResultsFilterWorkflows"]]
    collections: Optional[List["QueryViewsViewsResultsFilterCollections"]]
    users: Optional[List["QueryViewsViewsResultsFilterUsers"]]
    observations: Optional[List["QueryViewsViewsResultsFilterObservations"]]
    or_: Optional[List["QueryViewsViewsResultsFilterOr"]] = Field(alias="or")
    and_: Optional[List["QueryViewsViewsResultsFilterAnd"]] = Field(alias="and")


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


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


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


class QueryViewsViewsResultsFilterSimilarContents(BaseModel):
    id: str


class QueryViewsViewsResultsFilterContents(BaseModel):
    id: str


class QueryViewsViewsResultsFilterFeeds(BaseModel):
    id: str


class QueryViewsViewsResultsFilterWorkflows(BaseModel):
    id: str


class QueryViewsViewsResultsFilterCollections(BaseModel):
    id: str


class QueryViewsViewsResultsFilterUsers(BaseModel):
    id: str


class QueryViewsViewsResultsFilterObservations(BaseModel):
    type: ObservableTypes
    observable: "QueryViewsViewsResultsFilterObservationsObservable"
    states: Optional[List[Optional[EntityState]]]


class QueryViewsViewsResultsFilterObservationsObservable(BaseModel):
    id: str


class QueryViewsViewsResultsFilterOr(BaseModel):
    feeds: Optional[List["QueryViewsViewsResultsFilterOrFeeds"]]
    workflows: Optional[List["QueryViewsViewsResultsFilterOrWorkflows"]]
    collections: Optional[List["QueryViewsViewsResultsFilterOrCollections"]]
    users: Optional[List["QueryViewsViewsResultsFilterOrUsers"]]
    observations: Optional[List["QueryViewsViewsResultsFilterOrObservations"]]


class QueryViewsViewsResultsFilterOrFeeds(BaseModel):
    id: str


class QueryViewsViewsResultsFilterOrWorkflows(BaseModel):
    id: str


class QueryViewsViewsResultsFilterOrCollections(BaseModel):
    id: str


class QueryViewsViewsResultsFilterOrUsers(BaseModel):
    id: str


class QueryViewsViewsResultsFilterOrObservations(BaseModel):
    type: ObservableTypes
    observable: "QueryViewsViewsResultsFilterOrObservationsObservable"
    states: Optional[List[Optional[EntityState]]]


class QueryViewsViewsResultsFilterOrObservationsObservable(BaseModel):
    id: str


class QueryViewsViewsResultsFilterAnd(BaseModel):
    feeds: Optional[List["QueryViewsViewsResultsFilterAndFeeds"]]
    workflows: Optional[List["QueryViewsViewsResultsFilterAndWorkflows"]]
    collections: Optional[List["QueryViewsViewsResultsFilterAndCollections"]]
    users: Optional[List["QueryViewsViewsResultsFilterAndUsers"]]
    observations: Optional[List["QueryViewsViewsResultsFilterAndObservations"]]


class QueryViewsViewsResultsFilterAndFeeds(BaseModel):
    id: str


class QueryViewsViewsResultsFilterAndWorkflows(BaseModel):
    id: str


class QueryViewsViewsResultsFilterAndCollections(BaseModel):
    id: str


class QueryViewsViewsResultsFilterAndUsers(BaseModel):
    id: str


class QueryViewsViewsResultsFilterAndObservations(BaseModel):
    type: ObservableTypes
    observable: "QueryViewsViewsResultsFilterAndObservationsObservable"
    states: Optional[List[Optional[EntityState]]]


class QueryViewsViewsResultsFilterAndObservationsObservable(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilter(BaseModel):
    date_range: Optional["QueryViewsViewsResultsAugmentedFilterDateRange"] = Field(
        alias="dateRange"
    )
    in_last: Optional[Any] = Field(alias="inLast")
    creation_date_range: Optional[
        "QueryViewsViewsResultsAugmentedFilterCreationDateRange"
    ] = Field(alias="creationDateRange")
    created_in_last: Optional[Any] = Field(alias="createdInLast")
    types: Optional[List[ContentTypes]]
    file_types: Optional[List[Optional[FileTypes]]] = Field(alias="fileTypes")
    formats: Optional[List[Optional[str]]]
    file_extensions: Optional[List[str]] = Field(alias="fileExtensions")
    file_size_range: Optional["QueryViewsViewsResultsAugmentedFilterFileSizeRange"] = (
        Field(alias="fileSizeRange")
    )
    similar_contents: Optional[
        List["QueryViewsViewsResultsAugmentedFilterSimilarContents"]
    ] = Field(alias="similarContents")
    contents: Optional[List["QueryViewsViewsResultsAugmentedFilterContents"]]
    feeds: Optional[List["QueryViewsViewsResultsAugmentedFilterFeeds"]]
    workflows: Optional[List["QueryViewsViewsResultsAugmentedFilterWorkflows"]]
    collections: Optional[List["QueryViewsViewsResultsAugmentedFilterCollections"]]
    users: Optional[List["QueryViewsViewsResultsAugmentedFilterUsers"]]
    observations: Optional[List["QueryViewsViewsResultsAugmentedFilterObservations"]]
    or_: Optional[List["QueryViewsViewsResultsAugmentedFilterOr"]] = Field(alias="or")
    and_: Optional[List["QueryViewsViewsResultsAugmentedFilterAnd"]] = Field(
        alias="and"
    )


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


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


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


class QueryViewsViewsResultsAugmentedFilterSimilarContents(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterContents(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterFeeds(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterWorkflows(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterCollections(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterUsers(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterObservations(BaseModel):
    type: ObservableTypes
    observable: "QueryViewsViewsResultsAugmentedFilterObservationsObservable"
    states: Optional[List[Optional[EntityState]]]


class QueryViewsViewsResultsAugmentedFilterObservationsObservable(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterOr(BaseModel):
    feeds: Optional[List["QueryViewsViewsResultsAugmentedFilterOrFeeds"]]
    workflows: Optional[List["QueryViewsViewsResultsAugmentedFilterOrWorkflows"]]
    collections: Optional[List["QueryViewsViewsResultsAugmentedFilterOrCollections"]]
    users: Optional[List["QueryViewsViewsResultsAugmentedFilterOrUsers"]]
    observations: Optional[List["QueryViewsViewsResultsAugmentedFilterOrObservations"]]


class QueryViewsViewsResultsAugmentedFilterOrFeeds(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterOrWorkflows(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterOrCollections(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterOrUsers(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterOrObservations(BaseModel):
    type: ObservableTypes
    observable: "QueryViewsViewsResultsAugmentedFilterOrObservationsObservable"
    states: Optional[List[Optional[EntityState]]]


class QueryViewsViewsResultsAugmentedFilterOrObservationsObservable(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterAnd(BaseModel):
    feeds: Optional[List["QueryViewsViewsResultsAugmentedFilterAndFeeds"]]
    workflows: Optional[List["QueryViewsViewsResultsAugmentedFilterAndWorkflows"]]
    collections: Optional[List["QueryViewsViewsResultsAugmentedFilterAndCollections"]]
    users: Optional[List["QueryViewsViewsResultsAugmentedFilterAndUsers"]]
    observations: Optional[List["QueryViewsViewsResultsAugmentedFilterAndObservations"]]


class QueryViewsViewsResultsAugmentedFilterAndFeeds(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterAndWorkflows(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterAndCollections(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterAndUsers(BaseModel):
    id: str


class QueryViewsViewsResultsAugmentedFilterAndObservations(BaseModel):
    type: ObservableTypes
    observable: "QueryViewsViewsResultsAugmentedFilterAndObservationsObservable"
    states: Optional[List[Optional[EntityState]]]


class QueryViewsViewsResultsAugmentedFilterAndObservationsObservable(BaseModel):
    id: str


QueryViews.model_rebuild()
QueryViewsViews.model_rebuild()
QueryViewsViewsResults.model_rebuild()
QueryViewsViewsResultsFilter.model_rebuild()
QueryViewsViewsResultsFilterObservations.model_rebuild()
QueryViewsViewsResultsFilterOr.model_rebuild()
QueryViewsViewsResultsFilterOrObservations.model_rebuild()
QueryViewsViewsResultsFilterAnd.model_rebuild()
QueryViewsViewsResultsFilterAndObservations.model_rebuild()
QueryViewsViewsResultsAugmentedFilter.model_rebuild()
QueryViewsViewsResultsAugmentedFilterObservations.model_rebuild()
QueryViewsViewsResultsAugmentedFilterOr.model_rebuild()
QueryViewsViewsResultsAugmentedFilterOrObservations.model_rebuild()
QueryViewsViewsResultsAugmentedFilterAnd.model_rebuild()
QueryViewsViewsResultsAugmentedFilterAndObservations.model_rebuild()
