io.fabric8.knative.bindings.v1beta1.KafkaTLSSpecFluent Maven / Gradle / Ivy
The newest version!
package io.fabric8.knative.bindings.v1beta1;
import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.util.LinkedHashMap;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;
/**
* Generated
*/
@SuppressWarnings("unchecked")
public class KafkaTLSSpecFluent> extends BaseFluent{
public KafkaTLSSpecFluent() {
}
public KafkaTLSSpecFluent(KafkaTLSSpec instance) {
this.copyInstance(instance);
}
private SecretValueFromSourceBuilder caCert;
private SecretValueFromSourceBuilder cert;
private Boolean enable;
private SecretValueFromSourceBuilder key;
private Map additionalProperties;
protected void copyInstance(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.withAdditionalProperties(instance.getAdditionalProperties());
}
}
public SecretValueFromSource buildCaCert() {
return this.caCert != null ? this.caCert.build() : null;
}
public A withCaCert(SecretValueFromSource caCert) {
this._visitables.remove("caCert");
if (caCert != null) {
this.caCert = new SecretValueFromSourceBuilder(caCert);
this._visitables.get("caCert").add(this.caCert);
} else {
this.caCert = null;
this._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) {
this._visitables.remove("cert");
if (cert != null) {
this.cert = new SecretValueFromSourceBuilder(cert);
this._visitables.get("cert").add(this.cert);
} else {
this.cert = null;
this._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) {
this._visitables.remove("key");
if (key != null) {
this.key = new SecretValueFromSourceBuilder(key);
this._visitables.get("key").add(this.key);
} else {
this.key = null;
this._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 A addToAdditionalProperties(String key,Object value) {
if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new LinkedHashMap(); }
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (A)this;
}
public A addToAdditionalProperties(Map map) {
if(this.additionalProperties == null && map != null) { this.additionalProperties = new LinkedHashMap(); }
if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
}
public A removeFromAdditionalProperties(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(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 Map getAdditionalProperties() {
return this.additionalProperties;
}
public A withAdditionalProperties(Map additionalProperties) {
if (additionalProperties == null) {
this.additionalProperties = null;
} else {
this.additionalProperties = new LinkedHashMap(additionalProperties);
}
return (A) this;
}
public boolean hasAdditionalProperties() {
return this.additionalProperties != null;
}
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;
if (!java.util.Objects.equals(additionalProperties, that.additionalProperties)) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(caCert, cert, enable, key, additionalProperties, 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 + ","); }
if (additionalProperties != null && !additionalProperties.isEmpty()) { sb.append("additionalProperties:"); sb.append(additionalProperties); }
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