package things; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; class CreationBody { private final String url; private final Resource.Type type; @JsonCreator public CreationBody(@JsonProperty("url") String url, @JsonProperty("type") Resource.Type type) { this.url = url; this.type = type; } public String getUrl() { return url; } public Resource.Type getType() { return type; } }