# 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,
    FilterMode,
    ObservableTypes,
    ViewTypes,
)


class UpsertView(BaseModel):
    upsert_view: Optional["UpsertViewUpsertView"] = Field(alias="upsertView")


class UpsertViewUpsertView(BaseModel):
    id: str
    name: str
    state: EntityState
    type: Optional[ViewTypes]
    filter: Optional["UpsertViewUpsertViewFilter"]
    augmented_filter: Optional["UpsertViewUpsertViewAugmentedFilter"] = Field(
        alias="augmentedFilter"
    )


class UpsertViewUpsertViewFilter(BaseModel):
    date_range: Optional["UpsertViewUpsertViewFilterDateRange"] = Field(
        alias="dateRange"
    )
    in_last: Optional[Any] = Field(alias="inLast")
    creation_date_range: Optional["UpsertViewUpsertViewFilterCreationDateRange"] = (
        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["UpsertViewUpsertViewFilterFileSizeRange"] = Field(
        alias="fileSizeRange"
    )
    similar_contents: Optional[List["UpsertViewUpsertViewFilterSimilarContents"]] = (
        Field(alias="similarContents")
    )
    contents: Optional[List["UpsertViewUpsertViewFilterContents"]]
    feeds: Optional[List["UpsertViewUpsertViewFilterFeeds"]]
    workflows: Optional[List["UpsertViewUpsertViewFilterWorkflows"]]
    collections: Optional[List["UpsertViewUpsertViewFilterCollections"]]
    users: Optional[List["UpsertViewUpsertViewFilterUsers"]]
    observations: Optional[List["UpsertViewUpsertViewFilterObservations"]]
    or_: Optional[List["UpsertViewUpsertViewFilterOr"]] = Field(alias="or")
    and_: Optional[List["UpsertViewUpsertViewFilterAnd"]] = 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 UpsertViewUpsertViewFilterDateRange(BaseModel):
    from_: Optional[Any] = Field(alias="from")
    to: Optional[Any]


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


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


class UpsertViewUpsertViewFilterSimilarContents(BaseModel):
    id: str


class UpsertViewUpsertViewFilterContents(BaseModel):
    id: str


class UpsertViewUpsertViewFilterFeeds(BaseModel):
    id: str


class UpsertViewUpsertViewFilterWorkflows(BaseModel):
    id: str


class UpsertViewUpsertViewFilterCollections(BaseModel):
    id: str


class UpsertViewUpsertViewFilterUsers(BaseModel):
    id: str


class UpsertViewUpsertViewFilterObservations(BaseModel):
    type: ObservableTypes
    observable: "UpsertViewUpsertViewFilterObservationsObservable"
    states: Optional[List[EntityState]]


class UpsertViewUpsertViewFilterObservationsObservable(BaseModel):
    id: str


class UpsertViewUpsertViewFilterOr(BaseModel):
    feeds: Optional[List["UpsertViewUpsertViewFilterOrFeeds"]]
    workflows: Optional[List["UpsertViewUpsertViewFilterOrWorkflows"]]
    collections: Optional[List["UpsertViewUpsertViewFilterOrCollections"]]
    users: Optional[List["UpsertViewUpsertViewFilterOrUsers"]]
    observations: Optional[List["UpsertViewUpsertViewFilterOrObservations"]]


class UpsertViewUpsertViewFilterOrFeeds(BaseModel):
    id: str


class UpsertViewUpsertViewFilterOrWorkflows(BaseModel):
    id: str


class UpsertViewUpsertViewFilterOrCollections(BaseModel):
    id: str


class UpsertViewUpsertViewFilterOrUsers(BaseModel):
    id: str


class UpsertViewUpsertViewFilterOrObservations(BaseModel):
    type: ObservableTypes
    observable: "UpsertViewUpsertViewFilterOrObservationsObservable"
    states: Optional[List[EntityState]]


class UpsertViewUpsertViewFilterOrObservationsObservable(BaseModel):
    id: str


class UpsertViewUpsertViewFilterAnd(BaseModel):
    feeds: Optional[List["UpsertViewUpsertViewFilterAndFeeds"]]
    workflows: Optional[List["UpsertViewUpsertViewFilterAndWorkflows"]]
    collections: Optional[List["UpsertViewUpsertViewFilterAndCollections"]]
    users: Optional[List["UpsertViewUpsertViewFilterAndUsers"]]
    observations: Optional[List["UpsertViewUpsertViewFilterAndObservations"]]


class UpsertViewUpsertViewFilterAndFeeds(BaseModel):
    id: str


class UpsertViewUpsertViewFilterAndWorkflows(BaseModel):
    id: str


class UpsertViewUpsertViewFilterAndCollections(BaseModel):
    id: str


class UpsertViewUpsertViewFilterAndUsers(BaseModel):
    id: str


class UpsertViewUpsertViewFilterAndObservations(BaseModel):
    type: ObservableTypes
    observable: "UpsertViewUpsertViewFilterAndObservationsObservable"
    states: Optional[List[EntityState]]


class UpsertViewUpsertViewFilterAndObservationsObservable(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilter(BaseModel):
    date_range: Optional["UpsertViewUpsertViewAugmentedFilterDateRange"] = Field(
        alias="dateRange"
    )
    in_last: Optional[Any] = Field(alias="inLast")
    creation_date_range: Optional[
        "UpsertViewUpsertViewAugmentedFilterCreationDateRange"
    ] = 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["UpsertViewUpsertViewAugmentedFilterFileSizeRange"] = (
        Field(alias="fileSizeRange")
    )
    similar_contents: Optional[
        List["UpsertViewUpsertViewAugmentedFilterSimilarContents"]
    ] = Field(alias="similarContents")
    contents: Optional[List["UpsertViewUpsertViewAugmentedFilterContents"]]
    feeds: Optional[List["UpsertViewUpsertViewAugmentedFilterFeeds"]]
    workflows: Optional[List["UpsertViewUpsertViewAugmentedFilterWorkflows"]]
    collections: Optional[List["UpsertViewUpsertViewAugmentedFilterCollections"]]
    users: Optional[List["UpsertViewUpsertViewAugmentedFilterUsers"]]
    observations: Optional[List["UpsertViewUpsertViewAugmentedFilterObservations"]]
    or_: Optional[List["UpsertViewUpsertViewAugmentedFilterOr"]] = Field(alias="or")
    and_: Optional[List["UpsertViewUpsertViewAugmentedFilterAnd"]] = 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 UpsertViewUpsertViewAugmentedFilterDateRange(BaseModel):
    from_: Optional[Any] = Field(alias="from")
    to: Optional[Any]


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


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


class UpsertViewUpsertViewAugmentedFilterSimilarContents(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterContents(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterFeeds(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterWorkflows(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterCollections(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterUsers(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterObservations(BaseModel):
    type: ObservableTypes
    observable: "UpsertViewUpsertViewAugmentedFilterObservationsObservable"
    states: Optional[List[EntityState]]


class UpsertViewUpsertViewAugmentedFilterObservationsObservable(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterOr(BaseModel):
    feeds: Optional[List["UpsertViewUpsertViewAugmentedFilterOrFeeds"]]
    workflows: Optional[List["UpsertViewUpsertViewAugmentedFilterOrWorkflows"]]
    collections: Optional[List["UpsertViewUpsertViewAugmentedFilterOrCollections"]]
    users: Optional[List["UpsertViewUpsertViewAugmentedFilterOrUsers"]]
    observations: Optional[List["UpsertViewUpsertViewAugmentedFilterOrObservations"]]


class UpsertViewUpsertViewAugmentedFilterOrFeeds(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterOrWorkflows(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterOrCollections(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterOrUsers(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterOrObservations(BaseModel):
    type: ObservableTypes
    observable: "UpsertViewUpsertViewAugmentedFilterOrObservationsObservable"
    states: Optional[List[EntityState]]


class UpsertViewUpsertViewAugmentedFilterOrObservationsObservable(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterAnd(BaseModel):
    feeds: Optional[List["UpsertViewUpsertViewAugmentedFilterAndFeeds"]]
    workflows: Optional[List["UpsertViewUpsertViewAugmentedFilterAndWorkflows"]]
    collections: Optional[List["UpsertViewUpsertViewAugmentedFilterAndCollections"]]
    users: Optional[List["UpsertViewUpsertViewAugmentedFilterAndUsers"]]
    observations: Optional[List["UpsertViewUpsertViewAugmentedFilterAndObservations"]]


class UpsertViewUpsertViewAugmentedFilterAndFeeds(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterAndWorkflows(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterAndCollections(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterAndUsers(BaseModel):
    id: str


class UpsertViewUpsertViewAugmentedFilterAndObservations(BaseModel):
    type: ObservableTypes
    observable: "UpsertViewUpsertViewAugmentedFilterAndObservationsObservable"
    states: Optional[List[EntityState]]


class UpsertViewUpsertViewAugmentedFilterAndObservationsObservable(BaseModel):
    id: str


UpsertView.model_rebuild()
UpsertViewUpsertView.model_rebuild()
UpsertViewUpsertViewFilter.model_rebuild()
UpsertViewUpsertViewFilterObservations.model_rebuild()
UpsertViewUpsertViewFilterOr.model_rebuild()
UpsertViewUpsertViewFilterOrObservations.model_rebuild()
UpsertViewUpsertViewFilterAnd.model_rebuild()
UpsertViewUpsertViewFilterAndObservations.model_rebuild()
UpsertViewUpsertViewAugmentedFilter.model_rebuild()
UpsertViewUpsertViewAugmentedFilterObservations.model_rebuild()
UpsertViewUpsertViewAugmentedFilterOr.model_rebuild()
UpsertViewUpsertViewAugmentedFilterOrObservations.model_rebuild()
UpsertViewUpsertViewAugmentedFilterAnd.model_rebuild()
UpsertViewUpsertViewAugmentedFilterAndObservations.model_rebuild()
