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

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

    private org.apache.camel.component.azure.storage.blob.BlobConfiguration getOrCreateConfiguration(BlobComponent target) {
        if (target.getConfiguration() == null) {
            target.setConfiguration(new org.apache.camel.component.azure.storage.blob.BlobConfiguration());
        }
        return target.getConfiguration();
    }

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        BlobComponent target = (BlobComponent) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accesskey":
        case "accessKey": getOrCreateConfiguration(target).setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
        case "autowiredenabled":
        case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
        case "blobname":
        case "blobName": getOrCreateConfiguration(target).setBlobName(property(camelContext, java.lang.String.class, value)); return true;
        case "bloboffset":
        case "blobOffset": getOrCreateConfiguration(target).setBlobOffset(property(camelContext, long.class, value)); return true;
        case "blobsequencenumber":
        case "blobSequenceNumber": getOrCreateConfiguration(target).setBlobSequenceNumber(property(camelContext, java.lang.Long.class, value)); return true;
        case "blobtype":
        case "blobType": getOrCreateConfiguration(target).setBlobType(property(camelContext, org.apache.camel.component.azure.storage.blob.BlobType.class, value)); return true;
        case "blocklisttype":
        case "blockListType": getOrCreateConfiguration(target).setBlockListType(property(camelContext, com.azure.storage.blob.models.BlockListType.class, value)); return true;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "changefeedcontext":
        case "changeFeedContext": getOrCreateConfiguration(target).setChangeFeedContext(property(camelContext, com.azure.core.util.Context.class, value)); return true;
        case "changefeedendtime":
        case "changeFeedEndTime": getOrCreateConfiguration(target).setChangeFeedEndTime(property(camelContext, java.time.OffsetDateTime.class, value)); return true;
        case "changefeedstarttime":
        case "changeFeedStartTime": getOrCreateConfiguration(target).setChangeFeedStartTime(property(camelContext, java.time.OffsetDateTime.class, value)); return true;
        case "closestreamafterread":
        case "closeStreamAfterRead": getOrCreateConfiguration(target).setCloseStreamAfterRead(property(camelContext, boolean.class, value)); return true;
        case "closestreamafterwrite":
        case "closeStreamAfterWrite": getOrCreateConfiguration(target).setCloseStreamAfterWrite(property(camelContext, boolean.class, value)); return true;
        case "commitblocklistlater":
        case "commitBlockListLater": getOrCreateConfiguration(target).setCommitBlockListLater(property(camelContext, boolean.class, value)); return true;
        case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.azure.storage.blob.BlobConfiguration.class, value)); return true;
        case "createappendblob":
        case "createAppendBlob": getOrCreateConfiguration(target).setCreateAppendBlob(property(camelContext, boolean.class, value)); return true;
        case "createpageblob":
        case "createPageBlob": getOrCreateConfiguration(target).setCreatePageBlob(property(camelContext, boolean.class, value)); return true;
        case "credentialtype":
        case "credentialType": getOrCreateConfiguration(target).setCredentialType(property(camelContext, org.apache.camel.component.azure.storage.blob.CredentialType.class, value)); return true;
        case "credentials": getOrCreateConfiguration(target).setCredentials(property(camelContext, com.azure.storage.common.StorageSharedKeyCredential.class, value)); return true;
        case "datacount":
        case "dataCount": getOrCreateConfiguration(target).setDataCount(property(camelContext, java.lang.Long.class, value)); return true;
        case "downloadlinkexpiration":
        case "downloadLinkExpiration": getOrCreateConfiguration(target).setDownloadLinkExpiration(property(camelContext, java.lang.Long.class, value)); return true;
        case "filedir":
        case "fileDir": getOrCreateConfiguration(target).setFileDir(property(camelContext, java.lang.String.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 "maxresultsperpage":
        case "maxResultsPerPage": getOrCreateConfiguration(target).setMaxResultsPerPage(property(camelContext, java.lang.Integer.class, value)); return true;
        case "maxretryrequests":
        case "maxRetryRequests": getOrCreateConfiguration(target).setMaxRetryRequests(property(camelContext, int.class, value)); return true;
        case "operation": getOrCreateConfiguration(target).setOperation(property(camelContext, org.apache.camel.component.azure.storage.blob.BlobOperationsDefinition.class, value)); return true;
        case "pageblobsize":
        case "pageBlobSize": getOrCreateConfiguration(target).setPageBlobSize(property(camelContext, java.lang.Long.class, value)); return true;
        case "prefix": getOrCreateConfiguration(target).setPrefix(property(camelContext, java.lang.String.class, value)); return true;
        case "regex": getOrCreateConfiguration(target).setRegex(property(camelContext, java.lang.String.class, value)); return true;
        case "sastoken":
        case "sasToken": getOrCreateConfiguration(target).setSasToken(property(camelContext, java.lang.String.class, value)); return true;
        case "serviceclient":
        case "serviceClient": getOrCreateConfiguration(target).setServiceClient(property(camelContext, com.azure.storage.blob.BlobServiceClient.class, value)); return true;
        case "sourceblobaccesskey":
        case "sourceBlobAccessKey": getOrCreateConfiguration(target).setSourceBlobAccessKey(property(camelContext, java.lang.String.class, value)); return true;
        case "timeout": getOrCreateConfiguration(target).setTimeout(property(camelContext, java.time.Duration.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 "accesskey":
        case "accessKey": return java.lang.String.class;
        case "autowiredenabled":
        case "autowiredEnabled": return boolean.class;
        case "blobname":
        case "blobName": return java.lang.String.class;
        case "bloboffset":
        case "blobOffset": return long.class;
        case "blobsequencenumber":
        case "blobSequenceNumber": return java.lang.Long.class;
        case "blobtype":
        case "blobType": return org.apache.camel.component.azure.storage.blob.BlobType.class;
        case "blocklisttype":
        case "blockListType": return com.azure.storage.blob.models.BlockListType.class;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return boolean.class;
        case "changefeedcontext":
        case "changeFeedContext": return com.azure.core.util.Context.class;
        case "changefeedendtime":
        case "changeFeedEndTime": return java.time.OffsetDateTime.class;
        case "changefeedstarttime":
        case "changeFeedStartTime": return java.time.OffsetDateTime.class;
        case "closestreamafterread":
        case "closeStreamAfterRead": return boolean.class;
        case "closestreamafterwrite":
        case "closeStreamAfterWrite": return boolean.class;
        case "commitblocklistlater":
        case "commitBlockListLater": return boolean.class;
        case "configuration": return org.apache.camel.component.azure.storage.blob.BlobConfiguration.class;
        case "createappendblob":
        case "createAppendBlob": return boolean.class;
        case "createpageblob":
        case "createPageBlob": return boolean.class;
        case "credentialtype":
        case "credentialType": return org.apache.camel.component.azure.storage.blob.CredentialType.class;
        case "credentials": return com.azure.storage.common.StorageSharedKeyCredential.class;
        case "datacount":
        case "dataCount": return java.lang.Long.class;
        case "downloadlinkexpiration":
        case "downloadLinkExpiration": return java.lang.Long.class;
        case "filedir":
        case "fileDir": return java.lang.String.class;
        case "healthcheckconsumerenabled":
        case "healthCheckConsumerEnabled": return boolean.class;
        case "healthcheckproducerenabled":
        case "healthCheckProducerEnabled": return boolean.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "maxresultsperpage":
        case "maxResultsPerPage": return java.lang.Integer.class;
        case "maxretryrequests":
        case "maxRetryRequests": return int.class;
        case "operation": return org.apache.camel.component.azure.storage.blob.BlobOperationsDefinition.class;
        case "pageblobsize":
        case "pageBlobSize": return java.lang.Long.class;
        case "prefix": return java.lang.String.class;
        case "regex": return java.lang.String.class;
        case "sastoken":
        case "sasToken": return java.lang.String.class;
        case "serviceclient":
        case "serviceClient": return com.azure.storage.blob.BlobServiceClient.class;
        case "sourceblobaccesskey":
        case "sourceBlobAccessKey": return java.lang.String.class;
        case "timeout": return java.time.Duration.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        BlobComponent target = (BlobComponent) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accesskey":
        case "accessKey": return getOrCreateConfiguration(target).getAccessKey();
        case "autowiredenabled":
        case "autowiredEnabled": return target.isAutowiredEnabled();
        case "blobname":
        case "blobName": return getOrCreateConfiguration(target).getBlobName();
        case "bloboffset":
        case "blobOffset": return getOrCreateConfiguration(target).getBlobOffset();
        case "blobsequencenumber":
        case "blobSequenceNumber": return getOrCreateConfiguration(target).getBlobSequenceNumber();
        case "blobtype":
        case "blobType": return getOrCreateConfiguration(target).getBlobType();
        case "blocklisttype":
        case "blockListType": return getOrCreateConfiguration(target).getBlockListType();
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return target.isBridgeErrorHandler();
        case "changefeedcontext":
        case "changeFeedContext": return getOrCreateConfiguration(target).getChangeFeedContext();
        case "changefeedendtime":
        case "changeFeedEndTime": return getOrCreateConfiguration(target).getChangeFeedEndTime();
        case "changefeedstarttime":
        case "changeFeedStartTime": return getOrCreateConfiguration(target).getChangeFeedStartTime();
        case "closestreamafterread":
        case "closeStreamAfterRead": return getOrCreateConfiguration(target).isCloseStreamAfterRead();
        case "closestreamafterwrite":
        case "closeStreamAfterWrite": return getOrCreateConfiguration(target).isCloseStreamAfterWrite();
        case "commitblocklistlater":
        case "commitBlockListLater": return getOrCreateConfiguration(target).isCommitBlockListLater();
        case "configuration": return target.getConfiguration();
        case "createappendblob":
        case "createAppendBlob": return getOrCreateConfiguration(target).isCreateAppendBlob();
        case "createpageblob":
        case "createPageBlob": return getOrCreateConfiguration(target).isCreatePageBlob();
        case "credentialtype":
        case "credentialType": return getOrCreateConfiguration(target).getCredentialType();
        case "credentials": return getOrCreateConfiguration(target).getCredentials();
        case "datacount":
        case "dataCount": return getOrCreateConfiguration(target).getDataCount();
        case "downloadlinkexpiration":
        case "downloadLinkExpiration": return getOrCreateConfiguration(target).getDownloadLinkExpiration();
        case "filedir":
        case "fileDir": return getOrCreateConfiguration(target).getFileDir();
        case "healthcheckconsumerenabled":
        case "healthCheckConsumerEnabled": return target.isHealthCheckConsumerEnabled();
        case "healthcheckproducerenabled":
        case "healthCheckProducerEnabled": return target.isHealthCheckProducerEnabled();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "maxresultsperpage":
        case "maxResultsPerPage": return getOrCreateConfiguration(target).getMaxResultsPerPage();
        case "maxretryrequests":
        case "maxRetryRequests": return getOrCreateConfiguration(target).getMaxRetryRequests();
        case "operation": return getOrCreateConfiguration(target).getOperation();
        case "pageblobsize":
        case "pageBlobSize": return getOrCreateConfiguration(target).getPageBlobSize();
        case "prefix": return getOrCreateConfiguration(target).getPrefix();
        case "regex": return getOrCreateConfiguration(target).getRegex();
        case "sastoken":
        case "sasToken": return getOrCreateConfiguration(target).getSasToken();
        case "serviceclient":
        case "serviceClient": return getOrCreateConfiguration(target).getServiceClient();
        case "sourceblobaccesskey":
        case "sourceBlobAccessKey": return getOrCreateConfiguration(target).getSourceBlobAccessKey();
        case "timeout": return getOrCreateConfiguration(target).getTimeout();
        default: return null;
        }
    }
}

