package com.bocloud.nms.model.hillstone;

import java.util.Objects;

// IP黑名单
public class BlackIpModel extends HillStoneGenericModel {
    private Long vendorId; // 所属平台
    private Long virtualRouterId; // 所属虚拟路由器id
    private String virtualRouter; // 所属虚拟路由器
    private String ip; // ip地址
    private Integer age; // 剩余阻断时长，该字段会随着时间变化而变化，60-3600秒
    private String reason; // 加入原因： Manual 手工加入 其他可取值暂时未知

    public Long getVendorId() {
        return vendorId;
    }

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

    public Long getVirtualRouterId() {
        return virtualRouterId;
    }

    public void setVirtualRouterId(Long virtualRouterId) {
        this.virtualRouterId = virtualRouterId;
    }

    public String getVirtualRouter() {
        return virtualRouter;
    }

    public void setVirtualRouter(String virtualRouter) {
        this.virtualRouter = virtualRouter;
    }

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        BlackIpModel blackIp = (BlackIpModel) o;
        return Objects.equals(virtualRouterId, blackIp.virtualRouterId) &&
            Objects.equals(ip, blackIp.ip);
    }

    @Override
    public int hashCode() {
        return Objects.hash(virtualRouterId, ip);
    }
}
