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

from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import CheckResultEnum


class Clients(BaseModel):
    clients_elastic: Optional["ClientsClientsElastic"] = Field(alias="clientsElastic")


class ClientsClientsElastic(BaseModel):
    total_count: Optional[int] = Field(alias="totalCount")
    results: Optional[List[Optional["ClientsClientsElasticResults"]]]


class ClientsClientsElasticResults(BaseModel):
    id: str
    created_at: Optional[Any] = Field(alias="createdAt")
    updated_at: Optional[Any] = Field(alias="updatedAt")
    fromimport: Optional[bool]
    lastdiscovered: Optional[Any]
    macaddress: Optional[str]
    facts: Optional[Any]
    interface: Optional["ClientsClientsElasticResultsInterface"]
    location: Optional["ClientsClientsElasticResultsLocation"]
    checks: Optional[Any]
    check_elements: Optional[
        List[Optional["ClientsClientsElasticResultsCheckElements"]]
    ] = Field(alias="checkElements")


class ClientsClientsElasticResultsInterface(BaseModel):
    id: str
    name: Optional[str]
    device: Optional["ClientsClientsElasticResultsInterfaceDevice"]


class ClientsClientsElasticResultsInterfaceDevice(BaseModel):
    id: str
    hostname: Optional[str]
    ip: Optional[str]


class ClientsClientsElasticResultsLocation(BaseModel):
    id: str
    name: Optional[str]
    address: Optional[str]
    city: Optional[str]
    country: Optional[str]
    lat: Optional[float]
    lon: Optional[float]


class ClientsClientsElasticResultsCheckElements(BaseModel):
    id: str
    key: Optional[str]
    reason: Optional[str]
    result: Optional[CheckResultEnum]
    metrics: Optional[Any]
    neops_task: Optional["ClientsClientsElasticResultsCheckElementsNeopsTask"] = Field(
        alias="neopsTask"
    )


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