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

com.spotify.apollo.AutoValue_Status_WithReasonPhrase Maven / Gradle / Ivy

There is a newer version: 1.20.4
Show newest version

package com.spotify.apollo;

import javax.annotation.Generated;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_Status_WithReasonPhrase extends Status.WithReasonPhrase {

  private final int code;
  private final String reasonPhrase;
  private final StatusType.Family family;

  AutoValue_Status_WithReasonPhrase(
      int code,
      String reasonPhrase,
      StatusType.Family family) {
    this.code = code;
    if (reasonPhrase == null) {
      throw new NullPointerException("Null reasonPhrase");
    }
    this.reasonPhrase = reasonPhrase;
    if (family == null) {
      throw new NullPointerException("Null family");
    }
    this.family = family;
  }

  @Override
  public int code() {
    return code;
  }

  @Override
  public String reasonPhrase() {
    return reasonPhrase;
  }

  @Override
  public StatusType.Family family() {
    return family;
  }

  @Override
  public String toString() {
    return "WithReasonPhrase{"
        + "code=" + code + ", "
        + "reasonPhrase=" + reasonPhrase + ", "
        + "family=" + family
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Status.WithReasonPhrase) {
      Status.WithReasonPhrase that = (Status.WithReasonPhrase) o;
      return (this.code == that.code())
           && (this.reasonPhrase.equals(that.reasonPhrase()))
           && (this.family.equals(that.family()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= code;
    h *= 1000003;
    h ^= reasonPhrase.hashCode();
    h *= 1000003;
    h ^= family.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy