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.11.0
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;

@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;

  AutoValue_ApprovalContext(
      PatchSetApproval patchSetApproval,
      PatchSet target,
      ChangeNotes changeNotes,
      ChangeKind changeKind) {
    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;
  }

  @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 String toString() {
    return "ApprovalContext{"
        + "patchSetApproval=" + patchSetApproval + ", "
        + "target=" + target + ", "
        + "changeNotes=" + changeNotes + ", "
        + "changeKind=" + changeKind
        + "}";
  }

  @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());
    }
    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();
    return h$;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy