UrlsWorker/src/main/java/eu/openaire/urls_worker/models/Task.java

66 lines
1.3 KiB
Java
Raw Normal View History

2021-04-15 02:37:54 +02:00
package eu.openaire.urls_worker.models;
2021-04-24 20:08:02 +02:00
import com.fasterxml.jackson.annotation.JsonInclude;
2021-04-15 02:37:54 +02:00
import com.fasterxml.jackson.annotation.JsonProperty;
2021-04-24 20:08:02 +02:00
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
2021-04-15 02:37:54 +02:00
2021-04-24 20:08:02 +02:00
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"id",
"url",
"datasource"
2021-04-24 20:08:02 +02:00
})
2021-04-15 02:37:54 +02:00
public class Task {
@JsonProperty("id")
2021-04-24 20:08:02 +02:00
private String id;
2021-04-15 02:37:54 +02:00
@JsonProperty("url")
2021-04-24 20:08:02 +02:00
private String url;
2021-04-15 02:37:54 +02:00
@JsonProperty("datasource")
private Datasource datasource;
public Task() {}
public Task(String id, String url, Datasource datasource) {
this.id = id;
this.url = url;
this.datasource = datasource;
}
2021-04-15 02:37:54 +02:00
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;
}
public Datasource getDatasource() {
return datasource;
}
public void setDatasource(Datasource datasource) {
this.datasource = datasource;
}
2021-04-15 02:37:54 +02:00
@Override
public String toString() {
return "Task{" +
"id='" + id + '\'' +
", url='" + url + '\'' +
", datasource=" + datasource +
2021-04-15 02:37:54 +02:00
'}';
}
}