com.google.gerrit.server.notedb.AutoValue_NotesMigration_Snapshot Maven / Gradle / Ivy
package com.google.gerrit.server.notedb;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_NotesMigration_Snapshot extends NotesMigration.Snapshot {
private final boolean writeChanges;
private final boolean readChanges;
private final boolean readChangeSequence;
private final NoteDbChangeState.PrimaryStorage changePrimaryStorage;
private final boolean disableChangeReviewDb;
private final boolean failOnLoadForTest;
private AutoValue_NotesMigration_Snapshot(
boolean writeChanges,
boolean readChanges,
boolean readChangeSequence,
NoteDbChangeState.PrimaryStorage changePrimaryStorage,
boolean disableChangeReviewDb,
boolean failOnLoadForTest) {
this.writeChanges = writeChanges;
this.readChanges = readChanges;
this.readChangeSequence = readChangeSequence;
this.changePrimaryStorage = changePrimaryStorage;
this.disableChangeReviewDb = disableChangeReviewDb;
this.failOnLoadForTest = failOnLoadForTest;
}
@Override
boolean writeChanges() {
return writeChanges;
}
@Override
boolean readChanges() {
return readChanges;
}
@Override
boolean readChangeSequence() {
return readChangeSequence;
}
@Override
NoteDbChangeState.PrimaryStorage changePrimaryStorage() {
return changePrimaryStorage;
}
@Override
boolean disableChangeReviewDb() {
return disableChangeReviewDb;
}
@Override
boolean failOnLoadForTest() {
return failOnLoadForTest;
}
@Override
public String toString() {
return "Snapshot{"
+ "writeChanges=" + writeChanges + ", "
+ "readChanges=" + readChanges + ", "
+ "readChangeSequence=" + readChangeSequence + ", "
+ "changePrimaryStorage=" + changePrimaryStorage + ", "
+ "disableChangeReviewDb=" + disableChangeReviewDb + ", "
+ "failOnLoadForTest=" + failOnLoadForTest
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof NotesMigration.Snapshot) {
NotesMigration.Snapshot that = (NotesMigration.Snapshot) o;
return (this.writeChanges == that.writeChanges())
&& (this.readChanges == that.readChanges())
&& (this.readChangeSequence == that.readChangeSequence())
&& (this.changePrimaryStorage.equals(that.changePrimaryStorage()))
&& (this.disableChangeReviewDb == that.disableChangeReviewDb())
&& (this.failOnLoadForTest == that.failOnLoadForTest());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= writeChanges ? 1231 : 1237;
h$ *= 1000003;
h$ ^= readChanges ? 1231 : 1237;
h$ *= 1000003;
h$ ^= readChangeSequence ? 1231 : 1237;
h$ *= 1000003;
h$ ^= changePrimaryStorage.hashCode();
h$ *= 1000003;
h$ ^= disableChangeReviewDb ? 1231 : 1237;
h$ *= 1000003;
h$ ^= failOnLoadForTest ? 1231 : 1237;
return h$;
}
@Override
NotesMigration.Snapshot.Builder toBuilder() {
return new Builder(this);
}
static final class Builder extends NotesMigration.Snapshot.Builder {
private Boolean writeChanges;
private Boolean readChanges;
private Boolean readChangeSequence;
private NoteDbChangeState.PrimaryStorage changePrimaryStorage;
private Boolean disableChangeReviewDb;
private Boolean failOnLoadForTest;
Builder() {
}
private Builder(NotesMigration.Snapshot source) {
this.writeChanges = source.writeChanges();
this.readChanges = source.readChanges();
this.readChangeSequence = source.readChangeSequence();
this.changePrimaryStorage = source.changePrimaryStorage();
this.disableChangeReviewDb = source.disableChangeReviewDb();
this.failOnLoadForTest = source.failOnLoadForTest();
}
@Override
NotesMigration.Snapshot.Builder setWriteChanges(boolean writeChanges) {
this.writeChanges = writeChanges;
return this;
}
@Override
NotesMigration.Snapshot.Builder setReadChanges(boolean readChanges) {
this.readChanges = readChanges;
return this;
}
@Override
NotesMigration.Snapshot.Builder setReadChangeSequence(boolean readChangeSequence) {
this.readChangeSequence = readChangeSequence;
return this;
}
@Override
NotesMigration.Snapshot.Builder setChangePrimaryStorage(NoteDbChangeState.PrimaryStorage changePrimaryStorage) {
if (changePrimaryStorage == null) {
throw new NullPointerException("Null changePrimaryStorage");
}
this.changePrimaryStorage = changePrimaryStorage;
return this;
}
@Override
NotesMigration.Snapshot.Builder setDisableChangeReviewDb(boolean disableChangeReviewDb) {
this.disableChangeReviewDb = disableChangeReviewDb;
return this;
}
@Override
NotesMigration.Snapshot.Builder setFailOnLoadForTest(boolean failOnLoadForTest) {
this.failOnLoadForTest = failOnLoadForTest;
return this;
}
@Override
NotesMigration.Snapshot autoBuild() {
String missing = "";
if (this.writeChanges == null) {
missing += " writeChanges";
}
if (this.readChanges == null) {
missing += " readChanges";
}
if (this.readChangeSequence == null) {
missing += " readChangeSequence";
}
if (this.changePrimaryStorage == null) {
missing += " changePrimaryStorage";
}
if (this.disableChangeReviewDb == null) {
missing += " disableChangeReviewDb";
}
if (this.failOnLoadForTest == null) {
missing += " failOnLoadForTest";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_NotesMigration_Snapshot(
this.writeChanges,
this.readChanges,
this.readChangeSequence,
this.changePrimaryStorage,
this.disableChangeReviewDb,
this.failOnLoadForTest);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy