de.aipark.api.occupancy.Occupancy Maven / Gradle / Ivy
package de.aipark.api.occupancy;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.sql.Timestamp;
/**
* Created by torgen on 24.09.17.
*/
public class Occupancy implements Serializable {
@ApiModelProperty(value = "id of parking area", dataType = "java.lang.Long", required = true, example = "504838")
public long pId;
@ApiModelProperty(value = "occupancy time", dataType = "java.lang.Long", required = true, example = "1476561575000")
public Timestamp time;
@ApiModelProperty(value = "percentage probability (value between 0 and 100) for at least one open parking spot if type is P (predicted) or number of open parking spots if type is L (live number of open parking spots) or LP (predicted number of open parking spots)", required = true, example = "80")
public float value;
@ApiModelProperty(value = "P for predicted, L for live data (number of open parking spots), LP for predicted live data (number of open parking spots), U for unknown, C for closed parking area", required = true, example = "P")
public OccupancyType type;
public Occupancy() {
}
public Occupancy(long pId, Timestamp time, float value, OccupancyType type) {
this.pId = pId;
this.time = time;
this.value = value;
this.type = type;
}
public long getpId() {
return pId;
}
public void setpId(long pId) {
this.pId = pId;
}
public Timestamp getTime() {
return time;
}
public void setTime(Timestamp time) {
this.time = time;
}
public float getValue() {
return value;
}
public void setValue(float value) {
this.value = value;
}
public OccupancyType getType() {
return type;
}
public void setType(OccupancyType type) {
this.type = type;
}
@Override
public String toString() {
return "Occupancy{" +
"pId=" + pId +
", time=" + time +
", value=" + value +
", type=" + type +
'}';
}
}