TaskState () { final String status = (String)myResponse.get("status"); return switch (status) { case "IN_PROGRESS" -> TaskState.IN_PROGRESS; case "CONFIRMED" -> TaskState.OPEN; case "UNCONFIRMED" -> TaskState.SUBMITTED; case "RESOLVED" -> TaskState.RESOLVED; default -> TaskState.OTHER; }; }