annotations.io.alauda.devops.api.model.SecretBuildSourceBuilder Maven / Gradle / Ivy
package io.alauda.devops.api.model;
import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class SecretBuildSourceBuilder extends SecretBuildSourceFluentImpl implements VisitableBuilder{
SecretBuildSourceFluent> fluent;
Boolean validationEnabled;
public SecretBuildSourceBuilder(){
this(true);
}
public SecretBuildSourceBuilder(Boolean validationEnabled){
this(new SecretBuildSource(), validationEnabled);
}
public SecretBuildSourceBuilder(SecretBuildSourceFluent> fluent){
this(fluent, true);
}
public SecretBuildSourceBuilder(SecretBuildSourceFluent> fluent,Boolean validationEnabled){
this(fluent, new SecretBuildSource(), validationEnabled);
}
public SecretBuildSourceBuilder(SecretBuildSourceFluent> fluent,SecretBuildSource instance){
this(fluent, instance, true);
}
public SecretBuildSourceBuilder(SecretBuildSourceFluent> fluent,SecretBuildSource instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withDestinationDir(instance.getDestinationDir());
fluent.withSecret(instance.getSecret());
this.validationEnabled = validationEnabled;
}
public SecretBuildSourceBuilder(SecretBuildSource instance){
this(instance,true);
}
public SecretBuildSourceBuilder(SecretBuildSource instance,Boolean validationEnabled){
this.fluent = this;
this.withDestinationDir(instance.getDestinationDir());
this.withSecret(instance.getSecret());
this.validationEnabled = validationEnabled;
}
public SecretBuildSource build(){
SecretBuildSource buildable = new SecretBuildSource(fluent.getDestinationDir(),fluent.getSecret());
io.alauda.kubernetes.api.builder.ValidationUtils.validate(buildable);
return buildable;
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
SecretBuildSourceBuilder that = (SecretBuildSourceBuilder) o;
if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;
if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
return true;
}
}