fromJson method
Implementation
@override
T fromJson(JsonMap json) {
return switch (T) {
WebsocketPermissionKeys => WebsocketPermissionKeys.fromJson(json) as T,
ControlPermissionKeys => ControlPermissionKeys.fromJson(json) as T,
UserPermissionKeys => UserPermissionKeys.fromJson(json) as T,
FilePermissionKeys => FilePermissionKeys.fromJson(json) as T,
BackupPermissionKeys => BackupPermissionKeys.fromJson(json) as T,
AllocationPermissionKeys => AllocationPermissionKeys.fromJson(json) as T,
StartupPermissionKeys => StartupPermissionKeys.fromJson(json) as T,
DatabasePermissionKeys => DatabasePermissionKeys.fromJson(json) as T,
SchedulePermissionKeys => SchedulePermissionKeys.fromJson(json) as T,
SettingsPermissionKeys => SettingsPermissionKeys.fromJson(json) as T,
_ => throw Exception('Unknown permission type $T in PermissionsModel'),
};
}