package com.yihu.hos.arbiter.models;

import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * @created Airhead 2016/7/27.
 */
@Document
public class Endpoint {
    @Id
    private String id;
    private String name;
    private String endpoint;
    @Indexed(name = "updateTime_1", expireAfterSeconds = 30)
    private Date updateTime;
    private String event;
    private Integer healthCheckType;
    private String healthCheckURL;
    private Integer metricsType;
    private String metricsURL;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEndpoint() {
        return endpoint;
    }

    public void setEndpoint(String endpoint) {
        this.endpoint = endpoint;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getEvent() {
        return event;
    }

    public void setEvent(String event) {
        this.event = event;
    }

    public Integer getHealthCheckType() {
        return healthCheckType;
    }

    public void setHealthCheckType(Integer healthCheckType) {
        this.healthCheckType = healthCheckType;
    }

    public String getHealthCheckURL() {
        return healthCheckURL;
    }

    public void setHealthCheckURL(String healthCheckURL) {
        this.healthCheckURL = healthCheckURL;
    }

    public Integer getMetricsType() {
        return metricsType;
    }

    public void setMetricsType(Integer metricsType) {
        this.metricsType = metricsType;
    }

    public String getMetricsURL() {
        return metricsURL;
    }

    public void setMetricsURL(String metricsURL) {
        this.metricsURL = metricsURL;
    }
}
