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

from typing import Any, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import (
    AgentChannelTypes,
    AgentTypes,
    ContentTypes,
    EntityState,
    FileTypes,
    FilterMode,
    ObservableTypes,
    TimedPolicyRecurrenceTypes,
)


class GetAgent(BaseModel):
    agent: Optional["GetAgentAgent"]


class GetAgentAgent(BaseModel):
    id: str
    name: str
    creation_date: Any = Field(alias="creationDate")
    modified_date: Optional[Any] = Field(alias="modifiedDate")
    owner: "GetAgentAgentOwner"
    state: EntityState
    correlation_id: Optional[str] = Field(alias="correlationId")
    type: AgentTypes
    specification: Optional["GetAgentAgentSpecification"]
    filter: Optional["GetAgentAgentFilter"]
    schedule_policy: Optional["GetAgentAgentSchedulePolicy"] = Field(
        alias="schedulePolicy"
    )
    channels: Optional[list["GetAgentAgentChannels"]]
    timeout: Optional[Any]
    scratchpad: Optional[str]


class GetAgentAgentOwner(BaseModel):
    id: str


class GetAgentAgentSpecification(BaseModel):
    id: str


class GetAgentAgentFilter(BaseModel):
    date_range: Optional["GetAgentAgentFilterDateRange"] = Field(alias="dateRange")
    in_last: Optional[Any] = Field(alias="inLast")
    in_next: Optional[Any] = Field(alias="inNext")
    creation_date_range: Optional["GetAgentAgentFilterCreationDateRange"] = 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["GetAgentAgentFilterFileSizeRange"] = Field(
        alias="fileSizeRange"
    )
    similar_contents: Optional[list["GetAgentAgentFilterSimilarContents"]] = Field(
        alias="similarContents"
    )
    contents: Optional[list["GetAgentAgentFilterContents"]]
    feeds: Optional[list["GetAgentAgentFilterFeeds"]]
    workflows: Optional[list["GetAgentAgentFilterWorkflows"]]
    collections: Optional[list["GetAgentAgentFilterCollections"]]
    users: Optional[list["GetAgentAgentFilterUsers"]]
    observations: Optional[list["GetAgentAgentFilterObservations"]]
    or_: Optional[list["GetAgentAgentFilterOr"]] = Field(alias="or")
    and_: Optional[list["GetAgentAgentFilterAnd"]] = 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 GetAgentAgentFilterDateRange(BaseModel):
    from_: Optional[Any] = Field(alias="from")
    to: Optional[Any]


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


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


class GetAgentAgentFilterSimilarContents(BaseModel):
    id: str


class GetAgentAgentFilterContents(BaseModel):
    id: str


class GetAgentAgentFilterFeeds(BaseModel):
    id: str


class GetAgentAgentFilterWorkflows(BaseModel):
    id: str


class GetAgentAgentFilterCollections(BaseModel):
    id: str


class GetAgentAgentFilterUsers(BaseModel):
    id: str


class GetAgentAgentFilterObservations(BaseModel):
    type: ObservableTypes
    observable: "GetAgentAgentFilterObservationsObservable"
    states: Optional[list[EntityState]]


class GetAgentAgentFilterObservationsObservable(BaseModel):
    id: str


class GetAgentAgentFilterOr(BaseModel):
    feeds: Optional[list["GetAgentAgentFilterOrFeeds"]]
    workflows: Optional[list["GetAgentAgentFilterOrWorkflows"]]
    collections: Optional[list["GetAgentAgentFilterOrCollections"]]
    users: Optional[list["GetAgentAgentFilterOrUsers"]]
    observations: Optional[list["GetAgentAgentFilterOrObservations"]]


class GetAgentAgentFilterOrFeeds(BaseModel):
    id: str


class GetAgentAgentFilterOrWorkflows(BaseModel):
    id: str


class GetAgentAgentFilterOrCollections(BaseModel):
    id: str


class GetAgentAgentFilterOrUsers(BaseModel):
    id: str


class GetAgentAgentFilterOrObservations(BaseModel):
    type: ObservableTypes
    observable: "GetAgentAgentFilterOrObservationsObservable"
    states: Optional[list[EntityState]]


class GetAgentAgentFilterOrObservationsObservable(BaseModel):
    id: str


class GetAgentAgentFilterAnd(BaseModel):
    feeds: Optional[list["GetAgentAgentFilterAndFeeds"]]
    workflows: Optional[list["GetAgentAgentFilterAndWorkflows"]]
    collections: Optional[list["GetAgentAgentFilterAndCollections"]]
    users: Optional[list["GetAgentAgentFilterAndUsers"]]
    observations: Optional[list["GetAgentAgentFilterAndObservations"]]


class GetAgentAgentFilterAndFeeds(BaseModel):
    id: str


class GetAgentAgentFilterAndWorkflows(BaseModel):
    id: str


class GetAgentAgentFilterAndCollections(BaseModel):
    id: str


class GetAgentAgentFilterAndUsers(BaseModel):
    id: str


class GetAgentAgentFilterAndObservations(BaseModel):
    type: ObservableTypes
    observable: "GetAgentAgentFilterAndObservationsObservable"
    states: Optional[list[EntityState]]


class GetAgentAgentFilterAndObservationsObservable(BaseModel):
    id: str


class GetAgentAgentSchedulePolicy(BaseModel):
    recurrence_type: Optional[TimedPolicyRecurrenceTypes] = Field(
        alias="recurrenceType"
    )
    repeat_interval: Optional[Any] = Field(alias="repeatInterval")
    cron: Optional[str]
    time_zone_id: Optional[str] = Field(alias="timeZoneId")


class GetAgentAgentChannels(BaseModel):
    type: AgentChannelTypes
    identifier: str
    instructions: Optional[str]
    label: Optional[str]


GetAgent.model_rebuild()
GetAgentAgent.model_rebuild()
GetAgentAgentFilter.model_rebuild()
GetAgentAgentFilterObservations.model_rebuild()
GetAgentAgentFilterOr.model_rebuild()
GetAgentAgentFilterOrObservations.model_rebuild()
GetAgentAgentFilterAnd.model_rebuild()
GetAgentAgentFilterAndObservations.model_rebuild()
