io.fabric8.knative.eventing.contrib.kafka.v1beta1.KafkaTLSSpecFluent 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 io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
/**
* Generated
*/
@SuppressWarnings(value = "unchecked")
public class KafkaTLSSpecFluent> extends BaseFluent{
public KafkaTLSSpecFluent() {
}
public KafkaTLSSpecFluent(KafkaTLSSpec instance) {
instance = (instance != null ? instance : new KafkaTLSSpec());
if (instance != null) {
this.withCaCert(instance.getCaCert());
this.withCert(instance.getCert());
this.withEnable(instance.getEnable());
this.withKey(instance.getKey());
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;
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 CaCertNested withNewCaCert() {
return new CaCertNested(null);
}
public CaCertNested withNewCaCertLike(SecretValueFromSource item) {
return new CaCertNested(item);
}
public CaCertNested editCaCert() {
return withNewCaCertLike(java.util.Optional.ofNullable(buildCaCert()).orElse(null));
}
public CaCertNested editOrNewCaCert() {
return withNewCaCertLike(java.util.Optional.ofNullable(buildCaCert()).orElse(new SecretValueFromSourceBuilder().build()));
}
public CaCertNested editOrNewCaCertLike(SecretValueFromSource item) {
return withNewCaCertLike(java.util.Optional.ofNullable(buildCaCert()).orElse(item));
}
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 CertNested withNewCert() {
return new CertNested(null);
}
public CertNested withNewCertLike(SecretValueFromSource item) {
return new CertNested(item);
}
public CertNested editCert() {
return withNewCertLike(java.util.Optional.ofNullable(buildCert()).orElse(null));
}
public CertNested editOrNewCert() {
return withNewCertLike(java.util.Optional.ofNullable(buildCert()).orElse(new SecretValueFromSourceBuilder().build()));
}
public CertNested editOrNewCertLike(SecretValueFromSource item) {
return withNewCertLike(java.util.Optional.ofNullable(buildCert()).orElse(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;
}
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 KeyNested withNewKey() {
return new KeyNested(null);
}
public KeyNested withNewKeyLike(SecretValueFromSource item) {
return new KeyNested(item);
}
public KeyNested editKey() {
return withNewKeyLike(java.util.Optional.ofNullable(buildKey()).orElse(null));
}
public KeyNested editOrNewKey() {
return withNewKeyLike(java.util.Optional.ofNullable(buildKey()).orElse(new SecretValueFromSourceBuilder().build()));
}
public KeyNested editOrNewKeyLike(SecretValueFromSource item) {
return withNewKeyLike(java.util.Optional.ofNullable(buildKey()).orElse(item));
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
KafkaTLSSpecFluent that = (KafkaTLSSpecFluent) o;
if (!java.util.Objects.equals(caCert, that.caCert)) return false;
if (!java.util.Objects.equals(cert, that.cert)) return false;
if (!java.util.Objects.equals(enable, that.enable)) return false;
if (!java.util.Objects.equals(key, that.key)) 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);
}
public class CaCertNested extends SecretValueFromSourceFluent> implements Nested{
CaCertNested(SecretValueFromSource item) {
this.builder = new SecretValueFromSourceBuilder(this, item);
}
SecretValueFromSourceBuilder builder;
public N and() {
return (N) KafkaTLSSpecFluent.this.withCaCert(builder.build());
}
public N endCaCert() {
return and();
}
}
public class CertNested extends SecretValueFromSourceFluent> implements Nested{
CertNested(SecretValueFromSource item) {
this.builder = new SecretValueFromSourceBuilder(this, item);
}
SecretValueFromSourceBuilder builder;
public N and() {
return (N) KafkaTLSSpecFluent.this.withCert(builder.build());
}
public N endCert() {
return and();
}
}
public class KeyNested extends SecretValueFromSourceFluent> implements Nested{
KeyNested(SecretValueFromSource item) {
this.builder = new SecretValueFromSourceBuilder(this, item);
}
SecretValueFromSourceBuilder builder;
public N and() {
return (N) KafkaTLSSpecFluent.this.withKey(builder.build());
}
public N endKey() {
return and();
}
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy