# 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,
    TimedPolicyRecurrenceTypes,
)


class QueryAgents(BaseModel):
    agents: Optional["QueryAgentsAgents"]


class QueryAgentsAgents(BaseModel):
    results: Optional[list["QueryAgentsAgentsResults"]]


class QueryAgentsAgentsResults(BaseModel):
    id: str
    name: str
    creation_date: Any = Field(alias="creationDate")
    modified_date: Optional[Any] = Field(alias="modifiedDate")
    relevance: Optional[float]
    owner: "QueryAgentsAgentsResultsOwner"
    state: EntityState
    correlation_id: Optional[str] = Field(alias="correlationId")
    type: AgentTypes
    specification: Optional["QueryAgentsAgentsResultsSpecification"]
    filter: Optional["QueryAgentsAgentsResultsFilter"]
    schedule_policy: Optional["QueryAgentsAgentsResultsSchedulePolicy"] = Field(
        alias="schedulePolicy"
    )
    channels: Optional[list["QueryAgentsAgentsResultsChannels"]]
    connectors: Optional[list["QueryAgentsAgentsResultsConnectors"]]
    timeout: Optional[Any]
    prompt: Optional[str]
    scratchpad: Optional[str]


class QueryAgentsAgentsResultsOwner(BaseModel):
    id: str


class QueryAgentsAgentsResultsSpecification(BaseModel):
    id: str


class QueryAgentsAgentsResultsFilter(BaseModel):
    types: Optional[list[ContentTypes]]
    file_types: Optional[list[FileTypes]] = Field(alias="fileTypes")
    feeds: Optional[list["QueryAgentsAgentsResultsFilterFeeds"]]


class QueryAgentsAgentsResultsFilterFeeds(BaseModel):
    id: str


class QueryAgentsAgentsResultsSchedulePolicy(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 QueryAgentsAgentsResultsChannels(BaseModel):
    type: AgentChannelTypes
    identifier: str
    instructions: Optional[str]
    label: Optional[str]


class QueryAgentsAgentsResultsConnectors(BaseModel):
    id: str


QueryAgents.model_rebuild()
QueryAgentsAgents.model_rebuild()
QueryAgentsAgentsResults.model_rebuild()
QueryAgentsAgentsResultsFilter.model_rebuild()
