annotations.io.alauda.kubernetes.api.model.PipelineStatusBuilder 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 PipelineStatusBuilder extends PipelineStatusFluentImpl implements VisitableBuilder{
PipelineStatusFluent> fluent;
Boolean validationEnabled;
public PipelineStatusBuilder(){
this(true);
}
public PipelineStatusBuilder(Boolean validationEnabled){
this(new PipelineStatus(), validationEnabled);
}
public PipelineStatusBuilder(PipelineStatusFluent> fluent){
this(fluent, true);
}
public PipelineStatusBuilder(PipelineStatusFluent> fluent,Boolean validationEnabled){
this(fluent, new PipelineStatus(), validationEnabled);
}
public PipelineStatusBuilder(PipelineStatusFluent> fluent,PipelineStatus instance){
this(fluent, instance, true);
}
public PipelineStatusBuilder(PipelineStatusFluent> fluent,PipelineStatus instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withAborted(instance.getAborted());
fluent.withFinishedAt(instance.getFinishedAt());
fluent.withJenkins(instance.getJenkins());
fluent.withPhase(instance.getPhase());
fluent.withStartedAt(instance.getStartedAt());
fluent.withUpdatedAt(instance.getUpdatedAt());
this.validationEnabled = validationEnabled;
}
public PipelineStatusBuilder(PipelineStatus instance){
this(instance,true);
}
public PipelineStatusBuilder(PipelineStatus instance,Boolean validationEnabled){
this.fluent = this;
this.withAborted(instance.getAborted());
this.withFinishedAt(instance.getFinishedAt());
this.withJenkins(instance.getJenkins());
this.withPhase(instance.getPhase());
this.withStartedAt(instance.getStartedAt());
this.withUpdatedAt(instance.getUpdatedAt());
this.validationEnabled = validationEnabled;
}
public PipelineStatus build(){
PipelineStatus buildable = new PipelineStatus(fluent.isAborted(),fluent.getFinishedAt(),fluent.getJenkins(),fluent.getPhase(),fluent.getStartedAt(),fluent.getUpdatedAt());
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;
PipelineStatusBuilder that = (PipelineStatusBuilder) 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;
}
}