package com.bocloud.nms.model.hillstone;

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

// 安全域
public class SafeZoneModel extends HillStoneGenericModel {
    private Long vendorId; // 所属平台
    private String name; // 名称
    private String description; // 描述
    private Integer type; // 类型：1 二层安全域 0 三层安全域 2 tap安全域
    private Long virtualSwitchId; // 虚拟交换机id--二层安全域
    private String virtualSwitch; // 虚拟交换机--二层安全域
    private Long virtualRouterId; // 虚拟路由器--三层安全域和tap安全域
    private String virtualRouter; // 虚拟路由器--三层安全域和tap安全域
    private List<Long> interfaceIds;//绑定接口的ids
    private Boolean ident; // 应用识别
    private Boolean wan; // WAN安全域
    private Boolean nbt; // NBT缓存
    private Boolean synProxy; // 开启SYN代理
    private Integer syncMinRate; // 最小代理速率
    private Integer syncMaxRate; // 最大代理速率
    private Integer syncTimeout; // 代理超时，秒
    private Boolean synCookie; // SYN代理--cookie
    private Boolean tfEnable; // 启用边界流量过滤
    private Boolean tfCap; // 边界流量过滤--抓包
    private Integer tfUser; // 边界流量过滤--自定义，0关闭 1 丢弃 2 记录日志
    private Integer tfPre; // 边界流量过滤--预定义，0关闭 1 丢弃 2 记录日志
    private Integer tfTrend; // 边界流量过滤--TDA，0关闭 1 丢弃 2 记录日志
    private List<SafeZoneRuleModel> rules; // 攻击防护
    private List<SafeZoneWhiteModel> whites; // 白名单
    private Integer interfaceCount; // 接口数
    private Integer policyCount; // 接口数

    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 String getDescription() {
        return description;
    }

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

    public Integer getType() {
        return type;
    }

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

    public Long getVirtualSwitchId() {
        return virtualSwitchId;
    }

    public void setVirtualSwitchId(Long virtualSwitchId) {
        this.virtualSwitchId = virtualSwitchId;
    }

    public String getVirtualSwitch() {
        return virtualSwitch;
    }

    public void setVirtualSwitch(String virtualSwitch) {
        this.virtualSwitch = virtualSwitch;
    }

    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 List<Long> getInterfaceIds() {
        return interfaceIds;
    }

    public void setInterfaceIds(List<Long> interfaceIds) {
        this.interfaceIds = interfaceIds;
    }

    public Boolean getIdent() {
        return ident;
    }

    public void setIdent(Boolean ident) {
        this.ident = ident;
    }

    public Boolean getWan() {
        return wan;
    }

    public void setWan(Boolean wan) {
        this.wan = wan;
    }

    public Boolean getNbt() {
        return nbt;
    }

    public void setNbt(Boolean nbt) {
        this.nbt = nbt;
    }

    public Boolean getSynProxy() {
        return synProxy;
    }

    public void setSynProxy(Boolean synProxy) {
        this.synProxy = synProxy;
    }

    public Integer getSyncMinRate() {
        return syncMinRate;
    }

    public void setSyncMinRate(Integer syncMinRate) {
        this.syncMinRate = syncMinRate;
    }

    public Integer getSyncMaxRate() {
        return syncMaxRate;
    }

    public void setSyncMaxRate(Integer syncMaxRate) {
        this.syncMaxRate = syncMaxRate;
    }

    public Integer getSyncTimeout() {
        return syncTimeout;
    }

    public void setSyncTimeout(Integer syncTimeout) {
        this.syncTimeout = syncTimeout;
    }

    public Boolean getSynCookie() {
        return synCookie;
    }

    public void setSynCookie(Boolean synCookie) {
        this.synCookie = synCookie;
    }

    public Boolean getTfEnable() {
        return tfEnable;
    }

    public void setTfEnable(Boolean tfEnable) {
        this.tfEnable = tfEnable;
    }

    public Boolean getTfCap() {
        return tfCap;
    }

    public void setTfCap(Boolean tfCap) {
        this.tfCap = tfCap;
    }

    public Integer getTfUser() {
        return tfUser;
    }

    public void setTfUser(Integer tfUser) {
        this.tfUser = tfUser;
    }

    public Integer getTfPre() {
        return tfPre;
    }

    public void setTfPre(Integer tfPre) {
        this.tfPre = tfPre;
    }

    public Integer getTfTrend() {
        return tfTrend;
    }

    public void setTfTrend(Integer tfTrend) {
        this.tfTrend = tfTrend;
    }

    public List<SafeZoneRuleModel> getRules() {
        return rules;
    }

    public void setRules(List<SafeZoneRuleModel> rules) {
        this.rules = rules;
    }

    public List<SafeZoneWhiteModel> getWhites() {
        return whites;
    }

    public void setWhites(List<SafeZoneWhiteModel> whites) {
        this.whites = whites;
    }

    public Integer getInterfaceCount() {
        return interfaceCount;
    }

    public void setInterfaceCount(Integer interfaceCount) {
        this.interfaceCount = interfaceCount;
    }

    public Integer getPolicyCount() {
        return policyCount;
    }

    public void setPolicyCount(Integer policyCount) {
        this.policyCount = policyCount;
    }

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

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