com.google.gerrit.server.notedb.AutoValue_ChangeNotes_Factory_ChangeNotesResult Maven / Gradle / Ivy
package com.google.gerrit.server.notedb;
import com.google.gerrit.common.Nullable;
import com.google.gerrit.reviewdb.client.Change;
import com.google.gwtorm.server.OrmException;
import java.util.Optional;
import javax.annotation.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ChangeNotes_Factory_ChangeNotesResult extends ChangeNotes.Factory.ChangeNotesResult {
private final Change.Id id;
private final Optional error;
private final ChangeNotes maybeNotes;
AutoValue_ChangeNotes_Factory_ChangeNotesResult(
Change.Id id,
Optional error,
@Nullable ChangeNotes maybeNotes) {
if (id == null) {
throw new NullPointerException("Null id");
}
this.id = id;
if (error == null) {
throw new NullPointerException("Null error");
}
this.error = error;
this.maybeNotes = maybeNotes;
}
@Override
public Change.Id id() {
return id;
}
@Override
public Optional error() {
return error;
}
@Nullable
@Override
ChangeNotes maybeNotes() {
return maybeNotes;
}
@Override
public String toString() {
return "ChangeNotesResult{"
+ "id=" + id + ", "
+ "error=" + error + ", "
+ "maybeNotes=" + maybeNotes
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ChangeNotes.Factory.ChangeNotesResult) {
ChangeNotes.Factory.ChangeNotesResult that = (ChangeNotes.Factory.ChangeNotesResult) o;
return (this.id.equals(that.id()))
&& (this.error.equals(that.error()))
&& ((this.maybeNotes == null) ? (that.maybeNotes() == null) : this.maybeNotes.equals(that.maybeNotes()));
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= id.hashCode();
h$ *= 1000003;
h$ ^= error.hashCode();
h$ *= 1000003;
h$ ^= (maybeNotes == null) ? 0 : maybeNotes.hashCode();
return h$;
}
}