All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hisp.dhis.rules.models.AutoValue_RuleEffect Maven / Gradle / Ivy


package org.hisp.dhis.rules.models;

import javax.annotation.Generated;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 final class AutoValue_RuleEffect extends RuleEffect {

  private final String ruleId;
  private final RuleAction ruleAction;
  private final String data;

  AutoValue_RuleEffect(
      @Nullable String ruleId,
      RuleAction ruleAction,
      @Nullable String data) {
    this.ruleId = ruleId;
    if (ruleAction == null) {
      throw new NullPointerException("Null ruleAction");
    }
    this.ruleAction = ruleAction;
    this.data = data;
  }

  @Nullable
  @Override
  public String ruleId() {
    return ruleId;
  }

  @Nonnull
  @Override
  public RuleAction ruleAction() {
    return ruleAction;
  }

  @Nullable
  @Override
  public String data() {
    return data;
  }

  @Override
  public String toString() {
    return "RuleEffect{"
        + "ruleId=" + ruleId + ", "
        + "ruleAction=" + ruleAction + ", "
        + "data=" + data
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof RuleEffect) {
      RuleEffect that = (RuleEffect) o;
      return ((this.ruleId == null) ? (that.ruleId() == null) : this.ruleId.equals(that.ruleId()))
           && (this.ruleAction.equals(that.ruleAction()))
           && ((this.data == null) ? (that.data() == null) : this.data.equals(that.data()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= (ruleId == null) ? 0 : this.ruleId.hashCode();
    h *= 1000003;
    h ^= this.ruleAction.hashCode();
    h *= 1000003;
    h ^= (data == null) ? 0 : this.data.hashCode();
    return h;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy