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

import java.util.Map;

import org.apache.camel.CamelContext;
import org.apache.camel.spi.ConfigurerStrategy;
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 ScpEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    private static final Map<String, Object> ALL_OPTIONS;
    static {
        Map<String, Object> map = new CaseInsensitiveMap();
        map.put("host", java.lang.String.class);
        map.put("port", int.class);
        map.put("directoryName", java.lang.String.class);
        map.put("chmod", java.lang.String.class);
        map.put("disconnect", boolean.class);
        map.put("fileName", java.lang.String.class);
        map.put("flatten", boolean.class);
        map.put("jailStartingDirectory", boolean.class);
        map.put("lazyStartProducer", boolean.class);
        map.put("strictHostKeyChecking", java.lang.String.class);
        map.put("allowNullBody", boolean.class);
        map.put("disconnectOnBatchComplete", boolean.class);
        map.put("moveExistingFileStrategy", org.apache.camel.component.file.strategy.FileMoveExistingStrategy.class);
        map.put("basicPropertyBinding", boolean.class);
        map.put("connectTimeout", int.class);
        map.put("soTimeout", int.class);
        map.put("synchronous", boolean.class);
        map.put("timeout", int.class);
        map.put("knownHostsFile", java.lang.String.class);
        map.put("password", java.lang.String.class);
        map.put("preferredAuthentications", java.lang.String.class);
        map.put("privateKeyBytes", byte[].class);
        map.put("privateKeyFile", java.lang.String.class);
        map.put("privateKeyFilePassphrase", java.lang.String.class);
        map.put("username", java.lang.String.class);
        map.put("useUserKnownHostsFile", boolean.class);
        map.put("ciphers", java.lang.String.class);
        ALL_OPTIONS = map;
        ConfigurerStrategy.addConfigurerClearer(ScpEndpointConfigurer::clearConfigurers);
    }

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        ScpEndpoint target = (ScpEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "allownullbody":
        case "allowNullBody": target.setAllowNullBody(property(camelContext, boolean.class, value)); return true;
        case "basicpropertybinding":
        case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
        case "chmod": target.getConfiguration().setChmod(property(camelContext, java.lang.String.class, value)); return true;
        case "ciphers": target.getConfiguration().setCiphers(property(camelContext, java.lang.String.class, value)); return true;
        case "connecttimeout":
        case "connectTimeout": target.getConfiguration().setConnectTimeout(property(camelContext, int.class, value)); return true;
        case "disconnect": target.setDisconnect(property(camelContext, boolean.class, value)); return true;
        case "disconnectonbatchcomplete":
        case "disconnectOnBatchComplete": target.setDisconnectOnBatchComplete(property(camelContext, boolean.class, value)); return true;
        case "filename":
        case "fileName": target.setFileName(property(camelContext, java.lang.String.class, value)); return true;
        case "flatten": target.setFlatten(property(camelContext, boolean.class, value)); return true;
        case "jailstartingdirectory":
        case "jailStartingDirectory": target.setJailStartingDirectory(property(camelContext, boolean.class, value)); return true;
        case "knownhostsfile":
        case "knownHostsFile": target.getConfiguration().setKnownHostsFile(property(camelContext, java.lang.String.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "moveexistingfilestrategy":
        case "moveExistingFileStrategy": target.setMoveExistingFileStrategy(property(camelContext, org.apache.camel.component.file.strategy.FileMoveExistingStrategy.class, value)); return true;
        case "password": target.getConfiguration().setPassword(property(camelContext, java.lang.String.class, value)); return true;
        case "preferredauthentications":
        case "preferredAuthentications": target.getConfiguration().setPreferredAuthentications(property(camelContext, java.lang.String.class, value)); return true;
        case "privatekeybytes":
        case "privateKeyBytes": target.getConfiguration().setPrivateKeyBytes(property(camelContext, byte[].class, value)); return true;
        case "privatekeyfile":
        case "privateKeyFile": target.getConfiguration().setPrivateKeyFile(property(camelContext, java.lang.String.class, value)); return true;
        case "privatekeyfilepassphrase":
        case "privateKeyFilePassphrase": target.getConfiguration().setPrivateKeyFilePassphrase(property(camelContext, java.lang.String.class, value)); return true;
        case "sotimeout":
        case "soTimeout": target.getConfiguration().setSoTimeout(property(camelContext, int.class, value)); return true;
        case "stricthostkeychecking":
        case "strictHostKeyChecking": target.getConfiguration().setStrictHostKeyChecking(property(camelContext, java.lang.String.class, value)); return true;
        case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true;
        case "timeout": target.getConfiguration().setTimeout(property(camelContext, int.class, value)); return true;
        case "useuserknownhostsfile":
        case "useUserKnownHostsFile": target.getConfiguration().setUseUserKnownHostsFile(property(camelContext, boolean.class, value)); return true;
        case "username": target.getConfiguration().setUsername(property(camelContext, java.lang.String.class, value)); return true;
        default: return false;
        }
    }

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

    public static void clearBootstrapConfigurers() {
    }

    public static void clearConfigurers() {
        ALL_OPTIONS.clear();
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        ScpEndpoint target = (ScpEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "allownullbody":
        case "allowNullBody": return target.isAllowNullBody();
        case "basicpropertybinding":
        case "basicPropertyBinding": return target.isBasicPropertyBinding();
        case "chmod": return target.getConfiguration().getChmod();
        case "ciphers": return target.getConfiguration().getCiphers();
        case "connecttimeout":
        case "connectTimeout": return target.getConfiguration().getConnectTimeout();
        case "disconnect": return target.isDisconnect();
        case "disconnectonbatchcomplete":
        case "disconnectOnBatchComplete": return target.isDisconnectOnBatchComplete();
        case "filename":
        case "fileName": return target.getFileName();
        case "flatten": return target.isFlatten();
        case "jailstartingdirectory":
        case "jailStartingDirectory": return target.isJailStartingDirectory();
        case "knownhostsfile":
        case "knownHostsFile": return target.getConfiguration().getKnownHostsFile();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "moveexistingfilestrategy":
        case "moveExistingFileStrategy": return target.getMoveExistingFileStrategy();
        case "password": return target.getConfiguration().getPassword();
        case "preferredauthentications":
        case "preferredAuthentications": return target.getConfiguration().getPreferredAuthentications();
        case "privatekeybytes":
        case "privateKeyBytes": return target.getConfiguration().getPrivateKeyBytes();
        case "privatekeyfile":
        case "privateKeyFile": return target.getConfiguration().getPrivateKeyFile();
        case "privatekeyfilepassphrase":
        case "privateKeyFilePassphrase": return target.getConfiguration().getPrivateKeyFilePassphrase();
        case "sotimeout":
        case "soTimeout": return target.getConfiguration().getSoTimeout();
        case "stricthostkeychecking":
        case "strictHostKeyChecking": return target.getConfiguration().getStrictHostKeyChecking();
        case "synchronous": return target.isSynchronous();
        case "timeout": return target.getConfiguration().getTimeout();
        case "useuserknownhostsfile":
        case "useUserKnownHostsFile": return target.getConfiguration().isUseUserKnownHostsFile();
        case "username": return target.getConfiguration().getUsername();
        default: return null;
        }
    }
}

