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

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

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        ServiceBusEndpoint target = (ServiceBusEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "amqpretryoptions":
        case "amqpRetryOptions": target.getConfiguration().setAmqpRetryOptions(property(camelContext, com.azure.core.amqp.AmqpRetryOptions.class, value)); return true;
        case "amqptransporttype":
        case "amqpTransportType": target.getConfiguration().setAmqpTransportType(property(camelContext, com.azure.core.amqp.AmqpTransportType.class, value)); return true;
        case "binary": target.getConfiguration().setBinary(property(camelContext, boolean.class, value)); return true;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "clientoptions":
        case "clientOptions": target.getConfiguration().setClientOptions(property(camelContext, com.azure.core.util.ClientOptions.class, value)); return true;
        case "connectionstring":
        case "connectionString": target.getConfiguration().setConnectionString(property(camelContext, java.lang.String.class, value)); return true;
        case "credentialtype":
        case "credentialType": target.getConfiguration().setCredentialType(property(camelContext, org.apache.camel.component.azure.servicebus.CredentialType.class, value)); return true;
        case "enabledeadlettering":
        case "enableDeadLettering": target.getConfiguration().setEnableDeadLettering(property(camelContext, boolean.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 "fullyqualifiednamespace":
        case "fullyQualifiedNamespace": target.getConfiguration().setFullyQualifiedNamespace(property(camelContext, java.lang.String.class, value)); return true;
        case "headerfilterstrategy":
        case "headerFilterStrategy": target.getConfiguration().setHeaderFilterStrategy(property(camelContext, org.apache.camel.spi.HeaderFilterStrategy.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "maxautolockrenewduration":
        case "maxAutoLockRenewDuration": target.getConfiguration().setMaxAutoLockRenewDuration(property(camelContext, java.time.Duration.class, value)); return true;
        case "maxconcurrentcalls":
        case "maxConcurrentCalls": target.getConfiguration().setMaxConcurrentCalls(property(camelContext, int.class, value)); return true;
        case "prefetchcount":
        case "prefetchCount": target.getConfiguration().setPrefetchCount(property(camelContext, int.class, value)); return true;
        case "processorclient":
        case "processorClient": target.getConfiguration().setProcessorClient(property(camelContext, com.azure.messaging.servicebus.ServiceBusProcessorClient.class, value)); return true;
        case "produceroperation":
        case "producerOperation": target.getConfiguration().setProducerOperation(property(camelContext, org.apache.camel.component.azure.servicebus.ServiceBusProducerOperationDefinition.class, value)); return true;
        case "proxyoptions":
        case "proxyOptions": target.getConfiguration().setProxyOptions(property(camelContext, com.azure.core.amqp.ProxyOptions.class, value)); return true;
        case "scheduledenqueuetime":
        case "scheduledEnqueueTime": target.getConfiguration().setScheduledEnqueueTime(property(camelContext, java.time.OffsetDateTime.class, value)); return true;
        case "senderclient":
        case "senderClient": target.getConfiguration().setSenderClient(property(camelContext, com.azure.messaging.servicebus.ServiceBusSenderClient.class, value)); return true;
        case "servicebusreceivemode":
        case "serviceBusReceiveMode": target.getConfiguration().setServiceBusReceiveMode(property(camelContext, com.azure.messaging.servicebus.models.ServiceBusReceiveMode.class, value)); return true;
        case "servicebustransactioncontext":
        case "serviceBusTransactionContext": target.getConfiguration().setServiceBusTransactionContext(property(camelContext, com.azure.messaging.servicebus.ServiceBusTransactionContext.class, value)); return true;
        case "servicebustype":
        case "serviceBusType": target.getConfiguration().setServiceBusType(property(camelContext, org.apache.camel.component.azure.servicebus.ServiceBusType.class, value)); return true;
        case "subqueue":
        case "subQueue": target.getConfiguration().setSubQueue(property(camelContext, com.azure.messaging.servicebus.models.SubQueue.class, value)); return true;
        case "subscriptionname":
        case "subscriptionName": target.getConfiguration().setSubscriptionName(property(camelContext, java.lang.String.class, value)); return true;
        case "tokencredential":
        case "tokenCredential": target.getConfiguration().setTokenCredential(property(camelContext, com.azure.core.credential.TokenCredential.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public String[] getAutowiredNames() {
        return new String[]{"processorClient", "senderClient"};
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "amqpretryoptions":
        case "amqpRetryOptions": return com.azure.core.amqp.AmqpRetryOptions.class;
        case "amqptransporttype":
        case "amqpTransportType": return com.azure.core.amqp.AmqpTransportType.class;
        case "binary": return boolean.class;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return boolean.class;
        case "clientoptions":
        case "clientOptions": return com.azure.core.util.ClientOptions.class;
        case "connectionstring":
        case "connectionString": return java.lang.String.class;
        case "credentialtype":
        case "credentialType": return org.apache.camel.component.azure.servicebus.CredentialType.class;
        case "enabledeadlettering":
        case "enableDeadLettering": return boolean.class;
        case "exceptionhandler":
        case "exceptionHandler": return org.apache.camel.spi.ExceptionHandler.class;
        case "exchangepattern":
        case "exchangePattern": return org.apache.camel.ExchangePattern.class;
        case "fullyqualifiednamespace":
        case "fullyQualifiedNamespace": return java.lang.String.class;
        case "headerfilterstrategy":
        case "headerFilterStrategy": return org.apache.camel.spi.HeaderFilterStrategy.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "maxautolockrenewduration":
        case "maxAutoLockRenewDuration": return java.time.Duration.class;
        case "maxconcurrentcalls":
        case "maxConcurrentCalls": return int.class;
        case "prefetchcount":
        case "prefetchCount": return int.class;
        case "processorclient":
        case "processorClient": return com.azure.messaging.servicebus.ServiceBusProcessorClient.class;
        case "produceroperation":
        case "producerOperation": return org.apache.camel.component.azure.servicebus.ServiceBusProducerOperationDefinition.class;
        case "proxyoptions":
        case "proxyOptions": return com.azure.core.amqp.ProxyOptions.class;
        case "scheduledenqueuetime":
        case "scheduledEnqueueTime": return java.time.OffsetDateTime.class;
        case "senderclient":
        case "senderClient": return com.azure.messaging.servicebus.ServiceBusSenderClient.class;
        case "servicebusreceivemode":
        case "serviceBusReceiveMode": return com.azure.messaging.servicebus.models.ServiceBusReceiveMode.class;
        case "servicebustransactioncontext":
        case "serviceBusTransactionContext": return com.azure.messaging.servicebus.ServiceBusTransactionContext.class;
        case "servicebustype":
        case "serviceBusType": return org.apache.camel.component.azure.servicebus.ServiceBusType.class;
        case "subqueue":
        case "subQueue": return com.azure.messaging.servicebus.models.SubQueue.class;
        case "subscriptionname":
        case "subscriptionName": return java.lang.String.class;
        case "tokencredential":
        case "tokenCredential": return com.azure.core.credential.TokenCredential.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        ServiceBusEndpoint target = (ServiceBusEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "amqpretryoptions":
        case "amqpRetryOptions": return target.getConfiguration().getAmqpRetryOptions();
        case "amqptransporttype":
        case "amqpTransportType": return target.getConfiguration().getAmqpTransportType();
        case "binary": return target.getConfiguration().isBinary();
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return target.isBridgeErrorHandler();
        case "clientoptions":
        case "clientOptions": return target.getConfiguration().getClientOptions();
        case "connectionstring":
        case "connectionString": return target.getConfiguration().getConnectionString();
        case "credentialtype":
        case "credentialType": return target.getConfiguration().getCredentialType();
        case "enabledeadlettering":
        case "enableDeadLettering": return target.getConfiguration().isEnableDeadLettering();
        case "exceptionhandler":
        case "exceptionHandler": return target.getExceptionHandler();
        case "exchangepattern":
        case "exchangePattern": return target.getExchangePattern();
        case "fullyqualifiednamespace":
        case "fullyQualifiedNamespace": return target.getConfiguration().getFullyQualifiedNamespace();
        case "headerfilterstrategy":
        case "headerFilterStrategy": return target.getConfiguration().getHeaderFilterStrategy();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "maxautolockrenewduration":
        case "maxAutoLockRenewDuration": return target.getConfiguration().getMaxAutoLockRenewDuration();
        case "maxconcurrentcalls":
        case "maxConcurrentCalls": return target.getConfiguration().getMaxConcurrentCalls();
        case "prefetchcount":
        case "prefetchCount": return target.getConfiguration().getPrefetchCount();
        case "processorclient":
        case "processorClient": return target.getConfiguration().getProcessorClient();
        case "produceroperation":
        case "producerOperation": return target.getConfiguration().getProducerOperation();
        case "proxyoptions":
        case "proxyOptions": return target.getConfiguration().getProxyOptions();
        case "scheduledenqueuetime":
        case "scheduledEnqueueTime": return target.getConfiguration().getScheduledEnqueueTime();
        case "senderclient":
        case "senderClient": return target.getConfiguration().getSenderClient();
        case "servicebusreceivemode":
        case "serviceBusReceiveMode": return target.getConfiguration().getServiceBusReceiveMode();
        case "servicebustransactioncontext":
        case "serviceBusTransactionContext": return target.getConfiguration().getServiceBusTransactionContext();
        case "servicebustype":
        case "serviceBusType": return target.getConfiguration().getServiceBusType();
        case "subqueue":
        case "subQueue": return target.getConfiguration().getSubQueue();
        case "subscriptionname":
        case "subscriptionName": return target.getConfiguration().getSubscriptionName();
        case "tokencredential":
        case "tokenCredential": return target.getConfiguration().getTokenCredential();
        default: return null;
        }
    }
}

