io.fabric8.knative.eventing.contrib.kafka.v1beta1.KafkaSASLSpecFluent 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 KafkaSASLSpecFluent> extends BaseFluent{
public KafkaSASLSpecFluent() {
}
public KafkaSASLSpecFluent(KafkaSASLSpec instance) {
instance = (instance != null ? instance : new KafkaSASLSpec());
if (instance != null) {
this.withEnable(instance.getEnable());
this.withPassword(instance.getPassword());
this.withType(instance.getType());
this.withUser(instance.getUser());
this.withEnable(instance.getEnable());
this.withPassword(instance.getPassword());
this.withType(instance.getType());
this.withUser(instance.getUser());
}
}
private Boolean enable;
private SecretValueFromSourceBuilder password;
private SecretValueFromSourceBuilder type;
private SecretValueFromSourceBuilder user;
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 buildPassword() {
return this.password!=null ?this.password.build():null;
}
public A withPassword(SecretValueFromSource password) {
_visitables.get("password").remove(this.password);
if (password!=null){ this.password= new SecretValueFromSourceBuilder(password); _visitables.get("password").add(this.password);} else { this.password = null; _visitables.get("password").remove(this.password); } return (A) this;
}
public boolean hasPassword() {
return this.password != null;
}
public PasswordNested withNewPassword() {
return new PasswordNested(null);
}
public PasswordNested withNewPasswordLike(SecretValueFromSource item) {
return new PasswordNested(item);
}
public PasswordNested editPassword() {
return withNewPasswordLike(java.util.Optional.ofNullable(buildPassword()).orElse(null));
}
public PasswordNested editOrNewPassword() {
return withNewPasswordLike(java.util.Optional.ofNullable(buildPassword()).orElse(new SecretValueFromSourceBuilder().build()));
}
public PasswordNested editOrNewPasswordLike(SecretValueFromSource item) {
return withNewPasswordLike(java.util.Optional.ofNullable(buildPassword()).orElse(item));
}
public SecretValueFromSource buildType() {
return this.type!=null ?this.type.build():null;
}
public A withType(SecretValueFromSource type) {
_visitables.get("type").remove(this.type);
if (type!=null){ this.type= new SecretValueFromSourceBuilder(type); _visitables.get("type").add(this.type);} else { this.type = null; _visitables.get("type").remove(this.type); } return (A) this;
}
public boolean hasType() {
return this.type != null;
}
public TypeNested withNewType() {
return new TypeNested(null);
}
public TypeNested withNewTypeLike(SecretValueFromSource item) {
return new TypeNested(item);
}
public TypeNested editType() {
return withNewTypeLike(java.util.Optional.ofNullable(buildType()).orElse(null));
}
public TypeNested editOrNewType() {
return withNewTypeLike(java.util.Optional.ofNullable(buildType()).orElse(new SecretValueFromSourceBuilder().build()));
}
public TypeNested editOrNewTypeLike(SecretValueFromSource item) {
return withNewTypeLike(java.util.Optional.ofNullable(buildType()).orElse(item));
}
public SecretValueFromSource buildUser() {
return this.user!=null ?this.user.build():null;
}
public A withUser(SecretValueFromSource user) {
_visitables.get("user").remove(this.user);
if (user!=null){ this.user= new SecretValueFromSourceBuilder(user); _visitables.get("user").add(this.user);} else { this.user = null; _visitables.get("user").remove(this.user); } return (A) this;
}
public boolean hasUser() {
return this.user != null;
}
public UserNested withNewUser() {
return new UserNested(null);
}
public UserNested withNewUserLike(SecretValueFromSource item) {
return new UserNested(item);
}
public UserNested editUser() {
return withNewUserLike(java.util.Optional.ofNullable(buildUser()).orElse(null));
}
public UserNested editOrNewUser() {
return withNewUserLike(java.util.Optional.ofNullable(buildUser()).orElse(new SecretValueFromSourceBuilder().build()));
}
public UserNested editOrNewUserLike(SecretValueFromSource item) {
return withNewUserLike(java.util.Optional.ofNullable(buildUser()).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;
KafkaSASLSpecFluent that = (KafkaSASLSpecFluent) o;
if (!java.util.Objects.equals(enable, that.enable)) return false;
if (!java.util.Objects.equals(password, that.password)) return false;
if (!java.util.Objects.equals(type, that.type)) return false;
if (!java.util.Objects.equals(user, that.user)) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(enable, password, type, user, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (enable != null) { sb.append("enable:"); sb.append(enable + ","); }
if (password != null) { sb.append("password:"); sb.append(password + ","); }
if (type != null) { sb.append("type:"); sb.append(type + ","); }
if (user != null) { sb.append("user:"); sb.append(user); }
sb.append("}");
return sb.toString();
}
public A withEnable() {
return withEnable(true);
}
public class PasswordNested extends SecretValueFromSourceFluent> implements Nested{
PasswordNested(SecretValueFromSource item) {
this.builder = new SecretValueFromSourceBuilder(this, item);
}
SecretValueFromSourceBuilder builder;
public N and() {
return (N) KafkaSASLSpecFluent.this.withPassword(builder.build());
}
public N endPassword() {
return and();
}
}
public class TypeNested extends SecretValueFromSourceFluent> implements Nested{
TypeNested(SecretValueFromSource item) {
this.builder = new SecretValueFromSourceBuilder(this, item);
}
SecretValueFromSourceBuilder builder;
public N and() {
return (N) KafkaSASLSpecFluent.this.withType(builder.build());
}
public N endType() {
return and();
}
}
public class UserNested extends SecretValueFromSourceFluent> implements Nested{
UserNested(SecretValueFromSource item) {
this.builder = new SecretValueFromSourceBuilder(this, item);
}
SecretValueFromSourceBuilder builder;
public N and() {
return (N) KafkaSASLSpecFluent.this.withUser(builder.build());
}
public N endUser() {
return and();
}
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy