# 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 InterfaceResult(BaseModel):
    interface_result: Optional["InterfaceResultInterfaceResult"] = Field(
        alias="interfaceResult"
    )


class InterfaceResultInterfaceResult(BaseModel):
    results: Optional[List[Optional["InterfaceResultInterfaceResultResults"]]]


class InterfaceResultInterfaceResultResults(BaseModel):
    id: str
    state: Optional[ExecutionResultStateEnum]
    message: Optional[str]
    granularity: Optional[int]
    neops_task: Optional["InterfaceResultInterfaceResultResultsNeopsTask"] = Field(
        alias="neopsTask"
    )
    interface: Optional["InterfaceResultInterfaceResultResultsInterface"]
    execution: Optional["InterfaceResultInterfaceResultResultsExecution"]


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


class InterfaceResultInterfaceResultResultsInterface(BaseModel):
    id: str
    name: Optional[str]
    device: Optional["InterfaceResultInterfaceResultResultsInterfaceDevice"]


class InterfaceResultInterfaceResultResultsInterfaceDevice(BaseModel):
    id: str
    hostname: Optional[str]


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