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

io.kubernetes.client.models.V1ProbeFluentImpl Maven / Gradle / Ivy

package io.kubernetes.client.models;

import com.google.gson.annotations.SerializedName;
import io.kubernetes.client.fluent.Nested;
import java.lang.String;
import java.lang.Deprecated;
import io.kubernetes.client.fluent.BaseFluent;
import java.lang.Boolean;
import java.lang.Integer;
import java.lang.Object;

public class V1ProbeFluentImpl> extends io.kubernetes.client.fluent.BaseFluent implements V1ProbeFluent{

    private V1ExecActionBuilder exec;
    private Integer failureThreshold;
    private V1HTTPGetActionBuilder httpGet;
    private Integer initialDelaySeconds;
    private Integer periodSeconds;
    private Integer successThreshold;
    private V1TCPSocketActionBuilder tcpSocket;
    private Integer timeoutSeconds;

    public V1ProbeFluentImpl(){
    }
    public V1ProbeFluentImpl(V1Probe 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());

    }

    
/**
 * This method has been deprecated, please use method buildExec instead.
 */
@Deprecated public V1ExecAction getExec(){
            return this.exec!=null?this.exec.build():null;
    }

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

    public A withExec(V1ExecAction exec){
            _visitables.remove(this.exec);
            if (exec!=null){ this.exec= new V1ExecActionBuilder(exec); _visitables.add(this.exec);} return (A) this;
    }

    public Boolean hasExec(){
            return this.exec != null;
    }

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

    public V1ProbeFluent.ExecNested withNewExecLike(V1ExecAction item){
            return new ExecNestedImpl(item);
    }

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

    public V1ProbeFluent.ExecNested editOrNewExec(){
            return withNewExecLike(getExec() != null ? getExec(): new V1ExecActionBuilder().build());
    }

    public V1ProbeFluent.ExecNested editOrNewExecLike(V1ExecAction item){
            return withNewExecLike(getExec() != null ? getExec(): item);
    }

    public Integer getFailureThreshold(){
            return this.failureThreshold;
    }

    public A withFailureThreshold(Integer failureThreshold){
            this.failureThreshold=failureThreshold; return (A) this;
    }

    public Boolean hasFailureThreshold(){
            return this.failureThreshold != null;
    }

    public A withNewFailureThreshold(int arg1){
            return (A)withFailureThreshold(new Integer(arg1));
    }

    public A withNewFailureThreshold(String arg1){
            return (A)withFailureThreshold(new Integer(arg1));
    }

    
/**
 * This method has been deprecated, please use method buildHttpGet instead.
 */
@Deprecated public V1HTTPGetAction getHttpGet(){
            return this.httpGet!=null?this.httpGet.build():null;
    }

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

    public A withHttpGet(V1HTTPGetAction httpGet){
            _visitables.remove(this.httpGet);
            if (httpGet!=null){ this.httpGet= new V1HTTPGetActionBuilder(httpGet); _visitables.add(this.httpGet);} return (A) this;
    }

    public Boolean hasHttpGet(){
            return this.httpGet != null;
    }

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

    public V1ProbeFluent.HttpGetNested withNewHttpGetLike(V1HTTPGetAction item){
            return new HttpGetNestedImpl(item);
    }

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

    public V1ProbeFluent.HttpGetNested editOrNewHttpGet(){
            return withNewHttpGetLike(getHttpGet() != null ? getHttpGet(): new V1HTTPGetActionBuilder().build());
    }

    public V1ProbeFluent.HttpGetNested editOrNewHttpGetLike(V1HTTPGetAction item){
            return withNewHttpGetLike(getHttpGet() != null ? getHttpGet(): item);
    }

    public Integer getInitialDelaySeconds(){
            return this.initialDelaySeconds;
    }

    public A withInitialDelaySeconds(Integer initialDelaySeconds){
            this.initialDelaySeconds=initialDelaySeconds; return (A) this;
    }

    public Boolean hasInitialDelaySeconds(){
            return this.initialDelaySeconds != null;
    }

    public A withNewInitialDelaySeconds(int arg1){
            return (A)withInitialDelaySeconds(new Integer(arg1));
    }

    public A withNewInitialDelaySeconds(String arg1){
            return (A)withInitialDelaySeconds(new Integer(arg1));
    }

    public Integer getPeriodSeconds(){
            return this.periodSeconds;
    }

    public A withPeriodSeconds(Integer periodSeconds){
            this.periodSeconds=periodSeconds; return (A) this;
    }

    public Boolean hasPeriodSeconds(){
            return this.periodSeconds != null;
    }

    public A withNewPeriodSeconds(int arg1){
            return (A)withPeriodSeconds(new Integer(arg1));
    }

    public A withNewPeriodSeconds(String arg1){
            return (A)withPeriodSeconds(new Integer(arg1));
    }

    public Integer getSuccessThreshold(){
            return this.successThreshold;
    }

    public A withSuccessThreshold(Integer successThreshold){
            this.successThreshold=successThreshold; return (A) this;
    }

    public Boolean hasSuccessThreshold(){
            return this.successThreshold != null;
    }

    public A withNewSuccessThreshold(int arg1){
            return (A)withSuccessThreshold(new Integer(arg1));
    }

    public A withNewSuccessThreshold(String arg1){
            return (A)withSuccessThreshold(new Integer(arg1));
    }

    
/**
 * This method has been deprecated, please use method buildTcpSocket instead.
 */
@Deprecated public V1TCPSocketAction getTcpSocket(){
            return this.tcpSocket!=null?this.tcpSocket.build():null;
    }

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

    public A withTcpSocket(V1TCPSocketAction tcpSocket){
            _visitables.remove(this.tcpSocket);
            if (tcpSocket!=null){ this.tcpSocket= new V1TCPSocketActionBuilder(tcpSocket); _visitables.add(this.tcpSocket);} return (A) this;
    }

    public Boolean hasTcpSocket(){
            return this.tcpSocket != null;
    }

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

    public V1ProbeFluent.TcpSocketNested withNewTcpSocketLike(V1TCPSocketAction item){
            return new TcpSocketNestedImpl(item);
    }

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

    public V1ProbeFluent.TcpSocketNested editOrNewTcpSocket(){
            return withNewTcpSocketLike(getTcpSocket() != null ? getTcpSocket(): new V1TCPSocketActionBuilder().build());
    }

    public V1ProbeFluent.TcpSocketNested editOrNewTcpSocketLike(V1TCPSocketAction item){
            return withNewTcpSocketLike(getTcpSocket() != null ? getTcpSocket(): item);
    }

    public Integer getTimeoutSeconds(){
            return this.timeoutSeconds;
    }

    public A withTimeoutSeconds(Integer timeoutSeconds){
            this.timeoutSeconds=timeoutSeconds; return (A) this;
    }

    public Boolean hasTimeoutSeconds(){
            return this.timeoutSeconds != null;
    }

    public A withNewTimeoutSeconds(int arg1){
            return (A)withTimeoutSeconds(new Integer(arg1));
    }

    public A withNewTimeoutSeconds(String arg1){
            return (A)withTimeoutSeconds(new Integer(arg1));
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            V1ProbeFluentImpl that = (V1ProbeFluentImpl) 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;
            return true;
    }


    public class ExecNestedImpl extends V1ExecActionFluentImpl> implements V1ProbeFluent.ExecNested,io.kubernetes.client.fluent.Nested{

            private final V1ExecActionBuilder builder;
    
            ExecNestedImpl(V1ExecAction item){
                    this.builder = new V1ExecActionBuilder(this, item);
            }
            ExecNestedImpl(){
                    this.builder = new V1ExecActionBuilder(this);
            }
    
    public N and(){
            return (N) V1ProbeFluentImpl.this.withExec(builder.build());
    }
    public N endExec(){
            return and();
    }

}
    public class HttpGetNestedImpl extends V1HTTPGetActionFluentImpl> implements V1ProbeFluent.HttpGetNested,io.kubernetes.client.fluent.Nested{

            private final V1HTTPGetActionBuilder builder;
    
            HttpGetNestedImpl(V1HTTPGetAction item){
                    this.builder = new V1HTTPGetActionBuilder(this, item);
            }
            HttpGetNestedImpl(){
                    this.builder = new V1HTTPGetActionBuilder(this);
            }
    
    public N and(){
            return (N) V1ProbeFluentImpl.this.withHttpGet(builder.build());
    }
    public N endHttpGet(){
            return and();
    }

}
    public class TcpSocketNestedImpl extends V1TCPSocketActionFluentImpl> implements V1ProbeFluent.TcpSocketNested,io.kubernetes.client.fluent.Nested{

            private final V1TCPSocketActionBuilder builder;
    
            TcpSocketNestedImpl(V1TCPSocketAction item){
                    this.builder = new V1TCPSocketActionBuilder(this, item);
            }
            TcpSocketNestedImpl(){
                    this.builder = new V1TCPSocketActionBuilder(this);
            }
    
    public N and(){
            return (N) V1ProbeFluentImpl.this.withTcpSocket(builder.build());
    }
    public N endTcpSocket(){
            return and();
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy