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

from datetime import datetime
from typing import Any, List, Optional
from uuid import UUID

from .base_model import BaseModel
from .enums import ModuleInstanceStatus, ModuleInstanceTarget


class ModuleInstancesFull(BaseModel):
    me: "ModuleInstancesFullMe"


class ModuleInstancesFullMe(BaseModel):
    account: "ModuleInstancesFullMeAccount"


class ModuleInstancesFullMeAccount(BaseModel):
    module_instances: "ModuleInstancesFullMeAccountModuleInstances"


class ModuleInstancesFullMeAccountModuleInstances(BaseModel):
    nodes: List["ModuleInstancesFullMeAccountModuleInstancesNodes"]


class ModuleInstancesFullMeAccountModuleInstancesNodes(BaseModel):
    id: UUID
    created_at: datetime
    deleted_at: Optional[datetime]
    account_id: UUID
    path: str
    ins: List["ModuleInstancesFullMeAccountModuleInstancesNodesIns"]
    outs: List["ModuleInstancesFullMeAccountModuleInstancesNodesOuts"]
    queued_at: Optional[datetime]
    admitted_at: Optional[datetime]
    dispatched_at: Optional[datetime]
    completed_at: Optional[datetime]
    status: ModuleInstanceStatus
    target: ModuleInstanceTarget
    resources: Optional["ModuleInstancesFullMeAccountModuleInstancesNodesResources"]
    progress: Optional["ModuleInstancesFullMeAccountModuleInstancesNodesProgress"]
    tags: Optional[List[str]]


class ModuleInstancesFullMeAccountModuleInstancesNodesIns(BaseModel):
    id: UUID
    created_at: datetime
    deleted_at: Optional[datetime]
    rejected_at: Optional[datetime]
    account_id: UUID
    typeinfo: Any
    value: Optional[Any]
    tags: Optional[List[str]]


class ModuleInstancesFullMeAccountModuleInstancesNodesOuts(BaseModel):
    id: UUID
    created_at: datetime
    deleted_at: Optional[datetime]
    rejected_at: Optional[datetime]
    account_id: UUID
    typeinfo: Any
    value: Optional[Any]
    tags: Optional[List[str]]


class ModuleInstancesFullMeAccountModuleInstancesNodesResources(BaseModel):
    gpus: Optional[int]
    nodes: Optional[int]
    mem: Optional[int]
    storage: Optional[int]
    walltime: Optional[int]


class ModuleInstancesFullMeAccountModuleInstancesNodesProgress(BaseModel):
    n: int
    n_expected: int
    n_max: int
    done: bool


ModuleInstancesFull.model_rebuild()
ModuleInstancesFullMe.model_rebuild()
ModuleInstancesFullMeAccount.model_rebuild()
ModuleInstancesFullMeAccountModuleInstances.model_rebuild()
ModuleInstancesFullMeAccountModuleInstancesNodes.model_rebuild()
ModuleInstancesFullMeAccountModuleInstancesNodesIns.model_rebuild()
ModuleInstancesFullMeAccountModuleInstancesNodesOuts.model_rebuild()
ModuleInstancesFullMeAccountModuleInstancesNodesResources.model_rebuild()
ModuleInstancesFullMeAccountModuleInstancesNodesProgress.model_rebuild()
