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

com.google.gerrit.server.query.approval.AutoValue_ApprovalContext Maven / Gradle / Ivy

There is a newer version: 3.10.0-rc7
Show newest version
package com.google.gerrit.server.query.approval;

import com.google.gerrit.entities.PatchSet;
import com.google.gerrit.entities.PatchSetApproval;
import com.google.gerrit.extensions.client.ChangeKind;
import com.google.gerrit.server.notedb.ChangeNotes;
import javax.annotation.processing.Generated;
import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.revwalk.RevWalk;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_ApprovalContext extends ApprovalContext {

  private final PatchSetApproval patchSetApproval;

  private final PatchSet target;

  private final ChangeNotes changeNotes;

  private final ChangeKind changeKind;

  private final boolean isMerge;

  private final RevWalk revWalk;

  private final Config repoConfig;

  AutoValue_ApprovalContext(
      PatchSetApproval patchSetApproval,
      PatchSet target,
      ChangeNotes changeNotes,
      ChangeKind changeKind,
      boolean isMerge,
      RevWalk revWalk,
      Config repoConfig) {
    if (patchSetApproval == null) {
      throw new NullPointerException("Null patchSetApproval");
    }
    this.patchSetApproval = patchSetApproval;
    if (target == null) {
      throw new NullPointerException("Null target");
    }
    this.target = target;
    if (changeNotes == null) {
      throw new NullPointerException("Null changeNotes");
    }
    this.changeNotes = changeNotes;
    if (changeKind == null) {
      throw new NullPointerException("Null changeKind");
    }
    this.changeKind = changeKind;
    this.isMerge = isMerge;
    if (revWalk == null) {
      throw new NullPointerException("Null revWalk");
    }
    this.revWalk = revWalk;
    if (repoConfig == null) {
      throw new NullPointerException("Null repoConfig");
    }
    this.repoConfig = repoConfig;
  }

  @Override
  public PatchSetApproval patchSetApproval() {
    return patchSetApproval;
  }

  @Override
  public PatchSet target() {
    return target;
  }

  @Override
  public ChangeNotes changeNotes() {
    return changeNotes;
  }

  @Override
  public ChangeKind changeKind() {
    return changeKind;
  }

  @Override
  public boolean isMerge() {
    return isMerge;
  }

  @Override
  public RevWalk revWalk() {
    return revWalk;
  }

  @Override
  public Config repoConfig() {
    return repoConfig;
  }

  @Override
  public String toString() {
    return "ApprovalContext{"
        + "patchSetApproval=" + patchSetApproval + ", "
        + "target=" + target + ", "
        + "changeNotes=" + changeNotes + ", "
        + "changeKind=" + changeKind + ", "
        + "isMerge=" + isMerge + ", "
        + "revWalk=" + revWalk + ", "
        + "repoConfig=" + repoConfig
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ApprovalContext) {
      ApprovalContext that = (ApprovalContext) o;
      return this.patchSetApproval.equals(that.patchSetApproval())
          && this.target.equals(that.target())
          && this.changeNotes.equals(that.changeNotes())
          && this.changeKind.equals(that.changeKind())
          && this.isMerge == that.isMerge()
          && this.revWalk.equals(that.revWalk())
          && this.repoConfig.equals(that.repoConfig());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= patchSetApproval.hashCode();
    h$ *= 1000003;
    h$ ^= target.hashCode();
    h$ *= 1000003;
    h$ ^= changeNotes.hashCode();
    h$ *= 1000003;
    h$ ^= changeKind.hashCode();
    h$ *= 1000003;
    h$ ^= isMerge ? 1231 : 1237;
    h$ *= 1000003;
    h$ ^= revWalk.hashCode();
    h$ *= 1000003;
    h$ ^= repoConfig.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy