Shared WS
This commit is contained in:
@@ -10,6 +10,7 @@ class Workspace extends SerializerDeserializer<Workspace> {
|
||||
List<StorageItem> storages;
|
||||
List<ProcessingItem> processings;
|
||||
List<WorkflowItem> workflows;
|
||||
String? shared;
|
||||
|
||||
Workspace({
|
||||
this.id,
|
||||
@@ -20,13 +21,16 @@ class Workspace extends SerializerDeserializer<Workspace> {
|
||||
this.datacenters = const [],
|
||||
this.storages = const [],
|
||||
this.processings = const [],
|
||||
this.shared,
|
||||
});
|
||||
|
||||
@override deserialize(dynamic json) {
|
||||
try { json = json as Map<String, dynamic>;
|
||||
} catch (e) { return Workspace(); }
|
||||
print(json);
|
||||
return Workspace(
|
||||
id: json.containsKey("id") ? json["id"] : null,
|
||||
shared: json["shared"],
|
||||
name: json.containsKey("name") ? json["name"] : null,
|
||||
active: json.containsKey("active") ? json["active"] : false,
|
||||
processings: json.containsKey("processing_resources") ? fromListJson(json["processing_resources"], ProcessingItem()) : [],
|
||||
|
||||
Reference in New Issue
Block a user