org.graylog2.indexer.rotation.tso.AutoValue_IndexLifetimeConfig Maven / Gradle / Ivy
package org.graylog2.indexer.rotation.tso;
import com.fasterxml.jackson.annotation.JsonProperty;
import jakarta.validation.constraints.NotNull;
import javax.annotation.processing.Generated;
import org.joda.time.Period;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_IndexLifetimeConfig extends IndexLifetimeConfig {
private final @NotNull Period indexLifetimeMin;
private final @NotNull Period indexLifetimeMax;
private AutoValue_IndexLifetimeConfig(
@NotNull Period indexLifetimeMin,
@NotNull Period indexLifetimeMax) {
this.indexLifetimeMin = indexLifetimeMin;
this.indexLifetimeMax = indexLifetimeMax;
}
@JsonProperty("index_lifetime_min")
@Override
public @NotNull Period indexLifetimeMin() {
return indexLifetimeMin;
}
@JsonProperty("index_lifetime_max")
@Override
public @NotNull Period indexLifetimeMax() {
return indexLifetimeMax;
}
@Override
public String toString() {
return "IndexLifetimeConfig{"
+ "indexLifetimeMin=" + indexLifetimeMin + ", "
+ "indexLifetimeMax=" + indexLifetimeMax
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof IndexLifetimeConfig) {
IndexLifetimeConfig that = (IndexLifetimeConfig) o;
return this.indexLifetimeMin.equals(that.indexLifetimeMin())
&& this.indexLifetimeMax.equals(that.indexLifetimeMax());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= indexLifetimeMin.hashCode();
h$ *= 1000003;
h$ ^= indexLifetimeMax.hashCode();
return h$;
}
@Override
public IndexLifetimeConfig.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends IndexLifetimeConfig.Builder {
private @NotNull Period indexLifetimeMin;
private @NotNull Period indexLifetimeMax;
Builder() {
}
private Builder(IndexLifetimeConfig source) {
this.indexLifetimeMin = source.indexLifetimeMin();
this.indexLifetimeMax = source.indexLifetimeMax();
}
@Override
public IndexLifetimeConfig.Builder indexLifetimeMin(Period indexLifetimeMin) {
if (indexLifetimeMin == null) {
throw new NullPointerException("Null indexLifetimeMin");
}
this.indexLifetimeMin = indexLifetimeMin;
return this;
}
@Override
public IndexLifetimeConfig.Builder indexLifetimeMax(Period indexLifetimeMax) {
if (indexLifetimeMax == null) {
throw new NullPointerException("Null indexLifetimeMax");
}
this.indexLifetimeMax = indexLifetimeMax;
return this;
}
@Override
public IndexLifetimeConfig build() {
if (this.indexLifetimeMin == null
|| this.indexLifetimeMax == null) {
StringBuilder missing = new StringBuilder();
if (this.indexLifetimeMin == null) {
missing.append(" indexLifetimeMin");
}
if (this.indexLifetimeMax == null) {
missing.append(" indexLifetimeMax");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_IndexLifetimeConfig(
this.indexLifetimeMin,
this.indexLifetimeMax);
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy