
org.jclouds.profitbricks.domain.AutoValue_LoadBalancer_Request_UpdatePayload Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jclouds-shaded Show documentation
Show all versions of jclouds-shaded Show documentation
Provides a shaded jclouds with relocated guava and guice
The newest version!
package org.jclouds.profitbricks.domain;
import javax.annotation.Generated;
import org.jclouds.javax.annotation.Nullable;
@Generated("com.google.auto.value.processor.AutoValueProcessor")
final class AutoValue_LoadBalancer_Request_UpdatePayload extends LoadBalancer.Request.UpdatePayload {
private final String id;
private final String name;
private final LoadBalancer.Algorithm algorithm;
private final String ip;
private AutoValue_LoadBalancer_Request_UpdatePayload(
String id,
@Nullable String name,
LoadBalancer.Algorithm algorithm,
@Nullable String ip) {
this.id = id;
this.name = name;
this.algorithm = algorithm;
this.ip = ip;
}
@Override
public String id() {
return id;
}
@Nullable
@Override
public String name() {
return name;
}
@Override
public LoadBalancer.Algorithm algorithm() {
return algorithm;
}
@Nullable
@Override
public String ip() {
return ip;
}
@Override
public String toString() {
return "UpdatePayload{"
+ "id=" + id + ", "
+ "name=" + name + ", "
+ "algorithm=" + algorithm + ", "
+ "ip=" + ip
+ "}";
}
@Override
public boolean equals(Object o) {
if (o == this) {
return true;
}
if (o instanceof LoadBalancer.Request.UpdatePayload) {
LoadBalancer.Request.UpdatePayload that = (LoadBalancer.Request.UpdatePayload) o;
return (this.id.equals(that.id()))
&& ((this.name == null) ? (that.name() == null) : this.name.equals(that.name()))
&& (this.algorithm.equals(that.algorithm()))
&& ((this.ip == null) ? (that.ip() == null) : this.ip.equals(that.ip()));
}
return false;
}
@Override
public int hashCode() {
int h = 1;
h *= 1000003;
h ^= this.id.hashCode();
h *= 1000003;
h ^= (name == null) ? 0 : this.name.hashCode();
h *= 1000003;
h ^= this.algorithm.hashCode();
h *= 1000003;
h ^= (ip == null) ? 0 : this.ip.hashCode();
return h;
}
static final class Builder extends LoadBalancer.Request.UpdatePayload.Builder {
private String id;
private String name;
private LoadBalancer.Algorithm algorithm;
private String ip;
Builder() {
}
@Override
public LoadBalancer.Request.UpdatePayload.Builder id(String id) {
if (id == null) {
throw new NullPointerException("Null id");
}
this.id = id;
return this;
}
@Override
public LoadBalancer.Request.UpdatePayload.Builder name(@Nullable String name) {
this.name = name;
return this;
}
@Override
public LoadBalancer.Request.UpdatePayload.Builder algorithm(LoadBalancer.Algorithm algorithm) {
if (algorithm == null) {
throw new NullPointerException("Null algorithm");
}
this.algorithm = algorithm;
return this;
}
@Override
public LoadBalancer.Request.UpdatePayload.Builder ip(@Nullable String ip) {
this.ip = ip;
return this;
}
@Override
LoadBalancer.Request.UpdatePayload autoBuild() {
String missing = "";
if (this.id == null) {
missing += " id";
}
if (this.algorithm == null) {
missing += " algorithm";
}
if (!missing.isEmpty()) {
throw new IllegalStateException("Missing required properties:" + missing);
}
return new AutoValue_LoadBalancer_Request_UpdatePayload(
this.id,
this.name,
this.algorithm,
this.ip);
}
}
}