io.alauda.kubernetes.api.model.CodeRepositoryRefBuilder Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model;
import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class CodeRepositoryRefBuilder extends CodeRepositoryRefFluentImpl implements VisitableBuilder{
CodeRepositoryRefFluent> fluent;
Boolean validationEnabled;
public CodeRepositoryRefBuilder(){
this(true);
}
public CodeRepositoryRefBuilder(Boolean validationEnabled){
this(new CodeRepositoryRef(), validationEnabled);
}
public CodeRepositoryRefBuilder(CodeRepositoryRefFluent> fluent){
this(fluent, true);
}
public CodeRepositoryRefBuilder(CodeRepositoryRefFluent> fluent,Boolean validationEnabled){
this(fluent, new CodeRepositoryRef(), validationEnabled);
}
public CodeRepositoryRefBuilder(CodeRepositoryRefFluent> fluent,CodeRepositoryRef instance){
this(fluent, instance, true);
}
public CodeRepositoryRefBuilder(CodeRepositoryRefFluent> fluent,CodeRepositoryRef instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withName(instance.getName());
fluent.withRef(instance.getRef());
this.validationEnabled = validationEnabled;
}
public CodeRepositoryRefBuilder(CodeRepositoryRef instance){
this(instance,true);
}
public CodeRepositoryRefBuilder(CodeRepositoryRef instance,Boolean validationEnabled){
this.fluent = this;
this.withName(instance.getName());
this.withRef(instance.getRef());
this.validationEnabled = validationEnabled;
}
public CodeRepositoryRef build(){
CodeRepositoryRef buildable = new CodeRepositoryRef(fluent.getName(),fluent.getRef());
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;
CodeRepositoryRefBuilder that = (CodeRepositoryRefBuilder) 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;
}
}