package com.bocloud.nms.model.hillstone;

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

// 服务本
public class ServiceBookModel extends HillStoneGenericModel {
    private Long vendorId; // 所属平台
    private String name; // 名称
    private String description; // 描述
    /**
     * protocol; // 协议，6 tcp，17 udp
     * srcPortMin; // 源端口起始
     * srcPortMax; // 源端口结束
     * desPortMin; // 目的端口起始
     * desPortMax; // 目的端口结束
     */
    private String tcpUdps; // tcp 和 udp，格式：JSON
    /**
     * type; // 类型，可取值：3 4 5 8 11 12 13 15
     * min; // 最小码，1-5
     * max; // 最大码，1-5
     */
    private String icmps; // icmp，格式：JSON
    private String others; // 其他协议号，格式：多个数据英文逗号隔开


    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 String getTcpUdps() {
        return tcpUdps;
    }

    public void setTcpUdps(String tcpUdps) {
        this.tcpUdps = tcpUdps;
    }

    public String getIcmps() {
        return icmps;
    }

    public void setIcmps(String icmps) {
        this.icmps = icmps;
    }

    public String getOthers() {
        return others;
    }

    public void setOthers(String others) {
        this.others = others;
    }

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

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