io.alauda.kubernetes.api.model.JenkinsStatusBuilder 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 JenkinsStatusBuilder extends JenkinsStatusFluentImpl implements VisitableBuilder{
JenkinsStatusFluent> fluent;
Boolean validationEnabled;
public JenkinsStatusBuilder(){
this(true);
}
public JenkinsStatusBuilder(Boolean validationEnabled){
this(new JenkinsStatus(), validationEnabled);
}
public JenkinsStatusBuilder(JenkinsStatusFluent> fluent){
this(fluent, true);
}
public JenkinsStatusBuilder(JenkinsStatusFluent> fluent,Boolean validationEnabled){
this(fluent, new JenkinsStatus(), validationEnabled);
}
public JenkinsStatusBuilder(JenkinsStatusFluent> fluent,JenkinsStatus instance){
this(fluent, instance, true);
}
public JenkinsStatusBuilder(JenkinsStatusFluent> fluent,JenkinsStatus instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withServiceStatus(instance.getServiceStatus());
this.validationEnabled = validationEnabled;
}
public JenkinsStatusBuilder(JenkinsStatus instance){
this(instance,true);
}
public JenkinsStatusBuilder(JenkinsStatus instance,Boolean validationEnabled){
this.fluent = this;
this.withServiceStatus(instance.getServiceStatus());
this.validationEnabled = validationEnabled;
}
public JenkinsStatus build(){
JenkinsStatus buildable = new JenkinsStatus(fluent.getServiceStatus());
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;
JenkinsStatusBuilder that = (JenkinsStatusBuilder) 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;
}
}