io.alauda.kubernetes.api.model.JenkinsfilePreviewOptionsBuilder 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 JenkinsfilePreviewOptionsBuilder extends JenkinsfilePreviewOptionsFluentImpl implements VisitableBuilder{
JenkinsfilePreviewOptionsFluent> fluent;
Boolean validationEnabled;
public JenkinsfilePreviewOptionsBuilder(){
this(true);
}
public JenkinsfilePreviewOptionsBuilder(Boolean validationEnabled){
this(new JenkinsfilePreviewOptions(), validationEnabled);
}
public JenkinsfilePreviewOptionsBuilder(JenkinsfilePreviewOptionsFluent> fluent){
this(fluent, true);
}
public JenkinsfilePreviewOptionsBuilder(JenkinsfilePreviewOptionsFluent> fluent,Boolean validationEnabled){
this(fluent, new JenkinsfilePreviewOptions(), validationEnabled);
}
public JenkinsfilePreviewOptionsBuilder(JenkinsfilePreviewOptionsFluent> fluent,JenkinsfilePreviewOptions instance){
this(fluent, instance, true);
}
public JenkinsfilePreviewOptionsBuilder(JenkinsfilePreviewOptionsFluent> fluent,JenkinsfilePreviewOptions instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withApiVersion(instance.getApiVersion());
fluent.withKind(instance.getKind());
fluent.withSource(instance.getSource());
fluent.withTemplate(instance.getTemplate());
fluent.withValues(instance.getValues());
this.validationEnabled = validationEnabled;
}
public JenkinsfilePreviewOptionsBuilder(JenkinsfilePreviewOptions instance){
this(instance,true);
}
public JenkinsfilePreviewOptionsBuilder(JenkinsfilePreviewOptions instance,Boolean validationEnabled){
this.fluent = this;
this.withApiVersion(instance.getApiVersion());
this.withKind(instance.getKind());
this.withSource(instance.getSource());
this.withTemplate(instance.getTemplate());
this.withValues(instance.getValues());
this.validationEnabled = validationEnabled;
}
public JenkinsfilePreviewOptions build(){
JenkinsfilePreviewOptions buildable = new JenkinsfilePreviewOptions(fluent.getApiVersion(),fluent.getKind(),fluent.getSource(),fluent.getTemplate(),fluent.getValues());
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;
JenkinsfilePreviewOptionsBuilder that = (JenkinsfilePreviewOptionsBuilder) 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;
}
}