package com.bocloud.nms.model.hillstone;

import java.util.Objects;

// 策略路由规则--下一跳
public class PolicyRouteRuleNextHopModel extends HillStoneGenericModel {
    private Long policyRouteRuleId; // 所属策略路由规则id
    private Long intfId; // 接口id
    private String intf; // 接口
    private Long ip; // ip地址
    private Long trackId; // 检测对象id
    private String track; // 检测对象
    private Integer weight; // 路由权值,1-255,缺省1

    public Long getPolicyRouteRuleId() {
        return policyRouteRuleId;
    }

    public void setPolicyRouteRuleId(Long policyRouteRuleId) {
        this.policyRouteRuleId = policyRouteRuleId;
    }

    public Long getIntfId() {
        return intfId;
    }

    public void setIntfId(Long intfId) {
        this.intfId = intfId;
    }

    public String getIntf() {
        return intf;
    }

    public void setIntf(String intf) {
        this.intf = intf;
    }

    public Long getIp() {
        return ip;
    }

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

    public Long getTrackId() {
        return trackId;
    }

    public void setTrackId(Long trackId) {
        this.trackId = trackId;
    }

    public String getTrack() {
        return track;
    }

    public void setTrack(String track) {
        this.track = track;
    }

    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        PolicyRouteRuleNextHopModel hop = (PolicyRouteRuleNextHopModel) o;
        return Objects.equals(policyRouteRuleId, hop.policyRouteRuleId) &&
            Objects.equals(intfId, hop.intfId) &&
            Objects.equals(ip, hop.ip);
    }

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