com.aliyun.datahub.client.model.MetricRecord Maven / Gradle / Ivy
The newest version!
package com.aliyun.datahub.client.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Map;
public class MetricRecord {
@JsonProperty("Datum")
private Map datum;
@JsonProperty("Timestamp")
private long timestamp;
@JsonProperty("TimeInterval")
private long timeInterval;
public double getMetricValue(MetricType type) {
Double result = datum.get(type.getTitle());
return result == null ? 0 : result;
}
public Map getDatum() {
return datum;
}
public void setDatum(Map datum) {
this.datum = datum;
}
public long getTimestamp() {
return timestamp;
}
public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
public long getTimeInterval() {
return timeInterval;
}
public void setTimeInterval(long timeInterval) {
this.timeInterval = timeInterval;
}
}