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

org.jclouds.digitalocean2.domain.AutoValue_Size 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_Size extends Size {

  private final String slug;
  private final boolean available;
  private final float transfer;
  private final float priceMonthly;
  private final float priceHourly;
  private final int memory;
  private final int vcpus;
  private final int disk;
  private final List regions;

  AutoValue_Size(
      String slug,
      boolean available,
      float transfer,
      float priceMonthly,
      float priceHourly,
      int memory,
      int vcpus,
      int disk,
      List regions) {
    if (slug == null) {
      throw new NullPointerException("Null slug");
    }
    this.slug = slug;
    this.available = available;
    this.transfer = transfer;
    this.priceMonthly = priceMonthly;
    this.priceHourly = priceHourly;
    this.memory = memory;
    this.vcpus = vcpus;
    this.disk = disk;
    if (regions == null) {
      throw new NullPointerException("Null regions");
    }
    this.regions = regions;
  }

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

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

  @Override
  public float transfer() {
    return transfer;
  }

  @Override
  public float priceMonthly() {
    return priceMonthly;
  }

  @Override
  public float priceHourly() {
    return priceHourly;
  }

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

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

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

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

  @Override
  public String toString() {
    return "Size{"
        + "slug=" + slug + ", "
        + "available=" + available + ", "
        + "transfer=" + transfer + ", "
        + "priceMonthly=" + priceMonthly + ", "
        + "priceHourly=" + priceHourly + ", "
        + "memory=" + memory + ", "
        + "vcpus=" + vcpus + ", "
        + "disk=" + disk + ", "
        + "regions=" + regions
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Size) {
      Size that = (Size) o;
      return (this.slug.equals(that.slug()))
           && (this.available == that.available())
           && (Float.floatToIntBits(this.transfer) == Float.floatToIntBits(that.transfer()))
           && (Float.floatToIntBits(this.priceMonthly) == Float.floatToIntBits(that.priceMonthly()))
           && (Float.floatToIntBits(this.priceHourly) == Float.floatToIntBits(that.priceHourly()))
           && (this.memory == that.memory())
           && (this.vcpus == that.vcpus())
           && (this.disk == that.disk())
           && (this.regions.equals(that.regions()));
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.slug.hashCode();
    h *= 1000003;
    h ^= this.available ? 1231 : 1237;
    h *= 1000003;
    h ^= Float.floatToIntBits(this.transfer);
    h *= 1000003;
    h ^= Float.floatToIntBits(this.priceMonthly);
    h *= 1000003;
    h ^= Float.floatToIntBits(this.priceHourly);
    h *= 1000003;
    h ^= this.memory;
    h *= 1000003;
    h ^= this.vcpus;
    h *= 1000003;
    h ^= this.disk;
    h *= 1000003;
    h ^= this.regions.hashCode();
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy