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

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

package io.fabric8.kubernetes.api.model;

import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.util.LinkedHashMap;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Boolean;
import java.lang.Object;
import java.util.Map;

 /**
  * Generated
  */
public class LifecycleHandlerFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.kubernetes.api.model.LifecycleHandlerFluent{
  public LifecycleHandlerFluentImpl() {
  }
  public LifecycleHandlerFluentImpl(io.fabric8.kubernetes.api.model.LifecycleHandler instance) {
    this.withExec(instance.getExec()); 
    this.withHttpGet(instance.getHttpGet()); 
    this.withTcpSocket(instance.getTcpSocket()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

  }
  private io.fabric8.kubernetes.api.model.ExecActionBuilder exec;
  private io.fabric8.kubernetes.api.model.HTTPGetActionBuilder httpGet;
  private io.fabric8.kubernetes.api.model.TCPSocketActionBuilder tcpSocket;
  private java.util.Map additionalProperties;
  
  /**
   * This method has been deprecated, please use method buildExec instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.ExecAction getExec() {
    return this.exec!=null?this.exec.build():null;
  }
  public io.fabric8.kubernetes.api.model.ExecAction buildExec() {
    return this.exec!=null?this.exec.build():null;
  }
  public A withExec(io.fabric8.kubernetes.api.model.ExecAction exec) {
    _visitables.get("exec").remove(this.exec);
    if (exec!=null){ this.exec= new io.fabric8.kubernetes.api.model.ExecActionBuilder(exec); _visitables.get("exec").add(this.exec);} return (A) this;
  }
  public java.lang.Boolean hasExec() {
    return this.exec != null;
  }
  public io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.ExecNested withNewExec() {
    return new io.fabric8.kubernetes.api.model.LifecycleHandlerFluentImpl.ExecNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.ExecNested withNewExecLike(io.fabric8.kubernetes.api.model.ExecAction item) {
    return new io.fabric8.kubernetes.api.model.LifecycleHandlerFluentImpl.ExecNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.ExecNested editExec() {
    return withNewExecLike(getExec());
  }
  public io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.ExecNested editOrNewExec() {
    return withNewExecLike(getExec() != null ? getExec(): new io.fabric8.kubernetes.api.model.ExecActionBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.ExecNested editOrNewExecLike(io.fabric8.kubernetes.api.model.ExecAction item) {
    return withNewExecLike(getExec() != null ? getExec(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildHttpGet instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.HTTPGetAction getHttpGet() {
    return this.httpGet!=null?this.httpGet.build():null;
  }
  public io.fabric8.kubernetes.api.model.HTTPGetAction buildHttpGet() {
    return this.httpGet!=null?this.httpGet.build():null;
  }
  public A withHttpGet(io.fabric8.kubernetes.api.model.HTTPGetAction httpGet) {
    _visitables.get("httpGet").remove(this.httpGet);
    if (httpGet!=null){ this.httpGet= new io.fabric8.kubernetes.api.model.HTTPGetActionBuilder(httpGet); _visitables.get("httpGet").add(this.httpGet);} return (A) this;
  }
  public java.lang.Boolean hasHttpGet() {
    return this.httpGet != null;
  }
  public io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.HttpGetNested withNewHttpGet() {
    return new io.fabric8.kubernetes.api.model.LifecycleHandlerFluentImpl.HttpGetNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.HttpGetNested withNewHttpGetLike(io.fabric8.kubernetes.api.model.HTTPGetAction item) {
    return new io.fabric8.kubernetes.api.model.LifecycleHandlerFluentImpl.HttpGetNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.HttpGetNested editHttpGet() {
    return withNewHttpGetLike(getHttpGet());
  }
  public io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.HttpGetNested editOrNewHttpGet() {
    return withNewHttpGetLike(getHttpGet() != null ? getHttpGet(): new io.fabric8.kubernetes.api.model.HTTPGetActionBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.HttpGetNested editOrNewHttpGetLike(io.fabric8.kubernetes.api.model.HTTPGetAction item) {
    return withNewHttpGetLike(getHttpGet() != null ? getHttpGet(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildTcpSocket instead.
   * @return The buildable object.
   */
  @java.lang.Deprecated
  public io.fabric8.kubernetes.api.model.TCPSocketAction getTcpSocket() {
    return this.tcpSocket!=null?this.tcpSocket.build():null;
  }
  public io.fabric8.kubernetes.api.model.TCPSocketAction buildTcpSocket() {
    return this.tcpSocket!=null?this.tcpSocket.build():null;
  }
  public A withTcpSocket(io.fabric8.kubernetes.api.model.TCPSocketAction tcpSocket) {
    _visitables.get("tcpSocket").remove(this.tcpSocket);
    if (tcpSocket!=null){ this.tcpSocket= new io.fabric8.kubernetes.api.model.TCPSocketActionBuilder(tcpSocket); _visitables.get("tcpSocket").add(this.tcpSocket);} return (A) this;
  }
  public java.lang.Boolean hasTcpSocket() {
    return this.tcpSocket != null;
  }
  public io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.TcpSocketNested withNewTcpSocket() {
    return new io.fabric8.kubernetes.api.model.LifecycleHandlerFluentImpl.TcpSocketNestedImpl();
  }
  public io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.TcpSocketNested withNewTcpSocketLike(io.fabric8.kubernetes.api.model.TCPSocketAction item) {
    return new io.fabric8.kubernetes.api.model.LifecycleHandlerFluentImpl.TcpSocketNestedImpl(item);
  }
  public io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.TcpSocketNested editTcpSocket() {
    return withNewTcpSocketLike(getTcpSocket());
  }
  public io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.TcpSocketNested editOrNewTcpSocket() {
    return withNewTcpSocketLike(getTcpSocket() != null ? getTcpSocket(): new io.fabric8.kubernetes.api.model.TCPSocketActionBuilder().build());
  }
  public io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.TcpSocketNested editOrNewTcpSocketLike(io.fabric8.kubernetes.api.model.TCPSocketAction item) {
    return withNewTcpSocketLike(getTcpSocket() != null ? getTcpSocket(): item);
  }
  public A addToAdditionalProperties(java.lang.String key,java.lang.Object value) {
    if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (A)this;
  }
  public A addToAdditionalProperties(java.util.Map map) {
    if(this.additionalProperties == null && map != null) { this.additionalProperties = new java.util.LinkedHashMap(); }
    if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
  }
  public A removeFromAdditionalProperties(java.lang.String key) {
    if(this.additionalProperties == null) { return (A) this; }
    if(key != null && this.additionalProperties != null) {this.additionalProperties.remove(key);} return (A)this;
  }
  public A removeFromAdditionalProperties(java.util.Map map) {
    if(this.additionalProperties == null) { return (A) this; }
    if(map != null) { for(Object key : map.keySet()) {if (this.additionalProperties != null){this.additionalProperties.remove(key);}}} return (A)this;
  }
  public java.util.Map getAdditionalProperties() {
    return this.additionalProperties;
  }
  public A withAdditionalProperties(java.util.Map additionalProperties) {
    if (additionalProperties == null) { this.additionalProperties =  null;} else {this.additionalProperties = new java.util.LinkedHashMap(additionalProperties);} return (A) this;
  }
  public java.lang.Boolean hasAdditionalProperties() {
    return this.additionalProperties != null;
  }
  public boolean equals(java.lang.Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    LifecycleHandlerFluentImpl that = (LifecycleHandlerFluentImpl) 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;
    if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(exec,  httpGet,  tcpSocket,  additionalProperties,  super.hashCode());
  }
  public class ExecNestedImpl extends io.fabric8.kubernetes.api.model.ExecActionFluentImpl> implements io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.ExecNested,io.fabric8.kubernetes.api.builder.Nested{
    ExecNestedImpl(io.fabric8.kubernetes.api.model.ExecAction item) {
      this.builder = new io.fabric8.kubernetes.api.model.ExecActionBuilder(this, item);
    }
    ExecNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.ExecActionBuilder(this);
    }
    io.fabric8.kubernetes.api.model.ExecActionBuilder builder;
    public N and() {
      return (N) LifecycleHandlerFluentImpl.this.withExec(builder.build());
    }
    public N endExec() {
      return and();
    }
    
  }
  public class HttpGetNestedImpl extends io.fabric8.kubernetes.api.model.HTTPGetActionFluentImpl> implements io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.HttpGetNested,io.fabric8.kubernetes.api.builder.Nested{
    HttpGetNestedImpl(io.fabric8.kubernetes.api.model.HTTPGetAction item) {
      this.builder = new io.fabric8.kubernetes.api.model.HTTPGetActionBuilder(this, item);
    }
    HttpGetNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.HTTPGetActionBuilder(this);
    }
    io.fabric8.kubernetes.api.model.HTTPGetActionBuilder builder;
    public N and() {
      return (N) LifecycleHandlerFluentImpl.this.withHttpGet(builder.build());
    }
    public N endHttpGet() {
      return and();
    }
    
  }
  public class TcpSocketNestedImpl extends io.fabric8.kubernetes.api.model.TCPSocketActionFluentImpl> implements io.fabric8.kubernetes.api.model.LifecycleHandlerFluent.TcpSocketNested,io.fabric8.kubernetes.api.builder.Nested{
    TcpSocketNestedImpl(io.fabric8.kubernetes.api.model.TCPSocketAction item) {
      this.builder = new io.fabric8.kubernetes.api.model.TCPSocketActionBuilder(this, item);
    }
    TcpSocketNestedImpl() {
      this.builder = new io.fabric8.kubernetes.api.model.TCPSocketActionBuilder(this);
    }
    io.fabric8.kubernetes.api.model.TCPSocketActionBuilder builder;
    public N and() {
      return (N) LifecycleHandlerFluentImpl.this.withTcpSocket(builder.build());
    }
    public N endTcpSocket() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy