com.google.gerrit.server.project.AutoValue_SubmitRuleOptions Maven / Gradle / Ivy
package com.google.gerrit.server.project;
import com.google.gerrit.common.Nullable;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_SubmitRuleOptions extends SubmitRuleOptions {
private final boolean fastEvalLabels;
private final boolean allowDraft;
private final boolean allowClosed;
private final boolean skipFilters;
private final String rule;
private AutoValue_SubmitRuleOptions(
boolean fastEvalLabels,
boolean allowDraft,
boolean allowClosed,
boolean skipFilters,
@Nullable String rule) {
this.fastEvalLabels = fastEvalLabels;
this.allowDraft = allowDraft;
this.allowClosed = allowClosed;
this.skipFilters = skipFilters;
this.rule = rule;
}
@Override
public boolean fastEvalLabels() {
return fastEvalLabels;
}
@Override
public boolean allowDraft() {
return allowDraft;
}
@Override
public boolean allowClosed() {
return allowClosed;
}
@Override
public boolean skipFilters() {
return skipFilters;
}
@Nullable
@Override
public String rule() {
return rule;
}
@Override
public String toString() {
return "SubmitRuleOptions{"
+ "fastEvalLabels=" + fastEvalLabels + ", "
+ "allowDraft=" + allowDraft + ", "
+ "allowClosed=" + allowClosed + ", "
+ "skipFilters=" + skipFilters + ", "
+ "rule=" + rule
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof SubmitRuleOptions) {
SubmitRuleOptions that = (SubmitRuleOptions) o;
return (this.fastEvalLabels == that.fastEvalLabels())
&& (this.allowDraft == that.allowDraft())
&& (this.allowClosed == that.allowClosed())
&& (this.skipFilters == that.skipFilters())
&& ((this.rule == null) ? (that.rule() == null) : this.rule.equals(that.rule()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= fastEvalLabels ? 1231 : 1237;
h$ *= 1000003;
h$ ^= allowDraft ? 1231 : 1237;
h$ *= 1000003;
h$ ^= allowClosed ? 1231 : 1237;
h$ *= 1000003;
h$ ^= skipFilters ? 1231 : 1237;
h$ *= 1000003;
h$ ^= (rule == null) ? 0 : rule.hashCode();
return h$;
}
static final class Builder extends SubmitRuleOptions.Builder {
private Boolean fastEvalLabels;
private Boolean allowDraft;
private Boolean allowClosed;
private Boolean skipFilters;
private String rule;
Builder() {
}
@Override
public SubmitRuleOptions.Builder fastEvalLabels(boolean fastEvalLabels) {
this.fastEvalLabels = fastEvalLabels;
return this;
}
@Override
public SubmitRuleOptions.Builder allowDraft(boolean allowDraft) {
this.allowDraft = allowDraft;
return this;
}
@Override
public SubmitRuleOptions.Builder allowClosed(boolean allowClosed) {
this.allowClosed = allowClosed;
return this;
}
@Override
public SubmitRuleOptions.Builder skipFilters(boolean skipFilters) {
this.skipFilters = skipFilters;
return this;
}
@Override
public SubmitRuleOptions.Builder rule(@Nullable String rule) {
this.rule = rule;
return this;
}
@Override
public SubmitRuleOptions build() {
String missing = "";
if (this.fastEvalLabels == null) {
missing += " fastEvalLabels";
}
if (this.allowDraft == null) {
missing += " allowDraft";
}
if (this.allowClosed == null) {
missing += " allowClosed";
}
if (this.skipFilters == null) {
missing += " skipFilters";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_SubmitRuleOptions(
this.fastEvalLabels,
this.allowDraft,
this.allowClosed,
this.skipFilters,
this.rule);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy