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

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

There is a newer version: 1.20.4
Show newest version

package com.spotify.apollo;

import java.util.Optional;
import javax.annotation.Generated;

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

  private final StatusType status;
  private final Optional payload;
  private final Headers internalHeadersImpl;

  AutoValue_ResponseImpl(
      StatusType status,
      Optional payload,
      Headers internalHeadersImpl) {
    if (status == null) {
      throw new NullPointerException("Null status");
    }
    this.status = status;
    if (payload == null) {
      throw new NullPointerException("Null payload");
    }
    this.payload = payload;
    if (internalHeadersImpl == null) {
      throw new NullPointerException("Null internalHeadersImpl");
    }
    this.internalHeadersImpl = internalHeadersImpl;
  }

  @Override
  public StatusType status() {
    return status;
  }

  @Override
  public Optional payload() {
    return payload;
  }

  @Override
  Headers internalHeadersImpl() {
    return internalHeadersImpl;
  }

  @Override
  public String toString() {
    return "ResponseImpl{"
        + "status=" + status + ", "
        + "payload=" + payload + ", "
        + "internalHeadersImpl=" + internalHeadersImpl
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof ResponseImpl) {
      ResponseImpl that = (ResponseImpl) o;
      return (this.status.equals(that.status()))
           && (this.payload.equals(that.payload()))
           && (this.internalHeadersImpl.equals(that.internalHeadersImpl()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= status.hashCode();
    h *= 1000003;
    h ^= payload.hashCode();
    h *= 1000003;
    h ^= internalHeadersImpl.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy