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

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

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        DropboxEndpoint target = (DropboxEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accesstoken":
        case "accessToken": target.getConfiguration().setAccessToken(property(camelContext, java.lang.String.class, value)); return true;
        case "apikey":
        case "apiKey": target.getConfiguration().setApiKey(property(camelContext, java.lang.String.class, value)); return true;
        case "apisecret":
        case "apiSecret": target.getConfiguration().setApiSecret(property(camelContext, java.lang.String.class, value)); return true;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "client": target.getConfiguration().setClient(property(camelContext, com.dropbox.core.v2.DbxClientV2.class, value)); return true;
        case "clientidentifier":
        case "clientIdentifier": target.getConfiguration().setClientIdentifier(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 "expirein":
        case "expireIn": target.getConfiguration().setExpireIn(property(camelContext, java.lang.Long.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "localpath":
        case "localPath": target.getConfiguration().setLocalPath(property(camelContext, java.lang.String.class, value)); return true;
        case "newremotepath":
        case "newRemotePath": target.getConfiguration().setNewRemotePath(property(camelContext, java.lang.String.class, value)); return true;
        case "query": target.getConfiguration().setQuery(property(camelContext, java.lang.String.class, value)); return true;
        case "refreshtoken":
        case "refreshToken": target.getConfiguration().setRefreshToken(property(camelContext, java.lang.String.class, value)); return true;
        case "remotepath":
        case "remotePath": target.getConfiguration().setRemotePath(property(camelContext, java.lang.String.class, value)); return true;
        case "uploadmode":
        case "uploadMode": target.getConfiguration().setUploadMode(property(camelContext, org.apache.camel.component.dropbox.util.DropboxUploadMode.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accesstoken":
        case "accessToken": return java.lang.String.class;
        case "apikey":
        case "apiKey": return java.lang.String.class;
        case "apisecret":
        case "apiSecret": return java.lang.String.class;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return boolean.class;
        case "client": return com.dropbox.core.v2.DbxClientV2.class;
        case "clientidentifier":
        case "clientIdentifier": 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 "expirein":
        case "expireIn": return java.lang.Long.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "localpath":
        case "localPath": return java.lang.String.class;
        case "newremotepath":
        case "newRemotePath": return java.lang.String.class;
        case "query": return java.lang.String.class;
        case "refreshtoken":
        case "refreshToken": return java.lang.String.class;
        case "remotepath":
        case "remotePath": return java.lang.String.class;
        case "uploadmode":
        case "uploadMode": return org.apache.camel.component.dropbox.util.DropboxUploadMode.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        DropboxEndpoint target = (DropboxEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accesstoken":
        case "accessToken": return target.getConfiguration().getAccessToken();
        case "apikey":
        case "apiKey": return target.getConfiguration().getApiKey();
        case "apisecret":
        case "apiSecret": return target.getConfiguration().getApiSecret();
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return target.isBridgeErrorHandler();
        case "client": return target.getConfiguration().getClient();
        case "clientidentifier":
        case "clientIdentifier": return target.getConfiguration().getClientIdentifier();
        case "exceptionhandler":
        case "exceptionHandler": return target.getExceptionHandler();
        case "exchangepattern":
        case "exchangePattern": return target.getExchangePattern();
        case "expirein":
        case "expireIn": return target.getConfiguration().getExpireIn();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "localpath":
        case "localPath": return target.getConfiguration().getLocalPath();
        case "newremotepath":
        case "newRemotePath": return target.getConfiguration().getNewRemotePath();
        case "query": return target.getConfiguration().getQuery();
        case "refreshtoken":
        case "refreshToken": return target.getConfiguration().getRefreshToken();
        case "remotepath":
        case "remotePath": return target.getConfiguration().getRemotePath();
        case "uploadmode":
        case "uploadMode": return target.getConfiguration().getUploadMode();
        default: return null;
        }
    }
}

