package com.bocloud.nms.model.hillstone;

import java.util.Objects;

// 源NAT
public class VirtualRouteDestinationNatModel extends HillStoneGenericModel {
    private Long virtualRouteId; // 所属虚拟路由器id
    private String virtualRouteName; // 所属虚拟路由器名称
    private Long ruleId; // natId
    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; // 服务
    private String trans; // 转换类型为指定IP时，转换地址
    private Integer transType; // 转换类型为指定IP时，转换地址类型：null 不转换 0 地址条目 1 IP地址或IP掩码，SLB服务器池因为没有数据无法测试
    private Integer port; // 转换端口，1-65535，为null则表示不启用转换端口
    private Boolean loadBalance; // 负载均衡，取值为flag&1>0
    private Integer groupId; // ha组
    private String description; // 描述
    private Boolean pingTrack; // PING跟踪，取值为flag&2>0
    private Boolean tcpTrack; // TCP跟踪，取值为flag&4>0
    private Integer tcpTrackPort; // TCP跟踪端口
    private Boolean log; // NAT日志
    private Integer pos; // 列表位置对标id
    private Integer posFlag; // 列表位置，1->列表最前；2->该ID之前；3->该ID之后；4->列表最后
    private Boolean enable; // 启用/禁用

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

    public String getVirtualRouteName() {
        return virtualRouteName;
    }

    public Long getVirtualRouteId() {
        return virtualRouteId;
    }

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

    public Long getRuleId() {
        return ruleId;
    }

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

    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 String getToName() {
        return toName;
    }

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

    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 getService() {
        return service;
    }

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

    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 Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public Boolean getLoadBalance() {
        return loadBalance;
    }

    public void setLoadBalance(Boolean loadBalance) {
        this.loadBalance = loadBalance;
    }

    public Integer getGroupId() {
        return groupId;
    }

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

    public String getDescription() {
        return description;
    }

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

    public Boolean getPingTrack() {
        return pingTrack;
    }

    public void setPingTrack(Boolean pingTrack) {
        this.pingTrack = pingTrack;
    }

    public Boolean getTcpTrack() {
        return tcpTrack;
    }

    public void setTcpTrack(Boolean tcpTrack) {
        this.tcpTrack = tcpTrack;
    }

    public Integer getTcpTrackPort() {
        return tcpTrackPort;
    }

    public void setTcpTrackPort(Integer tcpTrackPort) {
        this.tcpTrackPort = tcpTrackPort;
    }

    public Boolean getLog() {
        return log;
    }

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

    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 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;
        }
        VirtualRouteDestinationNatModel that = (VirtualRouteDestinationNatModel) o;
        return Objects.equals(virtualRouteId, that.virtualRouteId) &&
            Objects.equals(ruleId, that.ruleId);
    }

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