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

from typing import Any, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import ExecutionStateEnum, ExecutionTypeEnum, ProviderTypeEnum


class ExecutionSubscription(BaseModel):
    execution_subscription: Optional["ExecutionSubscriptionExecutionSubscription"] = (
        Field(alias="executionSubscription")
    )


class ExecutionSubscriptionExecutionSubscription(BaseModel):
    execution: Optional["ExecutionSubscriptionExecutionSubscriptionExecution"]


class ExecutionSubscriptionExecutionSubscriptionExecution(BaseModel):
    id: str
    task_id: Optional[str] = Field(alias="taskId")
    name: Optional[str]
    created_at: Optional[Any] = Field(alias="createdAt")
    updated_at: Optional[Any] = Field(alias="updatedAt")
    state: Optional[ExecutionStateEnum]
    execution_type: Optional[ExecutionTypeEnum] = Field(alias="executionType")
    args: Optional[Any]
    do: Optional[str]
    done: Optional[str]
    log: Optional[str]
    process: Optional["ExecutionSubscriptionExecutionSubscriptionExecutionProcess"]
    neops_task: Optional[
        "ExecutionSubscriptionExecutionSubscriptionExecutionNeopsTask"
    ] = Field(alias="neopsTask")


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


class ExecutionSubscriptionExecutionSubscriptionExecutionNeopsTask(BaseModel):
    id: str
    name: Optional[str]
    description: Optional[str]
    provider: Optional[
        "ExecutionSubscriptionExecutionSubscriptionExecutionNeopsTaskProvider"
    ]


class ExecutionSubscriptionExecutionSubscriptionExecutionNeopsTaskProvider(BaseModel):
    provider_type: Optional[ProviderTypeEnum] = Field(alias="providerType")


ExecutionSubscription.model_rebuild()
ExecutionSubscriptionExecutionSubscription.model_rebuild()
ExecutionSubscriptionExecutionSubscriptionExecution.model_rebuild()
ExecutionSubscriptionExecutionSubscriptionExecutionNeopsTask.model_rebuild()
