com.google.gerrit.server.restapi.change.AutoValue_PostReviewOp_CopiedLabelUpdate Maven / Gradle / Ivy
package com.google.gerrit.server.restapi.change;
import com.google.gerrit.entities.PatchSet;
import com.google.gerrit.server.util.LabelVote;
import java.util.Optional;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_PostReviewOp_CopiedLabelUpdate extends PostReviewOp.CopiedLabelUpdate {
private final PatchSet.Id patchSetId;
private final Optional oldLabelVote;
private final PostReviewOp.CopiedLabelUpdate.Type type;
AutoValue_PostReviewOp_CopiedLabelUpdate(
PatchSet.Id patchSetId,
Optional oldLabelVote,
PostReviewOp.CopiedLabelUpdate.Type type) {
if (patchSetId == null) {
throw new NullPointerException("Null patchSetId");
}
this.patchSetId = patchSetId;
if (oldLabelVote == null) {
throw new NullPointerException("Null oldLabelVote");
}
this.oldLabelVote = oldLabelVote;
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
}
@Override
PatchSet.Id patchSetId() {
return patchSetId;
}
@Override
Optional oldLabelVote() {
return oldLabelVote;
}
@Override
PostReviewOp.CopiedLabelUpdate.Type type() {
return type;
}
@Override
public String toString() {
return "CopiedLabelUpdate{"
+ "patchSetId=" + patchSetId + ", "
+ "oldLabelVote=" + oldLabelVote + ", "
+ "type=" + type
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof PostReviewOp.CopiedLabelUpdate) {
PostReviewOp.CopiedLabelUpdate that = (PostReviewOp.CopiedLabelUpdate) o;
return this.patchSetId.equals(that.patchSetId())
&& this.oldLabelVote.equals(that.oldLabelVote())
&& this.type.equals(that.type());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= patchSetId.hashCode();
h$ *= 1000003;
h$ ^= oldLabelVote.hashCode();
h$ *= 1000003;
h$ ^= type.hashCode();
return h$;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy