package com.usky.rule.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;

@ApiModel
public class RuleEngineConditionVO implements Serializable {
    private static final long serialVersionUID = 596657710877126137L;
    @ApiModelProperty("自增ID")
    private Long id;
    @ApiModelProperty("条件")
    private String optionalCondition;
    @ApiModelProperty("条件表达式")
    private String expression;
    @ApiModelProperty("条件描述")
    private String descr;
    @ApiModelProperty("类型 1：触发条件 2：约束条件")
    private Short type;
    @ApiModelProperty("更新人")
    private Long updatedBy;
    @ApiModelProperty("记录更新时间")
    private String updateTime;
    @ApiModelProperty("创建人")
    private Long createdBy;
    @ApiModelProperty("记录创建时间")
    private String createTime;

    public static RuleEngineConditionVOBuilder builder() {
        return new RuleEngineConditionVOBuilder();
    }

    public Long getId() {
        return this.id;
    }

    public String getOptionalCondition() {
        return this.optionalCondition;
    }

    public String getExpression() {
        return this.expression;
    }

    public String getDescr() {
        return this.descr;
    }

    public Short getType() {
        return this.type;
    }

    public Long getUpdatedBy() {
        return this.updatedBy;
    }

    public String getUpdateTime() {
        return this.updateTime;
    }

    public Long getCreatedBy() {
        return this.createdBy;
    }

    public String getCreateTime() {
        return this.createTime;
    }

    public void setId(final Long id) {
        this.id = id;
    }

    public void setOptionalCondition(final String optionalCondition) {
        this.optionalCondition = optionalCondition;
    }

    public void setExpression(final String expression) {
        this.expression = expression;
    }

    public void setDescr(final String descr) {
        this.descr = descr;
    }

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

    public void setUpdatedBy(final Long updatedBy) {
        this.updatedBy = updatedBy;
    }

    public void setUpdateTime(final String updateTime) {
        this.updateTime = updateTime;
    }

    public void setCreatedBy(final Long createdBy) {
        this.createdBy = createdBy;
    }

    public void setCreateTime(final String createTime) {
        this.createTime = createTime;
    }

    public boolean equals(final Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof RuleEngineConditionVO)) {
            return false;
        } else {
            RuleEngineConditionVO other = (RuleEngineConditionVO)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                Object this$id = this.getId();
                Object other$id = other.getId();
                if (this$id == null) {
                    if (other$id != null) {
                        return false;
                    }
                } else if (!this$id.equals(other$id)) {
                    return false;
                }

                Object this$type = this.getType();
                Object other$type = other.getType();
                if (this$type == null) {
                    if (other$type != null) {
                        return false;
                    }
                } else if (!this$type.equals(other$type)) {
                    return false;
                }

                Object this$updatedBy = this.getUpdatedBy();
                Object other$updatedBy = other.getUpdatedBy();
                if (this$updatedBy == null) {
                    if (other$updatedBy != null) {
                        return false;
                    }
                } else if (!this$updatedBy.equals(other$updatedBy)) {
                    return false;
                }

                Object this$createdBy = this.getCreatedBy();
                Object other$createdBy = other.getCreatedBy();
                if (this$createdBy == null) {
                    if (other$createdBy != null) {
                        return false;
                    }
                } else if (!this$createdBy.equals(other$createdBy)) {
                    return false;
                }

                Object this$optionalCondition = this.getOptionalCondition();
                Object other$optionalCondition = other.getOptionalCondition();
                if (this$optionalCondition == null) {
                    if (other$optionalCondition != null) {
                        return false;
                    }
                } else if (!this$optionalCondition.equals(other$optionalCondition)) {
                    return false;
                }

                Object this$expression = this.getExpression();
                Object other$expression = other.getExpression();
                if (this$expression == null) {
                    if (other$expression != null) {
                        return false;
                    }
                } else if (!this$expression.equals(other$expression)) {
                    return false;
                }

                Object this$descr = this.getDescr();
                Object other$descr = other.getDescr();
                if (this$descr == null) {
                    if (other$descr != null) {
                        return false;
                    }
                } else if (!this$descr.equals(other$descr)) {
                    return false;
                }

                Object this$updateTime = this.getUpdateTime();
                Object other$updateTime = other.getUpdateTime();
                if (this$updateTime == null) {
                    if (other$updateTime != null) {
                        return false;
                    }
                } else if (!this$updateTime.equals(other$updateTime)) {
                    return false;
                }

                Object this$createTime = this.getCreateTime();
                Object other$createTime = other.getCreateTime();
                if (this$createTime == null) {
                    if (other$createTime != null) {
                        return false;
                    }
                } else if (!this$createTime.equals(other$createTime)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(final Object other) {
        return other instanceof RuleEngineConditionVO;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        Object $id = this.getId();
        result = result * 59 + ($id == null ? 43 : $id.hashCode());
        Object $type = this.getType();
        result = result * 59 + ($type == null ? 43 : $type.hashCode());
        Object $updatedBy = this.getUpdatedBy();
        result = result * 59 + ($updatedBy == null ? 43 : $updatedBy.hashCode());
        Object $createdBy = this.getCreatedBy();
        result = result * 59 + ($createdBy == null ? 43 : $createdBy.hashCode());
        Object $optionalCondition = this.getOptionalCondition();
        result = result * 59 + ($optionalCondition == null ? 43 : $optionalCondition.hashCode());
        Object $expression = this.getExpression();
        result = result * 59 + ($expression == null ? 43 : $expression.hashCode());
        Object $descr = this.getDescr();
        result = result * 59 + ($descr == null ? 43 : $descr.hashCode());
        Object $updateTime = this.getUpdateTime();
        result = result * 59 + ($updateTime == null ? 43 : $updateTime.hashCode());
        Object $createTime = this.getCreateTime();
        result = result * 59 + ($createTime == null ? 43 : $createTime.hashCode());
        return result;
    }

    public String toString() {
        return "RuleEngineConditionVO(id=" + this.getId() + ", optionalCondition=" + this.getOptionalCondition() + ", expression=" + this.getExpression() + ", descr=" + this.getDescr() + ", type=" + this.getType() + ", updatedBy=" + this.getUpdatedBy() + ", updateTime=" + this.getUpdateTime() + ", createdBy=" + this.getCreatedBy() + ", createTime=" + this.getCreateTime() + ")";
    }

    public RuleEngineConditionVO(final Long id, final String optionalCondition, final String expression, final String descr, final Short type, final Long updatedBy, final String updateTime, final Long createdBy, final String createTime) {
        this.id = id;
        this.optionalCondition = optionalCondition;
        this.expression = expression;
        this.descr = descr;
        this.type = type;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.createdBy = createdBy;
        this.createTime = createTime;
    }

    public RuleEngineConditionVO() {
    }

    public static class RuleEngineConditionVOBuilder {
        private Long id;
        private String optionalCondition;
        private String expression;
        private String descr;
        private Short type;
        private Long updatedBy;
        private String updateTime;
        private Long createdBy;
        private String createTime;

        RuleEngineConditionVOBuilder() {
        }

        public RuleEngineConditionVOBuilder id(final Long id) {
            this.id = id;
            return this;
        }

        public RuleEngineConditionVOBuilder optionalCondition(final String optionalCondition) {
            this.optionalCondition = optionalCondition;
            return this;
        }

        public RuleEngineConditionVOBuilder expression(final String expression) {
            this.expression = expression;
            return this;
        }

        public RuleEngineConditionVOBuilder descr(final String descr) {
            this.descr = descr;
            return this;
        }

        public RuleEngineConditionVOBuilder type(final Short type) {
            this.type = type;
            return this;
        }

        public RuleEngineConditionVOBuilder updatedBy(final Long updatedBy) {
            this.updatedBy = updatedBy;
            return this;
        }

        public RuleEngineConditionVOBuilder updateTime(final String updateTime) {
            this.updateTime = updateTime;
            return this;
        }

        public RuleEngineConditionVOBuilder createdBy(final Long createdBy) {
            this.createdBy = createdBy;
            return this;
        }

        public RuleEngineConditionVOBuilder createTime(final String createTime) {
            this.createTime = createTime;
            return this;
        }

        public RuleEngineConditionVO build() {
            return new RuleEngineConditionVO(this.id, this.optionalCondition, this.expression, this.descr, this.type, this.updatedBy, this.updateTime, this.createdBy, this.createTime);
        }

        public String toString() {
            return "RuleEngineConditionVO.RuleEngineConditionVOBuilder(id=" + this.id + ", optionalCondition=" + this.optionalCondition + ", expression=" + this.expression + ", descr=" + this.descr + ", type=" + this.type + ", updatedBy=" + this.updatedBy + ", updateTime=" + this.updateTime + ", createdBy=" + this.createdBy + ", createTime=" + this.createTime + ")";
        }
    }
}
