com.google.gerrit.index.AutoValue_IndexConfig Maven / Gradle / Ivy
package com.google.gerrit.index;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_IndexConfig extends IndexConfig {
private final int maxLimit;
private final int maxPages;
private final int maxTerms;
private final boolean separateChangeSubIndexes;
private AutoValue_IndexConfig(
int maxLimit,
int maxPages,
int maxTerms,
boolean separateChangeSubIndexes) {
this.maxLimit = maxLimit;
this.maxPages = maxPages;
this.maxTerms = maxTerms;
this.separateChangeSubIndexes = separateChangeSubIndexes;
}
@Override
public int maxLimit() {
return maxLimit;
}
@Override
public int maxPages() {
return maxPages;
}
@Override
public int maxTerms() {
return maxTerms;
}
@Override
public boolean separateChangeSubIndexes() {
return separateChangeSubIndexes;
}
@Override
public String toString() {
return "IndexConfig{"
+ "maxLimit=" + maxLimit + ", "
+ "maxPages=" + maxPages + ", "
+ "maxTerms=" + maxTerms + ", "
+ "separateChangeSubIndexes=" + separateChangeSubIndexes
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof IndexConfig) {
IndexConfig that = (IndexConfig) o;
return this.maxLimit == that.maxLimit()
&& this.maxPages == that.maxPages()
&& this.maxTerms == that.maxTerms()
&& this.separateChangeSubIndexes == that.separateChangeSubIndexes();
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= maxLimit;
h$ *= 1000003;
h$ ^= maxPages;
h$ *= 1000003;
h$ ^= maxTerms;
h$ *= 1000003;
h$ ^= separateChangeSubIndexes ? 1231 : 1237;
return h$;
}
static final class Builder extends IndexConfig.Builder {
private Integer maxLimit;
private Integer maxPages;
private Integer maxTerms;
private Boolean separateChangeSubIndexes;
Builder() {
}
@Override
public IndexConfig.Builder maxLimit(int maxLimit) {
this.maxLimit = maxLimit;
return this;
}
@Override
public int maxLimit() {
if (maxLimit == null) {
throw new IllegalStateException("Property \"maxLimit\" has not been set");
}
return maxLimit;
}
@Override
public IndexConfig.Builder maxPages(int maxPages) {
this.maxPages = maxPages;
return this;
}
@Override
public int maxPages() {
if (maxPages == null) {
throw new IllegalStateException("Property \"maxPages\" has not been set");
}
return maxPages;
}
@Override
public IndexConfig.Builder maxTerms(int maxTerms) {
this.maxTerms = maxTerms;
return this;
}
@Override
public int maxTerms() {
if (maxTerms == null) {
throw new IllegalStateException("Property \"maxTerms\" has not been set");
}
return maxTerms;
}
@Override
public IndexConfig.Builder separateChangeSubIndexes(boolean separateChangeSubIndexes) {
this.separateChangeSubIndexes = separateChangeSubIndexes;
return this;
}
@Override
IndexConfig autoBuild() {
String missing = "";
if (this.maxLimit == null) {
missing += " maxLimit";
}
if (this.maxPages == null) {
missing += " maxPages";
}
if (this.maxTerms == null) {
missing += " maxTerms";
}
if (this.separateChangeSubIndexes == null) {
missing += " separateChangeSubIndexes";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_IndexConfig(
this.maxLimit,
this.maxPages,
this.maxTerms,
this.separateChangeSubIndexes);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy