io.fabric8.kubernetes.api.model.ProbeFluentImpl Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import java.util.Map;
import java.util.Map;
import java.util.HashMap;
import java.io.Serializable;
import java.util.AbstractMap;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.Fluent;
import io.fabric8.kubernetes.api.builder.Nested;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
public class ProbeFluentImpl> extends BaseFluent implements ProbeFluent{
VisitableBuilder exec; Integer failureThreshold; VisitableBuilder httpGet; Integer initialDelaySeconds; Integer periodSeconds; Integer successThreshold; VisitableBuilder tcpSocket; Integer timeoutSeconds; Map additionalProperties = new HashMap();
public ProbeFluentImpl(){
}
public ProbeFluentImpl( Probe instance ){
this.withExec(instance.getExec()); this.withFailureThreshold(instance.getFailureThreshold()); this.withHttpGet(instance.getHttpGet()); this.withInitialDelaySeconds(instance.getInitialDelaySeconds()); this.withPeriodSeconds(instance.getPeriodSeconds()); this.withSuccessThreshold(instance.getSuccessThreshold()); this.withTcpSocket(instance.getTcpSocket()); this.withTimeoutSeconds(instance.getTimeoutSeconds());
}
public ExecAction getExec(){
return this.exec!=null?this.exec.build():null;
}
public T withExec( ExecAction exec){
if (exec!=null){ this.exec= new ExecActionBuilder(exec); _visitables.add(this.exec);} return (T) this;
}
public ExecNested withNewExec(){
return new ExecNestedImpl();
}
public ExecNested withNewExecLike( ExecAction item){
return new ExecNestedImpl(item);
}
public ExecNested editExec(){
return withNewExecLike(getExec());
}
public Integer getFailureThreshold(){
return this.failureThreshold;
}
public T withFailureThreshold( Integer failureThreshold){
this.failureThreshold=failureThreshold; return (T) this;
}
public HTTPGetAction getHttpGet(){
return this.httpGet!=null?this.httpGet.build():null;
}
public T withHttpGet( HTTPGetAction httpGet){
if (httpGet!=null){ this.httpGet= new HTTPGetActionBuilder(httpGet); _visitables.add(this.httpGet);} return (T) this;
}
public HttpGetNested withNewHttpGet(){
return new HttpGetNestedImpl();
}
public HttpGetNested withNewHttpGetLike( HTTPGetAction item){
return new HttpGetNestedImpl(item);
}
public HttpGetNested editHttpGet(){
return withNewHttpGetLike(getHttpGet());
}
public Integer getInitialDelaySeconds(){
return this.initialDelaySeconds;
}
public T withInitialDelaySeconds( Integer initialDelaySeconds){
this.initialDelaySeconds=initialDelaySeconds; return (T) this;
}
public Integer getPeriodSeconds(){
return this.periodSeconds;
}
public T withPeriodSeconds( Integer periodSeconds){
this.periodSeconds=periodSeconds; return (T) this;
}
public Integer getSuccessThreshold(){
return this.successThreshold;
}
public T withSuccessThreshold( Integer successThreshold){
this.successThreshold=successThreshold; return (T) this;
}
public TCPSocketAction getTcpSocket(){
return this.tcpSocket!=null?this.tcpSocket.build():null;
}
public T withTcpSocket( TCPSocketAction tcpSocket){
if (tcpSocket!=null){ this.tcpSocket= new TCPSocketActionBuilder(tcpSocket); _visitables.add(this.tcpSocket);} return (T) this;
}
public TcpSocketNested withNewTcpSocket(){
return new TcpSocketNestedImpl();
}
public TcpSocketNested withNewTcpSocketLike( TCPSocketAction item){
return new TcpSocketNestedImpl(item);
}
public TcpSocketNested editTcpSocket(){
return withNewTcpSocketLike(getTcpSocket());
}
public Integer getTimeoutSeconds(){
return this.timeoutSeconds;
}
public T withTimeoutSeconds( Integer timeoutSeconds){
this.timeoutSeconds=timeoutSeconds; return (T) this;
}
public T addToAdditionalProperties( String key, Object value){
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
}
public T addToAdditionalProperties( Map map){
if(map != null) { this.additionalProperties.putAll(map);} return (T)this;
}
public T removeFromAdditionalProperties( String key){
if(key != null) {this.additionalProperties.remove(key);} return (T)this;
}
public T removeFromAdditionalProperties( Map map){
if(map != null) { for(Object key : map.keySet()) {this.additionalProperties.remove(key);}} return (T)this;
}
public Map getAdditionalProperties(){
return this.additionalProperties;
}
public T withAdditionalProperties( Map additionalProperties){
this.additionalProperties.clear();if (additionalProperties != null) {this.additionalProperties.putAll(additionalProperties);} return (T) this;
}
public boolean equals( Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ProbeFluentImpl that = (ProbeFluentImpl) o;
if (exec != null ? !exec.equals(that.exec) :that.exec != null) return false;
if (failureThreshold != null ? !failureThreshold.equals(that.failureThreshold) :that.failureThreshold != null) return false;
if (httpGet != null ? !httpGet.equals(that.httpGet) :that.httpGet != null) return false;
if (initialDelaySeconds != null ? !initialDelaySeconds.equals(that.initialDelaySeconds) :that.initialDelaySeconds != null) return false;
if (periodSeconds != null ? !periodSeconds.equals(that.periodSeconds) :that.periodSeconds != null) return false;
if (successThreshold != null ? !successThreshold.equals(that.successThreshold) :that.successThreshold != null) return false;
if (tcpSocket != null ? !tcpSocket.equals(that.tcpSocket) :that.tcpSocket != null) return false;
if (timeoutSeconds != null ? !timeoutSeconds.equals(that.timeoutSeconds) :that.timeoutSeconds != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;
}
public class ExecNestedImpl extends ExecActionFluentImpl> implements ExecNested{
private final ExecActionBuilder builder;
ExecNestedImpl (){
this.builder = new ExecActionBuilder(this);
}
ExecNestedImpl ( ExecAction item){
this.builder = new ExecActionBuilder(this, item);
}
public N and(){
return (N) ProbeFluentImpl.this.withExec(builder.build());
}
public N endExec(){
return and();
}
}
public class HttpGetNestedImpl extends HTTPGetActionFluentImpl> implements HttpGetNested{
private final HTTPGetActionBuilder builder;
HttpGetNestedImpl (){
this.builder = new HTTPGetActionBuilder(this);
}
HttpGetNestedImpl ( HTTPGetAction item){
this.builder = new HTTPGetActionBuilder(this, item);
}
public N endHttpGet(){
return and();
}
public N and(){
return (N) ProbeFluentImpl.this.withHttpGet(builder.build());
}
}
public class TcpSocketNestedImpl extends TCPSocketActionFluentImpl> implements TcpSocketNested{
private final TCPSocketActionBuilder builder;
TcpSocketNestedImpl (){
this.builder = new TCPSocketActionBuilder(this);
}
TcpSocketNestedImpl ( TCPSocketAction item){
this.builder = new TCPSocketActionBuilder(this, item);
}
public N and(){
return (N) ProbeFluentImpl.this.withTcpSocket(builder.build());
}
public N endTcpSocket(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy