annotations.me.snowdrop.servicecatalog.api.model.ValidationSchemaBuilder 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 ValidationSchemaBuilder extends ValidationSchemaFluentImpl implements VisitableBuilder{
ValidationSchemaFluent> fluent;
Boolean validationEnabled;
Validator validator;
public ValidationSchemaBuilder(){
this(true);
}
public ValidationSchemaBuilder(Boolean validationEnabled){
this(new ValidationSchema(), validationEnabled);
}
public ValidationSchemaBuilder(ValidationSchemaFluent> fluent){
this(fluent, true);
}
public ValidationSchemaBuilder(ValidationSchemaFluent> fluent,Boolean validationEnabled){
this(fluent, new ValidationSchema(), validationEnabled);
}
public ValidationSchemaBuilder(ValidationSchemaFluent> fluent,ValidationSchema instance){
this(fluent, instance, true);
}
public ValidationSchemaBuilder(ValidationSchemaFluent> fluent,ValidationSchema instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withClusterServiceBroker(instance.getClusterServiceBroker());
fluent.withClusterServiceBrokerList(instance.getClusterServiceBrokerList());
fluent.withClusterServiceClass(instance.getClusterServiceClass());
fluent.withClusterServiceClassList(instance.getClusterServiceClassList());
fluent.withClusterServicePlan(instance.getClusterServicePlan());
fluent.withClusterServicePlanList(instance.getClusterServicePlanList());
fluent.withServiceBinding(instance.getServiceBinding());
fluent.withServiceBindingList(instance.getServiceBindingList());
fluent.withServiceBroker(instance.getServiceBroker());
fluent.withServiceBrokerList(instance.getServiceBrokerList());
fluent.withServiceInstance(instance.getServiceInstance());
fluent.withServiceInstanceList(instance.getServiceInstanceList());
this.validationEnabled = validationEnabled;
}
public ValidationSchemaBuilder(ValidationSchema instance){
this(instance,true);
}
public ValidationSchemaBuilder(ValidationSchema instance,Boolean validationEnabled){
this.fluent = this;
this.withClusterServiceBroker(instance.getClusterServiceBroker());
this.withClusterServiceBrokerList(instance.getClusterServiceBrokerList());
this.withClusterServiceClass(instance.getClusterServiceClass());
this.withClusterServiceClassList(instance.getClusterServiceClassList());
this.withClusterServicePlan(instance.getClusterServicePlan());
this.withClusterServicePlanList(instance.getClusterServicePlanList());
this.withServiceBinding(instance.getServiceBinding());
this.withServiceBindingList(instance.getServiceBindingList());
this.withServiceBroker(instance.getServiceBroker());
this.withServiceBrokerList(instance.getServiceBrokerList());
this.withServiceInstance(instance.getServiceInstance());
this.withServiceInstanceList(instance.getServiceInstanceList());
this.validationEnabled = validationEnabled;
}
public ValidationSchemaBuilder(Validator validator){
this(new ValidationSchema(), true);
}
public ValidationSchemaBuilder(ValidationSchemaFluent> fluent,ValidationSchema instance,Validator validator){
this.fluent = fluent;
fluent.withClusterServiceBroker(instance.getClusterServiceBroker());
fluent.withClusterServiceBrokerList(instance.getClusterServiceBrokerList());
fluent.withClusterServiceClass(instance.getClusterServiceClass());
fluent.withClusterServiceClassList(instance.getClusterServiceClassList());
fluent.withClusterServicePlan(instance.getClusterServicePlan());
fluent.withClusterServicePlanList(instance.getClusterServicePlanList());
fluent.withServiceBinding(instance.getServiceBinding());
fluent.withServiceBindingList(instance.getServiceBindingList());
fluent.withServiceBroker(instance.getServiceBroker());
fluent.withServiceBrokerList(instance.getServiceBrokerList());
fluent.withServiceInstance(instance.getServiceInstance());
fluent.withServiceInstanceList(instance.getServiceInstanceList());
this.validator = validator;
this.validationEnabled = validator != null;
}
public ValidationSchemaBuilder(ValidationSchema instance,Validator validator){
this.fluent = this;
this.withClusterServiceBroker(instance.getClusterServiceBroker());
this.withClusterServiceBrokerList(instance.getClusterServiceBrokerList());
this.withClusterServiceClass(instance.getClusterServiceClass());
this.withClusterServiceClassList(instance.getClusterServiceClassList());
this.withClusterServicePlan(instance.getClusterServicePlan());
this.withClusterServicePlanList(instance.getClusterServicePlanList());
this.withServiceBinding(instance.getServiceBinding());
this.withServiceBindingList(instance.getServiceBindingList());
this.withServiceBroker(instance.getServiceBroker());
this.withServiceBrokerList(instance.getServiceBrokerList());
this.withServiceInstance(instance.getServiceInstance());
this.withServiceInstanceList(instance.getServiceInstanceList());
this.validator = validator;
this.validationEnabled = validator != null;
}
public ValidationSchema build(){
ValidationSchema buildable = new ValidationSchema(fluent.getClusterServiceBroker(),fluent.getClusterServiceBrokerList(),fluent.getClusterServiceClass(),fluent.getClusterServiceClassList(),fluent.getClusterServicePlan(),fluent.getClusterServicePlanList(),fluent.getServiceBinding(),fluent.getServiceBindingList(),fluent.getServiceBroker(),fluent.getServiceBrokerList(),fluent.getServiceInstance(),fluent.getServiceInstanceList());
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;
ValidationSchemaBuilder that = (ValidationSchemaBuilder) 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