package pl.itcrowd.youtrack.api.defaults; import pl.itcrowd.youtrack.api.Commander; public enum Fields implements Commander { assignee, issueId("issue id"), state, created("created"), description, numberInProject(null), projectShortName("project"), reporterName("reporter"), resolved("resolved date"), summary, updated, updaterName("updated by"); private String command; private Fields() { command = name(); } private Fields(String command) { this.command = command; } public String getCommand() { if (command == null) { throw new UnsupportedOperationException("There is no command for field: " + name()); } return command; } }