All Downloads are FREE. Search and download functionalities are using the official Maven repository.

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.VisitableBuilder;
import io.fabric8.common.Fluent;
import io.fabric8.common.BaseFluent;
import io.fabric8.common.Visitable;

public class LifecycleFluent> extends BaseFluent implements Fluent{

     VisitableBuilder postStart;     VisitableBuilder 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 PostStartNested withNewPostStartLike( Handler item){
    return new PostStartNested(item);
    }
    public PostStartNested editPostStart(){
    return withNewPostStartLike(getPostStart());
    }
    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 PreStopNested withNewPreStopLike( Handler item){
    return new PreStopNested(item);
    }
    public PreStopNested editPreStop(){
    return withNewPreStopLike(getPreStop());
    }
    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;
    
             PostStartNested ( Handler item){
        this.builder = new HandlerBuilder(item);
        }
             PostStartNested (){
        this.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;
    
             PreStopNested ( Handler item){
        this.builder = new HandlerBuilder(item);
        }
             PreStopNested (){
        this.builder = new HandlerBuilder(this);
        }
    
            public N endPreStop(){
            return and();
        }
            public N and(){
            return (N) LifecycleFluent.this.withPreStop(builder.build());
        }
    
}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy