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

io.fabric8.knative.eventing.contrib.kafka.v1beta1.KafkaSASLSpecFluentImpl 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 KafkaSASLSpecFluentImpl> extends BaseFluent implements KafkaSASLSpecFluent{
  public KafkaSASLSpecFluentImpl() {
  }
  public KafkaSASLSpecFluentImpl(KafkaSASLSpec instance) {
    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;
  }
  
  /**
   * This method has been deprecated, please use method buildPassword instead.
   * @return The buildable object.
   */
  @Deprecated
  public SecretValueFromSource getPassword() {
    return this.password!=null ?this.password.build():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 KafkaSASLSpecFluent.PasswordNested withNewPassword() {
    return new KafkaSASLSpecFluentImpl.PasswordNestedImpl();
  }
  public KafkaSASLSpecFluent.PasswordNested withNewPasswordLike(SecretValueFromSource item) {
    return new KafkaSASLSpecFluentImpl.PasswordNestedImpl(item);
  }
  public KafkaSASLSpecFluent.PasswordNested editPassword() {
    return withNewPasswordLike(getPassword());
  }
  public KafkaSASLSpecFluent.PasswordNested editOrNewPassword() {
    return withNewPasswordLike(getPassword() != null ? getPassword(): new SecretValueFromSourceBuilder().build());
  }
  public KafkaSASLSpecFluent.PasswordNested editOrNewPasswordLike(SecretValueFromSource item) {
    return withNewPasswordLike(getPassword() != null ? getPassword(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildType instead.
   * @return The buildable object.
   */
  @Deprecated
  public SecretValueFromSource getType() {
    return this.type!=null ?this.type.build():null;
  }
  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 KafkaSASLSpecFluent.TypeNested withNewType() {
    return new KafkaSASLSpecFluentImpl.TypeNestedImpl();
  }
  public KafkaSASLSpecFluent.TypeNested withNewTypeLike(SecretValueFromSource item) {
    return new KafkaSASLSpecFluentImpl.TypeNestedImpl(item);
  }
  public KafkaSASLSpecFluent.TypeNested editType() {
    return withNewTypeLike(getType());
  }
  public KafkaSASLSpecFluent.TypeNested editOrNewType() {
    return withNewTypeLike(getType() != null ? getType(): new SecretValueFromSourceBuilder().build());
  }
  public KafkaSASLSpecFluent.TypeNested editOrNewTypeLike(SecretValueFromSource item) {
    return withNewTypeLike(getType() != null ? getType(): item);
  }
  
  /**
   * This method has been deprecated, please use method buildUser instead.
   * @return The buildable object.
   */
  @Deprecated
  public SecretValueFromSource getUser() {
    return this.user!=null ?this.user.build():null;
  }
  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 KafkaSASLSpecFluent.UserNested withNewUser() {
    return new KafkaSASLSpecFluentImpl.UserNestedImpl();
  }
  public KafkaSASLSpecFluent.UserNested withNewUserLike(SecretValueFromSource item) {
    return new KafkaSASLSpecFluentImpl.UserNestedImpl(item);
  }
  public KafkaSASLSpecFluent.UserNested editUser() {
    return withNewUserLike(getUser());
  }
  public KafkaSASLSpecFluent.UserNested editOrNewUser() {
    return withNewUserLike(getUser() != null ? getUser(): new SecretValueFromSourceBuilder().build());
  }
  public KafkaSASLSpecFluent.UserNested editOrNewUserLike(SecretValueFromSource item) {
    return withNewUserLike(getUser() != null ? getUser(): item);
  }
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    KafkaSASLSpecFluentImpl that = (KafkaSASLSpecFluentImpl) o;
    if (enable != null ? !enable.equals(that.enable) :that.enable != null) return false;
    if (password != null ? !password.equals(that.password) :that.password != null) return false;
    if (type != null ? !type.equals(that.type) :that.type != null) return false;
    if (user != null ? !user.equals(that.user) :that.user != null) 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);
  }
  class PasswordNestedImpl extends SecretValueFromSourceFluentImpl> implements KafkaSASLSpecFluent.PasswordNested,Nested{
    PasswordNestedImpl(SecretValueFromSource item) {
      this.builder = new SecretValueFromSourceBuilder(this, item);
    }
    PasswordNestedImpl() {
      this.builder = new SecretValueFromSourceBuilder(this);
    }
    SecretValueFromSourceBuilder builder;
    public N and() {
      return (N) KafkaSASLSpecFluentImpl.this.withPassword(builder.build());
    }
    public N endPassword() {
      return and();
    }
    
  }
  class TypeNestedImpl extends SecretValueFromSourceFluentImpl> implements KafkaSASLSpecFluent.TypeNested,Nested{
    TypeNestedImpl(SecretValueFromSource item) {
      this.builder = new SecretValueFromSourceBuilder(this, item);
    }
    TypeNestedImpl() {
      this.builder = new SecretValueFromSourceBuilder(this);
    }
    SecretValueFromSourceBuilder builder;
    public N and() {
      return (N) KafkaSASLSpecFluentImpl.this.withType(builder.build());
    }
    public N endType() {
      return and();
    }
    
  }
  class UserNestedImpl extends SecretValueFromSourceFluentImpl> implements KafkaSASLSpecFluent.UserNested,Nested{
    UserNestedImpl(SecretValueFromSource item) {
      this.builder = new SecretValueFromSourceBuilder(this, item);
    }
    UserNestedImpl() {
      this.builder = new SecretValueFromSourceBuilder(this);
    }
    SecretValueFromSourceBuilder builder;
    public N and() {
      return (N) KafkaSASLSpecFluentImpl.this.withUser(builder.build());
    }
    public N endUser() {
      return and();
    }
    
  }
  
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy