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

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 BoxEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, ExtendedPropertyConfigurerGetter {

    private static final Map<String, Object> ALL_OPTIONS;
    static {
        Map<String, Object> map = new CaseInsensitiveMap();
        map.put("ApiName", org.apache.camel.component.box.internal.BoxApiName.class);
        map.put("MethodName", java.lang.String.class);
        map.put("ClientId", java.lang.String.class);
        map.put("EnterpriseId", java.lang.String.class);
        map.put("InBody", java.lang.String.class);
        map.put("UserId", java.lang.String.class);
        map.put("ExceptionHandler", org.apache.camel.spi.ExceptionHandler.class);
        map.put("ExchangePattern", org.apache.camel.ExchangePattern.class);
        map.put("LazyStartProducer", boolean.class);
        map.put("HttpParams", java.util.Map.class);
        map.put("AuthenticationType", java.lang.String.class);
        map.put("AccessTokenCache", com.box.sdk.IAccessTokenCache.class);
        map.put("ClientSecret", java.lang.String.class);
        map.put("EncryptionAlgorithm", com.box.sdk.EncryptionAlgorithm.class);
        map.put("MaxCacheEntries", int.class);
        map.put("PrivateKeyFile", java.lang.String.class);
        map.put("PrivateKeyPassword", java.lang.String.class);
        map.put("PublicKeyId", java.lang.String.class);
        map.put("SslContextParameters", org.apache.camel.support.jsse.SSLContextParameters.class);
        map.put("UserName", java.lang.String.class);
        map.put("UserPassword", java.lang.String.class);
        ALL_OPTIONS = map;
    }

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        BoxEndpoint target = (BoxEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accesstokencache":
        case "accessTokenCache": target.getConfiguration().setAccessTokenCache(property(camelContext, com.box.sdk.IAccessTokenCache.class, value)); return true;
        case "authenticationtype":
        case "authenticationType": target.getConfiguration().setAuthenticationType(property(camelContext, java.lang.String.class, value)); return true;
        case "clientid":
        case "clientId": target.getConfiguration().setClientId(property(camelContext, java.lang.String.class, value)); return true;
        case "clientsecret":
        case "clientSecret": target.getConfiguration().setClientSecret(property(camelContext, java.lang.String.class, value)); return true;
        case "encryptionalgorithm":
        case "encryptionAlgorithm": target.getConfiguration().setEncryptionAlgorithm(property(camelContext, com.box.sdk.EncryptionAlgorithm.class, value)); return true;
        case "enterpriseid":
        case "enterpriseId": target.getConfiguration().setEnterpriseId(property(camelContext, java.lang.String.class, value)); return true;
        case "exceptionhandler":
        case "exceptionHandler": target.setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
        case "exchangepattern":
        case "exchangePattern": target.setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
        case "httpparams":
        case "httpParams": target.getConfiguration().setHttpParams(property(camelContext, java.util.Map.class, value)); return true;
        case "inbody":
        case "inBody": target.setInBody(property(camelContext, java.lang.String.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "maxcacheentries":
        case "maxCacheEntries": target.getConfiguration().setMaxCacheEntries(property(camelContext, int.class, value)); return true;
        case "privatekeyfile":
        case "privateKeyFile": target.getConfiguration().setPrivateKeyFile(property(camelContext, java.lang.String.class, value)); return true;
        case "privatekeypassword":
        case "privateKeyPassword": target.getConfiguration().setPrivateKeyPassword(property(camelContext, java.lang.String.class, value)); return true;
        case "publickeyid":
        case "publicKeyId": target.getConfiguration().setPublicKeyId(property(camelContext, java.lang.String.class, value)); return true;
        case "sslcontextparameters":
        case "sslContextParameters": target.getConfiguration().setSslContextParameters(property(camelContext, org.apache.camel.support.jsse.SSLContextParameters.class, value)); return true;
        case "userid":
        case "userId": target.getConfiguration().setUserId(property(camelContext, java.lang.String.class, value)); return true;
        case "username":
        case "userName": target.getConfiguration().setUserName(property(camelContext, java.lang.String.class, value)); return true;
        case "userpassword":
        case "userPassword": target.getConfiguration().setUserPassword(property(camelContext, java.lang.String.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Map<String, Object> getAllOptions(Object target) {
        return ALL_OPTIONS;
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accesstokencache":
        case "accessTokenCache": return com.box.sdk.IAccessTokenCache.class;
        case "authenticationtype":
        case "authenticationType": return java.lang.String.class;
        case "clientid":
        case "clientId": return java.lang.String.class;
        case "clientsecret":
        case "clientSecret": return java.lang.String.class;
        case "encryptionalgorithm":
        case "encryptionAlgorithm": return com.box.sdk.EncryptionAlgorithm.class;
        case "enterpriseid":
        case "enterpriseId": return java.lang.String.class;
        case "exceptionhandler":
        case "exceptionHandler": return org.apache.camel.spi.ExceptionHandler.class;
        case "exchangepattern":
        case "exchangePattern": return org.apache.camel.ExchangePattern.class;
        case "httpparams":
        case "httpParams": return java.util.Map.class;
        case "inbody":
        case "inBody": return java.lang.String.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "maxcacheentries":
        case "maxCacheEntries": return int.class;
        case "privatekeyfile":
        case "privateKeyFile": return java.lang.String.class;
        case "privatekeypassword":
        case "privateKeyPassword": return java.lang.String.class;
        case "publickeyid":
        case "publicKeyId": return java.lang.String.class;
        case "sslcontextparameters":
        case "sslContextParameters": return org.apache.camel.support.jsse.SSLContextParameters.class;
        case "userid":
        case "userId": return java.lang.String.class;
        case "username":
        case "userName": return java.lang.String.class;
        case "userpassword":
        case "userPassword": return java.lang.String.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        BoxEndpoint target = (BoxEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accesstokencache":
        case "accessTokenCache": return target.getConfiguration().getAccessTokenCache();
        case "authenticationtype":
        case "authenticationType": return target.getConfiguration().getAuthenticationType();
        case "clientid":
        case "clientId": return target.getConfiguration().getClientId();
        case "clientsecret":
        case "clientSecret": return target.getConfiguration().getClientSecret();
        case "encryptionalgorithm":
        case "encryptionAlgorithm": return target.getConfiguration().getEncryptionAlgorithm();
        case "enterpriseid":
        case "enterpriseId": return target.getConfiguration().getEnterpriseId();
        case "exceptionhandler":
        case "exceptionHandler": return target.getExceptionHandler();
        case "exchangepattern":
        case "exchangePattern": return target.getExchangePattern();
        case "httpparams":
        case "httpParams": return target.getConfiguration().getHttpParams();
        case "inbody":
        case "inBody": return target.getInBody();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "maxcacheentries":
        case "maxCacheEntries": return target.getConfiguration().getMaxCacheEntries();
        case "privatekeyfile":
        case "privateKeyFile": return target.getConfiguration().getPrivateKeyFile();
        case "privatekeypassword":
        case "privateKeyPassword": return target.getConfiguration().getPrivateKeyPassword();
        case "publickeyid":
        case "publicKeyId": return target.getConfiguration().getPublicKeyId();
        case "sslcontextparameters":
        case "sslContextParameters": return target.getConfiguration().getSslContextParameters();
        case "userid":
        case "userId": return target.getConfiguration().getUserId();
        case "username":
        case "userName": return target.getConfiguration().getUserName();
        case "userpassword":
        case "userPassword": return target.getConfiguration().getUserPassword();
        default: return null;
        }
    }

    @Override
    public Object getCollectionValueType(Object target, String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "httpparams":
        case "httpParams": return java.lang.Object.class;
        default: return null;
        }
    }
}

