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

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!
 */
@SuppressWarnings("unchecked")
public class DisruptorComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        DisruptorComponent target = (DisruptorComponent) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "autowiredenabled":
        case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "buffersize":
        case "bufferSize": target.setBufferSize(property(camelContext, int.class, value)); return true;
        case "defaultblockwhenfull":
        case "defaultBlockWhenFull": target.setDefaultBlockWhenFull(property(camelContext, boolean.class, value)); return true;
        case "defaultconcurrentconsumers":
        case "defaultConcurrentConsumers": target.setDefaultConcurrentConsumers(property(camelContext, int.class, value)); return true;
        case "defaultmultipleconsumers":
        case "defaultMultipleConsumers": target.setDefaultMultipleConsumers(property(camelContext, boolean.class, value)); return true;
        case "defaultproducertype":
        case "defaultProducerType": target.setDefaultProducerType(property(camelContext, org.apache.camel.component.disruptor.DisruptorProducerType.class, value)); return true;
        case "defaultwaitstrategy":
        case "defaultWaitStrategy": target.setDefaultWaitStrategy(property(camelContext, org.apache.camel.component.disruptor.DisruptorWaitStrategy.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "autowiredenabled":
        case "autowiredEnabled": return boolean.class;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return boolean.class;
        case "buffersize":
        case "bufferSize": return int.class;
        case "defaultblockwhenfull":
        case "defaultBlockWhenFull": return boolean.class;
        case "defaultconcurrentconsumers":
        case "defaultConcurrentConsumers": return int.class;
        case "defaultmultipleconsumers":
        case "defaultMultipleConsumers": return boolean.class;
        case "defaultproducertype":
        case "defaultProducerType": return org.apache.camel.component.disruptor.DisruptorProducerType.class;
        case "defaultwaitstrategy":
        case "defaultWaitStrategy": return org.apache.camel.component.disruptor.DisruptorWaitStrategy.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        DisruptorComponent target = (DisruptorComponent) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "autowiredenabled":
        case "autowiredEnabled": return target.isAutowiredEnabled();
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return target.isBridgeErrorHandler();
        case "buffersize":
        case "bufferSize": return target.getBufferSize();
        case "defaultblockwhenfull":
        case "defaultBlockWhenFull": return target.isDefaultBlockWhenFull();
        case "defaultconcurrentconsumers":
        case "defaultConcurrentConsumers": return target.getDefaultConcurrentConsumers();
        case "defaultmultipleconsumers":
        case "defaultMultipleConsumers": return target.isDefaultMultipleConsumers();
        case "defaultproducertype":
        case "defaultProducerType": return target.getDefaultProducerType();
        case "defaultwaitstrategy":
        case "defaultWaitStrategy": return target.getDefaultWaitStrategy();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        default: return null;
        }
    }
}

