io.alauda.kubernetes.api.model.MultiBranchOrphanBuilder Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model;
import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class MultiBranchOrphanBuilder extends MultiBranchOrphanFluentImpl implements VisitableBuilder{
MultiBranchOrphanFluent> fluent;
Boolean validationEnabled;
public MultiBranchOrphanBuilder(){
this(true);
}
public MultiBranchOrphanBuilder(Boolean validationEnabled){
this(new MultiBranchOrphan(), validationEnabled);
}
public MultiBranchOrphanBuilder(MultiBranchOrphanFluent> fluent){
this(fluent, true);
}
public MultiBranchOrphanBuilder(MultiBranchOrphanFluent> fluent,Boolean validationEnabled){
this(fluent, new MultiBranchOrphan(), validationEnabled);
}
public MultiBranchOrphanBuilder(MultiBranchOrphanFluent> fluent,MultiBranchOrphan instance){
this(fluent, instance, true);
}
public MultiBranchOrphanBuilder(MultiBranchOrphanFluent> fluent,MultiBranchOrphan instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withDays(instance.getDays());
fluent.withMax(instance.getMax());
this.validationEnabled = validationEnabled;
}
public MultiBranchOrphanBuilder(MultiBranchOrphan instance){
this(instance,true);
}
public MultiBranchOrphanBuilder(MultiBranchOrphan instance,Boolean validationEnabled){
this.fluent = this;
this.withDays(instance.getDays());
this.withMax(instance.getMax());
this.validationEnabled = validationEnabled;
}
public MultiBranchOrphan build(){
MultiBranchOrphan buildable = new MultiBranchOrphan(fluent.getDays(),fluent.getMax());
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;
MultiBranchOrphanBuilder that = (MultiBranchOrphanBuilder) 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;
}
}