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

io.fabric8.kubernetes.api.model.HandlerFluentImpl Maven / Gradle / Ivy

There is a newer version: 4.1.1
Show newest version
package io.fabric8.kubernetes.api.model;

import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.validation.Valid;
import java.lang.Object;
import io.fabric8.kubernetes.api.builder.Nested;

public class HandlerFluentImpl> extends BaseFluent implements HandlerFluent{

    private VisitableBuilder exec;
    private VisitableBuilder httpGet;
    private VisitableBuilder tcpSocket;

    public HandlerFluentImpl(){
    }
    public HandlerFluentImpl(Handler instance){
            this.withExec(instance.getExec()); 
            this.withHttpGet(instance.getHttpGet()); 
            this.withTcpSocket(instance.getTcpSocket()); 
    }

    public ExecAction getExec(){
            return this.exec!=null?this.exec.build():null;
    }

    public A withExec(ExecAction exec){
            if (exec!=null){ this.exec= new ExecActionBuilder(exec); _visitables.add(this.exec);} return (A) this;
    }

    public HandlerFluent.ExecNested withNewExec(){
            return new ExecNestedImpl();
    }

    public HandlerFluent.ExecNested withNewExecLike(ExecAction item){
            return new ExecNestedImpl(item);
    }

    public HandlerFluent.ExecNested editExec(){
            return withNewExecLike(getExec());
    }

    public HTTPGetAction getHttpGet(){
            return this.httpGet!=null?this.httpGet.build():null;
    }

    public A withHttpGet(HTTPGetAction httpGet){
            if (httpGet!=null){ this.httpGet= new HTTPGetActionBuilder(httpGet); _visitables.add(this.httpGet);} return (A) this;
    }

    public HandlerFluent.HttpGetNested withNewHttpGet(){
            return new HttpGetNestedImpl();
    }

    public HandlerFluent.HttpGetNested withNewHttpGetLike(HTTPGetAction item){
            return new HttpGetNestedImpl(item);
    }

    public HandlerFluent.HttpGetNested editHttpGet(){
            return withNewHttpGetLike(getHttpGet());
    }

    public TCPSocketAction getTcpSocket(){
            return this.tcpSocket!=null?this.tcpSocket.build():null;
    }

    public A withTcpSocket(TCPSocketAction tcpSocket){
            if (tcpSocket!=null){ this.tcpSocket= new TCPSocketActionBuilder(tcpSocket); _visitables.add(this.tcpSocket);} return (A) this;
    }

    public HandlerFluent.TcpSocketNested withNewTcpSocket(){
            return new TcpSocketNestedImpl();
    }

    public HandlerFluent.TcpSocketNested withNewTcpSocketLike(TCPSocketAction item){
            return new TcpSocketNestedImpl(item);
    }

    public HandlerFluent.TcpSocketNested editTcpSocket(){
            return withNewTcpSocketLike(getTcpSocket());
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            HandlerFluentImpl that = (HandlerFluentImpl) o;
            if (exec != null ? !exec.equals(that.exec) :that.exec != null) return false;
            if (httpGet != null ? !httpGet.equals(that.httpGet) :that.httpGet != null) return false;
            if (tcpSocket != null ? !tcpSocket.equals(that.tcpSocket) :that.tcpSocket != null) return false;
            return true;
    }


    public class ExecNestedImpl extends ExecActionFluentImpl> implements HandlerFluent.ExecNested,Nested{

            private final ExecActionBuilder builder;
    
            ExecNestedImpl(){
                    this.builder = new ExecActionBuilder(this);
            }
            ExecNestedImpl(ExecAction item){
                    this.builder = new ExecActionBuilder(this, item);
            }
    
    public N and(){
            return (N) HandlerFluentImpl.this.withExec(builder.build());
    }
    public N endExec(){
            return and();
    }

}
    public class HttpGetNestedImpl extends HTTPGetActionFluentImpl> implements HandlerFluent.HttpGetNested,Nested{

            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) HandlerFluentImpl.this.withHttpGet(builder.build());
    }

}
    public class TcpSocketNestedImpl extends TCPSocketActionFluentImpl> implements HandlerFluent.TcpSocketNested,Nested{

            private final TCPSocketActionBuilder builder;
    
            TcpSocketNestedImpl(){
                    this.builder = new TCPSocketActionBuilder(this);
            }
            TcpSocketNestedImpl(TCPSocketAction item){
                    this.builder = new TCPSocketActionBuilder(this, item);
            }
    
    public N and(){
            return (N) HandlerFluentImpl.this.withTcpSocket(builder.build());
    }
    public N endTcpSocket(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy