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

from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import ConnectionStateEnum


class Devices(BaseModel):
    devices_elastic: Optional["DevicesDevicesElastic"] = Field(alias="devicesElastic")


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


class DevicesDevicesElasticResults(BaseModel):
    id: str
    created_at: Optional[Any] = Field(alias="createdAt")
    updated_at: Optional[Any] = Field(alias="updatedAt")
    hostname: Optional[str]
    ip: Optional[str]
    connection_state: Optional[ConnectionStateEnum] = Field(alias="connectionState")
    facts: Optional[Any]
    software_release: Optional[str] = Field(alias="softwareRelease")
    platform: Optional["DevicesDevicesElasticResultsPlatform"]
    vendor: Optional[str]
    model: Optional[str]
    serial: Optional[str]
    username: Optional[str]
    current_configuration: Optional[str] = Field(alias="currentConfiguration")
    groups: Optional[List[Optional["DevicesDevicesElasticResultsGroups"]]]
    checks: Optional[Any]
    group_count: Optional[int] = Field(alias="groupCount")
    interface_count: Optional[int] = Field(alias="interfaceCount")


class DevicesDevicesElasticResultsPlatform(BaseModel):
    id: str
    name: Optional[str]
    short_name: Optional[str] = Field(alias="shortName")


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


Devices.model_rebuild()
DevicesDevicesElastic.model_rebuild()
DevicesDevicesElasticResults.model_rebuild()
