Initial commit
This commit is contained in:
23
src/main/java/things/CreationBody.java
Normal file
23
src/main/java/things/CreationBody.java
Normal file
@@ -0,0 +1,23 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user