package com.bocloud.nms.model.hillstone;

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

// 策略路由规则
public class PolicyRouteRuleModel extends HillStoneGenericModel {
    private Long policyRouteId; // 所属策略路由id
    private String policyRouteName; // 策略路由名称
    private Long childId; // 规则ID
    private Boolean enable; // 0->禁用；1->启用
    private String description; // 描述
    private List<RelationModel> srcAddrs; // 源地址
    private List<RelationModel> userGroups; // 源用户组
    private List<RelationModel> users; // 源用户
    private List<RelationModel> dstAddrs; // 目的地址
    private List<RelationModel> services; // 服务/服务组
    private List<RelationModel> applications; // 应用/应用组/应用过滤组
    private List<RelationModel> workTimes; // 时间表
    private List<PolicyRouteRuleNextHopModel> nextHops; // 下一跳

    public Long getPolicyRouteId() {
        return policyRouteId;
    }

    public void setPolicyRouteId(Long policyRouteId) {
        this.policyRouteId = policyRouteId;
    }

    public Long getChildId() {
        return childId;
    }

    public void setChildId(Long childId) {
        this.childId = childId;
    }

    public String getPolicyRouteName() {
        return policyRouteName;
    }

    public void setPolicyRouteName(String policyRouteName) {
        this.policyRouteName = policyRouteName;
    }

    public Boolean getEnable() {
        return enable;
    }

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

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public List<RelationModel> getSrcAddrs() {
        return srcAddrs;
    }

    public void setSrcAddrs(List<RelationModel> srcAddrs) {
        this.srcAddrs = srcAddrs;
    }

    public List<RelationModel> getUserGroups() {
        return userGroups;
    }

    public void setUserGroups(List<RelationModel> userGroups) {
        this.userGroups = userGroups;
    }

    public List<RelationModel> getUsers() {
        return users;
    }

    public void setUsers(List<RelationModel> users) {
        this.users = users;
    }

    public List<RelationModel> getDstAddrs() {
        return dstAddrs;
    }

    public void setDstAddrs(List<RelationModel> dstAddrs) {
        this.dstAddrs = dstAddrs;
    }

    public List<RelationModel> getServices() {
        return services;
    }

    public void setServices(List<RelationModel> services) {
        this.services = services;
    }

    public List<RelationModel> getApplications() {
        return applications;
    }

    public void setApplications(List<RelationModel> applications) {
        this.applications = applications;
    }

    public List<RelationModel> getWorkTimes() {
        return workTimes;
    }

    public void setWorkTimes(List<RelationModel> workTimes) {
        this.workTimes = workTimes;
    }

    public List<PolicyRouteRuleNextHopModel> getNextHops() {
        return nextHops;
    }

    public void setNextHops(List<PolicyRouteRuleNextHopModel> nextHops) {
        this.nextHops = nextHops;
    }

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

    @Override
    public int hashCode() {
        return Objects.hash(policyRouteId, childId);
    }
}
