package com.usky.rule.vo;

import com.fasterxml.jackson.annotation.JsonProperty;

public class Condition {
    @JsonProperty("itemCode")
    private String itemCode;
    @JsonProperty("itemName")
    private String itemName;
    @JsonProperty("identifier")
    private String identifier;
    @JsonProperty("name")
    private String name;
    @JsonProperty("value")
    private String value;
    @JsonProperty("condition")
    private String condition;
    @JsonProperty("timeRange")
    private TimeRange timeRange;
    @JsonProperty("expression")
    private Expression expression;
    @JsonProperty("operator")
    private String operator;

    public Condition() {
    }

    public String getItemCode() {
        return this.itemCode;
    }

    public String getItemName() {
        return this.itemName;
    }

    public String getIdentifier() {
        return this.identifier;
    }

    public String getName() {
        return this.name;
    }

    public String getValue() {
        return this.value;
    }

    public String getCondition() {
        return this.condition;
    }

    public TimeRange getTimeRange() {
        return this.timeRange;
    }

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

    public String getOperator() {
        return this.operator;
    }

    @JsonProperty("itemCode")
    public void setItemCode(final String itemCode) {
        this.itemCode = itemCode;
    }

    @JsonProperty("itemName")
    public void setItemName(final String itemName) {
        this.itemName = itemName;
    }

    @JsonProperty("identifier")
    public void setIdentifier(final String identifier) {
        this.identifier = identifier;
    }

    @JsonProperty("name")
    public void setName(final String name) {
        this.name = name;
    }

    @JsonProperty("value")
    public void setValue(final String value) {
        this.value = value;
    }

    @JsonProperty("condition")
    public void setCondition(final String condition) {
        this.condition = condition;
    }

    @JsonProperty("timeRange")
    public void setTimeRange(final TimeRange timeRange) {
        this.timeRange = timeRange;
    }

    @JsonProperty("expression")
    public void setExpression(final Expression expression) {
        this.expression = expression;
    }

    @JsonProperty("operator")
    public void setOperator(final String operator) {
        this.operator = operator;
    }

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

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

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

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

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

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

                Object this$timeRange = this.getTimeRange();
                Object other$timeRange = other.getTimeRange();
                if (this$timeRange == null) {
                    if (other$timeRange != null) {
                        return false;
                    }
                } else if (!this$timeRange.equals(other$timeRange)) {
                    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$operator = this.getOperator();
                Object other$operator = other.getOperator();
                if (this$operator == null) {
                    if (other$operator != null) {
                        return false;
                    }
                } else if (!this$operator.equals(other$operator)) {
                    return false;
                }

                return true;
            }
        }
    }

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

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        Object $itemCode = this.getItemCode();
        result = result * 59 + ($itemCode == null ? 43 : $itemCode.hashCode());
        Object $itemName = this.getItemName();
        result = result * 59 + ($itemName == null ? 43 : $itemName.hashCode());
        Object $identifier = this.getIdentifier();
        result = result * 59 + ($identifier == null ? 43 : $identifier.hashCode());
        Object $name = this.getName();
        result = result * 59 + ($name == null ? 43 : $name.hashCode());
        Object $value = this.getValue();
        result = result * 59 + ($value == null ? 43 : $value.hashCode());
        Object $condition = this.getCondition();
        result = result * 59 + ($condition == null ? 43 : $condition.hashCode());
        Object $timeRange = this.getTimeRange();
        result = result * 59 + ($timeRange == null ? 43 : $timeRange.hashCode());
        Object $expression = this.getExpression();
        result = result * 59 + ($expression == null ? 43 : $expression.hashCode());
        Object $operator = this.getOperator();
        result = result * 59 + ($operator == null ? 43 : $operator.hashCode());
        return result;
    }

    public String toString() {
        return "Condition(itemCode=" + this.getItemCode() + ", itemName=" + this.getItemName() + ", identifier=" + this.getIdentifier() + ", name=" + this.getName() + ", value=" + this.getValue() + ", condition=" + this.getCondition() + ", timeRange=" + this.getTimeRange() + ", expression=" + this.getExpression() + ", operator=" + this.getOperator() + ")";
    }
}
