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

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!
 */
@SuppressWarnings("unchecked")
public class QueueEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        QueueEndpoint target = (QueueEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accesskey":
        case "accessKey": target.getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
        case "autodiscoverclient":
        case "autoDiscoverClient": target.getConfiguration().setAutoDiscoverClient(property(camelContext, boolean.class, value)); return true;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "createqueue":
        case "createQueue": target.getConfiguration().setCreateQueue(property(camelContext, boolean.class, value)); return true;
        case "credentials": target.getConfiguration().setCredentials(property(camelContext, com.azure.storage.common.StorageSharedKeyCredential.class, value)); return true;
        case "exceptionhandler":
        case "exceptionHandler": target.setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
        case "exchangepattern":
        case "exchangePattern": target.setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "maxmessages":
        case "maxMessages": target.getConfiguration().setMaxMessages(property(camelContext, java.lang.Integer.class, value)); return true;
        case "messageid":
        case "messageId": target.getConfiguration().setMessageId(property(camelContext, java.lang.String.class, value)); return true;
        case "operation": target.getConfiguration().setOperation(property(camelContext, org.apache.camel.component.azure.storage.queue.QueueOperationDefinition.class, value)); return true;
        case "popreceipt":
        case "popReceipt": target.getConfiguration().setPopReceipt(property(camelContext, java.lang.String.class, value)); return true;
        case "serviceclient":
        case "serviceClient": target.getConfiguration().setServiceClient(property(camelContext, com.azure.storage.queue.QueueServiceClient.class, value)); return true;
        case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true;
        case "timetolive":
        case "timeToLive": target.getConfiguration().setTimeToLive(property(camelContext, java.time.Duration.class, value)); return true;
        case "timeout": target.getConfiguration().setTimeout(property(camelContext, java.time.Duration.class, value)); return true;
        case "visibilitytimeout":
        case "visibilityTimeout": target.getConfiguration().setVisibilityTimeout(property(camelContext, java.time.Duration.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accesskey":
        case "accessKey": return java.lang.String.class;
        case "autodiscoverclient":
        case "autoDiscoverClient": return boolean.class;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return boolean.class;
        case "createqueue":
        case "createQueue": return boolean.class;
        case "credentials": return com.azure.storage.common.StorageSharedKeyCredential.class;
        case "exceptionhandler":
        case "exceptionHandler": return org.apache.camel.spi.ExceptionHandler.class;
        case "exchangepattern":
        case "exchangePattern": return org.apache.camel.ExchangePattern.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "maxmessages":
        case "maxMessages": return java.lang.Integer.class;
        case "messageid":
        case "messageId": return java.lang.String.class;
        case "operation": return org.apache.camel.component.azure.storage.queue.QueueOperationDefinition.class;
        case "popreceipt":
        case "popReceipt": return java.lang.String.class;
        case "serviceclient":
        case "serviceClient": return com.azure.storage.queue.QueueServiceClient.class;
        case "synchronous": return boolean.class;
        case "timetolive":
        case "timeToLive": return java.time.Duration.class;
        case "timeout": return java.time.Duration.class;
        case "visibilitytimeout":
        case "visibilityTimeout": return java.time.Duration.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        QueueEndpoint target = (QueueEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accesskey":
        case "accessKey": return target.getConfiguration().getAccessKey();
        case "autodiscoverclient":
        case "autoDiscoverClient": return target.getConfiguration().isAutoDiscoverClient();
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return target.isBridgeErrorHandler();
        case "createqueue":
        case "createQueue": return target.getConfiguration().isCreateQueue();
        case "credentials": return target.getConfiguration().getCredentials();
        case "exceptionhandler":
        case "exceptionHandler": return target.getExceptionHandler();
        case "exchangepattern":
        case "exchangePattern": return target.getExchangePattern();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "maxmessages":
        case "maxMessages": return target.getConfiguration().getMaxMessages();
        case "messageid":
        case "messageId": return target.getConfiguration().getMessageId();
        case "operation": return target.getConfiguration().getOperation();
        case "popreceipt":
        case "popReceipt": return target.getConfiguration().getPopReceipt();
        case "serviceclient":
        case "serviceClient": return target.getConfiguration().getServiceClient();
        case "synchronous": return target.isSynchronous();
        case "timetolive":
        case "timeToLive": return target.getConfiguration().getTimeToLive();
        case "timeout": return target.getConfiguration().getTimeout();
        case "visibilitytimeout":
        case "visibilityTimeout": return target.getConfiguration().getVisibilityTimeout();
        default: return null;
        }
    }
}

