Add "Assignment", "Task" and "Error" classes.

springify_project
Lampros Smyrnaios 3 years ago
parent c6e12d3e95
commit 89c6a73a30

@ -0,0 +1,52 @@
package eu.openaire.urls_controller.models;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Date;
import java.util.List;
public class Assignment {
@JsonProperty("tasks")
List<Task> tasks;
@JsonProperty("workerId")
String workerId;
@JsonProperty("date")
Date date;
public List<Task> getTasks() {
return tasks;
}
public void setTasks(List<Task> tasks) {
this.tasks = tasks;
}
public String getWorkerId() {
return workerId;
}
public void setWorkerId(String workerId) {
this.workerId = workerId;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
@Override
public String toString() {
return "Assignment{" +
"tasks=" + tasks +
", workerId='" + workerId + '\'' +
", date=" + date +
'}';
}
}

@ -0,0 +1,36 @@
package eu.openaire.urls_controller.models;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Error {
@JsonProperty("type")
String type;
@JsonProperty("message")
String message;
public String getType() {
return type;
}
public void setType(String type) {
type = type;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
@Override
public String toString() {
return "Error{" +
"type='" + type + '\'' +
", message='" + message + '\'' +
'}';
}
}

@ -0,0 +1,36 @@
package eu.openaire.urls_controller.models;
import com.fasterxml.jackson.annotation.JsonProperty;
public class Task {
@JsonProperty("id")
String id;
@JsonProperty("url")
String url;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@Override
public String toString() {
return "Task{" +
"id='" + id + '\'' +
", url='" + url + '\'' +
'}';
}
}
Loading…
Cancel
Save