io.fabric8.kubernetes.api.model.LifecycleFluent Maven / Gradle / Ivy
package io.fabric8.kubernetes.api.model;
import java.util.HashMap;
import java.util.Map;
import io.fabric8.common.Nested;
import io.fabric8.common.Builder;
import io.fabric8.common.Fluent;
import io.fabric8.common.BaseFluent;
import io.fabric8.common.Visitable;
public class LifecycleFluent> extends BaseFluent implements Fluent{
HandlerBuilder postStart; HandlerBuilder preStop; Map additionalProperties = new HashMap();
public Handler getPostStart(){
return this.postStart!=null?this.postStart.build():null;
}
public T withPostStart( Handler postStart){
if (postStart!=null){ this.postStart= new HandlerBuilder(postStart); _visitables.add(this.postStart);} return (T) this;
}
public PostStartNested withNewPostStart(){
return new PostStartNested();
}
public Handler getPreStop(){
return this.preStop!=null?this.preStop.build():null;
}
public T withPreStop( Handler preStop){
if (preStop!=null){ this.preStop= new HandlerBuilder(preStop); _visitables.add(this.preStop);} return (T) this;
}
public PreStopNested withNewPreStop(){
return new PreStopNested();
}
public T addToAdditionalProperties( String key, Object value){
if(key != null && value != null) {this.additionalProperties.put(key, value);} 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 class PostStartNested extends HandlerFluent> implements Nested{
private final HandlerBuilder builder = new HandlerBuilder(this);
public N and(){
return (N) LifecycleFluent.this.withPostStart(builder.build());
}
public N endPostStart(){
return and();
}
}
public class PreStopNested extends HandlerFluent> implements Nested{
private final HandlerBuilder builder = new HandlerBuilder(this);
public N and(){
return (N) LifecycleFluent.this.withPreStop(builder.build());
}
public N endPreStop(){
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy