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

annotations.io.fabric8.kubernetes.api.model.HandlerFluent Maven / Gradle / Ivy

There is a newer version: 0.0.54
Show newest version
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.Visitable;
import io.fabric8.common.BaseFluent;

public class HandlerFluent> extends BaseFluent implements Fluent{

     ExecActionBuilder exec;     HTTPGetActionBuilder httpGet;     TCPSocketActionBuilder tcpSocket;     Map additionalProperties = new HashMap();

    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 ExecNested();
    }
    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 HttpGetNested();
    }
    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 TcpSocketNested();
    }
    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 ExecNested extends ExecActionFluent> implements Nested{

        private final ExecActionBuilder builder = new ExecActionBuilder(this);
    
            public N and(){
            return (N) HandlerFluent.this.withExec(builder.build());
        }
            public N endExec(){
            return and();
        }
    
}
    public class HttpGetNested extends HTTPGetActionFluent> implements Nested{

        private final HTTPGetActionBuilder builder = new HTTPGetActionBuilder(this);
    
            public N and(){
            return (N) HandlerFluent.this.withHttpGet(builder.build());
        }
            public N endHttpGet(){
            return and();
        }
    
}
    public class TcpSocketNested extends TCPSocketActionFluent> implements Nested{

        private final TCPSocketActionBuilder builder = new TCPSocketActionBuilder(this);
    
            public N endTcpSocket(){
            return and();
        }
            public N and(){
            return (N) HandlerFluent.this.withTcpSocket(builder.build());
        }
    
}


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy