annotations.me.snowdrop.servicecatalog.api.model.ClusterObjectReferenceBuilder Maven / Gradle / Ivy
The newest version!
package me.snowdrop.servicecatalog.api.model;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
import javax.validation.Validator;
public class ClusterObjectReferenceBuilder extends ClusterObjectReferenceFluentImpl implements VisitableBuilder{
ClusterObjectReferenceFluent> fluent;
Boolean validationEnabled;
Validator validator;
public ClusterObjectReferenceBuilder(){
this(true);
}
public ClusterObjectReferenceBuilder(Boolean validationEnabled){
this(new ClusterObjectReference(), validationEnabled);
}
public ClusterObjectReferenceBuilder(ClusterObjectReferenceFluent> fluent){
this(fluent, true);
}
public ClusterObjectReferenceBuilder(ClusterObjectReferenceFluent> fluent,Boolean validationEnabled){
this(fluent, new ClusterObjectReference(), validationEnabled);
}
public ClusterObjectReferenceBuilder(ClusterObjectReferenceFluent> fluent,ClusterObjectReference instance){
this(fluent, instance, true);
}
public ClusterObjectReferenceBuilder(ClusterObjectReferenceFluent> fluent,ClusterObjectReference instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withName(instance.getName());
this.validationEnabled = validationEnabled;
}
public ClusterObjectReferenceBuilder(ClusterObjectReference instance){
this(instance,true);
}
public ClusterObjectReferenceBuilder(ClusterObjectReference instance,Boolean validationEnabled){
this.fluent = this;
this.withName(instance.getName());
this.validationEnabled = validationEnabled;
}
public ClusterObjectReferenceBuilder(Validator validator){
this(new ClusterObjectReference(), true);
}
public ClusterObjectReferenceBuilder(ClusterObjectReferenceFluent> fluent,ClusterObjectReference instance,Validator validator){
this.fluent = fluent;
fluent.withName(instance.getName());
this.validator = validator;
this.validationEnabled = validator != null;
}
public ClusterObjectReferenceBuilder(ClusterObjectReference instance,Validator validator){
this.fluent = this;
this.withName(instance.getName());
this.validator = validator;
this.validationEnabled = validator != null;
}
public ClusterObjectReference build(){
ClusterObjectReference buildable = new ClusterObjectReference(fluent.getName());
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;
ClusterObjectReferenceBuilder that = (ClusterObjectReferenceBuilder) 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 - 2025 Weber Informatics LLC | Privacy Policy