/* Generated by camel build tools - do NOT edit this file! */
package com.redhat.camel.component.cics;

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

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        CICSEndpoint target = (CICSEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "ctgdebug":
        case "ctgDebug": target.getConfiguration().setCtgDebug(property(camelContext, java.lang.Boolean.class, value)); return true;
        case "ecibinding":
        case "eciBinding": target.getConfiguration().setEciBinding(property(camelContext, com.redhat.camel.component.cics.CICSEciBinding.class, value)); return true;
        case "ecitimeout":
        case "eciTimeout": target.getConfiguration().setEciTimeout(property(camelContext, short.class, value)); return true;
        case "encoding": target.getConfiguration().setEncoding(property(camelContext, java.lang.String.class, value)); return true;
        case "gatewayfactory":
        case "gatewayFactory": target.getConfiguration().setGatewayFactory(property(camelContext, com.redhat.camel.component.cics.pool.CICSGatewayFactory.class, value)); return true;
        case "host": target.getConfiguration().setHost(property(camelContext, java.lang.String.class, value)); return true;
        case "initialflow":
        case "initialFlow": target.getConfiguration().setInitialFlow(property(camelContext, java.lang.Boolean.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "password": target.getConfiguration().setPassword(property(camelContext, java.lang.String.class, value)); return true;
        case "port": target.getConfiguration().setPort(property(camelContext, int.class, value)); return true;
        case "protocol": target.getConfiguration().setProtocol(property(camelContext, java.lang.String.class, value)); return true;
        case "server": target.getConfiguration().setServer(property(camelContext, java.lang.String.class, value)); return true;
        case "socketconnectiontimeout":
        case "socketConnectionTimeout": target.getConfiguration().setSocketConnectionTimeout(property(camelContext, int.class, value)); return true;
        case "sslkeyring":
        case "sslKeyring": target.getConfiguration().setSslKeyring(property(camelContext, java.lang.String.class, value)); return true;
        case "sslpassword":
        case "sslPassword": target.getConfiguration().setSslPassword(property(camelContext, java.lang.String.class, value)); return true;
        case "userid":
        case "userId": target.getConfiguration().setUserId(property(camelContext, java.lang.String.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public String[] getAutowiredNames() {
        return new String[]{"gatewayFactory"};
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "ctgdebug":
        case "ctgDebug": return java.lang.Boolean.class;
        case "ecibinding":
        case "eciBinding": return com.redhat.camel.component.cics.CICSEciBinding.class;
        case "ecitimeout":
        case "eciTimeout": return short.class;
        case "encoding": return java.lang.String.class;
        case "gatewayfactory":
        case "gatewayFactory": return com.redhat.camel.component.cics.pool.CICSGatewayFactory.class;
        case "host": return java.lang.String.class;
        case "initialflow":
        case "initialFlow": return java.lang.Boolean.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "password": return java.lang.String.class;
        case "port": return int.class;
        case "protocol": return java.lang.String.class;
        case "server": return java.lang.String.class;
        case "socketconnectiontimeout":
        case "socketConnectionTimeout": return int.class;
        case "sslkeyring":
        case "sslKeyring": return java.lang.String.class;
        case "sslpassword":
        case "sslPassword": return java.lang.String.class;
        case "userid":
        case "userId": return java.lang.String.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        CICSEndpoint target = (CICSEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "ctgdebug":
        case "ctgDebug": return target.getConfiguration().getCtgDebug();
        case "ecibinding":
        case "eciBinding": return target.getConfiguration().getEciBinding();
        case "ecitimeout":
        case "eciTimeout": return target.getConfiguration().getEciTimeout();
        case "encoding": return target.getConfiguration().getEncoding();
        case "gatewayfactory":
        case "gatewayFactory": return target.getConfiguration().getGatewayFactory();
        case "host": return target.getConfiguration().getHost();
        case "initialflow":
        case "initialFlow": return target.getConfiguration().getInitialFlow();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "password": return target.getConfiguration().getPassword();
        case "port": return target.getConfiguration().getPort();
        case "protocol": return target.getConfiguration().getProtocol();
        case "server": return target.getConfiguration().getServer();
        case "socketconnectiontimeout":
        case "socketConnectionTimeout": return target.getConfiguration().getSocketConnectionTimeout();
        case "sslkeyring":
        case "sslKeyring": return target.getConfiguration().getSslKeyring();
        case "sslpassword":
        case "sslPassword": return target.getConfiguration().getSslPassword();
        case "userid":
        case "userId": return target.getConfiguration().getUserId();
        default: return null;
        }
    }
}

