package com.bocloud.nms.model.hillstone;

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

// RIP
public class VirtualRouteRipModel extends HillStoneGenericModel {
    private Long virtualRouteId; // 所属虚拟路由器id
    private String virtualRouteName; // 所属虚拟路由器
    private Integer version; // 版本 v1 /v2
    private Integer enable; // 启用/禁用
    private Integer defaultMetric; // 缺省度量 1（1-15）
    private Integer defaultDistance; // 缺省距离 120（1-255）
    private Boolean defaultInfo; //缺省信息发布：0->未开启；1->开启
    private Integer intervalSecond; // 更新时间,(0~16777215)秒,缺省值:30
    private Integer invalid; // 无效时间,(0~16777215)秒,缺省值:180
    private Integer holddown; // 阻止时间,(0~16777215)秒,缺省值:180
    private Integer flush; // 清除时间,(0~16777215)秒,缺省值:240
    /**
     * protocol; // 协议， connected->直连、static->静态、ospf->OSPF、isis->ISIS、bgp->BGP
     * metric; // 度量，(1~15),缺省值:1
     */
    private String redistributes; // 引入路由
    private List<RelationModel> passiveInterfaces; // 被动接口
    private String neighbors; // 邻居，数据格式：1.1.1.1,2.2.2.2
    private String networks; // 网络，数据格式：1.1.1.1/24,2.2.2.2/24
    /**
     * ip; // IP地址
     * mask; // 掩码
     * distance; // 距离
     */
    private String distances; // 距离

    public Long getVirtualRouteId() {
        return virtualRouteId;
    }

    public void setVirtualRouteId(Long virtualRouteId) {
        this.virtualRouteId = virtualRouteId;
    }

    public String getVirtualRouteName() {
        return virtualRouteName;
    }

    public void setVirtualRouteName(String virtualRouteName) {
        this.virtualRouteName = virtualRouteName;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    public Integer getEnable() {
        return enable;
    }

    public void setEnable(Integer enable) {
        this.enable = enable;
    }

    public Integer getDefaultMetric() {
        return defaultMetric;
    }

    public void setDefaultMetric(Integer defaultMetric) {
        this.defaultMetric = defaultMetric;
    }

    public Integer getDefaultDistance() {
        return defaultDistance;
    }

    public void setDefaultDistance(Integer defaultDistance) {
        this.defaultDistance = defaultDistance;
    }

    public Boolean getDefaultInfo() {
        return defaultInfo;
    }

    public void setDefaultInfo(Boolean defaultInfo) {
        this.defaultInfo = defaultInfo;
    }

    public Integer getIntervalSecond() {
        return intervalSecond;
    }

    public void setIntervalSecond(Integer intervalSecond) {
        this.intervalSecond = intervalSecond;
    }

    public Integer getInvalid() {
        return invalid;
    }

    public void setInvalid(Integer invalid) {
        this.invalid = invalid;
    }

    public Integer getHolddown() {
        return holddown;
    }

    public void setHolddown(Integer holddown) {
        this.holddown = holddown;
    }

    public Integer getFlush() {
        return flush;
    }

    public void setFlush(Integer flush) {
        this.flush = flush;
    }

    public String getRedistributes() {
        return redistributes;
    }

    public void setRedistributes(String redistributes) {
        this.redistributes = redistributes;
    }

    public List<RelationModel> getPassiveInterfaces() {
        return passiveInterfaces;
    }

    public void setPassiveInterfaces(List<RelationModel> passiveInterfaces) {
        this.passiveInterfaces = passiveInterfaces;
    }

    public String getNeighbors() {
        return neighbors;
    }

    public void setNeighbors(String neighbors) {
        this.neighbors = neighbors;
    }

    public String getNetworks() {
        return networks;
    }

    public void setNetworks(String networks) {
        this.networks = networks;
    }

    public String getDistances() {
        return distances;
    }

    public void setDistances(String distances) {
        this.distances = distances;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        VirtualRouteRipModel that = (VirtualRouteRipModel) o;
        return Objects.equals(virtualRouteId, that.virtualRouteId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(virtualRouteId);
    }
}
