annotations.io.alauda.devops.api.model.ImageLookupPolicyBuilder 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 ImageLookupPolicyBuilder extends ImageLookupPolicyFluentImpl implements VisitableBuilder{
ImageLookupPolicyFluent> fluent;
Boolean validationEnabled;
public ImageLookupPolicyBuilder(){
this(true);
}
public ImageLookupPolicyBuilder(Boolean validationEnabled){
this(new ImageLookupPolicy(), validationEnabled);
}
public ImageLookupPolicyBuilder(ImageLookupPolicyFluent> fluent){
this(fluent, true);
}
public ImageLookupPolicyBuilder(ImageLookupPolicyFluent> fluent,Boolean validationEnabled){
this(fluent, new ImageLookupPolicy(), validationEnabled);
}
public ImageLookupPolicyBuilder(ImageLookupPolicyFluent> fluent,ImageLookupPolicy instance){
this(fluent, instance, true);
}
public ImageLookupPolicyBuilder(ImageLookupPolicyFluent> fluent,ImageLookupPolicy instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withLocal(instance.getLocal());
this.validationEnabled = validationEnabled;
}
public ImageLookupPolicyBuilder(ImageLookupPolicy instance){
this(instance,true);
}
public ImageLookupPolicyBuilder(ImageLookupPolicy instance,Boolean validationEnabled){
this.fluent = this;
this.withLocal(instance.getLocal());
this.validationEnabled = validationEnabled;
}
public ImageLookupPolicy build(){
ImageLookupPolicy buildable = new ImageLookupPolicy(fluent.isLocal());
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;
ImageLookupPolicyBuilder that = (ImageLookupPolicyBuilder) 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;
}
}