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

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 ExecEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        ExecEndpoint target = (ExecEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "allowcontrolheaders":
        case "allowControlHeaders": target.setAllowControlHeaders(property(camelContext, boolean.class, value)); return true;
        case "args": target.setArgs(property(camelContext, java.lang.String.class, value)); return true;
        case "binding": target.setBinding(property(camelContext, org.apache.camel.component.exec.ExecBinding.class, value)); return true;
        case "commandexecutor":
        case "commandExecutor": target.setCommandExecutor(property(camelContext, org.apache.camel.component.exec.ExecCommandExecutor.class, value)); return true;
        case "commandloglevel":
        case "commandLogLevel": target.setCommandLogLevel(property(camelContext, org.apache.camel.LoggingLevel.class, value)); return true;
        case "exitvalues":
        case "exitValues": target.setExitValues(property(camelContext, java.lang.String.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "outfile":
        case "outFile": target.setOutFile(property(camelContext, java.lang.String.class, value)); return true;
        case "timeout": target.setTimeout(property(camelContext, long.class, value)); return true;
        case "usestderronemptystdout":
        case "useStderrOnEmptyStdout": target.setUseStderrOnEmptyStdout(property(camelContext, boolean.class, value)); return true;
        case "workingdir":
        case "workingDir": target.setWorkingDir(property(camelContext, java.lang.String.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "allowcontrolheaders":
        case "allowControlHeaders": return boolean.class;
        case "args": return java.lang.String.class;
        case "binding": return org.apache.camel.component.exec.ExecBinding.class;
        case "commandexecutor":
        case "commandExecutor": return org.apache.camel.component.exec.ExecCommandExecutor.class;
        case "commandloglevel":
        case "commandLogLevel": return org.apache.camel.LoggingLevel.class;
        case "exitvalues":
        case "exitValues": return java.lang.String.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "outfile":
        case "outFile": return java.lang.String.class;
        case "timeout": return long.class;
        case "usestderronemptystdout":
        case "useStderrOnEmptyStdout": return boolean.class;
        case "workingdir":
        case "workingDir": return java.lang.String.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        ExecEndpoint target = (ExecEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "allowcontrolheaders":
        case "allowControlHeaders": return target.isAllowControlHeaders();
        case "args": return target.getArgs();
        case "binding": return target.getBinding();
        case "commandexecutor":
        case "commandExecutor": return target.getCommandExecutor();
        case "commandloglevel":
        case "commandLogLevel": return target.getCommandLogLevel();
        case "exitvalues":
        case "exitValues": return target.getExitValues();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "outfile":
        case "outFile": return target.getOutFile();
        case "timeout": return target.getTimeout();
        case "usestderronemptystdout":
        case "useStderrOnEmptyStdout": return target.isUseStderrOnEmptyStdout();
        case "workingdir":
        case "workingDir": return target.getWorkingDir();
        default: return null;
        }
    }
}

