This commit is contained in:
mr
2024-11-08 13:59:22 +01:00
parent 685badc59a
commit 1ca77b6611
69 changed files with 1601 additions and 1337 deletions

View File

@@ -8,7 +8,7 @@ class Workspace extends SerializerDeserializer<Workspace> implements ShallowData
String? name;
bool? active;
List<DataItem> datas;
List<DataCenterItem> datacenters;
List<ComputeItem> computes;
List<StorageItem> storages;
List<ProcessingItem> processings;
List<WorkflowItem> workflows;
@@ -20,7 +20,7 @@ class Workspace extends SerializerDeserializer<Workspace> implements ShallowData
this.active = false,
this.workflows = const [],
this.datas = const [],
this.datacenters = const [],
this.computes = const [],
this.storages = const [],
this.processings = const [],
this.shared,
@@ -39,7 +39,7 @@ class Workspace extends SerializerDeserializer<Workspace> implements ShallowData
active: json.containsKey("active") ? json["active"] : false,
processings: json.containsKey("processing_resources") ? fromListJson(json["processing_resources"], ProcessingItem()) : [],
storages: json.containsKey("storage_resources") ? fromListJson(json["storage_resources"], StorageItem()) : [],
datacenters: json.containsKey("datacenter_resources") ? fromListJson(json["datacenter_resources"], DataCenterItem()) : [],
computes: json.containsKey("compute_resources") ? fromListJson(json["compute_resources"], ComputeItem()) : [],
datas: json.containsKey("data_resources") ? fromListJson(json["data_resources"], DataItem()) : [],
workflows: json.containsKey("workflow_resources") ? fromListJson(json["workflow_resources"], WorkflowItem()) : []
);
@@ -49,7 +49,7 @@ class Workspace extends SerializerDeserializer<Workspace> implements ShallowData
"name": name,
"processings": processings.map((e) => e.id).toList(),
"storages": storages.map((e) => e.id).toList(),
"datacenters": datacenters.map((e) => e.id).toList(),
"computes": computes.map((e) => e.id).toList(),
"datas": datas.map((e) => e.id).toList(),
"workflows": workflows.map((e) => e.id).toList(),
};