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

org.jclouds.packet.domain.internal.AutoValue_PaginatedCollection_Meta Maven / Gradle / Ivy

The newest version!

package org.jclouds.packet.domain.internal;

import javax.annotation.Generated;
import org.jclouds.javax.annotation.Nullable;
import org.jclouds.packet.domain.Href;

@Generated("com.google.auto.value.processor.AutoValueProcessor")
 final class AutoValue_PaginatedCollection_Meta extends PaginatedCollection.Meta {

  private final long total;
  private final Href first;
  private final Href previous;
  private final Href self;
  private final Href next;
  private final Href last;

  AutoValue_PaginatedCollection_Meta(
      long total,
      @Nullable Href first,
      @Nullable Href previous,
      @Nullable Href self,
      @Nullable Href next,
      @Nullable Href last) {
    this.total = total;
    this.first = first;
    this.previous = previous;
    this.self = self;
    this.next = next;
    this.last = last;
  }

  @Override
  public long total() {
    return total;
  }

  @Nullable
  @Override
  public Href first() {
    return first;
  }

  @Nullable
  @Override
  public Href previous() {
    return previous;
  }

  @Nullable
  @Override
  public Href self() {
    return self;
  }

  @Nullable
  @Override
  public Href next() {
    return next;
  }

  @Nullable
  @Override
  public Href last() {
    return last;
  }

  @Override
  public String toString() {
    return "Meta{"
        + "total=" + total + ", "
        + "first=" + first + ", "
        + "previous=" + previous + ", "
        + "self=" + self + ", "
        + "next=" + next + ", "
        + "last=" + last
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof PaginatedCollection.Meta) {
      PaginatedCollection.Meta that = (PaginatedCollection.Meta) o;
      return (this.total == that.total())
           && ((this.first == null) ? (that.first() == null) : this.first.equals(that.first()))
           && ((this.previous == null) ? (that.previous() == null) : this.previous.equals(that.previous()))
           && ((this.self == null) ? (that.self() == null) : this.self.equals(that.self()))
           && ((this.next == null) ? (that.next() == null) : this.next.equals(that.next()))
           && ((this.last == null) ? (that.last() == null) : this.last.equals(that.last()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= (this.total >>> 32) ^ this.total;
    h *= 1000003;
    h ^= (first == null) ? 0 : this.first.hashCode();
    h *= 1000003;
    h ^= (previous == null) ? 0 : this.previous.hashCode();
    h *= 1000003;
    h ^= (self == null) ? 0 : this.self.hashCode();
    h *= 1000003;
    h ^= (next == null) ? 0 : this.next.hashCode();
    h *= 1000003;
    h ^= (last == null) ? 0 : this.last.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy