/**
 * <p>Copyright:Copyright(c) 2017</p>
 * <p>Company:上海中信信息发展股份有限公司</p>
 * <p>包名:com.cesgroup.cesmonitor.bean</p>
 * <p>文件名:ResourceAlarmInfo.java</p>
 * <p>创建时间:2017年5月23日 下午2:38:39</p>
 * <p>作者:Administrator</p>
 */

package com.cesgroup.cesmonitor.bean;

import java.util.List;

/**
 *
 * @author cloud
 * @version 1.0.0 2017年5月23日
 */
public class ResourceAlarmInfo implements Comparable<ResourceAlarmInfo> {

    /**
     * 时间eventid
     */
    private String eventid;

    /**
     * 主机
     */
    private String host;

    /**
     * 问题描述信息
     */
    private String description;

    /**
     * 事件发生信息
     */
    private List<EventInfo> eventMsg;

    /**
     * 等级
     */
    private String priority;

    /**
     * 事件发生的时间
     */
    private Long startClock;

    /**
     * 是否被确认
     */
    private int acknowledged;

    /**
     * 信息
     */
    private String messages;

    /**
     * 动作
     */
    private Integer action;

    /**
     * 报警次数
     */
    private Integer alertTime;

    /**
     * 状态
     */
    private Integer status;

    /**
     * events表中的objectid
     */
    private Integer objectid;

    /**
     * 触发器变更时间
     */
    private Long endClock;

    /**
     * 历时
     */
    private String subClock;

    public Integer getObjectid() {
        return objectid;
    }

    public void setObjectid(Integer objectid) {
        this.objectid = objectid;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public String getSubClock() {
        return subClock;
    }

    public void setSubClock(String subClock) {
        this.subClock = subClock;
    }

    public String getMessages() {
        return messages;
    }

    public void setMessages(String messages) {
        this.messages = messages;
    }

    public int getAcknowledged() {
        return acknowledged;
    }

    public void setAcknowledged(int acknowledged) {
        this.acknowledged = acknowledged;
    }

    public Integer getAction() {
        return action;
    }

    public void setAction(Integer action) {
        this.action = action;
    }

    public Integer getAlertTime() {
        return alertTime;
    }

    public void setAlertTime(Integer alertTime) {
        this.alertTime = alertTime;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * @return the description
     */
    public String getDescription() {
        return description;

    }

    /**
     * @param description
     *            the description to set
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * @return the eventid
     */
    public String getEventid() {
        return eventid;
    }

    /**
     * @param eventid
     *            the eventid to set
     */
    public void setEventid(String eventid) {
        this.eventid = eventid;
    }

    /**
     * @return the priority
     */
    public String getPriority() {
        return priority;
    }

    /**
     * @param priority
     *            the priority to set
     */
    public void setPriority(String priority) {
        this.priority = priority;
    }

    /**
     * @return the endClock
     */
    public Long getEndClock() {
        return endClock;
    }

    /**
     * @param endClock
     *            the endClock to set
     */
    public void setEndClock(Long endClock) {
        this.endClock = endClock;
    }

    /**
     * @return the startClock
     */
    public Long getStartClock() {
        return startClock;
    }

    /**
     * @param startClock
     *            the startClock to set
     */
    public void setStartClock(Long startClock) {
        this.startClock = startClock;
    }

    /**
     * @return the eventMsg
     */
    public List<EventInfo> getEventMsg() {
        return eventMsg;
    }

    /**
     * @param eventMsg
     *            the eventMsg to set
     */
    public void setEventMsg(List<EventInfo> eventMsg) {
        this.eventMsg = eventMsg;
    }

    /**
     *
     * @see java.lang.Comparable#compareTo(java.lang.Object)
     */
    @Override
    public int compareTo(ResourceAlarmInfo p) {
        if (this == p) {
            return 0;
        } else if (p != null && p instanceof ResourceAlarmInfo) {
            ResourceAlarmInfo pd = p;
            if (this.startClock > pd.startClock) {
                return -1;
            } else if (this.startClock < pd.startClock) {
                return 1;
            } else {
                return 0;
            }
        } else {
            return -1;
        }
    }
}
