annotations.io.alauda.kubernetes.api.model.JenkinsBindingSpecBuilder 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 JenkinsBindingSpecBuilder extends JenkinsBindingSpecFluentImpl implements VisitableBuilder{
JenkinsBindingSpecFluent> fluent;
Boolean validationEnabled;
public JenkinsBindingSpecBuilder(){
this(true);
}
public JenkinsBindingSpecBuilder(Boolean validationEnabled){
this(new JenkinsBindingSpec(), validationEnabled);
}
public JenkinsBindingSpecBuilder(JenkinsBindingSpecFluent> fluent){
this(fluent, true);
}
public JenkinsBindingSpecBuilder(JenkinsBindingSpecFluent> fluent,Boolean validationEnabled){
this(fluent, new JenkinsBindingSpec(), validationEnabled);
}
public JenkinsBindingSpecBuilder(JenkinsBindingSpecFluent> fluent,JenkinsBindingSpec instance){
this(fluent, instance, true);
}
public JenkinsBindingSpecBuilder(JenkinsBindingSpecFluent> fluent,JenkinsBindingSpec instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withAccount(instance.getAccount());
fluent.withJenkins(instance.getJenkins());
this.validationEnabled = validationEnabled;
}
public JenkinsBindingSpecBuilder(JenkinsBindingSpec instance){
this(instance,true);
}
public JenkinsBindingSpecBuilder(JenkinsBindingSpec instance,Boolean validationEnabled){
this.fluent = this;
this.withAccount(instance.getAccount());
this.withJenkins(instance.getJenkins());
this.validationEnabled = validationEnabled;
}
public JenkinsBindingSpec build(){
JenkinsBindingSpec buildable = new JenkinsBindingSpec(fluent.getAccount(),fluent.getJenkins());
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;
JenkinsBindingSpecBuilder that = (JenkinsBindingSpecBuilder) 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;
}
}