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

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

    private org.apache.camel.component.cyberark.vault.CyberArkVaultConfiguration getOrCreateConfiguration(CyberArkVaultComponent target) {
        if (target.getConfiguration() == null) {
            target.setConfiguration(new org.apache.camel.component.cyberark.vault.CyberArkVaultConfiguration());
        }
        return target.getConfiguration();
    }

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        CyberArkVaultComponent target = (CyberArkVaultComponent) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "account": getOrCreateConfiguration(target).setAccount(property(camelContext, java.lang.String.class, value)); return true;
        case "apikey":
        case "apiKey": getOrCreateConfiguration(target).setApiKey(property(camelContext, java.lang.String.class, value)); return true;
        case "authtoken":
        case "authToken": getOrCreateConfiguration(target).setAuthToken(property(camelContext, java.lang.String.class, value)); return true;
        case "autowiredenabled":
        case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
        case "certificatepath":
        case "certificatePath": getOrCreateConfiguration(target).setCertificatePath(property(camelContext, java.lang.String.class, value)); return true;
        case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.cyberark.vault.CyberArkVaultConfiguration.class, value)); return true;
        case "conjurclient":
        case "conjurClient": getOrCreateConfiguration(target).setConjurClient(property(camelContext, org.apache.camel.component.cyberark.vault.client.ConjurClient.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "operation": getOrCreateConfiguration(target).setOperation(property(camelContext, org.apache.camel.component.cyberark.vault.CyberArkVaultOperations.class, value)); return true;
        case "password": getOrCreateConfiguration(target).setPassword(property(camelContext, java.lang.String.class, value)); return true;
        case "secretid":
        case "secretId": getOrCreateConfiguration(target).setSecretId(property(camelContext, java.lang.String.class, value)); return true;
        case "url": getOrCreateConfiguration(target).setUrl(property(camelContext, java.lang.String.class, value)); return true;
        case "username": getOrCreateConfiguration(target).setUsername(property(camelContext, java.lang.String.class, value)); return true;
        case "verifyssl":
        case "verifySsl": getOrCreateConfiguration(target).setVerifySsl(property(camelContext, boolean.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "account": return java.lang.String.class;
        case "apikey":
        case "apiKey": return java.lang.String.class;
        case "authtoken":
        case "authToken": return java.lang.String.class;
        case "autowiredenabled":
        case "autowiredEnabled": return boolean.class;
        case "certificatepath":
        case "certificatePath": return java.lang.String.class;
        case "configuration": return org.apache.camel.component.cyberark.vault.CyberArkVaultConfiguration.class;
        case "conjurclient":
        case "conjurClient": return org.apache.camel.component.cyberark.vault.client.ConjurClient.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "operation": return org.apache.camel.component.cyberark.vault.CyberArkVaultOperations.class;
        case "password": return java.lang.String.class;
        case "secretid":
        case "secretId": return java.lang.String.class;
        case "url": return java.lang.String.class;
        case "username": return java.lang.String.class;
        case "verifyssl":
        case "verifySsl": return boolean.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        CyberArkVaultComponent target = (CyberArkVaultComponent) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "account": return getOrCreateConfiguration(target).getAccount();
        case "apikey":
        case "apiKey": return getOrCreateConfiguration(target).getApiKey();
        case "authtoken":
        case "authToken": return getOrCreateConfiguration(target).getAuthToken();
        case "autowiredenabled":
        case "autowiredEnabled": return target.isAutowiredEnabled();
        case "certificatepath":
        case "certificatePath": return getOrCreateConfiguration(target).getCertificatePath();
        case "configuration": return target.getConfiguration();
        case "conjurclient":
        case "conjurClient": return getOrCreateConfiguration(target).getConjurClient();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "operation": return getOrCreateConfiguration(target).getOperation();
        case "password": return getOrCreateConfiguration(target).getPassword();
        case "secretid":
        case "secretId": return getOrCreateConfiguration(target).getSecretId();
        case "url": return getOrCreateConfiguration(target).getUrl();
        case "username": return getOrCreateConfiguration(target).getUsername();
        case "verifyssl":
        case "verifySsl": return getOrCreateConfiguration(target).isVerifySsl();
        default: return null;
        }
    }
}

