io.alauda.kubernetes.api.model.PipelineDependencyBuilder 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 PipelineDependencyBuilder extends PipelineDependencyFluentImpl implements VisitableBuilder{
PipelineDependencyFluent> fluent;
Boolean validationEnabled;
public PipelineDependencyBuilder(){
this(true);
}
public PipelineDependencyBuilder(Boolean validationEnabled){
this(new PipelineDependency(), validationEnabled);
}
public PipelineDependencyBuilder(PipelineDependencyFluent> fluent){
this(fluent, true);
}
public PipelineDependencyBuilder(PipelineDependencyFluent> fluent,Boolean validationEnabled){
this(fluent, new PipelineDependency(), validationEnabled);
}
public PipelineDependencyBuilder(PipelineDependencyFluent> fluent,PipelineDependency instance){
this(fluent, instance, true);
}
public PipelineDependencyBuilder(PipelineDependencyFluent> fluent,PipelineDependency instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withPlugins(instance.getPlugins());
this.validationEnabled = validationEnabled;
}
public PipelineDependencyBuilder(PipelineDependency instance){
this(instance,true);
}
public PipelineDependencyBuilder(PipelineDependency instance,Boolean validationEnabled){
this.fluent = this;
this.withPlugins(instance.getPlugins());
this.validationEnabled = validationEnabled;
}
public PipelineDependency build(){
PipelineDependency buildable = new PipelineDependency(fluent.getPlugins());
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;
PipelineDependencyBuilder that = (PipelineDependencyBuilder) 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;
}
}