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

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

There is a newer version: 3.10.0-rc4
Show newest version


package com.google.gerrit.server.change;

import com.google.gerrit.common.Nullable;
import com.google.gerrit.common.data.SubmitRecord;
import com.google.gerrit.extensions.common.LabelInfo;
import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_LabelsJson_LabelWithStatus extends LabelsJson.LabelWithStatus {

  private final LabelInfo label;

  private final SubmitRecord.Label.Status status;

  AutoValue_LabelsJson_LabelWithStatus(
      LabelInfo label,
      @Nullable SubmitRecord.Label.Status status) {
    if (label == null) {
      throw new NullPointerException("Null label");
    }
    this.label = label;
    this.status = status;
  }

  @Override
  LabelInfo label() {
    return label;
  }

  @Nullable
  @Override
  SubmitRecord.Label.Status status() {
    return status;
  }

  @Override
  public String toString() {
    return "LabelWithStatus{"
         + "label=" + label + ", "
         + "status=" + status
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof LabelsJson.LabelWithStatus) {
      LabelsJson.LabelWithStatus that = (LabelsJson.LabelWithStatus) o;
      return (this.label.equals(that.label()))
           && ((this.status == null) ? (that.status() == null) : this.status.equals(that.status()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h$ = 1;
    h$ *= 1000003;
    h$ ^= label.hashCode();
    h$ *= 1000003;
    h$ ^= (status == null) ? 0 : status.hashCode();
    return h$;
  }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy