io.alauda.kubernetes.api.model.PipelineTaskArgumentValidationBuilder 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 PipelineTaskArgumentValidationBuilder extends PipelineTaskArgumentValidationFluentImpl implements VisitableBuilder{
PipelineTaskArgumentValidationFluent> fluent;
Boolean validationEnabled;
public PipelineTaskArgumentValidationBuilder(){
this(true);
}
public PipelineTaskArgumentValidationBuilder(Boolean validationEnabled){
this(new PipelineTaskArgumentValidation(), validationEnabled);
}
public PipelineTaskArgumentValidationBuilder(PipelineTaskArgumentValidationFluent> fluent){
this(fluent, true);
}
public PipelineTaskArgumentValidationBuilder(PipelineTaskArgumentValidationFluent> fluent,Boolean validationEnabled){
this(fluent, new PipelineTaskArgumentValidation(), validationEnabled);
}
public PipelineTaskArgumentValidationBuilder(PipelineTaskArgumentValidationFluent> fluent,PipelineTaskArgumentValidation instance){
this(fluent, instance, true);
}
public PipelineTaskArgumentValidationBuilder(PipelineTaskArgumentValidationFluent> fluent,PipelineTaskArgumentValidation instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withPattern(instance.getPattern());
this.validationEnabled = validationEnabled;
}
public PipelineTaskArgumentValidationBuilder(PipelineTaskArgumentValidation instance){
this(instance,true);
}
public PipelineTaskArgumentValidationBuilder(PipelineTaskArgumentValidation instance,Boolean validationEnabled){
this.fluent = this;
this.withPattern(instance.getPattern());
this.validationEnabled = validationEnabled;
}
public PipelineTaskArgumentValidation build(){
PipelineTaskArgumentValidation buildable = new PipelineTaskArgumentValidation(fluent.getPattern());
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;
PipelineTaskArgumentValidationBuilder that = (PipelineTaskArgumentValidationBuilder) 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;
}
}