com.google.gerrit.extensions.common.AutoValue_ChangeInfoDifference Maven / Gradle / Ivy
package com.google.gerrit.extensions.common;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ChangeInfoDifference extends ChangeInfoDifference {
private final ChangeInfo oldChangeInfo;
private final ChangeInfo newChangeInfo;
private final ChangeInfo added;
private final ChangeInfo removed;
private AutoValue_ChangeInfoDifference(
ChangeInfo oldChangeInfo,
ChangeInfo newChangeInfo,
ChangeInfo added,
ChangeInfo removed) {
this.oldChangeInfo = oldChangeInfo;
this.newChangeInfo = newChangeInfo;
this.added = added;
this.removed = removed;
}
@Override
public ChangeInfo oldChangeInfo() {
return oldChangeInfo;
}
@Override
public ChangeInfo newChangeInfo() {
return newChangeInfo;
}
@Override
public ChangeInfo added() {
return added;
}
@Override
public ChangeInfo removed() {
return removed;
}
@Override
public String toString() {
return "ChangeInfoDifference{"
+ "oldChangeInfo=" + oldChangeInfo + ", "
+ "newChangeInfo=" + newChangeInfo + ", "
+ "added=" + added + ", "
+ "removed=" + removed
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ChangeInfoDifference) {
ChangeInfoDifference that = (ChangeInfoDifference) o;
return this.oldChangeInfo.equals(that.oldChangeInfo())
&& this.newChangeInfo.equals(that.newChangeInfo())
&& this.added.equals(that.added())
&& this.removed.equals(that.removed());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= oldChangeInfo.hashCode();
h$ *= 1000003;
h$ ^= newChangeInfo.hashCode();
h$ *= 1000003;
h$ ^= added.hashCode();
h$ *= 1000003;
h$ ^= removed.hashCode();
return h$;
}
static final class Builder extends ChangeInfoDifference.Builder {
private ChangeInfo oldChangeInfo;
private ChangeInfo newChangeInfo;
private ChangeInfo added;
private ChangeInfo removed;
Builder() {
}
@Override
public ChangeInfoDifference.Builder setOldChangeInfo(ChangeInfo oldChangeInfo) {
if (oldChangeInfo == null) {
throw new NullPointerException("Null oldChangeInfo");
}
this.oldChangeInfo = oldChangeInfo;
return this;
}
@Override
public ChangeInfoDifference.Builder setNewChangeInfo(ChangeInfo newChangeInfo) {
if (newChangeInfo == null) {
throw new NullPointerException("Null newChangeInfo");
}
this.newChangeInfo = newChangeInfo;
return this;
}
@Override
public ChangeInfoDifference.Builder setAdded(ChangeInfo added) {
if (added == null) {
throw new NullPointerException("Null added");
}
this.added = added;
return this;
}
@Override
public ChangeInfoDifference.Builder setRemoved(ChangeInfo removed) {
if (removed == null) {
throw new NullPointerException("Null removed");
}
this.removed = removed;
return this;
}
@Override
public ChangeInfoDifference build() {
String missing = "";
if (this.oldChangeInfo == null) {
missing += " oldChangeInfo";
}
if (this.newChangeInfo == null) {
missing += " newChangeInfo";
}
if (this.added == null) {
missing += " added";
}
if (this.removed == null) {
missing += " removed";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_ChangeInfoDifference(
this.oldChangeInfo,
this.newChangeInfo,
this.added,
this.removed);
}
}
}