mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -06:00
Restructure codebase - part 1
This commit is contained in:
parent
87517a77c2
commit
3c1b377308
46 changed files with 898 additions and 1725 deletions
15
plugins/UM3NetworkPrinting/src/Models/ClusterMaterial.py
Normal file
15
plugins/UM3NetworkPrinting/src/Models/ClusterMaterial.py
Normal file
|
@ -0,0 +1,15 @@
|
|||
## Class representing a material that was fetched from the cluster API.
|
||||
from plugins.UM3NetworkPrinting.src.Models.BaseModel import BaseModel
|
||||
|
||||
|
||||
class ClusterMaterial(BaseModel):
|
||||
def __init__(self, guid: str, version: int, **kwargs) -> None:
|
||||
self.guid = guid # type: str
|
||||
self.version = version # type: int
|
||||
super().__init__(**kwargs)
|
||||
|
||||
def validate(self) -> None:
|
||||
if not self.guid:
|
||||
raise ValueError("guid is required on ClusterMaterial")
|
||||
if not self.version:
|
||||
raise ValueError("version is required on ClusterMaterial")
|
Loading…
Add table
Add a link
Reference in a new issue