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

import java.util.Map;

import org.apache.camel.CamelContext;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.spi.PropertyConfigurerGetter;
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 LanguageEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        LanguageEndpoint target = (LanguageEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "basicpropertybinding":
        case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
        case "binary": target.setBinary(property(camelContext, boolean.class, value)); return true;
        case "cachescript":
        case "cacheScript": target.setCacheScript(property(camelContext, boolean.class, value)); return true;
        case "contentcache":
        case "contentCache": target.setContentCache(property(camelContext, boolean.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "script": target.setScript(property(camelContext, java.lang.String.class, value)); return true;
        case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true;
        case "transform": target.setTransform(property(camelContext, boolean.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Map<String, Object> getAllOptions(Object target) {
        Map<String, Object> answer = new CaseInsensitiveMap();
        answer.put("basicPropertyBinding", boolean.class);
        answer.put("binary", boolean.class);
        answer.put("cacheScript", boolean.class);
        answer.put("contentCache", boolean.class);
        answer.put("lazyStartProducer", boolean.class);
        answer.put("script", java.lang.String.class);
        answer.put("synchronous", boolean.class);
        answer.put("transform", boolean.class);
        return answer;
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        LanguageEndpoint target = (LanguageEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "basicpropertybinding":
        case "basicPropertyBinding": return target.isBasicPropertyBinding();
        case "binary": return target.isBinary();
        case "cachescript":
        case "cacheScript": return target.isCacheScript();
        case "contentcache":
        case "contentCache": return target.isContentCache();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "script": return target.getScript();
        case "synchronous": return target.isSynchronous();
        case "transform": return target.isTransform();
        default: return null;
        }
    }
}

