io.alauda.kubernetes.api.model.PipelineTemplateArgumentBuilder 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 PipelineTemplateArgumentBuilder extends PipelineTemplateArgumentFluentImpl implements VisitableBuilder{
PipelineTemplateArgumentFluent> fluent;
Boolean validationEnabled;
public PipelineTemplateArgumentBuilder(){
this(true);
}
public PipelineTemplateArgumentBuilder(Boolean validationEnabled){
this(new PipelineTemplateArgument(), validationEnabled);
}
public PipelineTemplateArgumentBuilder(PipelineTemplateArgumentFluent> fluent){
this(fluent, true);
}
public PipelineTemplateArgumentBuilder(PipelineTemplateArgumentFluent> fluent,Boolean validationEnabled){
this(fluent, new PipelineTemplateArgument(), validationEnabled);
}
public PipelineTemplateArgumentBuilder(PipelineTemplateArgumentFluent> fluent,PipelineTemplateArgument instance){
this(fluent, instance, true);
}
public PipelineTemplateArgumentBuilder(PipelineTemplateArgumentFluent> fluent,PipelineTemplateArgument instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withBinding(instance.getBinding());
fluent.withDefault(instance.getDefault());
fluent.withDisplay(instance.getDisplay());
fluent.withName(instance.getName());
fluent.withRequired(instance.getRequired());
fluent.withSchema(instance.getSchema());
fluent.withValidation(instance.getValidation());
this.validationEnabled = validationEnabled;
}
public PipelineTemplateArgumentBuilder(PipelineTemplateArgument instance){
this(instance,true);
}
public PipelineTemplateArgumentBuilder(PipelineTemplateArgument instance,Boolean validationEnabled){
this.fluent = this;
this.withBinding(instance.getBinding());
this.withDefault(instance.getDefault());
this.withDisplay(instance.getDisplay());
this.withName(instance.getName());
this.withRequired(instance.getRequired());
this.withSchema(instance.getSchema());
this.withValidation(instance.getValidation());
this.validationEnabled = validationEnabled;
}
public PipelineTemplateArgument build(){
PipelineTemplateArgument buildable = new PipelineTemplateArgument(fluent.getBinding(),fluent.getDefault(),fluent.getDisplay(),fluent.getName(),fluent.isRequired(),fluent.getSchema(),fluent.getValidation());
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;
PipelineTemplateArgumentBuilder that = (PipelineTemplateArgumentBuilder) 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;
}
}