io.alauda.kubernetes.api.model.CodeRepositoryStatusBuilder 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 CodeRepositoryStatusBuilder extends CodeRepositoryStatusFluentImpl implements VisitableBuilder{
CodeRepositoryStatusFluent> fluent;
Boolean validationEnabled;
public CodeRepositoryStatusBuilder(){
this(true);
}
public CodeRepositoryStatusBuilder(Boolean validationEnabled){
this(new CodeRepositoryStatus(), validationEnabled);
}
public CodeRepositoryStatusBuilder(CodeRepositoryStatusFluent> fluent){
this(fluent, true);
}
public CodeRepositoryStatusBuilder(CodeRepositoryStatusFluent> fluent,Boolean validationEnabled){
this(fluent, new CodeRepositoryStatus(), validationEnabled);
}
public CodeRepositoryStatusBuilder(CodeRepositoryStatusFluent> fluent,CodeRepositoryStatus instance){
this(fluent, instance, true);
}
public CodeRepositoryStatusBuilder(CodeRepositoryStatusFluent> fluent,CodeRepositoryStatus instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withServiceStatus(instance.getServiceStatus());
fluent.withRepository(instance.getRepository());
this.validationEnabled = validationEnabled;
}
public CodeRepositoryStatusBuilder(CodeRepositoryStatus instance){
this(instance,true);
}
public CodeRepositoryStatusBuilder(CodeRepositoryStatus instance,Boolean validationEnabled){
this.fluent = this;
this.withServiceStatus(instance.getServiceStatus());
this.withRepository(instance.getRepository());
this.validationEnabled = validationEnabled;
}
public CodeRepositoryStatus build(){
CodeRepositoryStatus buildable = new CodeRepositoryStatus(fluent.getServiceStatus(),fluent.getRepository());
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;
CodeRepositoryStatusBuilder that = (CodeRepositoryStatusBuilder) 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;
}
}