package com.bocloud.nms.model.hillstone;

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

// 应用本
public class ApplicationBookModel extends HillStoneGenericModel {
    private Long vendorId; // 所属平台
    private String props; // 原生平台id
    private Integer appType; // 预留区分 0 -> 应用、 1 -> 组、 2 -> 过滤组
    private Integer type; // 0->自定义 2->预定义
    private String name;
    private String showName; // 页面显示名称
    private String category; // 类别
    private String subCategory; // 子类别
    private Integer tcpTimeout; // TCP 前端天换算成秒 如何标识？ 1-65535 默认1800
    private Integer udpTimeout; // UDP 默认60
    private Integer icmpTimeout; // ICMP 默认6
    private Integer otherProtocolTimeout; // 其他 默认60
    private Integer risk; // 风险等级 新建0
    private String technology; // 所用技术
    /**
     * 应用组字段
     */
    private Integer flag;
    private List<ApplicationBookModel> members; // 组内成员
    private String standardPort; // 常规端口
    private String evasive; // 易逃逸 自下新建全是none
    private String excessiveBandwidth; // 大量消耗带宽
    private String proneToMisuse; // 易被滥用
    private String fileTransfer; // 能够传输文件
    private String tunnelsOtherApps; // 被其他应用使用
    private String userByMalware; // 被恶意软件利用
    private String vulnerabilities; // 存在已知漏洞
    private String widelyUsed; // 已被大规模使用
    private String refers; // 右下角关联项 flag 1->安全策略； 7->策略路由； 0->组

    public Long getVendorId() {
        return vendorId;
    }

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

    public String getProps() {
        return props;
    }

    public void setProps(String props) {
        this.props = props;
    }

    public Integer getType() {
        return type;
    }

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

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getShowName() {
        return showName;
    }

    public void setShowName(String showName) {
        this.showName = showName;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getSubCategory() {
        return subCategory;
    }

    public void setSubCategory(String subCategory) {
        this.subCategory = subCategory;
    }

    public Integer getTcpTimeout() {
        return tcpTimeout;
    }

    public void setTcpTimeout(Integer tcpTimeout) {
        this.tcpTimeout = tcpTimeout;
    }

    public Integer getUdpTimeout() {
        return udpTimeout;
    }

    public void setUdpTimeout(Integer udpTimeout) {
        this.udpTimeout = udpTimeout;
    }

    public Integer getIcmpTimeout() {
        return icmpTimeout;
    }

    public void setIcmpTimeout(Integer icmpTimeout) {
        this.icmpTimeout = icmpTimeout;
    }

    public Integer getOtherProtocolTimeout() {
        return otherProtocolTimeout;
    }

    public void setOtherProtocolTimeout(Integer otherProtocolTimeout) {
        this.otherProtocolTimeout = otherProtocolTimeout;
    }

    public Integer getRisk() {
        return risk;
    }

    public void setRisk(Integer risk) {
        this.risk = risk;
    }

    public String getTechnology() {
        return technology;
    }

    public void setTechnology(String technology) {
        this.technology = technology;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    public List<ApplicationBookModel> getMembers() {
        return members;
    }

    public void setMembers(List<ApplicationBookModel> members) {
        this.members = members;
    }

    public String getStandardPort() {
        return standardPort;
    }

    public void setStandardPort(String standardPort) {
        this.standardPort = standardPort;
    }

    public String getEvasive() {
        return evasive;
    }

    public void setEvasive(String evasive) {
        this.evasive = evasive;
    }

    public String getExcessiveBandwidth() {
        return excessiveBandwidth;
    }

    public void setExcessiveBandwidth(String excessiveBandwidth) {
        this.excessiveBandwidth = excessiveBandwidth;
    }

    public String getProneToMisuse() {
        return proneToMisuse;
    }

    public void setProneToMisuse(String proneToMisuse) {
        this.proneToMisuse = proneToMisuse;
    }

    public String getFileTransfer() {
        return fileTransfer;
    }

    public void setFileTransfer(String fileTransfer) {
        this.fileTransfer = fileTransfer;
    }

    public String getTunnelsOtherApps() {
        return tunnelsOtherApps;
    }

    public void setTunnelsOtherApps(String tunnelsOtherApps) {
        this.tunnelsOtherApps = tunnelsOtherApps;
    }

    public String getUserByMalware() {
        return userByMalware;
    }

    public void setUserByMalware(String userByMalware) {
        this.userByMalware = userByMalware;
    }

    public String getVulnerabilities() {
        return vulnerabilities;
    }

    public void setVulnerabilities(String vulnerabilities) {
        this.vulnerabilities = vulnerabilities;
    }

    public String getWidelyUsed() {
        return widelyUsed;
    }

    public void setWidelyUsed(String widelyUsed) {
        this.widelyUsed = widelyUsed;
    }

    public Integer getAppType() {
        return appType;
    }

    public void setAppType(Integer appType) {
        this.appType = appType;
    }

    public String getRefers() {
        return refers;
    }

    public void setRefers(String refers) {
        this.refers = refers;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ApplicationBookModel that = (ApplicationBookModel) o;
        return Objects.equals(props, that.props) && Objects.equals(name, that.name) && Objects.equals(appType, that.appType);
    }

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