io.alauda.kubernetes.api.model.JenkinsStatusFluentImpl 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.Integer;
import java.lang.Deprecated;
import javax.validation.Valid;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.lang.Long;
import java.lang.Object;
import java.lang.Boolean;
public class JenkinsStatusFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements JenkinsStatusFluent{
private HostPortStatusBuilder http;
private String status;
public JenkinsStatusFluentImpl(){
}
public JenkinsStatusFluentImpl(JenkinsStatus instance){
this.withHttp(instance.getHttp());
this.withStatus(instance.getStatus());
}
/**
* This method has been deprecated, please use method buildHttp instead.
*/
@Deprecated public HostPortStatus getHttp(){
return this.http!=null?this.http.build():null;
}
public HostPortStatus buildHttp(){
return this.http!=null?this.http.build():null;
}
public A withHttp(HostPortStatus http){
_visitables.remove(this.http);
if (http!=null){ this.http= new HostPortStatusBuilder(http); _visitables.add(this.http);} return (A) this;
}
public Boolean hasHttp(){
return this.http!=null;
}
public JenkinsStatusFluent.HttpNested withNewHttp(){
return new HttpNestedImpl();
}
public JenkinsStatusFluent.HttpNested withNewHttpLike(HostPortStatus item){
return new HttpNestedImpl(item);
}
public JenkinsStatusFluent.HttpNested editHttp(){
return withNewHttpLike(getHttp());
}
public JenkinsStatusFluent.HttpNested editOrNewHttp(){
return withNewHttpLike(getHttp() != null ? getHttp(): new HostPortStatusBuilder().build());
}
public JenkinsStatusFluent.HttpNested editOrNewHttpLike(HostPortStatus item){
return withNewHttpLike(getHttp() != null ? getHttp(): item);
}
public A withNewHttp(Long delay,String lastAttempt,String response,Integer statusCode,String version){
return (A)withHttp(new HostPortStatus(delay, lastAttempt, response, statusCode, version));
}
public String getStatus(){
return this.status;
}
public A withStatus(String status){
this.status=status; return (A) this;
}
public Boolean hasStatus(){
return this.status!=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;
JenkinsStatusFluentImpl that = (JenkinsStatusFluentImpl) o;
if (http != null ? !http.equals(that.http) :that.http != null) return false;
if (status != null ? !status.equals(that.status) :that.status != null) return false;
return true;
}
public class HttpNestedImpl extends HostPortStatusFluentImpl> implements JenkinsStatusFluent.HttpNested,io.alauda.kubernetes.api.builder.Nested{
private final HostPortStatusBuilder builder;
HttpNestedImpl(HostPortStatus item){
this.builder = new HostPortStatusBuilder(this, item);
}
HttpNestedImpl(){
this.builder = new HostPortStatusBuilder(this);
}
public N and(){
return (N) JenkinsStatusFluentImpl.this.withHttp(builder.build());
}
public N endHttp(){
return and();
}
}
}