package com.usky.rule.vo.trigger;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.usky.rule.vo.Condition;
import com.usky.rule.vo.visualization.SimpleVO;
import java.util.List;

public class SpaceTrigger  {
    @JsonProperty("method")
    private String method;
    @JsonProperty("conditions")
    private List<Condition> conditions;
    @JsonProperty("spaces")
    private List<SimpleVO> spaces;

    public SpaceTrigger() {
    }

    public String getMethod() {
        return this.method;
    }

    public List<Condition> getConditions() {
        return this.conditions;
    }

    public List<SimpleVO> getSpaces() {
        return this.spaces;
    }

    @JsonProperty("method")
    public void setMethod(final String method) {
        this.method = method;
    }

    @JsonProperty("conditions")
    public void setConditions(final List<Condition> conditions) {
        this.conditions = conditions;
    }

    @JsonProperty("spaces")
    public void setSpaces(final List<SimpleVO> spaces) {
        this.spaces = spaces;
    }

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

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

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

                return true;
            }
        }
    }

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

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        Object $method = this.getMethod();
        result = result * 59 + ($method == null ? 43 : $method.hashCode());
        Object $conditions = this.getConditions();
        result = result * 59 + ($conditions == null ? 43 : $conditions.hashCode());
        Object $spaces = this.getSpaces();
        result = result * 59 + ($spaces == null ? 43 : $spaces.hashCode());
        return result;
    }

    public String toString() {
        return "SpaceTrigger(method=" + this.getMethod() + ", conditions=" + this.getConditions() + ", spaces=" + this.getSpaces() + ")";
    }
}
