io.alauda.kubernetes.api.model.CodeRepositoryStatusRepositoryBuilder 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 CodeRepositoryStatusRepositoryBuilder extends CodeRepositoryStatusRepositoryFluentImpl implements VisitableBuilder{
CodeRepositoryStatusRepositoryFluent> fluent;
Boolean validationEnabled;
public CodeRepositoryStatusRepositoryBuilder(){
this(true);
}
public CodeRepositoryStatusRepositoryBuilder(Boolean validationEnabled){
this(new CodeRepositoryStatusRepository(), validationEnabled);
}
public CodeRepositoryStatusRepositoryBuilder(CodeRepositoryStatusRepositoryFluent> fluent){
this(fluent, true);
}
public CodeRepositoryStatusRepositoryBuilder(CodeRepositoryStatusRepositoryFluent> fluent,Boolean validationEnabled){
this(fluent, new CodeRepositoryStatusRepository(), validationEnabled);
}
public CodeRepositoryStatusRepositoryBuilder(CodeRepositoryStatusRepositoryFluent> fluent,CodeRepositoryStatusRepository instance){
this(fluent, instance, true);
}
public CodeRepositoryStatusRepositoryBuilder(CodeRepositoryStatusRepositoryFluent> fluent,CodeRepositoryStatusRepository instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withLatestCommit(instance.getLatestCommit());
this.validationEnabled = validationEnabled;
}
public CodeRepositoryStatusRepositoryBuilder(CodeRepositoryStatusRepository instance){
this(instance,true);
}
public CodeRepositoryStatusRepositoryBuilder(CodeRepositoryStatusRepository instance,Boolean validationEnabled){
this.fluent = this;
this.withLatestCommit(instance.getLatestCommit());
this.validationEnabled = validationEnabled;
}
public CodeRepositoryStatusRepository build(){
CodeRepositoryStatusRepository buildable = new CodeRepositoryStatusRepository(fluent.getLatestCommit());
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;
CodeRepositoryStatusRepositoryBuilder that = (CodeRepositoryStatusRepositoryBuilder) 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;
}
}