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

from typing import List, Optional

from pydantic import Field

from .base_model import BaseModel


class AddRoleDeviceGroup(BaseModel):
    role_device_group_upsert: Optional["AddRoleDeviceGroupRoleDeviceGroupUpsert"] = (
        Field(alias="roleDeviceGroupUpsert")
    )


class AddRoleDeviceGroupRoleDeviceGroupUpsert(BaseModel):
    role_device_group: Optional[
        "AddRoleDeviceGroupRoleDeviceGroupUpsertRoleDeviceGroup"
    ] = Field(alias="roleDeviceGroup")


class AddRoleDeviceGroupRoleDeviceGroupUpsertRoleDeviceGroup(BaseModel):
    role: Optional["AddRoleDeviceGroupRoleDeviceGroupUpsertRoleDeviceGroupRole"]
    device_group: Optional[
        "AddRoleDeviceGroupRoleDeviceGroupUpsertRoleDeviceGroupDeviceGroup"
    ] = Field(alias="deviceGroup")


class AddRoleDeviceGroupRoleDeviceGroupUpsertRoleDeviceGroupRole(BaseModel):
    id: str
    users: Optional[
        List[
            Optional["AddRoleDeviceGroupRoleDeviceGroupUpsertRoleDeviceGroupRoleUsers"]
        ]
    ]


class AddRoleDeviceGroupRoleDeviceGroupUpsertRoleDeviceGroupRoleUsers(BaseModel):
    id: str
    username: Optional[str]


class AddRoleDeviceGroupRoleDeviceGroupUpsertRoleDeviceGroupDeviceGroup(BaseModel):
    id: str
    name: Optional[str]
    devices: Optional[
        List[
            Optional[
                "AddRoleDeviceGroupRoleDeviceGroupUpsertRoleDeviceGroupDeviceGroupDevices"
            ]
        ]
    ]


class AddRoleDeviceGroupRoleDeviceGroupUpsertRoleDeviceGroupDeviceGroupDevices(
    BaseModel
):
    hostname: Optional[str]


AddRoleDeviceGroup.model_rebuild()
AddRoleDeviceGroupRoleDeviceGroupUpsert.model_rebuild()
AddRoleDeviceGroupRoleDeviceGroupUpsertRoleDeviceGroup.model_rebuild()
AddRoleDeviceGroupRoleDeviceGroupUpsertRoleDeviceGroupRole.model_rebuild()
AddRoleDeviceGroupRoleDeviceGroupUpsertRoleDeviceGroupDeviceGroup.model_rebuild()
