package com.bocloud.nms.model.hillstone;

import java.util.Objects;

// 安全域--白名单
public class SafeZoneWhiteModel extends HillStoneGenericModel {
    private Long safeZoneId; // 所属安全域id
    private String safeZone; // 所属安全域
    private Integer type; // 类型，1 IP掩码 2 地址条目（地址本）
    private Long ip; // IP地址
    private Long mask; // 子网掩码
    private Long addressBookId; // 地址条目名称id
    private String addressBook; // 地址条目名称

    public Long getSafeZoneId() {
        return safeZoneId;
    }

    public void setSafeZoneId(Long safeZoneId) {
        this.safeZoneId = safeZoneId;
    }

    public String getSafeZone() {
        return safeZone;
    }

    public void setSafeZone(String safeZone) {
        this.safeZone = safeZone;
    }

    public Integer getType() {
        return type;
    }

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

    public Long getIp() {
        return ip;
    }

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

    public Long getMask() {
        return mask;
    }

    public void setMask(Long mask) {
        this.mask = mask;
    }

    public Long getAddressBookId() {
        return addressBookId;
    }

    public void setAddressBookId(Long addressBookId) {
        this.addressBookId = addressBookId;
    }

    public String getAddressBook() {
        return addressBook;
    }

    public void setAddressBook(String addressBook) {
        this.addressBook = addressBook;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        SafeZoneWhiteModel white = (SafeZoneWhiteModel) o;
        return Objects.equals(safeZoneId, white.safeZoneId) &&
            Objects.equals(type, white.type) &&
            Objects.equals(ip, white.ip) &&
            Objects.equals(mask, white.mask) &&
            Objects.equals(addressBookId, white.addressBookId);
    }

    @Override
    public int hashCode() {
        return Objects.hash(safeZoneId, type, ip, mask, addressBookId);
    }
}
