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

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

    private org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration getOrCreateConfiguration(DataLakeComponent target) {
        if (target.getConfiguration() == null) {
            target.setConfiguration(new org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration());
        }
        return target.getConfiguration();
    }

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        DataLakeComponent target = (DataLakeComponent) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accountkey":
        case "accountKey": getOrCreateConfiguration(target).setAccountKey(property(camelContext, java.lang.String.class, value)); return true;
        case "autowiredenabled":
        case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "clientid":
        case "clientId": getOrCreateConfiguration(target).setClientId(property(camelContext, java.lang.String.class, value)); return true;
        case "clientsecret":
        case "clientSecret": getOrCreateConfiguration(target).setClientSecret(property(camelContext, java.lang.String.class, value)); return true;
        case "clientsecretcredential":
        case "clientSecretCredential": getOrCreateConfiguration(target).setClientSecretCredential(property(camelContext, com.azure.identity.ClientSecretCredential.class, value)); return true;
        case "close": getOrCreateConfiguration(target).setClose(property(camelContext, java.lang.Boolean.class, value)); return true;
        case "closestreamafterread":
        case "closeStreamAfterRead": getOrCreateConfiguration(target).setCloseStreamAfterRead(property(camelContext, java.lang.Boolean.class, value)); return true;
        case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration.class, value)); return true;
        case "credentialtype":
        case "credentialType": getOrCreateConfiguration(target).setCredentialType(property(camelContext, org.apache.camel.component.azure.storage.datalake.CredentialType.class, value)); return true;
        case "datacount":
        case "dataCount": getOrCreateConfiguration(target).setDataCount(property(camelContext, java.lang.Long.class, value)); return true;
        case "directoryname":
        case "directoryName": getOrCreateConfiguration(target).setDirectoryName(property(camelContext, java.lang.String.class, value)); return true;
        case "downloadlinkexpiration":
        case "downloadLinkExpiration": getOrCreateConfiguration(target).setDownloadLinkExpiration(property(camelContext, java.lang.Long.class, value)); return true;
        case "expression": getOrCreateConfiguration(target).setExpression(property(camelContext, java.lang.String.class, value)); return true;
        case "filedir":
        case "fileDir": getOrCreateConfiguration(target).setFileDir(property(camelContext, java.lang.String.class, value)); return true;
        case "filename":
        case "fileName": getOrCreateConfiguration(target).setFileName(property(camelContext, java.lang.String.class, value)); return true;
        case "fileoffset":
        case "fileOffset": getOrCreateConfiguration(target).setFileOffset(property(camelContext, java.lang.Long.class, value)); return true;
        case "healthcheckconsumerenabled":
        case "healthCheckConsumerEnabled": target.setHealthCheckConsumerEnabled(property(camelContext, boolean.class, value)); return true;
        case "healthcheckproducerenabled":
        case "healthCheckProducerEnabled": target.setHealthCheckProducerEnabled(property(camelContext, boolean.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "maxresults":
        case "maxResults": getOrCreateConfiguration(target).setMaxResults(property(camelContext, java.lang.Integer.class, value)); return true;
        case "maxretryrequests":
        case "maxRetryRequests": getOrCreateConfiguration(target).setMaxRetryRequests(property(camelContext, int.class, value)); return true;
        case "openoptions":
        case "openOptions": getOrCreateConfiguration(target).setOpenOptions(property(camelContext, java.util.Set.class, value)); return true;
        case "operation": getOrCreateConfiguration(target).setOperation(property(camelContext, org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition.class, value)); return true;
        case "path": getOrCreateConfiguration(target).setPath(property(camelContext, java.lang.String.class, value)); return true;
        case "permission": getOrCreateConfiguration(target).setPermission(property(camelContext, java.lang.String.class, value)); return true;
        case "position": getOrCreateConfiguration(target).setPosition(property(camelContext, java.lang.Long.class, value)); return true;
        case "recursive": getOrCreateConfiguration(target).setRecursive(property(camelContext, java.lang.Boolean.class, value)); return true;
        case "regex": getOrCreateConfiguration(target).setRegex(property(camelContext, java.lang.String.class, value)); return true;
        case "retainuncommiteddata":
        case "retainUncommitedData": getOrCreateConfiguration(target).setRetainUncommitedData(property(camelContext, java.lang.Boolean.class, value)); return true;
        case "sascredential":
        case "sasCredential": getOrCreateConfiguration(target).setSasCredential(property(camelContext, com.azure.core.credential.AzureSasCredential.class, value)); return true;
        case "sassignature":
        case "sasSignature": getOrCreateConfiguration(target).setSasSignature(property(camelContext, java.lang.String.class, value)); return true;
        case "serviceclient":
        case "serviceClient": getOrCreateConfiguration(target).setServiceClient(property(camelContext, com.azure.storage.file.datalake.DataLakeServiceClient.class, value)); return true;
        case "sharedkeycredential":
        case "sharedKeyCredential": getOrCreateConfiguration(target).setSharedKeyCredential(property(camelContext, com.azure.storage.common.StorageSharedKeyCredential.class, value)); return true;
        case "tenantid":
        case "tenantId": getOrCreateConfiguration(target).setTenantId(property(camelContext, java.lang.String.class, value)); return true;
        case "timeout": getOrCreateConfiguration(target).setTimeout(property(camelContext, java.time.Duration.class, value)); return true;
        case "umask": getOrCreateConfiguration(target).setUmask(property(camelContext, java.lang.String.class, value)); return true;
        case "userprincipalnamereturned":
        case "userPrincipalNameReturned": getOrCreateConfiguration(target).setUserPrincipalNameReturned(property(camelContext, java.lang.Boolean.class, value)); return true;
        default: return false;
        }
    }

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

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accountkey":
        case "accountKey": return java.lang.String.class;
        case "autowiredenabled":
        case "autowiredEnabled": return boolean.class;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return boolean.class;
        case "clientid":
        case "clientId": return java.lang.String.class;
        case "clientsecret":
        case "clientSecret": return java.lang.String.class;
        case "clientsecretcredential":
        case "clientSecretCredential": return com.azure.identity.ClientSecretCredential.class;
        case "close": return java.lang.Boolean.class;
        case "closestreamafterread":
        case "closeStreamAfterRead": return java.lang.Boolean.class;
        case "configuration": return org.apache.camel.component.azure.storage.datalake.DataLakeConfiguration.class;
        case "credentialtype":
        case "credentialType": return org.apache.camel.component.azure.storage.datalake.CredentialType.class;
        case "datacount":
        case "dataCount": return java.lang.Long.class;
        case "directoryname":
        case "directoryName": return java.lang.String.class;
        case "downloadlinkexpiration":
        case "downloadLinkExpiration": return java.lang.Long.class;
        case "expression": return java.lang.String.class;
        case "filedir":
        case "fileDir": return java.lang.String.class;
        case "filename":
        case "fileName": return java.lang.String.class;
        case "fileoffset":
        case "fileOffset": return java.lang.Long.class;
        case "healthcheckconsumerenabled":
        case "healthCheckConsumerEnabled": return boolean.class;
        case "healthcheckproducerenabled":
        case "healthCheckProducerEnabled": return boolean.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "maxresults":
        case "maxResults": return java.lang.Integer.class;
        case "maxretryrequests":
        case "maxRetryRequests": return int.class;
        case "openoptions":
        case "openOptions": return java.util.Set.class;
        case "operation": return org.apache.camel.component.azure.storage.datalake.DataLakeOperationsDefinition.class;
        case "path": return java.lang.String.class;
        case "permission": return java.lang.String.class;
        case "position": return java.lang.Long.class;
        case "recursive": return java.lang.Boolean.class;
        case "regex": return java.lang.String.class;
        case "retainuncommiteddata":
        case "retainUncommitedData": return java.lang.Boolean.class;
        case "sascredential":
        case "sasCredential": return com.azure.core.credential.AzureSasCredential.class;
        case "sassignature":
        case "sasSignature": return java.lang.String.class;
        case "serviceclient":
        case "serviceClient": return com.azure.storage.file.datalake.DataLakeServiceClient.class;
        case "sharedkeycredential":
        case "sharedKeyCredential": return com.azure.storage.common.StorageSharedKeyCredential.class;
        case "tenantid":
        case "tenantId": return java.lang.String.class;
        case "timeout": return java.time.Duration.class;
        case "umask": return java.lang.String.class;
        case "userprincipalnamereturned":
        case "userPrincipalNameReturned": return java.lang.Boolean.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        DataLakeComponent target = (DataLakeComponent) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accountkey":
        case "accountKey": return getOrCreateConfiguration(target).getAccountKey();
        case "autowiredenabled":
        case "autowiredEnabled": return target.isAutowiredEnabled();
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return target.isBridgeErrorHandler();
        case "clientid":
        case "clientId": return getOrCreateConfiguration(target).getClientId();
        case "clientsecret":
        case "clientSecret": return getOrCreateConfiguration(target).getClientSecret();
        case "clientsecretcredential":
        case "clientSecretCredential": return getOrCreateConfiguration(target).getClientSecretCredential();
        case "close": return getOrCreateConfiguration(target).getClose();
        case "closestreamafterread":
        case "closeStreamAfterRead": return getOrCreateConfiguration(target).getCloseStreamAfterRead();
        case "configuration": return target.getConfiguration();
        case "credentialtype":
        case "credentialType": return getOrCreateConfiguration(target).getCredentialType();
        case "datacount":
        case "dataCount": return getOrCreateConfiguration(target).getDataCount();
        case "directoryname":
        case "directoryName": return getOrCreateConfiguration(target).getDirectoryName();
        case "downloadlinkexpiration":
        case "downloadLinkExpiration": return getOrCreateConfiguration(target).getDownloadLinkExpiration();
        case "expression": return getOrCreateConfiguration(target).getExpression();
        case "filedir":
        case "fileDir": return getOrCreateConfiguration(target).getFileDir();
        case "filename":
        case "fileName": return getOrCreateConfiguration(target).getFileName();
        case "fileoffset":
        case "fileOffset": return getOrCreateConfiguration(target).getFileOffset();
        case "healthcheckconsumerenabled":
        case "healthCheckConsumerEnabled": return target.isHealthCheckConsumerEnabled();
        case "healthcheckproducerenabled":
        case "healthCheckProducerEnabled": return target.isHealthCheckProducerEnabled();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "maxresults":
        case "maxResults": return getOrCreateConfiguration(target).getMaxResults();
        case "maxretryrequests":
        case "maxRetryRequests": return getOrCreateConfiguration(target).getMaxRetryRequests();
        case "openoptions":
        case "openOptions": return getOrCreateConfiguration(target).getOpenOptions();
        case "operation": return getOrCreateConfiguration(target).getOperation();
        case "path": return getOrCreateConfiguration(target).getPath();
        case "permission": return getOrCreateConfiguration(target).getPermission();
        case "position": return getOrCreateConfiguration(target).getPosition();
        case "recursive": return getOrCreateConfiguration(target).getRecursive();
        case "regex": return getOrCreateConfiguration(target).getRegex();
        case "retainuncommiteddata":
        case "retainUncommitedData": return getOrCreateConfiguration(target).getRetainUncommitedData();
        case "sascredential":
        case "sasCredential": return getOrCreateConfiguration(target).getSasCredential();
        case "sassignature":
        case "sasSignature": return getOrCreateConfiguration(target).getSasSignature();
        case "serviceclient":
        case "serviceClient": return getOrCreateConfiguration(target).getServiceClient();
        case "sharedkeycredential":
        case "sharedKeyCredential": return getOrCreateConfiguration(target).getSharedKeyCredential();
        case "tenantid":
        case "tenantId": return getOrCreateConfiguration(target).getTenantId();
        case "timeout": return getOrCreateConfiguration(target).getTimeout();
        case "umask": return getOrCreateConfiguration(target).getUmask();
        case "userprincipalnamereturned":
        case "userPrincipalNameReturned": return getOrCreateConfiguration(target).getUserPrincipalNameReturned();
        default: return null;
        }
    }

    @Override
    public Object getCollectionValueType(Object target, String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "openoptions":
        case "openOptions": return java.nio.file.OpenOption.class;
        default: return null;
        }
    }
}

