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

from typing import List, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import ExecutionResultStateEnum, RunOnEnum


class DeviceGroupResult(BaseModel):
    group_result: Optional["DeviceGroupResultGroupResult"] = Field(alias="groupResult")


class DeviceGroupResultGroupResult(BaseModel):
    results: Optional[List[Optional["DeviceGroupResultGroupResultResults"]]]


class DeviceGroupResultGroupResultResults(BaseModel):
    id: str
    state: Optional[ExecutionResultStateEnum]
    message: Optional[str]
    granularity: Optional[int]
    neops_task: Optional["DeviceGroupResultGroupResultResultsNeopsTask"] = Field(
        alias="neopsTask"
    )
    group: Optional["DeviceGroupResultGroupResultResultsGroup"]
    execution: Optional["DeviceGroupResultGroupResultResultsExecution"]


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


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


class DeviceGroupResultGroupResultResultsExecution(BaseModel):
    id: str
    run_on: Optional[RunOnEnum] = Field(alias="runOn")
