public static Resource createResource(JSONObject data) throws JSONException {
		switch (convertType(data.getString("type"))) {
		case Pool:
			return new net.elbandi.pve2api.data.resource.Pool(data);
		case VmQemu:
			return new net.elbandi.pve2api.data.resource.Vm(data);
		case Node:
			return new net.elbandi.pve2api.data.resource.Node(data);
		case Storage:
			return new net.elbandi.pve2api.data.resource.Storage(data);
		default:
			return new Resource(data);
		}
	}