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

from typing import Any, List, Optional

from pydantic import Field

from .base_model import BaseModel


class DeviceUpsert(BaseModel):
    device_upsert: Optional["DeviceUpsertDeviceUpsert"] = Field(alias="deviceUpsert")


class DeviceUpsertDeviceUpsert(BaseModel):
    device: Optional["DeviceUpsertDeviceUpsertDevice"]


class DeviceUpsertDeviceUpsertDevice(BaseModel):
    id: str
    hostname: Optional[str]
    connection_options: Optional[Any] = Field(alias="connectionOptions")
    ip: Optional[str]
    groups: Optional[List[Optional["DeviceUpsertDeviceUpsertDeviceGroups"]]]
    platform: Optional["DeviceUpsertDeviceUpsertDevicePlatform"]
    username: Optional[str]


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


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


DeviceUpsert.model_rebuild()
DeviceUpsertDeviceUpsert.model_rebuild()
DeviceUpsertDeviceUpsertDevice.model_rebuild()
