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

from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel
from .enums import InterfaceStateEnum


class Interfaces(BaseModel):
    interfaces_elastic: Optional["InterfacesInterfacesElastic"] = Field(
        alias="interfacesElastic"
    )


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


class InterfacesInterfacesElasticResults(BaseModel):
    id: str
    created_at: Optional[Any] = Field(alias="createdAt")
    updated_at: Optional[Any] = Field(alias="updatedAt")
    name: Optional[str]
    description: Optional[str]
    state: Optional[InterfaceStateEnum]
    facts: Optional[Any]
    current_configuration: Optional[str] = Field(alias="currentConfiguration")
    interface: Optional["InterfacesInterfacesElasticResultsInterface"]
    device: Optional["InterfacesInterfacesElasticResultsDevice"]
    checks: Optional[Any]
    client_count: Optional[int] = Field(alias="clientCount")


class InterfacesInterfacesElasticResultsInterface(BaseModel):
    id: str


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


Interfaces.model_rebuild()
InterfacesInterfacesElastic.model_rebuild()
InterfacesInterfacesElasticResults.model_rebuild()
