package com.bocloud.nms.model.hillstone;

import java.util.Objects;

// 源NAT
public class VirtualRouteSourceNatModel extends HillStoneGenericModel {
    private Long virtualRouteId; // 所属虚拟路由器id
    private String virtualRouteName; // 所属虚拟路由器
    private Long ruleId; // natId
    private Integer groupId; // ha组
    private String fromName; // 源地址
    private Integer fromType; // 源地址类型：0 地址条目 1 IP地址或IP掩码
    private String toName; // 目的地址
    private Integer toType; // 目的地址类型：0 地址条目 1 IP地址或IP掩码
    private Long serviceId; // 服务id
    private String service; // 服务
    /**
     * 地址转换类型：
     * 0 不转换
     * 1 指定IP--静态
     * 2 指定IP--动态
     * 4 指定IP--动态端口--sticky不启用，track不启用
     * 12 指定IP--动态端口--sticky启用，track不启用
     * 140 指定IP--动态端口--sticky启用，track启用
     * 132 指定IP--动态端口--sticky不启用，track启用
     * 20 出接口IP--sticky不启用
     * 28 出接口IP--sticky启用
     */
    private Integer flag;
    private String trans; // 转换类型为指定IP时，转换地址
    private Integer transType; // 转换类型为指定IP时，转换地址类型：0 地址条目 1 IP地址或IP掩码
    private Integer pos; // 列表位置对标id
    private Integer posFlag; // 列表位置，1->列表最前；2->该ID之前；3->该ID之后；4->列表最后
    private Integer log; // NAT日志：0 -> 不开启; 1 -> 开启;
    private String description; // 描述
    private Boolean enable; // 可用/禁用

    public Long getVirtualRouteId() {
        return virtualRouteId;
    }

    public void setVirtualRouteId(Long virtualRouteId) {
        this.virtualRouteId = virtualRouteId;
    }

    public String getVirtualRouteName() {
        return virtualRouteName;
    }

    public void setVirtualRouteName(String virtualRouteName) {
        this.virtualRouteName = virtualRouteName;
    }

    public Long getRuleId() {
        return ruleId;
    }

    public void setRuleId(Long ruleId) {
        this.ruleId = ruleId;
    }

    public Integer getGroupId() {
        return groupId;
    }

    public void setGroupId(Integer groupId) {
        this.groupId = groupId;
    }

    public String getFromName() {
        return fromName;
    }

    public void setFromName(String fromName) {
        this.fromName = fromName;
    }

    public Integer getFromType() {
        return fromType;
    }

    public void setFromType(Integer fromType) {
        this.fromType = fromType;
    }

    public Integer getToType() {
        return toType;
    }

    public void setToType(Integer toType) {
        this.toType = toType;
    }

    public Long getServiceId() {
        return serviceId;
    }

    public void setServiceId(Long serviceId) {
        this.serviceId = serviceId;
    }

    public String getTrans() {
        return trans;
    }

    public void setTrans(String trans) {
        this.trans = trans;
    }

    public Integer getTransType() {
        return transType;
    }

    public void setTransType(Integer transType) {
        this.transType = transType;
    }

    public String getToName() {
        return toName;
    }

    public void setToName(String toName) {
        this.toName = toName;
    }

    public String getService() {
        return service;
    }

    public void setService(String service) {
        this.service = service;
    }

    public Integer getFlag() {
        return flag;
    }

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

    public Integer getPos() {
        return pos;
    }

    public void setPos(Integer pos) {
        this.pos = pos;
    }

    public Integer getPosFlag() {
        return posFlag;
    }

    public void setPosFlag(Integer posFlag) {
        this.posFlag = posFlag;
    }

    public Integer getLog() {
        return log;
    }

    public void setLog(Integer log) {
        this.log = log;
    }

    public String getDescription() {
        return description;
    }

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

    public Boolean getEnable() {
        return enable;
    }

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

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

    @Override
    public int hashCode() {
        return Objects.hash(virtualRouteId, ruleId);
    }
}
