Add the "DownloadAttempt" class.

This commit is contained in:
Lampros Smyrnaios 2021-04-24 21:44:51 +03:00
parent a6ab810ad3
commit d3588ea36b
1 changed files with 83 additions and 0 deletions

View File

@ -0,0 +1,83 @@
package eu.openaire.urls_controller.models;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.Date;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"id",
"original_url",
"actual_url",
"date",
"status",
"error"
})
public class DownloadAttempt {
@JsonProperty("id")
private String id;
@JsonProperty("original_url")
private String original_url;
@JsonProperty("date")
private Date date;
@JsonProperty("status")
private String status;
@JsonProperty("error")
private Error error;
public DownloadAttempt(String id, String original_url, Date date, String status, Error error) {
this.id = id;
this.original_url = original_url;
this.date = date;
this.status = status;
this.error = error;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getOriginal_url() {
return original_url;
}
public void setOriginal_url(String original_url) {
this.original_url = original_url;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
public Error getError() {
return error;
}
public void setError(Error error) {
this.error = error;
}
}