io.dekorate.halkyon.model.StorageBuilder Maven / Gradle / Ivy
package io.dekorate.halkyon.model;
import io.dekorate.deps.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class StorageBuilder extends StorageFluentImpl implements VisitableBuilder{
StorageFluent> fluent;
Boolean validationEnabled;
public StorageBuilder(){
this(true);
}
public StorageBuilder(Boolean validationEnabled){
this(new Storage(), validationEnabled);
}
public StorageBuilder(StorageFluent> fluent){
this(fluent, true);
}
public StorageBuilder(StorageFluent> fluent,Boolean validationEnabled){
this(fluent, new Storage(), validationEnabled);
}
public StorageBuilder(StorageFluent> fluent,Storage instance){
this(fluent, instance, true);
}
public StorageBuilder(StorageFluent> fluent,Storage instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withName(instance.getName());
fluent.withCapacity(instance.getCapacity());
fluent.withMode(instance.getMode());
this.validationEnabled = validationEnabled;
}
public StorageBuilder(Storage instance){
this(instance,true);
}
public StorageBuilder(Storage instance,Boolean validationEnabled){
this.fluent = this;
this.withName(instance.getName());
this.withCapacity(instance.getCapacity());
this.withMode(instance.getMode());
this.validationEnabled = validationEnabled;
}
public Storage build(){
Storage buildable = new Storage(fluent.getName(),fluent.getCapacity(),fluent.getMode());
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;
StorageBuilder that = (StorageBuilder) 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;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy