org.hisp.dhis.rules.models.AutoValue_RuleVariableCalculatedValue 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_RuleVariableCalculatedValue extends RuleVariableCalculatedValue {
private final String name;
private final String calculatedValueVariable;
private final RuleValueType calculatedValueType;
AutoValue_RuleVariableCalculatedValue(
String name,
String calculatedValueVariable,
RuleValueType calculatedValueType) {
if (name == null) {
throw new NullPointerException("Null name");
}
this.name = name;
if (calculatedValueVariable == null) {
throw new NullPointerException("Null calculatedValueVariable");
}
this.calculatedValueVariable = calculatedValueVariable;
if (calculatedValueType == null) {
throw new NullPointerException("Null calculatedValueType");
}
this.calculatedValueType = calculatedValueType;
}
@Nonnull
@Override
public String name() {
return name;
}
@Nonnull
@Override
public String calculatedValueVariable() {
return calculatedValueVariable;
}
@Nonnull
@Override
public RuleValueType calculatedValueType() {
return calculatedValueType;
}
@Override
public String toString() {
return "RuleVariableCalculatedValue{"
+ "name=" + name + ", "
+ "calculatedValueVariable=" + calculatedValueVariable + ", "
+ "calculatedValueType=" + calculatedValueType
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof RuleVariableCalculatedValue) {
RuleVariableCalculatedValue that = (RuleVariableCalculatedValue) o;
return (this.name.equals(that.name()))
&& (this.calculatedValueVariable.equals(that.calculatedValueVariable()))
&& (this.calculatedValueType.equals(that.calculatedValueType()));
}
return false;
}
@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= this.name.hashCode();
h *= 1000003;
h ^= this.calculatedValueVariable.hashCode();
h *= 1000003;
h ^= this.calculatedValueType.hashCode();
return h;
}
}