mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 23:46:22 -06:00
Add support for multiple available configurations via network and cloud
This commit is contained in:
parent
8d8f18d953
commit
3578afd4ac
5 changed files with 111 additions and 12 deletions
|
@ -0,0 +1,23 @@
|
|||
# Copyright (c) 2019 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
from typing import Union, Dict, Any, List
|
||||
|
||||
from ..BaseModel import BaseModel
|
||||
from .ClusterPrinterMaterialStationSlot import ClusterPrinterMaterialStationSlot
|
||||
|
||||
|
||||
## Class representing the data of a Material Station in the cluster.
|
||||
class ClusterPrinterMaterialStation(BaseModel):
|
||||
|
||||
## Creates a new Material Station status.
|
||||
# \param status: The status of the material station.
|
||||
# \param: supported: Whether the material station is supported on this machine or not.
|
||||
# \param material_slots: The active slots configurations of this material station.
|
||||
def __init__(self, status: str, supported: bool = False,
|
||||
material_slots: Union[None, Dict[str, Any], ClusterPrinterMaterialStationSlot] = None,
|
||||
**kwargs) -> None:
|
||||
self.status = status
|
||||
self.supported = supported
|
||||
self.material_slots = self.parseModels(ClusterPrinterMaterialStationSlot, material_slots)\
|
||||
if material_slots else [] # type: List[ClusterPrinterMaterialStationSlot]
|
||||
super().__init__(**kwargs)
|
Loading…
Add table
Add a link
Reference in a new issue