annotations.me.snowdrop.servicecatalog.api.model.ClusterServiceBrokerSpecBuilder 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 ClusterServiceBrokerSpecBuilder extends ClusterServiceBrokerSpecFluentImpl implements VisitableBuilder{
ClusterServiceBrokerSpecFluent> fluent;
Boolean validationEnabled;
Validator validator;
public ClusterServiceBrokerSpecBuilder(){
this(true);
}
public ClusterServiceBrokerSpecBuilder(Boolean validationEnabled){
this(new ClusterServiceBrokerSpec(), validationEnabled);
}
public ClusterServiceBrokerSpecBuilder(ClusterServiceBrokerSpecFluent> fluent){
this(fluent, true);
}
public ClusterServiceBrokerSpecBuilder(ClusterServiceBrokerSpecFluent> fluent,Boolean validationEnabled){
this(fluent, new ClusterServiceBrokerSpec(), validationEnabled);
}
public ClusterServiceBrokerSpecBuilder(ClusterServiceBrokerSpecFluent> fluent,ClusterServiceBrokerSpec instance){
this(fluent, instance, true);
}
public ClusterServiceBrokerSpecBuilder(ClusterServiceBrokerSpecFluent> fluent,ClusterServiceBrokerSpec instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withAuthInfo(instance.getAuthInfo());
fluent.withCaBundle(instance.getCaBundle());
fluent.withCatalogRestrictions(instance.getCatalogRestrictions());
fluent.withInsecureSkipTLSVerify(instance.getInsecureSkipTLSVerify());
fluent.withRelistBehavior(instance.getRelistBehavior());
fluent.withRelistDuration(instance.getRelistDuration());
fluent.withRelistRequests(instance.getRelistRequests());
fluent.withUrl(instance.getUrl());
this.validationEnabled = validationEnabled;
}
public ClusterServiceBrokerSpecBuilder(ClusterServiceBrokerSpec instance){
this(instance,true);
}
public ClusterServiceBrokerSpecBuilder(ClusterServiceBrokerSpec instance,Boolean validationEnabled){
this.fluent = this;
this.withAuthInfo(instance.getAuthInfo());
this.withCaBundle(instance.getCaBundle());
this.withCatalogRestrictions(instance.getCatalogRestrictions());
this.withInsecureSkipTLSVerify(instance.getInsecureSkipTLSVerify());
this.withRelistBehavior(instance.getRelistBehavior());
this.withRelistDuration(instance.getRelistDuration());
this.withRelistRequests(instance.getRelistRequests());
this.withUrl(instance.getUrl());
this.validationEnabled = validationEnabled;
}
public ClusterServiceBrokerSpecBuilder(Validator validator){
this(new ClusterServiceBrokerSpec(), true);
}
public ClusterServiceBrokerSpecBuilder(ClusterServiceBrokerSpecFluent> fluent,ClusterServiceBrokerSpec instance,Validator validator){
this.fluent = fluent;
fluent.withAuthInfo(instance.getAuthInfo());
fluent.withCaBundle(instance.getCaBundle());
fluent.withCatalogRestrictions(instance.getCatalogRestrictions());
fluent.withInsecureSkipTLSVerify(instance.getInsecureSkipTLSVerify());
fluent.withRelistBehavior(instance.getRelistBehavior());
fluent.withRelistDuration(instance.getRelistDuration());
fluent.withRelistRequests(instance.getRelistRequests());
fluent.withUrl(instance.getUrl());
this.validator = validator;
this.validationEnabled = validator != null;
}
public ClusterServiceBrokerSpecBuilder(ClusterServiceBrokerSpec instance,Validator validator){
this.fluent = this;
this.withAuthInfo(instance.getAuthInfo());
this.withCaBundle(instance.getCaBundle());
this.withCatalogRestrictions(instance.getCatalogRestrictions());
this.withInsecureSkipTLSVerify(instance.getInsecureSkipTLSVerify());
this.withRelistBehavior(instance.getRelistBehavior());
this.withRelistDuration(instance.getRelistDuration());
this.withRelistRequests(instance.getRelistRequests());
this.withUrl(instance.getUrl());
this.validator = validator;
this.validationEnabled = validator != null;
}
public ClusterServiceBrokerSpec build(){
ClusterServiceBrokerSpec buildable = new ClusterServiceBrokerSpec(fluent.getAuthInfo(),fluent.getCaBundle(),fluent.getCatalogRestrictions(),fluent.isInsecureSkipTLSVerify(),fluent.getRelistBehavior(),fluent.getRelistDuration(),fluent.getRelistRequests(),fluent.getUrl());
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;
ClusterServiceBrokerSpecBuilder that = (ClusterServiceBrokerSpecBuilder) 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