annotations.io.alauda.devops.api.model.GitBuildSourceBuilder 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 GitBuildSourceBuilder extends GitBuildSourceFluentImpl implements VisitableBuilder{
GitBuildSourceFluent> fluent;
Boolean validationEnabled;
public GitBuildSourceBuilder(){
this(true);
}
public GitBuildSourceBuilder(Boolean validationEnabled){
this(new GitBuildSource(), validationEnabled);
}
public GitBuildSourceBuilder(GitBuildSourceFluent> fluent){
this(fluent, true);
}
public GitBuildSourceBuilder(GitBuildSourceFluent> fluent,Boolean validationEnabled){
this(fluent, new GitBuildSource(), validationEnabled);
}
public GitBuildSourceBuilder(GitBuildSourceFluent> fluent,GitBuildSource instance){
this(fluent, instance, true);
}
public GitBuildSourceBuilder(GitBuildSourceFluent> fluent,GitBuildSource instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withHttpProxy(instance.getHttpProxy());
fluent.withHttpsProxy(instance.getHttpsProxy());
fluent.withNoProxy(instance.getNoProxy());
fluent.withRef(instance.getRef());
fluent.withUri(instance.getUri());
this.validationEnabled = validationEnabled;
}
public GitBuildSourceBuilder(GitBuildSource instance){
this(instance,true);
}
public GitBuildSourceBuilder(GitBuildSource instance,Boolean validationEnabled){
this.fluent = this;
this.withHttpProxy(instance.getHttpProxy());
this.withHttpsProxy(instance.getHttpsProxy());
this.withNoProxy(instance.getNoProxy());
this.withRef(instance.getRef());
this.withUri(instance.getUri());
this.validationEnabled = validationEnabled;
}
public GitBuildSource build(){
GitBuildSource buildable = new GitBuildSource(fluent.getHttpProxy(),fluent.getHttpsProxy(),fluent.getNoProxy(),fluent.getRef(),fluent.getUri());
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;
GitBuildSourceBuilder that = (GitBuildSourceBuilder) 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;
}
}