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

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.component.etcd.cloud.EtcdServiceDiscoveryFactory;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@SuppressWarnings("unchecked")
public class EtcdServiceDiscoveryFactoryConfigurer extends org.apache.camel.support.component.PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        org.apache.camel.component.etcd.cloud.EtcdServiceDiscoveryFactory target = (org.apache.camel.component.etcd.cloud.EtcdServiceDiscoveryFactory) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "password":
        case "Password": target.setPassword(property(camelContext, java.lang.String.class, value)); return true;
        case "servicepath":
        case "ServicePath": target.setServicePath(property(camelContext, java.lang.String.class, value)); return true;
        case "sslcontextparameters":
        case "SslContextParameters": target.setSslContextParameters(property(camelContext, org.apache.camel.support.jsse.SSLContextParameters.class, value)); return true;
        case "timetolive":
        case "TimeToLive": target.setTimeToLive(property(camelContext, java.lang.Integer.class, value)); return true;
        case "timeout":
        case "Timeout": target.setTimeout(property(camelContext, java.lang.Long.class, value)); return true;
        case "type":
        case "Type": target.setType(property(camelContext, java.lang.String.class, value)); return true;
        case "uris":
        case "Uris": target.setUris(property(camelContext, java.lang.String.class, value)); return true;
        case "username":
        case "UserName": target.setUserName(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 "password":
        case "Password": return java.lang.String.class;
        case "servicepath":
        case "ServicePath": return java.lang.String.class;
        case "sslcontextparameters":
        case "SslContextParameters": return org.apache.camel.support.jsse.SSLContextParameters.class;
        case "timetolive":
        case "TimeToLive": return java.lang.Integer.class;
        case "timeout":
        case "Timeout": return java.lang.Long.class;
        case "type":
        case "Type": return java.lang.String.class;
        case "uris":
        case "Uris": return java.lang.String.class;
        case "username":
        case "UserName": return java.lang.String.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        org.apache.camel.component.etcd.cloud.EtcdServiceDiscoveryFactory target = (org.apache.camel.component.etcd.cloud.EtcdServiceDiscoveryFactory) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "password":
        case "Password": return target.getPassword();
        case "servicepath":
        case "ServicePath": return target.getServicePath();
        case "sslcontextparameters":
        case "SslContextParameters": return target.getSslContextParameters();
        case "timetolive":
        case "TimeToLive": return target.getTimeToLive();
        case "timeout":
        case "Timeout": return target.getTimeout();
        case "type":
        case "Type": return target.getType();
        case "uris":
        case "Uris": return target.getUris();
        case "username":
        case "UserName": return target.getUserName();
        default: return null;
        }
    }
}

