/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.component.bean.validator;

import javax.annotation.processing.Generated;
import java.util.Map;

import org.apache.camel.CamelContext;
import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
import org.apache.camel.spi.PropertyConfigurerGetter;
import org.apache.camel.spi.ConfigurerStrategy;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.util.CaseInsensitiveMap;
import org.apache.camel.support.component.PropertyConfigurerSupport;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
@SuppressWarnings("unchecked")
public class BeanValidatorEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        BeanValidatorEndpoint target = (BeanValidatorEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "constraintvalidatorfactory":
        case "constraintValidatorFactory": target.setConstraintValidatorFactory(property(camelContext, jakarta.validation.ConstraintValidatorFactory.class, value)); return true;
        case "group": target.setGroup(property(camelContext, java.lang.String.class, value)); return true;
        case "ignorexmlconfiguration":
        case "ignoreXmlConfiguration": target.setIgnoreXmlConfiguration(property(camelContext, boolean.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "messageinterpolator":
        case "messageInterpolator": target.setMessageInterpolator(property(camelContext, jakarta.validation.MessageInterpolator.class, value)); return true;
        case "traversableresolver":
        case "traversableResolver": target.setTraversableResolver(property(camelContext, jakarta.validation.TraversableResolver.class, value)); return true;
        case "validationproviderresolver":
        case "validationProviderResolver": target.setValidationProviderResolver(property(camelContext, jakarta.validation.ValidationProviderResolver.class, value)); return true;
        case "validatorfactory":
        case "validatorFactory": target.setValidatorFactory(property(camelContext, jakarta.validation.ValidatorFactory.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "constraintvalidatorfactory":
        case "constraintValidatorFactory": return jakarta.validation.ConstraintValidatorFactory.class;
        case "group": return java.lang.String.class;
        case "ignorexmlconfiguration":
        case "ignoreXmlConfiguration": return boolean.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "messageinterpolator":
        case "messageInterpolator": return jakarta.validation.MessageInterpolator.class;
        case "traversableresolver":
        case "traversableResolver": return jakarta.validation.TraversableResolver.class;
        case "validationproviderresolver":
        case "validationProviderResolver": return jakarta.validation.ValidationProviderResolver.class;
        case "validatorfactory":
        case "validatorFactory": return jakarta.validation.ValidatorFactory.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        BeanValidatorEndpoint target = (BeanValidatorEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "constraintvalidatorfactory":
        case "constraintValidatorFactory": return target.getConstraintValidatorFactory();
        case "group": return target.getGroup();
        case "ignorexmlconfiguration":
        case "ignoreXmlConfiguration": return target.isIgnoreXmlConfiguration();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "messageinterpolator":
        case "messageInterpolator": return target.getMessageInterpolator();
        case "traversableresolver":
        case "traversableResolver": return target.getTraversableResolver();
        case "validationproviderresolver":
        case "validationProviderResolver": return target.getValidationProviderResolver();
        case "validatorfactory":
        case "validatorFactory": return target.getValidatorFactory();
        default: return null;
        }
    }
}

