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

from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import RunOnEnum


class NeopsTasks(BaseModel):
    neops_tasks: Optional["NeopsTasksNeopsTasks"] = Field(alias="neopsTasks")


class NeopsTasksNeopsTasks(BaseModel):
    results: Optional[List[Optional["NeopsTasksNeopsTasksResults"]]]


class NeopsTasksNeopsTasksResults(BaseModel):
    id: str
    name: Optional[str]
    description: Optional[str]
    uniquetaskname: Optional[str]
    provider_identifier: Optional[str] = Field(alias="providerIdentifier")
    run_on: Optional[RunOnEnum] = Field(alias="runOn")
    run_on_strict: Optional[bool] = Field(alias="runOnStrict")
    is_check: Optional[bool] = Field(alias="isCheck")
    is_task: Optional[bool] = Field(alias="isTask")
    provider: Optional["NeopsTasksNeopsTasksResultsProvider"]
    task_kwargs: Optional[Any] = Field(alias="taskKwargs")
    task_run_input_schema: Optional[Any] = Field(alias="taskRunInputSchema")
    task_run_filter: Optional[str] = Field(alias="taskRunFilter")
    pre_run_tasks: Optional[
        List[Optional["NeopsTasksNeopsTasksResultsPreRunTasks"]]
    ] = Field(alias="preRunTasks")
    post_run_tasks: Optional[
        List[Optional["NeopsTasksNeopsTasksResultsPostRunTasks"]]
    ] = Field(alias="postRunTasks")
    created_at: Optional[Any] = Field(alias="createdAt")
    updated_at: Optional[Any] = Field(alias="updatedAt")
    permission: Optional[int]
    is_valid: Optional[bool] = Field(alias="isValid")
    is_valid_recursive: Optional[bool] = Field(alias="isValidRecursive")
    validity_information: Optional[str] = Field(alias="ValidityInformation")


class NeopsTasksNeopsTasksResultsProvider(BaseModel):
    name: Optional[str]
    json_schema: Optional[Any] = Field(alias="jsonSchema")
    short_description: Optional[str] = Field(alias="shortDescription")
    deprecated: Optional[bool]
    description: Optional[str]


class NeopsTasksNeopsTasksResultsPreRunTasks(BaseModel):
    id: str
    name: Optional[str]


class NeopsTasksNeopsTasksResultsPostRunTasks(BaseModel):
    id: str
    name: Optional[str]


NeopsTasks.model_rebuild()
NeopsTasksNeopsTasks.model_rebuild()
NeopsTasksNeopsTasksResults.model_rebuild()
