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