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 DeviceTrigger {
    @JsonProperty("productId")
    private Long productId;
    @JsonProperty("method")
    private String method;
    @JsonProperty("conditions")
    private List<Condition> conditions;
    @JsonProperty("devices")
    private List<SimpleVO> devices;

    public DeviceTrigger() {
    }

    public Long getProductId() {
        return this.productId;
    }

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

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

    public List<SimpleVO> getDevices() {
        return this.devices;
    }

    @JsonProperty("productId")
    public void setProductId(final Long productId) {
        this.productId = productId;
    }

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

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

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

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

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

                return true;
            }
        }
    }

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

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        Object $productId = this.getProductId();
        result = result * 59 + ($productId == null ? 43 : $productId.hashCode());
        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 $devices = this.getDevices();
        result = result * 59 + ($devices == null ? 43 : $devices.hashCode());
        return result;
    }

    public String toString() {
        return "DeviceTrigger(productId=" + this.getProductId() + ", method=" + this.getMethod() + ", conditions=" + this.getConditions() + ", devices=" + this.getDevices() + ")";
    }
}
