io.alauda.kubernetes.api.model.PipelineStatusFluentImpl Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.alauda.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.Deprecated;
import javax.validation.Valid;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class PipelineStatusFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements PipelineStatusFluent{
private Boolean aborted;
private String finishedAt;
private PipelineStatusJenkinsBuilder jenkins;
private String phase;
private String startedAt;
private String updatedAt;
public PipelineStatusFluentImpl(){
}
public PipelineStatusFluentImpl(PipelineStatus instance){
this.withAborted(instance.getAborted());
this.withFinishedAt(instance.getFinishedAt());
this.withJenkins(instance.getJenkins());
this.withPhase(instance.getPhase());
this.withStartedAt(instance.getStartedAt());
this.withUpdatedAt(instance.getUpdatedAt());
}
public Boolean isAborted(){
return this.aborted;
}
public A withAborted(Boolean aborted){
this.aborted=aborted; return (A) this;
}
public Boolean hasAborted(){
return this.aborted!=null;
}
public String getFinishedAt(){
return this.finishedAt;
}
public A withFinishedAt(String finishedAt){
this.finishedAt=finishedAt; return (A) this;
}
public Boolean hasFinishedAt(){
return this.finishedAt!=null;
}
/**
* This method has been deprecated, please use method buildJenkins instead.
*/
@Deprecated public PipelineStatusJenkins getJenkins(){
return this.jenkins!=null?this.jenkins.build():null;
}
public PipelineStatusJenkins buildJenkins(){
return this.jenkins!=null?this.jenkins.build():null;
}
public A withJenkins(PipelineStatusJenkins jenkins){
_visitables.remove(this.jenkins);
if (jenkins!=null){ this.jenkins= new PipelineStatusJenkinsBuilder(jenkins); _visitables.add(this.jenkins);} return (A) this;
}
public Boolean hasJenkins(){
return this.jenkins!=null;
}
public PipelineStatusFluent.JenkinsNested withNewJenkins(){
return new JenkinsNestedImpl();
}
public PipelineStatusFluent.JenkinsNested withNewJenkinsLike(PipelineStatusJenkins item){
return new JenkinsNestedImpl(item);
}
public PipelineStatusFluent.JenkinsNested editJenkins(){
return withNewJenkinsLike(getJenkins());
}
public PipelineStatusFluent.JenkinsNested editOrNewJenkins(){
return withNewJenkinsLike(getJenkins() != null ? getJenkins(): new PipelineStatusJenkinsBuilder().build());
}
public PipelineStatusFluent.JenkinsNested editOrNewJenkinsLike(PipelineStatusJenkins item){
return withNewJenkinsLike(getJenkins() != null ? getJenkins(): item);
}
public A withNewJenkins(String build,String result,String stages,String startStageID,String status){
return (A)withJenkins(new PipelineStatusJenkins(build, result, stages, startStageID, status));
}
public String getPhase(){
return this.phase;
}
public A withPhase(String phase){
this.phase=phase; return (A) this;
}
public Boolean hasPhase(){
return this.phase!=null;
}
public String getStartedAt(){
return this.startedAt;
}
public A withStartedAt(String startedAt){
this.startedAt=startedAt; return (A) this;
}
public Boolean hasStartedAt(){
return this.startedAt!=null;
}
public String getUpdatedAt(){
return this.updatedAt;
}
public A withUpdatedAt(String updatedAt){
this.updatedAt=updatedAt; return (A) this;
}
public Boolean hasUpdatedAt(){
return this.updatedAt!=null;
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
PipelineStatusFluentImpl that = (PipelineStatusFluentImpl) o;
if (aborted != null ? !aborted.equals(that.aborted) :that.aborted != null) return false;
if (finishedAt != null ? !finishedAt.equals(that.finishedAt) :that.finishedAt != null) return false;
if (jenkins != null ? !jenkins.equals(that.jenkins) :that.jenkins != null) return false;
if (phase != null ? !phase.equals(that.phase) :that.phase != null) return false;
if (startedAt != null ? !startedAt.equals(that.startedAt) :that.startedAt != null) return false;
if (updatedAt != null ? !updatedAt.equals(that.updatedAt) :that.updatedAt != null) return false;
return true;
}
public class JenkinsNestedImpl extends PipelineStatusJenkinsFluentImpl> implements PipelineStatusFluent.JenkinsNested,io.alauda.kubernetes.api.builder.Nested{
private final PipelineStatusJenkinsBuilder builder;
JenkinsNestedImpl(PipelineStatusJenkins item){
this.builder = new PipelineStatusJenkinsBuilder(this, item);
}
JenkinsNestedImpl(){
this.builder = new PipelineStatusJenkinsBuilder(this);
}
public N and(){
return (N) PipelineStatusFluentImpl.this.withJenkins(builder.build());
}
public N endJenkins(){
return and();
}
}
}