io.alauda.kubernetes.api.model.PipelineHookHTTPRequestBuilder 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 PipelineHookHTTPRequestBuilder extends PipelineHookHTTPRequestFluentImpl implements VisitableBuilder{
PipelineHookHTTPRequestFluent> fluent;
Boolean validationEnabled;
public PipelineHookHTTPRequestBuilder(){
this(true);
}
public PipelineHookHTTPRequestBuilder(Boolean validationEnabled){
this(new PipelineHookHTTPRequest(), validationEnabled);
}
public PipelineHookHTTPRequestBuilder(PipelineHookHTTPRequestFluent> fluent){
this(fluent, true);
}
public PipelineHookHTTPRequestBuilder(PipelineHookHTTPRequestFluent> fluent,Boolean validationEnabled){
this(fluent, new PipelineHookHTTPRequest(), validationEnabled);
}
public PipelineHookHTTPRequestBuilder(PipelineHookHTTPRequestFluent> fluent,PipelineHookHTTPRequest instance){
this(fluent, instance, true);
}
public PipelineHookHTTPRequestBuilder(PipelineHookHTTPRequestFluent> fluent,PipelineHookHTTPRequest instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withHeaders(instance.getHeaders());
fluent.withMethod(instance.getMethod());
fluent.withUri(instance.getUri());
this.validationEnabled = validationEnabled;
}
public PipelineHookHTTPRequestBuilder(PipelineHookHTTPRequest instance){
this(instance,true);
}
public PipelineHookHTTPRequestBuilder(PipelineHookHTTPRequest instance,Boolean validationEnabled){
this.fluent = this;
this.withHeaders(instance.getHeaders());
this.withMethod(instance.getMethod());
this.withUri(instance.getUri());
this.validationEnabled = validationEnabled;
}
public PipelineHookHTTPRequest build(){
PipelineHookHTTPRequest buildable = new PipelineHookHTTPRequest(fluent.getHeaders(),fluent.getMethod(),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;
PipelineHookHTTPRequestBuilder that = (PipelineHookHTTPRequestBuilder) 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;
}
}