package net.northking.cctp.device.util.prometheus;

import java.util.HashMap;
import java.util.Map;

public class    PrometheusRequest {
    private String query;
    //jobName
    private String job;
    //instance实例
    private String instance;
    //查询开始时间戳
    private Long start;
    //查询结束时间戳
    private Long end;
    //间隔时间
    private Long step;
    //时间
    private Long time;

    public String getQuery() {
        return query;
    }

    public void setQuery(String query) {
        this.query = query;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public String getInstance() {
        return instance;
    }

    public void setInstance(String instance) {
        this.instance = instance;
    }

    public Long getStart() {
        return start;
    }

    public void setStart(Long start) {
        this.start = start;
    }

    public Long getEnd() {
        return end;
    }

    public void setEnd(Long end) {
        this.end = end;
    }

    public Long getStep() {
        return step;
    }

    public void setStep(Long step) {
        this.step = step;
    }

    public Long getTime() {
        return time;
    }

    public void setTime(Long time) {
        this.time = time;
    }

    public Map<String, Object> toMap() {
        Map<String, Object> valueMap = new HashMap();
        if (this.query != null) {
            valueMap.put("query", this.query);
        }

        if (this.job != null) {
            valueMap.put("job", this.job);
        }

        if (this.instance != null) {
            valueMap.put("instance", this.instance);
        }

        if (this.start != null) {
            valueMap.put("start", this.start);
        }

        if (this.end != null) {
            valueMap.put("end", this.end);
        }

        if (this.step != null) {
            valueMap.put("step", this.step);
        }

        if (this.time != null) {
            valueMap.put("time", this.time);
        }

        return valueMap;
    }

}
