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