annotations.me.snowdrop.applicationcrd.api.model.InfoItemSourceBuilder Maven / Gradle / Ivy
package me.snowdrop.applicationcrd.api.model;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
import javax.validation.Validator;
public class InfoItemSourceBuilder extends InfoItemSourceFluentImpl implements VisitableBuilder{
InfoItemSourceFluent> fluent;
Boolean validationEnabled;
Validator validator;
public InfoItemSourceBuilder(){
this(true);
}
public InfoItemSourceBuilder(Boolean validationEnabled){
this(new InfoItemSource(), validationEnabled);
}
public InfoItemSourceBuilder(InfoItemSourceFluent> fluent){
this(fluent, true);
}
public InfoItemSourceBuilder(InfoItemSourceFluent> fluent,Boolean validationEnabled){
this(fluent, new InfoItemSource(), validationEnabled);
}
public InfoItemSourceBuilder(InfoItemSourceFluent> fluent,InfoItemSource instance){
this(fluent, instance, true);
}
public InfoItemSourceBuilder(InfoItemSourceFluent> fluent,InfoItemSource instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withConfigMapKeyRef(instance.getConfigMapKeyRef());
fluent.withIngressRef(instance.getIngressRef());
fluent.withSecretKeyRef(instance.getSecretKeyRef());
fluent.withServiceRef(instance.getServiceRef());
fluent.withType(instance.getType());
this.validationEnabled = validationEnabled;
}
public InfoItemSourceBuilder(InfoItemSource instance){
this(instance,true);
}
public InfoItemSourceBuilder(InfoItemSource instance,Boolean validationEnabled){
this.fluent = this;
this.withConfigMapKeyRef(instance.getConfigMapKeyRef());
this.withIngressRef(instance.getIngressRef());
this.withSecretKeyRef(instance.getSecretKeyRef());
this.withServiceRef(instance.getServiceRef());
this.withType(instance.getType());
this.validationEnabled = validationEnabled;
}
public InfoItemSourceBuilder(Validator validator){
this(new InfoItemSource(), true);
}
public InfoItemSourceBuilder(InfoItemSourceFluent> fluent,InfoItemSource instance,Validator validator){
this.fluent = fluent;
fluent.withConfigMapKeyRef(instance.getConfigMapKeyRef());
fluent.withIngressRef(instance.getIngressRef());
fluent.withSecretKeyRef(instance.getSecretKeyRef());
fluent.withServiceRef(instance.getServiceRef());
fluent.withType(instance.getType());
this.validator = validator;
this.validationEnabled = validator != null;
}
public InfoItemSourceBuilder(InfoItemSource instance,Validator validator){
this.fluent = this;
this.withConfigMapKeyRef(instance.getConfigMapKeyRef());
this.withIngressRef(instance.getIngressRef());
this.withSecretKeyRef(instance.getSecretKeyRef());
this.withServiceRef(instance.getServiceRef());
this.withType(instance.getType());
this.validator = validator;
this.validationEnabled = validator != null;
}
public InfoItemSource build(){
InfoItemSource buildable = new InfoItemSource(fluent.getConfigMapKeyRef(),fluent.getIngressRef(),fluent.getSecretKeyRef(),fluent.getServiceRef(),fluent.getType());
if (validationEnabled) {io.fabric8.kubernetes.api.builder.ValidationUtils.validate(buildable, validator);}
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;
InfoItemSourceBuilder that = (InfoItemSourceBuilder) 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;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy