io.alauda.kubernetes.api.model.PipelineTriggerCodeChangeBuilder 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 PipelineTriggerCodeChangeBuilder extends PipelineTriggerCodeChangeFluentImpl implements VisitableBuilder{
PipelineTriggerCodeChangeFluent> fluent;
Boolean validationEnabled;
public PipelineTriggerCodeChangeBuilder(){
this(true);
}
public PipelineTriggerCodeChangeBuilder(Boolean validationEnabled){
this(new PipelineTriggerCodeChange(), validationEnabled);
}
public PipelineTriggerCodeChangeBuilder(PipelineTriggerCodeChangeFluent> fluent){
this(fluent, true);
}
public PipelineTriggerCodeChangeBuilder(PipelineTriggerCodeChangeFluent> fluent,Boolean validationEnabled){
this(fluent, new PipelineTriggerCodeChange(), validationEnabled);
}
public PipelineTriggerCodeChangeBuilder(PipelineTriggerCodeChangeFluent> fluent,PipelineTriggerCodeChange instance){
this(fluent, instance, true);
}
public PipelineTriggerCodeChangeBuilder(PipelineTriggerCodeChangeFluent> fluent,PipelineTriggerCodeChange instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withEnabled(instance.getEnabled());
fluent.withPeriodicCheck(instance.getPeriodicCheck());
this.validationEnabled = validationEnabled;
}
public PipelineTriggerCodeChangeBuilder(PipelineTriggerCodeChange instance){
this(instance,true);
}
public PipelineTriggerCodeChangeBuilder(PipelineTriggerCodeChange instance,Boolean validationEnabled){
this.fluent = this;
this.withEnabled(instance.getEnabled());
this.withPeriodicCheck(instance.getPeriodicCheck());
this.validationEnabled = validationEnabled;
}
public PipelineTriggerCodeChange build(){
PipelineTriggerCodeChange buildable = new PipelineTriggerCodeChange(fluent.isEnabled(),fluent.getPeriodicCheck());
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;
PipelineTriggerCodeChangeBuilder that = (PipelineTriggerCodeChangeBuilder) 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;
}
}