
org.jclouds.digitalocean2.domain.AutoValue_Image Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of digitalocean2-fixed Show documentation
Show all versions of digitalocean2-fixed Show documentation
jclouds provider for Digital Ocean v2 Compute API, with backported fixes
The newest version!
package org.jclouds.digitalocean2.domain;
import java.util.Date;
import java.util.List;
import javax.annotation.Generated;
import org.jclouds.javax.annotation.Nullable;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_Image extends Image {
private final int id;
private final String name;
private final String type;
private final String distribution;
private final String slug;
private final boolean isPublic;
private final List regions;
private final Date createdAt;
private final float minDiskSize;
private final float sizeGBs;
AutoValue_Image(
int id,
String name,
String type,
String distribution,
@Nullable String slug,
boolean isPublic,
List regions,
Date createdAt,
float minDiskSize,
float sizeGBs) {
this.id = id;
if (name == null) {
throw new NullPointerException("Null name");
}
this.name = name;
if (type == null) {
throw new NullPointerException("Null type");
}
this.type = type;
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;
if (createdAt == null) {
throw new NullPointerException("Null createdAt");
}
this.createdAt = createdAt;
this.minDiskSize = minDiskSize;
this.sizeGBs = sizeGBs;
}
@Override
public int id() {
return id;
}
@Override
public String name() {
return name;
}
@Override
public String type() {
return type;
}
@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 Date createdAt() {
return createdAt;
}
@Override
public float minDiskSize() {
return minDiskSize;
}
@Override
public float sizeGBs() {
return sizeGBs;
}
@Override
public String toString() {
return "Image{"
+ "id=" + id + ", "
+ "name=" + name + ", "
+ "type=" + type + ", "
+ "distribution=" + distribution + ", "
+ "slug=" + slug + ", "
+ "isPublic=" + isPublic + ", "
+ "regions=" + regions + ", "
+ "createdAt=" + createdAt + ", "
+ "minDiskSize=" + minDiskSize + ", "
+ "sizeGBs=" + sizeGBs
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof Image) {
Image that = (Image) o;
return (this.id == that.id())
&& (this.name.equals(that.name()))
&& (this.type.equals(that.type()))
&& (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.createdAt.equals(that.createdAt()))
&& (Float.floatToIntBits(this.minDiskSize) == Float.floatToIntBits(that.minDiskSize()))
&& (Float.floatToIntBits(this.sizeGBs) == Float.floatToIntBits(that.sizeGBs()));
}
return false;
}
@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= this.id;
h *= 1000003;
h ^= this.name.hashCode();
h *= 1000003;
h ^= this.type.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.createdAt.hashCode();
h *= 1000003;
h ^= Float.floatToIntBits(this.minDiskSize);
h *= 1000003;
h ^= Float.floatToIntBits(this.sizeGBs);
return h;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy