annotations.io.alauda.kubernetes.api.model.PipelineTaskOptionBuilder 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 PipelineTaskOptionBuilder extends PipelineTaskOptionFluentImpl implements VisitableBuilder{
PipelineTaskOptionFluent> fluent;
Boolean validationEnabled;
public PipelineTaskOptionBuilder(){
this(true);
}
public PipelineTaskOptionBuilder(Boolean validationEnabled){
this(new PipelineTaskOption(), validationEnabled);
}
public PipelineTaskOptionBuilder(PipelineTaskOptionFluent> fluent){
this(fluent, true);
}
public PipelineTaskOptionBuilder(PipelineTaskOptionFluent> fluent,Boolean validationEnabled){
this(fluent, new PipelineTaskOption(), validationEnabled);
}
public PipelineTaskOptionBuilder(PipelineTaskOptionFluent> fluent,PipelineTaskOption instance){
this(fluent, instance, true);
}
public PipelineTaskOptionBuilder(PipelineTaskOptionFluent> fluent,PipelineTaskOption instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withTimeout(instance.getTimeout());
this.validationEnabled = validationEnabled;
}
public PipelineTaskOptionBuilder(PipelineTaskOption instance){
this(instance,true);
}
public PipelineTaskOptionBuilder(PipelineTaskOption instance,Boolean validationEnabled){
this.fluent = this;
this.withTimeout(instance.getTimeout());
this.validationEnabled = validationEnabled;
}
public PipelineTaskOption build(){
PipelineTaskOption buildable = new PipelineTaskOption(fluent.getTimeout());
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;
PipelineTaskOptionBuilder that = (PipelineTaskOptionBuilder) 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;
}
}