org.hisp.dhis.rules.AutoValue_RuleVariableValue Maven / Gradle / Ivy
package org.hisp.dhis.rules;
import java.util.List;
import javax.annotation.Generated;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.hisp.dhis.rules.models.RuleValueType;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_RuleVariableValue extends RuleVariableValue {
private final String value;
private final RuleValueType type;
private final List candidates;
private final String eventDate;
AutoValue_RuleVariableValue(
@Nullable String value,
RuleValueType type,
List candidates,
@Nullable String eventDate) {
this.value = value;
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
if (candidates == null) {
throw new NullPointerException("Null candidates");
}
this.candidates = candidates;
this.eventDate = eventDate;
}
@Nullable
@Override
public String value() {
return value;
}
@Nonnull
@Override
public RuleValueType type() {
return type;
}
@Nonnull
@Override
public List candidates() {
return candidates;
}
@Nullable
@Override
public String eventDate() {
return eventDate;
}
@Override
public String toString() {
return "RuleVariableValue{"
+ "value=" + value + ", "
+ "type=" + type + ", "
+ "candidates=" + candidates + ", "
+ "eventDate=" + eventDate
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof RuleVariableValue) {
RuleVariableValue that = (RuleVariableValue) o;
return ((this.value == null) ? (that.value() == null) : this.value.equals(that.value()))
&& (this.type.equals(that.type()))
&& (this.candidates.equals(that.candidates()))
&& ((this.eventDate == null) ? (that.eventDate() == null) : this.eventDate.equals(that.eventDate()));
}
return false;
}
@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= (value == null) ? 0 : this.value.hashCode();
h *= 1000003;
h ^= this.type.hashCode();
h *= 1000003;
h ^= this.candidates.hashCode();
h *= 1000003;
h ^= (eventDate == null) ? 0 : this.eventDate.hashCode();
return h;
}
}