All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.gerrit.server.change.AutoValue_PostReviewersOp_Result Maven / Gradle / Ivy

There is a newer version: 3.11.0
Show newest version


package com.google.gerrit.server.change;

import com.google.common.collect.ImmutableList;
import com.google.gerrit.reviewdb.client.Account;
import com.google.gerrit.reviewdb.client.PatchSetApproval;
import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_PostReviewersOp_Result extends PostReviewersOp.Result {

  private final ImmutableList addedReviewers;

  private final ImmutableList addedCCs;

  private AutoValue_PostReviewersOp_Result(
      ImmutableList addedReviewers,
      ImmutableList addedCCs) {
    this.addedReviewers = addedReviewers;
    this.addedCCs = addedCCs;
  }

  @Override
  public ImmutableList addedReviewers() {
    return addedReviewers;
  }

  @Override
  public ImmutableList addedCCs() {
    return addedCCs;
  }

  @Override
  public String toString() {
    return "Result{"
         + "addedReviewers=" + addedReviewers + ", "
         + "addedCCs=" + addedCCs
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof PostReviewersOp.Result) {
      PostReviewersOp.Result that = (PostReviewersOp.Result) o;
      return (this.addedReviewers.equals(that.addedReviewers()))
           && (this.addedCCs.equals(that.addedCCs()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= addedReviewers.hashCode();
    h$ *= 1000003;
    h$ ^= addedCCs.hashCode();
    return h$;
  }

  static final class Builder extends PostReviewersOp.Result.Builder {
    private ImmutableList addedReviewers;
    private ImmutableList addedCCs;
    Builder() {
    }
    @Override
    PostReviewersOp.Result.Builder setAddedReviewers(ImmutableList addedReviewers) {
      if (addedReviewers == null) {
        throw new NullPointerException("Null addedReviewers");
      }
      this.addedReviewers = addedReviewers;
      return this;
    }
    @Override
    PostReviewersOp.Result.Builder setAddedCCs(ImmutableList addedCCs) {
      if (addedCCs == null) {
        throw new NullPointerException("Null addedCCs");
      }
      this.addedCCs = addedCCs;
      return this;
    }
    @Override
    PostReviewersOp.Result build() {
      String missing = "";
      if (this.addedReviewers == null) {
        missing += " addedReviewers";
      }
      if (this.addedCCs == null) {
        missing += " addedCCs";
      }
      if (!missing.isEmpty()) {
        throw new IllegalStateException("Missing required properties:" + missing);
      }
      return new AutoValue_PostReviewersOp_Result(
          this.addedReviewers,
          this.addedCCs);
    }
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy