annotations.io.alauda.kubernetes.api.model.UserAccountFluentImpl Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.alauda.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.Deprecated;
import javax.validation.Valid;
import io.alauda.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
public class UserAccountFluentImpl> extends io.alauda.kubernetes.api.builder.BaseFluent implements UserAccountFluent{
private SecretKeySetRefBuilder secret;
public UserAccountFluentImpl(){
}
public UserAccountFluentImpl(UserAccount instance){
this.withSecret(instance.getSecret());
}
/**
* This method has been deprecated, please use method buildSecret instead.
*/
@Deprecated public SecretKeySetRef getSecret(){
return this.secret!=null?this.secret.build():null;
}
public SecretKeySetRef buildSecret(){
return this.secret!=null?this.secret.build():null;
}
public A withSecret(SecretKeySetRef secret){
_visitables.remove(this.secret);
if (secret!=null){ this.secret= new SecretKeySetRefBuilder(secret); _visitables.add(this.secret);} return (A) this;
}
public Boolean hasSecret(){
return this.secret!=null;
}
public UserAccountFluent.SecretNested withNewSecret(){
return new SecretNestedImpl();
}
public UserAccountFluent.SecretNested withNewSecretLike(SecretKeySetRef item){
return new SecretNestedImpl(item);
}
public UserAccountFluent.SecretNested editSecret(){
return withNewSecretLike(getSecret());
}
public UserAccountFluent.SecretNested editOrNewSecret(){
return withNewSecretLike(getSecret() != null ? getSecret(): new SecretKeySetRefBuilder().build());
}
public UserAccountFluent.SecretNested editOrNewSecretLike(SecretKeySetRef item){
return withNewSecretLike(getSecret() != null ? getSecret(): item);
}
public A withNewSecret(String apiTokenKey,String name,String namespace,String usernameKey){
return (A)withSecret(new SecretKeySetRef(apiTokenKey, name, namespace, usernameKey));
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
UserAccountFluentImpl that = (UserAccountFluentImpl) o;
if (secret != null ? !secret.equals(that.secret) :that.secret != null) return false;
return true;
}
public class SecretNestedImpl extends SecretKeySetRefFluentImpl> implements UserAccountFluent.SecretNested,io.alauda.kubernetes.api.builder.Nested{
private final SecretKeySetRefBuilder builder;
SecretNestedImpl(SecretKeySetRef item){
this.builder = new SecretKeySetRefBuilder(this, item);
}
SecretNestedImpl(){
this.builder = new SecretKeySetRefBuilder(this);
}
public N and(){
return (N) UserAccountFluentImpl.this.withSecret(builder.build());
}
public N endSecret(){
return and();
}
}
}