annotations.io.alauda.kubernetes.api.model.extensions.IDRangeBuilder Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model.extensions;
import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class IDRangeBuilder extends io.alauda.kubernetes.api.model.extensions.IDRangeFluentImpl implements VisitableBuilder{
io.alauda.kubernetes.api.model.extensions.IDRangeFluent> fluent;
Boolean validationEnabled;
public IDRangeBuilder(){
this(true);
}
public IDRangeBuilder(Boolean validationEnabled){
this(new IDRange(), validationEnabled);
}
public IDRangeBuilder(io.alauda.kubernetes.api.model.extensions.IDRangeFluent> fluent){
this(fluent, true);
}
public IDRangeBuilder(io.alauda.kubernetes.api.model.extensions.IDRangeFluent> fluent,Boolean validationEnabled){
this(fluent, new IDRange(), validationEnabled);
}
public IDRangeBuilder(io.alauda.kubernetes.api.model.extensions.IDRangeFluent> fluent,io.alauda.kubernetes.api.model.extensions.IDRange instance){
this(fluent, instance, true);
}
public IDRangeBuilder(io.alauda.kubernetes.api.model.extensions.IDRangeFluent> fluent,io.alauda.kubernetes.api.model.extensions.IDRange instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withMax(instance.getMax());
fluent.withMin(instance.getMin());
this.validationEnabled = validationEnabled;
}
public IDRangeBuilder(io.alauda.kubernetes.api.model.extensions.IDRange instance){
this(instance,true);
}
public IDRangeBuilder(io.alauda.kubernetes.api.model.extensions.IDRange instance,Boolean validationEnabled){
this.fluent = this;
this.withMax(instance.getMax());
this.withMin(instance.getMin());
this.validationEnabled = validationEnabled;
}
public io.alauda.kubernetes.api.model.extensions.IDRange build(){
IDRange buildable = new IDRange(fluent.getMax(),fluent.getMin());
io.alauda.kubernetes.api.builder.ValidationUtils.validate(buildable);
return buildable;
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
IDRangeBuilder that = (IDRangeBuilder) o;
if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;
if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
return true;
}
}