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

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

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        DigitalOceanEndpoint target = (DigitalOceanEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "basicpropertybinding":
        case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
        case "digitaloceanclient":
        case "digitalOceanClient": target.getConfiguration().setDigitalOceanClient(property(camelContext, com.myjeeva.digitalocean.impl.DigitalOceanClient.class, value)); return true;
        case "httpproxyhost":
        case "httpProxyHost": target.getConfiguration().setHttpProxyHost(property(camelContext, java.lang.String.class, value)); return true;
        case "httpproxypassword":
        case "httpProxyPassword": target.getConfiguration().setHttpProxyPassword(property(camelContext, java.lang.String.class, value)); return true;
        case "httpproxyport":
        case "httpProxyPort": target.getConfiguration().setHttpProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
        case "httpproxyuser":
        case "httpProxyUser": target.getConfiguration().setHttpProxyUser(property(camelContext, java.lang.String.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "oauthtoken":
        case "oAuthToken": target.getConfiguration().setOAuthToken(property(camelContext, java.lang.String.class, value)); return true;
        case "page": target.getConfiguration().setPage(property(camelContext, java.lang.Integer.class, value)); return true;
        case "perpage":
        case "perPage": target.getConfiguration().setPerPage(property(camelContext, java.lang.Integer.class, value)); return true;
        case "resource": target.getConfiguration().setResource(property(camelContext, org.apache.camel.component.digitalocean.constants.DigitalOceanResources.class, value)); return true;
        case "synchronous": target.setSynchronous(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("digitalOceanClient", com.myjeeva.digitalocean.impl.DigitalOceanClient.class);
        answer.put("httpProxyHost", java.lang.String.class);
        answer.put("httpProxyPassword", java.lang.String.class);
        answer.put("httpProxyPort", java.lang.Integer.class);
        answer.put("httpProxyUser", java.lang.String.class);
        answer.put("lazyStartProducer", boolean.class);
        answer.put("oAuthToken", java.lang.String.class);
        answer.put("page", java.lang.Integer.class);
        answer.put("perPage", java.lang.Integer.class);
        answer.put("resource", org.apache.camel.component.digitalocean.constants.DigitalOceanResources.class);
        answer.put("synchronous", boolean.class);
        return answer;
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        DigitalOceanEndpoint target = (DigitalOceanEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "basicpropertybinding":
        case "basicPropertyBinding": return target.isBasicPropertyBinding();
        case "digitaloceanclient":
        case "digitalOceanClient": return target.getConfiguration().getDigitalOceanClient();
        case "httpproxyhost":
        case "httpProxyHost": return target.getConfiguration().getHttpProxyHost();
        case "httpproxypassword":
        case "httpProxyPassword": return target.getConfiguration().getHttpProxyPassword();
        case "httpproxyport":
        case "httpProxyPort": return target.getConfiguration().getHttpProxyPort();
        case "httpproxyuser":
        case "httpProxyUser": return target.getConfiguration().getHttpProxyUser();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "oauthtoken":
        case "oAuthToken": return target.getConfiguration().getOAuthToken();
        case "page": return target.getConfiguration().getPage();
        case "perpage":
        case "perPage": return target.getConfiguration().getPerPage();
        case "resource": return target.getConfiguration().getResource();
        case "synchronous": return target.isSynchronous();
        default: return null;
        }
    }
}

