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

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


package org.hisp.dhis.rules.models;

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

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

  private final String name;
  private final String dataElement;
  private final RuleValueType dataElementType;

  AutoValue_RuleVariableCurrentEvent(
      String name,
      String dataElement,
      RuleValueType dataElementType) {
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    if (dataElement == null) {
      throw new NullPointerException("Null dataElement");
    }
    this.dataElement = dataElement;
    if (dataElementType == null) {
      throw new NullPointerException("Null dataElementType");
    }
    this.dataElementType = dataElementType;
  }

  @Nonnull
  @Override
  public String name() {
    return name;
  }

  @Nonnull
  @Override
  public String dataElement() {
    return dataElement;
  }

  @Nonnull
  @Override
  public RuleValueType dataElementType() {
    return dataElementType;
  }

  @Override
  public String toString() {
    return "RuleVariableCurrentEvent{"
        + "name=" + name + ", "
        + "dataElement=" + dataElement + ", "
        + "dataElementType=" + dataElementType
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof RuleVariableCurrentEvent) {
      RuleVariableCurrentEvent that = (RuleVariableCurrentEvent) o;
      return (this.name.equals(that.name()))
           && (this.dataElement.equals(that.dataElement()))
           && (this.dataElementType.equals(that.dataElementType()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.name.hashCode();
    h *= 1000003;
    h ^= this.dataElement.hashCode();
    h *= 1000003;
    h ^= this.dataElementType.hashCode();
    return h;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy