com.google.gerrit.server.notedb.AutoValue_ChangeNotesParseApprovalUtil_ParsedPatchSetApproval Maven / Gradle / Ivy
package com.google.gerrit.server.notedb;
import java.util.Optional;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ChangeNotesParseApprovalUtil_ParsedPatchSetApproval extends ChangeNotesParseApprovalUtil.ParsedPatchSetApproval {
private final String footerLine;
private final boolean isRemoval;
private final String labelVote;
private final Optional uuid;
private final Optional accountIdent;
private final Optional realAccountIdent;
private final Optional tag;
private AutoValue_ChangeNotesParseApprovalUtil_ParsedPatchSetApproval(
String footerLine,
boolean isRemoval,
String labelVote,
Optional uuid,
Optional accountIdent,
Optional realAccountIdent,
Optional tag) {
this.footerLine = footerLine;
this.isRemoval = isRemoval;
this.labelVote = labelVote;
this.uuid = uuid;
this.accountIdent = accountIdent;
this.realAccountIdent = realAccountIdent;
this.tag = tag;
}
@Override
public String footerLine() {
return footerLine;
}
@Override
public boolean isRemoval() {
return isRemoval;
}
@Override
public String labelVote() {
return labelVote;
}
@Override
public Optional uuid() {
return uuid;
}
@Override
public Optional accountIdent() {
return accountIdent;
}
@Override
public Optional realAccountIdent() {
return realAccountIdent;
}
@Override
public Optional tag() {
return tag;
}
@Override
public String toString() {
return "ParsedPatchSetApproval{"
+ "footerLine=" + footerLine + ", "
+ "isRemoval=" + isRemoval + ", "
+ "labelVote=" + labelVote + ", "
+ "uuid=" + uuid + ", "
+ "accountIdent=" + accountIdent + ", "
+ "realAccountIdent=" + realAccountIdent + ", "
+ "tag=" + tag
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ChangeNotesParseApprovalUtil.ParsedPatchSetApproval) {
ChangeNotesParseApprovalUtil.ParsedPatchSetApproval that = (ChangeNotesParseApprovalUtil.ParsedPatchSetApproval) o;
return this.footerLine.equals(that.footerLine())
&& this.isRemoval == that.isRemoval()
&& this.labelVote.equals(that.labelVote())
&& this.uuid.equals(that.uuid())
&& this.accountIdent.equals(that.accountIdent())
&& this.realAccountIdent.equals(that.realAccountIdent())
&& this.tag.equals(that.tag());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= footerLine.hashCode();
h$ *= 1000003;
h$ ^= isRemoval ? 1231 : 1237;
h$ *= 1000003;
h$ ^= labelVote.hashCode();
h$ *= 1000003;
h$ ^= uuid.hashCode();
h$ *= 1000003;
h$ ^= accountIdent.hashCode();
h$ *= 1000003;
h$ ^= realAccountIdent.hashCode();
h$ *= 1000003;
h$ ^= tag.hashCode();
return h$;
}
static final class Builder extends ChangeNotesParseApprovalUtil.ParsedPatchSetApproval.Builder {
private String footerLine;
private boolean isRemoval;
private String labelVote;
private Optional uuid = Optional.empty();
private Optional accountIdent = Optional.empty();
private Optional realAccountIdent = Optional.empty();
private Optional tag = Optional.empty();
private byte set$0;
Builder() {
}
@Override
ChangeNotesParseApprovalUtil.ParsedPatchSetApproval.Builder footerLine(String footerLine) {
if (footerLine == null) {
throw new NullPointerException("Null footerLine");
}
this.footerLine = footerLine;
return this;
}
@Override
ChangeNotesParseApprovalUtil.ParsedPatchSetApproval.Builder isRemoval(boolean isRemoval) {
this.isRemoval = isRemoval;
set$0 |= (byte) 1;
return this;
}
@Override
ChangeNotesParseApprovalUtil.ParsedPatchSetApproval.Builder labelVote(String labelVote) {
if (labelVote == null) {
throw new NullPointerException("Null labelVote");
}
this.labelVote = labelVote;
return this;
}
@Override
ChangeNotesParseApprovalUtil.ParsedPatchSetApproval.Builder uuid(Optional uuid) {
if (uuid == null) {
throw new NullPointerException("Null uuid");
}
this.uuid = uuid;
return this;
}
@Override
ChangeNotesParseApprovalUtil.ParsedPatchSetApproval.Builder accountIdent(Optional accountIdent) {
if (accountIdent == null) {
throw new NullPointerException("Null accountIdent");
}
this.accountIdent = accountIdent;
return this;
}
@Override
ChangeNotesParseApprovalUtil.ParsedPatchSetApproval.Builder realAccountIdent(Optional realAccountIdent) {
if (realAccountIdent == null) {
throw new NullPointerException("Null realAccountIdent");
}
this.realAccountIdent = realAccountIdent;
return this;
}
@Override
ChangeNotesParseApprovalUtil.ParsedPatchSetApproval.Builder tag(Optional tag) {
if (tag == null) {
throw new NullPointerException("Null tag");
}
this.tag = tag;
return this;
}
@Override
ChangeNotesParseApprovalUtil.ParsedPatchSetApproval build() {
if (set$0 != 1
|| this.footerLine == null
|| this.labelVote == null) {
StringBuilder missing = new StringBuilder();
if (this.footerLine == null) {
missing.append(" footerLine");
}
if ((set$0 & 1) == 0) {
missing.append(" isRemoval");
}
if (this.labelVote == null) {
missing.append(" labelVote");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_ChangeNotesParseApprovalUtil_ParsedPatchSetApproval(
this.footerLine,
this.isRemoval,
this.labelVote,
this.uuid,
this.accountIdent,
this.realAccountIdent,
this.tag);
}
}
}