package com.bocloud.nms.model.hillstone;

import java.util.List;
import java.util.Objects;

// 监控对象
public class MonitorBookModel extends HillStoneGenericModel {
    private Long vendorId; // 所属平台
    private String name; // 名称
    private String type; // 类型 0 接口 1 HTTP/Ping/ARP/DNS/TCP
    private Integer threshold; // 警戒值，默认255
    private List<MonitorBookIpAddrModel> ipAddrs; // 检测类型为HTTP/Ping/ARP/DNS/TCP时的检测成员
    private List<MonitorBookInterfaceModel> interfaces; // 检测类型为接口时的检测成员

    public Long getVendorId() {
        return vendorId;
    }

    public void setVendorId(Long vendorId) {
        this.vendorId = vendorId;
    }

    public String getName() {
        return name;
    }

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

    public Integer getThreshold() {
        return threshold;
    }

    public void setThreshold(Integer threshold) {
        this.threshold = threshold;
    }

    public List<MonitorBookIpAddrModel> getIpAddrs() {
        return ipAddrs;
    }

    public void setIpAddrs(List<MonitorBookIpAddrModel> ipAddrs) {
        this.ipAddrs = ipAddrs;
    }

    public List<MonitorBookInterfaceModel> getInterfaces() {
        return interfaces;
    }

    public void setInterfaces(List<MonitorBookInterfaceModel> interfaces) {
        this.interfaces = interfaces;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        MonitorBookModel book = (MonitorBookModel) o;
        return Objects.equals(vendorId, book.vendorId) &&
            Objects.equals(name, book.name);
    }

    @Override
    public int hashCode() {
        return Objects.hash(vendorId, name);
    }
}
