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

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

The newest version!

package org.jclouds.digitalocean2.domain;

import java.util.List;
import javax.annotation.Generated;
import org.jclouds.javax.annotation.Nullable;

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

  private final int id;
  private final String name;
  private final String distribution;
  private final String slug;
  private final boolean isPublic;
  private final List regions;
  private final int minDiskSize;

  AutoValue_Backup(
      int id,
      String name,
      String distribution,
      @Nullable String slug,
      boolean isPublic,
      List regions,
      int minDiskSize) {
    this.id = id;
    if (name == null) {
      throw new NullPointerException("Null name");
    }
    this.name = name;
    if (distribution == null) {
      throw new NullPointerException("Null distribution");
    }
    this.distribution = distribution;
    this.slug = slug;
    this.isPublic = isPublic;
    if (regions == null) {
      throw new NullPointerException("Null regions");
    }
    this.regions = regions;
    this.minDiskSize = minDiskSize;
  }

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

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

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

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

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

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

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

  @Override
  public String toString() {
    return "Backup{"
        + "id=" + id + ", "
        + "name=" + name + ", "
        + "distribution=" + distribution + ", "
        + "slug=" + slug + ", "
        + "isPublic=" + isPublic + ", "
        + "regions=" + regions + ", "
        + "minDiskSize=" + minDiskSize
        + "}";
  }

  @Override
  public boolean equals(Object o) {
    if (o == this) {
      return true;
    }
    if (o instanceof Backup) {
      Backup that = (Backup) o;
      return (this.id == that.id())
           && (this.name.equals(that.name()))
           && (this.distribution.equals(that.distribution()))
           && ((this.slug == null) ? (that.slug() == null) : this.slug.equals(that.slug()))
           && (this.isPublic == that.isPublic())
           && (this.regions.equals(that.regions()))
           && (this.minDiskSize == that.minDiskSize());
    }
    return false;
  }

  @Override
  public int hashCode() {
    int h = 1;
    h *= 1000003;
    h ^= this.id;
    h *= 1000003;
    h ^= this.name.hashCode();
    h *= 1000003;
    h ^= this.distribution.hashCode();
    h *= 1000003;
    h ^= (slug == null) ? 0 : this.slug.hashCode();
    h *= 1000003;
    h ^= this.isPublic ? 1231 : 1237;
    h *= 1000003;
    h ^= this.regions.hashCode();
    h *= 1000003;
    h ^= this.minDiskSize;
    return h;
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy