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

io.fabric8.knative.eventing.contrib.kafka.v1beta1.KafkaTLSSpecFluentImpl Maven / Gradle / Ivy

package io.fabric8.knative.eventing.contrib.kafka.v1beta1;

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

 /**
  * Generated
  */
  @SuppressWarnings(value = "unchecked")
  public class KafkaTLSSpecFluentImpl> extends BaseFluent implements KafkaTLSSpecFluent{
  public KafkaTLSSpecFluentImpl() {
  }
  public KafkaTLSSpecFluentImpl(KafkaTLSSpec instance) {
    this.withCaCert(instance.getCaCert()); 
    this.withCert(instance.getCert()); 
    this.withEnable(instance.getEnable()); 
    this.withKey(instance.getKey()); 
  }
  private SecretValueFromSourceBuilder caCert;
  private SecretValueFromSourceBuilder cert;
  private Boolean enable;
  private SecretValueFromSourceBuilder key;
  
  /**
   * This method has been deprecated, please use method buildCaCert instead.
   * @return The buildable object.
   */
  @Deprecated
  public SecretValueFromSource getCaCert() {
    return this.caCert!=null ?this.caCert.build():null;
  }
  public SecretValueFromSource buildCaCert() {
    return this.caCert!=null ?this.caCert.build():null;
  }
  public A withCaCert(SecretValueFromSource caCert) {
    _visitables.get("caCert").remove(this.caCert);
    if (caCert!=null){ this.caCert= new SecretValueFromSourceBuilder(caCert); _visitables.get("caCert").add(this.caCert);} else { this.caCert = null; _visitables.get("caCert").remove(this.caCert); } return (A) this;
  }
  public Boolean hasCaCert() {
    return this.caCert != null;
  }
  public KafkaTLSSpecFluent.CaCertNested withNewCaCert() {
    return new KafkaTLSSpecFluentImpl.CaCertNestedImpl();
  }
  public KafkaTLSSpecFluent.CaCertNested withNewCaCertLike(SecretValueFromSource item) {
    return new KafkaTLSSpecFluentImpl.CaCertNestedImpl(item);
  }
  public KafkaTLSSpecFluent.CaCertNested editCaCert() {
    return withNewCaCertLike(getCaCert());
  }
  public KafkaTLSSpecFluent.CaCertNested editOrNewCaCert() {
    return withNewCaCertLike(getCaCert() != null ? getCaCert(): new SecretValueFromSourceBuilder().build());
  }
  public KafkaTLSSpecFluent.CaCertNested editOrNewCaCertLike(SecretValueFromSource item) {
    return withNewCaCertLike(getCaCert() != null ? getCaCert(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildCert instead.
   * @return The buildable object.
   */
  @Deprecated
  public SecretValueFromSource getCert() {
    return this.cert!=null ?this.cert.build():null;
  }
  public SecretValueFromSource buildCert() {
    return this.cert!=null ?this.cert.build():null;
  }
  public A withCert(SecretValueFromSource cert) {
    _visitables.get("cert").remove(this.cert);
    if (cert!=null){ this.cert= new SecretValueFromSourceBuilder(cert); _visitables.get("cert").add(this.cert);} else { this.cert = null; _visitables.get("cert").remove(this.cert); } return (A) this;
  }
  public Boolean hasCert() {
    return this.cert != null;
  }
  public KafkaTLSSpecFluent.CertNested withNewCert() {
    return new KafkaTLSSpecFluentImpl.CertNestedImpl();
  }
  public KafkaTLSSpecFluent.CertNested withNewCertLike(SecretValueFromSource item) {
    return new KafkaTLSSpecFluentImpl.CertNestedImpl(item);
  }
  public KafkaTLSSpecFluent.CertNested editCert() {
    return withNewCertLike(getCert());
  }
  public KafkaTLSSpecFluent.CertNested editOrNewCert() {
    return withNewCertLike(getCert() != null ? getCert(): new SecretValueFromSourceBuilder().build());
  }
  public KafkaTLSSpecFluent.CertNested editOrNewCertLike(SecretValueFromSource item) {
    return withNewCertLike(getCert() != null ? getCert(): item);
  }
  public Boolean getEnable() {
    return this.enable;
  }
  public A withEnable(Boolean enable) {
    this.enable=enable; return (A) this;
  }
  public Boolean hasEnable() {
    return this.enable != null;
  }
  
  /**
   * This method has been deprecated, please use method buildKey instead.
   * @return The buildable object.
   */
  @Deprecated
  public SecretValueFromSource getKey() {
    return this.key!=null ?this.key.build():null;
  }
  public SecretValueFromSource buildKey() {
    return this.key!=null ?this.key.build():null;
  }
  public A withKey(SecretValueFromSource key) {
    _visitables.get("key").remove(this.key);
    if (key!=null){ this.key= new SecretValueFromSourceBuilder(key); _visitables.get("key").add(this.key);} else { this.key = null; _visitables.get("key").remove(this.key); } return (A) this;
  }
  public Boolean hasKey() {
    return this.key != null;
  }
  public KafkaTLSSpecFluent.KeyNested withNewKey() {
    return new KafkaTLSSpecFluentImpl.KeyNestedImpl();
  }
  public KafkaTLSSpecFluent.KeyNested withNewKeyLike(SecretValueFromSource item) {
    return new KafkaTLSSpecFluentImpl.KeyNestedImpl(item);
  }
  public KafkaTLSSpecFluent.KeyNested editKey() {
    return withNewKeyLike(getKey());
  }
  public KafkaTLSSpecFluent.KeyNested editOrNewKey() {
    return withNewKeyLike(getKey() != null ? getKey(): new SecretValueFromSourceBuilder().build());
  }
  public KafkaTLSSpecFluent.KeyNested editOrNewKeyLike(SecretValueFromSource item) {
    return withNewKeyLike(getKey() != null ? getKey(): item);
  }
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    KafkaTLSSpecFluentImpl that = (KafkaTLSSpecFluentImpl) o;
    if (caCert != null ? !caCert.equals(that.caCert) :that.caCert != null) return false;
    if (cert != null ? !cert.equals(that.cert) :that.cert != null) return false;
    if (enable != null ? !enable.equals(that.enable) :that.enable != null) return false;
    if (key != null ? !key.equals(that.key) :that.key != null) return false;
    return true;
  }
  public int hashCode() {
    return java.util.Objects.hash(caCert,  cert,  enable,  key,  super.hashCode());
  }
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("{");
    if (caCert != null) { sb.append("caCert:"); sb.append(caCert + ","); }
    if (cert != null) { sb.append("cert:"); sb.append(cert + ","); }
    if (enable != null) { sb.append("enable:"); sb.append(enable + ","); }
    if (key != null) { sb.append("key:"); sb.append(key); }
    sb.append("}");
    return sb.toString();
  }
  public A withEnable() {
    return withEnable(true);
  }
  class CaCertNestedImpl extends SecretValueFromSourceFluentImpl> implements KafkaTLSSpecFluent.CaCertNested,Nested{
    CaCertNestedImpl(SecretValueFromSource item) {
      this.builder = new SecretValueFromSourceBuilder(this, item);
    }
    CaCertNestedImpl() {
      this.builder = new SecretValueFromSourceBuilder(this);
    }
    SecretValueFromSourceBuilder builder;
    public N and() {
      return (N) KafkaTLSSpecFluentImpl.this.withCaCert(builder.build());
    }
    public N endCaCert() {
      return and();
    }
    
  }
  class CertNestedImpl extends SecretValueFromSourceFluentImpl> implements KafkaTLSSpecFluent.CertNested,Nested{
    CertNestedImpl(SecretValueFromSource item) {
      this.builder = new SecretValueFromSourceBuilder(this, item);
    }
    CertNestedImpl() {
      this.builder = new SecretValueFromSourceBuilder(this);
    }
    SecretValueFromSourceBuilder builder;
    public N and() {
      return (N) KafkaTLSSpecFluentImpl.this.withCert(builder.build());
    }
    public N endCert() {
      return and();
    }
    
  }
  class KeyNestedImpl extends SecretValueFromSourceFluentImpl> implements KafkaTLSSpecFluent.KeyNested,Nested{
    KeyNestedImpl(SecretValueFromSource item) {
      this.builder = new SecretValueFromSourceBuilder(this, item);
    }
    KeyNestedImpl() {
      this.builder = new SecretValueFromSourceBuilder(this);
    }
    SecretValueFromSourceBuilder builder;
    public N and() {
      return (N) KafkaTLSSpecFluentImpl.this.withKey(builder.build());
    }
    public N endKey() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy