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

from typing import Any, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import (
    ContentTypes,
    EntityState,
    FileTypes,
    FilterMode,
    ObservableTypes,
    ViewTypes,
)


class CreateView(BaseModel):
    create_view: Optional["CreateViewCreateView"] = Field(alias="createView")


class CreateViewCreateView(BaseModel):
    id: str
    name: str
    state: EntityState
    type: Optional[ViewTypes]
    filter: Optional["CreateViewCreateViewFilter"]
    augmented_filter: Optional["CreateViewCreateViewAugmentedFilter"] = Field(
        alias="augmentedFilter"
    )


class CreateViewCreateViewFilter(BaseModel):
    date_range: Optional["CreateViewCreateViewFilterDateRange"] = Field(
        alias="dateRange"
    )
    in_last: Optional[Any] = Field(alias="inLast")
    in_next: Optional[Any] = Field(alias="inNext")
    creation_date_range: Optional["CreateViewCreateViewFilterCreationDateRange"] = (
        Field(alias="creationDateRange")
    )
    created_in_last: Optional[Any] = Field(alias="createdInLast")
    types: Optional[list[ContentTypes]]
    file_types: Optional[list[FileTypes]] = Field(alias="fileTypes")
    formats: Optional[list[str]]
    file_extensions: Optional[list[str]] = Field(alias="fileExtensions")
    file_size_range: Optional["CreateViewCreateViewFilterFileSizeRange"] = Field(
        alias="fileSizeRange"
    )
    similar_contents: Optional[list["CreateViewCreateViewFilterSimilarContents"]] = (
        Field(alias="similarContents")
    )
    contents: Optional[list["CreateViewCreateViewFilterContents"]]
    feeds: Optional[list["CreateViewCreateViewFilterFeeds"]]
    workflows: Optional[list["CreateViewCreateViewFilterWorkflows"]]
    collections: Optional[list["CreateViewCreateViewFilterCollections"]]
    users: Optional[list["CreateViewCreateViewFilterUsers"]]
    observations: Optional[list["CreateViewCreateViewFilterObservations"]]
    or_: Optional[list["CreateViewCreateViewFilterOr"]] = Field(alias="or")
    and_: Optional[list["CreateViewCreateViewFilterAnd"]] = Field(alias="and")
    has_observations: Optional[bool] = Field(alias="hasObservations")
    has_feeds: Optional[bool] = Field(alias="hasFeeds")
    has_collections: Optional[bool] = Field(alias="hasCollections")
    has_workflows: Optional[bool] = Field(alias="hasWorkflows")
    collection_mode: Optional[FilterMode] = Field(alias="collectionMode")
    observation_mode: Optional[FilterMode] = Field(alias="observationMode")


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


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


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


class CreateViewCreateViewFilterSimilarContents(BaseModel):
    id: str


class CreateViewCreateViewFilterContents(BaseModel):
    id: str


class CreateViewCreateViewFilterFeeds(BaseModel):
    id: str


class CreateViewCreateViewFilterWorkflows(BaseModel):
    id: str


class CreateViewCreateViewFilterCollections(BaseModel):
    id: str


class CreateViewCreateViewFilterUsers(BaseModel):
    id: str


class CreateViewCreateViewFilterObservations(BaseModel):
    type: ObservableTypes
    observable: "CreateViewCreateViewFilterObservationsObservable"
    states: Optional[list[EntityState]]


class CreateViewCreateViewFilterObservationsObservable(BaseModel):
    id: str


class CreateViewCreateViewFilterOr(BaseModel):
    feeds: Optional[list["CreateViewCreateViewFilterOrFeeds"]]
    workflows: Optional[list["CreateViewCreateViewFilterOrWorkflows"]]
    collections: Optional[list["CreateViewCreateViewFilterOrCollections"]]
    users: Optional[list["CreateViewCreateViewFilterOrUsers"]]
    observations: Optional[list["CreateViewCreateViewFilterOrObservations"]]


class CreateViewCreateViewFilterOrFeeds(BaseModel):
    id: str


class CreateViewCreateViewFilterOrWorkflows(BaseModel):
    id: str


class CreateViewCreateViewFilterOrCollections(BaseModel):
    id: str


class CreateViewCreateViewFilterOrUsers(BaseModel):
    id: str


class CreateViewCreateViewFilterOrObservations(BaseModel):
    type: ObservableTypes
    observable: "CreateViewCreateViewFilterOrObservationsObservable"
    states: Optional[list[EntityState]]


class CreateViewCreateViewFilterOrObservationsObservable(BaseModel):
    id: str


class CreateViewCreateViewFilterAnd(BaseModel):
    feeds: Optional[list["CreateViewCreateViewFilterAndFeeds"]]
    workflows: Optional[list["CreateViewCreateViewFilterAndWorkflows"]]
    collections: Optional[list["CreateViewCreateViewFilterAndCollections"]]
    users: Optional[list["CreateViewCreateViewFilterAndUsers"]]
    observations: Optional[list["CreateViewCreateViewFilterAndObservations"]]


class CreateViewCreateViewFilterAndFeeds(BaseModel):
    id: str


class CreateViewCreateViewFilterAndWorkflows(BaseModel):
    id: str


class CreateViewCreateViewFilterAndCollections(BaseModel):
    id: str


class CreateViewCreateViewFilterAndUsers(BaseModel):
    id: str


class CreateViewCreateViewFilterAndObservations(BaseModel):
    type: ObservableTypes
    observable: "CreateViewCreateViewFilterAndObservationsObservable"
    states: Optional[list[EntityState]]


class CreateViewCreateViewFilterAndObservationsObservable(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilter(BaseModel):
    date_range: Optional["CreateViewCreateViewAugmentedFilterDateRange"] = Field(
        alias="dateRange"
    )
    in_last: Optional[Any] = Field(alias="inLast")
    in_next: Optional[Any] = Field(alias="inNext")
    creation_date_range: Optional[
        "CreateViewCreateViewAugmentedFilterCreationDateRange"
    ] = Field(alias="creationDateRange")
    created_in_last: Optional[Any] = Field(alias="createdInLast")
    types: Optional[list[ContentTypes]]
    file_types: Optional[list[FileTypes]] = Field(alias="fileTypes")
    formats: Optional[list[str]]
    file_extensions: Optional[list[str]] = Field(alias="fileExtensions")
    file_size_range: Optional["CreateViewCreateViewAugmentedFilterFileSizeRange"] = (
        Field(alias="fileSizeRange")
    )
    similar_contents: Optional[
        list["CreateViewCreateViewAugmentedFilterSimilarContents"]
    ] = Field(alias="similarContents")
    contents: Optional[list["CreateViewCreateViewAugmentedFilterContents"]]
    feeds: Optional[list["CreateViewCreateViewAugmentedFilterFeeds"]]
    workflows: Optional[list["CreateViewCreateViewAugmentedFilterWorkflows"]]
    collections: Optional[list["CreateViewCreateViewAugmentedFilterCollections"]]
    users: Optional[list["CreateViewCreateViewAugmentedFilterUsers"]]
    observations: Optional[list["CreateViewCreateViewAugmentedFilterObservations"]]
    or_: Optional[list["CreateViewCreateViewAugmentedFilterOr"]] = Field(alias="or")
    and_: Optional[list["CreateViewCreateViewAugmentedFilterAnd"]] = Field(alias="and")
    has_observations: Optional[bool] = Field(alias="hasObservations")
    has_feeds: Optional[bool] = Field(alias="hasFeeds")
    has_collections: Optional[bool] = Field(alias="hasCollections")
    has_workflows: Optional[bool] = Field(alias="hasWorkflows")
    collection_mode: Optional[FilterMode] = Field(alias="collectionMode")
    observation_mode: Optional[FilterMode] = Field(alias="observationMode")


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


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


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


class CreateViewCreateViewAugmentedFilterSimilarContents(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterContents(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterFeeds(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterWorkflows(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterCollections(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterUsers(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterObservations(BaseModel):
    type: ObservableTypes
    observable: "CreateViewCreateViewAugmentedFilterObservationsObservable"
    states: Optional[list[EntityState]]


class CreateViewCreateViewAugmentedFilterObservationsObservable(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterOr(BaseModel):
    feeds: Optional[list["CreateViewCreateViewAugmentedFilterOrFeeds"]]
    workflows: Optional[list["CreateViewCreateViewAugmentedFilterOrWorkflows"]]
    collections: Optional[list["CreateViewCreateViewAugmentedFilterOrCollections"]]
    users: Optional[list["CreateViewCreateViewAugmentedFilterOrUsers"]]
    observations: Optional[list["CreateViewCreateViewAugmentedFilterOrObservations"]]


class CreateViewCreateViewAugmentedFilterOrFeeds(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterOrWorkflows(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterOrCollections(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterOrUsers(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterOrObservations(BaseModel):
    type: ObservableTypes
    observable: "CreateViewCreateViewAugmentedFilterOrObservationsObservable"
    states: Optional[list[EntityState]]


class CreateViewCreateViewAugmentedFilterOrObservationsObservable(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterAnd(BaseModel):
    feeds: Optional[list["CreateViewCreateViewAugmentedFilterAndFeeds"]]
    workflows: Optional[list["CreateViewCreateViewAugmentedFilterAndWorkflows"]]
    collections: Optional[list["CreateViewCreateViewAugmentedFilterAndCollections"]]
    users: Optional[list["CreateViewCreateViewAugmentedFilterAndUsers"]]
    observations: Optional[list["CreateViewCreateViewAugmentedFilterAndObservations"]]


class CreateViewCreateViewAugmentedFilterAndFeeds(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterAndWorkflows(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterAndCollections(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterAndUsers(BaseModel):
    id: str


class CreateViewCreateViewAugmentedFilterAndObservations(BaseModel):
    type: ObservableTypes
    observable: "CreateViewCreateViewAugmentedFilterAndObservationsObservable"
    states: Optional[list[EntityState]]


class CreateViewCreateViewAugmentedFilterAndObservationsObservable(BaseModel):
    id: str


CreateView.model_rebuild()
CreateViewCreateView.model_rebuild()
CreateViewCreateViewFilter.model_rebuild()
CreateViewCreateViewFilterObservations.model_rebuild()
CreateViewCreateViewFilterOr.model_rebuild()
CreateViewCreateViewFilterOrObservations.model_rebuild()
CreateViewCreateViewFilterAnd.model_rebuild()
CreateViewCreateViewFilterAndObservations.model_rebuild()
CreateViewCreateViewAugmentedFilter.model_rebuild()
CreateViewCreateViewAugmentedFilterObservations.model_rebuild()
CreateViewCreateViewAugmentedFilterOr.model_rebuild()
CreateViewCreateViewAugmentedFilterOrObservations.model_rebuild()
CreateViewCreateViewAugmentedFilterAnd.model_rebuild()
CreateViewCreateViewAugmentedFilterAndObservations.model_rebuild()
