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

org.jclouds.digitalocean2.domain.AutoValue_Region Maven / Gradle / Ivy

The newest version!

package org.jclouds.digitalocean2.domain;

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

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

  private final String slug;
  private final String name;
  private final List sizes;
  private final boolean available;
  private final List features;

  AutoValue_Region(
      String slug,
      String name,
      List sizes,
      boolean available,
      List features) {
    if (slug == null) {
      throw new NullPointerException("Null slug");
    }
    this.slug = slug;
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    if (sizes == null) {
      throw new NullPointerException("Null sizes");
    }
    this.sizes = sizes;
    this.available = available;
    if (features == null) {
      throw new NullPointerException("Null features");
    }
    this.features = features;
  }

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

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

  @Override
  public List sizes() {
    return sizes;
  }

  @Override
  public boolean available() {
    return available;
  }

  @Override
  public List features() {
    return features;
  }

  @Override
  public String toString() {
    return "Region{"
        + "slug=" + slug + ", "
        + "name=" + name + ", "
        + "sizes=" + sizes + ", "
        + "available=" + available + ", "
        + "features=" + features
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Region) {
      Region that = (Region) o;
      return (this.slug.equals(that.slug()))
           && (this.name.equals(that.name()))
           && (this.sizes.equals(that.sizes()))
           && (this.available == that.available())
           && (this.features.equals(that.features()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.slug.hashCode();
    h *= 1000003;
    h ^= this.name.hashCode();
    h *= 1000003;
    h ^= this.sizes.hashCode();
    h *= 1000003;
    h ^= this.available ? 1231 : 1237;
    h *= 1000003;
    h ^= this.features.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy