com.google.gerrit.server.change.AutoValue_ReviewerOp_Result Maven / Gradle / Ivy
The newest version!
package com.google.gerrit.server.change;
import com.google.common.collect.ImmutableList;
import com.google.gerrit.entities.Account;
import com.google.gerrit.entities.Address;
import com.google.gerrit.entities.PatchSetApproval;
import java.util.Optional;
import javax.annotation.processing.Generated;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ReviewerOp_Result extends ReviewerOp.Result {
private final ImmutableList addedReviewers;
private final ImmutableList addedReviewersByEmail;
private final ImmutableList addedCCs;
private final ImmutableList addedCCsByEmail;
private final Optional deletedReviewer;
private final Optional deletedReviewerByEmail;
private AutoValue_ReviewerOp_Result(
ImmutableList addedReviewers,
ImmutableList addedReviewersByEmail,
ImmutableList addedCCs,
ImmutableList addedCCsByEmail,
Optional deletedReviewer,
Optional deletedReviewerByEmail) {
this.addedReviewers = addedReviewers;
this.addedReviewersByEmail = addedReviewersByEmail;
this.addedCCs = addedCCs;
this.addedCCsByEmail = addedCCsByEmail;
this.deletedReviewer = deletedReviewer;
this.deletedReviewerByEmail = deletedReviewerByEmail;
}
@Override
public ImmutableList addedReviewers() {
return addedReviewers;
}
@Override
public ImmutableList addedReviewersByEmail() {
return addedReviewersByEmail;
}
@Override
public ImmutableList addedCCs() {
return addedCCs;
}
@Override
public ImmutableList addedCCsByEmail() {
return addedCCsByEmail;
}
@Override
public Optional deletedReviewer() {
return deletedReviewer;
}
@Override
public Optional deletedReviewerByEmail() {
return deletedReviewerByEmail;
}
@Override
public String toString() {
return "Result{"
+ "addedReviewers=" + addedReviewers + ", "
+ "addedReviewersByEmail=" + addedReviewersByEmail + ", "
+ "addedCCs=" + addedCCs + ", "
+ "addedCCsByEmail=" + addedCCsByEmail + ", "
+ "deletedReviewer=" + deletedReviewer + ", "
+ "deletedReviewerByEmail=" + deletedReviewerByEmail
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof ReviewerOp.Result) {
ReviewerOp.Result that = (ReviewerOp.Result) o;
return this.addedReviewers.equals(that.addedReviewers())
&& this.addedReviewersByEmail.equals(that.addedReviewersByEmail())
&& this.addedCCs.equals(that.addedCCs())
&& this.addedCCsByEmail.equals(that.addedCCsByEmail())
&& this.deletedReviewer.equals(that.deletedReviewer())
&& this.deletedReviewerByEmail.equals(that.deletedReviewerByEmail());
}
return false;
}
@Override
public int hashCode() {
int h$ = 1;
h$ *= 1000003;
h$ ^= addedReviewers.hashCode();
h$ *= 1000003;
h$ ^= addedReviewersByEmail.hashCode();
h$ *= 1000003;
h$ ^= addedCCs.hashCode();
h$ *= 1000003;
h$ ^= addedCCsByEmail.hashCode();
h$ *= 1000003;
h$ ^= deletedReviewer.hashCode();
h$ *= 1000003;
h$ ^= deletedReviewerByEmail.hashCode();
return h$;
}
static final class Builder extends ReviewerOp.Result.Builder {
private ImmutableList addedReviewers;
private ImmutableList addedReviewersByEmail;
private ImmutableList addedCCs;
private ImmutableList addedCCsByEmail;
private Optional deletedReviewer = Optional.empty();
private Optional deletedReviewerByEmail = Optional.empty();
Builder() {
}
@Override
ReviewerOp.Result.Builder setAddedReviewers(Iterable addedReviewers) {
this.addedReviewers = ImmutableList.copyOf(addedReviewers);
return this;
}
@Override
ReviewerOp.Result.Builder setAddedReviewersByEmail(Iterable addedReviewersByEmail) {
this.addedReviewersByEmail = ImmutableList.copyOf(addedReviewersByEmail);
return this;
}
@Override
ReviewerOp.Result.Builder setAddedCCs(Iterable addedCCs) {
this.addedCCs = ImmutableList.copyOf(addedCCs);
return this;
}
@Override
ReviewerOp.Result.Builder setAddedCCsByEmail(Iterable addedCCsByEmail) {
this.addedCCsByEmail = ImmutableList.copyOf(addedCCsByEmail);
return this;
}
@Override
ReviewerOp.Result.Builder setDeletedReviewer(Account.Id deletedReviewer) {
this.deletedReviewer = Optional.of(deletedReviewer);
return this;
}
@Override
ReviewerOp.Result.Builder setDeletedReviewerByEmail(Address deletedReviewerByEmail) {
this.deletedReviewerByEmail = Optional.of(deletedReviewerByEmail);
return this;
}
@Override
ReviewerOp.Result build() {
if (this.addedReviewers == null
|| this.addedReviewersByEmail == null
|| this.addedCCs == null
|| this.addedCCsByEmail == null) {
StringBuilder missing = new StringBuilder();
if (this.addedReviewers == null) {
missing.append(" addedReviewers");
}
if (this.addedReviewersByEmail == null) {
missing.append(" addedReviewersByEmail");
}
if (this.addedCCs == null) {
missing.append(" addedCCs");
}
if (this.addedCCsByEmail == null) {
missing.append(" addedCCsByEmail");
}
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_ReviewerOp_Result(
this.addedReviewers,
this.addedReviewersByEmail,
this.addedCCs,
this.addedCCsByEmail,
this.deletedReviewer,
this.deletedReviewerByEmail);
}
}
}