/* 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 ServiceBusComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    private org.apache.camel.component.azure.servicebus.ServiceBusConfiguration getOrCreateConfiguration(ServiceBusComponent target) {
        if (target.getConfiguration() == null) {
            target.setConfiguration(new org.apache.camel.component.azure.servicebus.ServiceBusConfiguration());
        }
        return target.getConfiguration();
    }

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        ServiceBusComponent target = (ServiceBusComponent) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "amqpretryoptions":
        case "amqpRetryOptions": getOrCreateConfiguration(target).setAmqpRetryOptions(property(camelContext, com.azure.core.amqp.AmqpRetryOptions.class, value)); return true;
        case "amqptransporttype":
        case "amqpTransportType": getOrCreateConfiguration(target).setAmqpTransportType(property(camelContext, com.azure.core.amqp.AmqpTransportType.class, value)); return true;
        case "autowiredenabled":
        case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
        case "binary": getOrCreateConfiguration(target).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": getOrCreateConfiguration(target).setClientOptions(property(camelContext, com.azure.core.util.ClientOptions.class, value)); return true;
        case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.azure.servicebus.ServiceBusConfiguration.class, value)); return true;
        case "connectionstring":
        case "connectionString": getOrCreateConfiguration(target).setConnectionString(property(camelContext, java.lang.String.class, value)); return true;
        case "credentialtype":
        case "credentialType": getOrCreateConfiguration(target).setCredentialType(property(camelContext, org.apache.camel.component.azure.servicebus.CredentialType.class, value)); return true;
        case "enabledeadlettering":
        case "enableDeadLettering": getOrCreateConfiguration(target).setEnableDeadLettering(property(camelContext, boolean.class, value)); return true;
        case "fullyqualifiednamespace":
        case "fullyQualifiedNamespace": getOrCreateConfiguration(target).setFullyQualifiedNamespace(property(camelContext, java.lang.String.class, value)); return true;
        case "headerfilterstrategy":
        case "headerFilterStrategy": getOrCreateConfiguration(target).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": getOrCreateConfiguration(target).setMaxAutoLockRenewDuration(property(camelContext, java.time.Duration.class, value)); return true;
        case "maxconcurrentcalls":
        case "maxConcurrentCalls": getOrCreateConfiguration(target).setMaxConcurrentCalls(property(camelContext, int.class, value)); return true;
        case "prefetchcount":
        case "prefetchCount": getOrCreateConfiguration(target).setPrefetchCount(property(camelContext, int.class, value)); return true;
        case "processorclient":
        case "processorClient": getOrCreateConfiguration(target).setProcessorClient(property(camelContext, com.azure.messaging.servicebus.ServiceBusProcessorClient.class, value)); return true;
        case "produceroperation":
        case "producerOperation": getOrCreateConfiguration(target).setProducerOperation(property(camelContext, org.apache.camel.component.azure.servicebus.ServiceBusProducerOperationDefinition.class, value)); return true;
        case "proxyoptions":
        case "proxyOptions": getOrCreateConfiguration(target).setProxyOptions(property(camelContext, com.azure.core.amqp.ProxyOptions.class, value)); return true;
        case "scheduledenqueuetime":
        case "scheduledEnqueueTime": getOrCreateConfiguration(target).setScheduledEnqueueTime(property(camelContext, java.time.OffsetDateTime.class, value)); return true;
        case "senderclient":
        case "senderClient": getOrCreateConfiguration(target).setSenderClient(property(camelContext, com.azure.messaging.servicebus.ServiceBusSenderClient.class, value)); return true;
        case "servicebusreceivemode":
        case "serviceBusReceiveMode": getOrCreateConfiguration(target).setServiceBusReceiveMode(property(camelContext, com.azure.messaging.servicebus.models.ServiceBusReceiveMode.class, value)); return true;
        case "servicebustransactioncontext":
        case "serviceBusTransactionContext": getOrCreateConfiguration(target).setServiceBusTransactionContext(property(camelContext, com.azure.messaging.servicebus.ServiceBusTransactionContext.class, value)); return true;
        case "servicebustype":
        case "serviceBusType": getOrCreateConfiguration(target).setServiceBusType(property(camelContext, org.apache.camel.component.azure.servicebus.ServiceBusType.class, value)); return true;
        case "subqueue":
        case "subQueue": getOrCreateConfiguration(target).setSubQueue(property(camelContext, com.azure.messaging.servicebus.models.SubQueue.class, value)); return true;
        case "subscriptionname":
        case "subscriptionName": getOrCreateConfiguration(target).setSubscriptionName(property(camelContext, java.lang.String.class, value)); return true;
        case "tokencredential":
        case "tokenCredential": getOrCreateConfiguration(target).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 "autowiredenabled":
        case "autowiredEnabled": return boolean.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 "configuration": return org.apache.camel.component.azure.servicebus.ServiceBusConfiguration.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 "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) {
        ServiceBusComponent target = (ServiceBusComponent) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "amqpretryoptions":
        case "amqpRetryOptions": return getOrCreateConfiguration(target).getAmqpRetryOptions();
        case "amqptransporttype":
        case "amqpTransportType": return getOrCreateConfiguration(target).getAmqpTransportType();
        case "autowiredenabled":
        case "autowiredEnabled": return target.isAutowiredEnabled();
        case "binary": return getOrCreateConfiguration(target).isBinary();
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return target.isBridgeErrorHandler();
        case "clientoptions":
        case "clientOptions": return getOrCreateConfiguration(target).getClientOptions();
        case "configuration": return target.getConfiguration();
        case "connectionstring":
        case "connectionString": return getOrCreateConfiguration(target).getConnectionString();
        case "credentialtype":
        case "credentialType": return getOrCreateConfiguration(target).getCredentialType();
        case "enabledeadlettering":
        case "enableDeadLettering": return getOrCreateConfiguration(target).isEnableDeadLettering();
        case "fullyqualifiednamespace":
        case "fullyQualifiedNamespace": return getOrCreateConfiguration(target).getFullyQualifiedNamespace();
        case "headerfilterstrategy":
        case "headerFilterStrategy": return getOrCreateConfiguration(target).getHeaderFilterStrategy();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "maxautolockrenewduration":
        case "maxAutoLockRenewDuration": return getOrCreateConfiguration(target).getMaxAutoLockRenewDuration();
        case "maxconcurrentcalls":
        case "maxConcurrentCalls": return getOrCreateConfiguration(target).getMaxConcurrentCalls();
        case "prefetchcount":
        case "prefetchCount": return getOrCreateConfiguration(target).getPrefetchCount();
        case "processorclient":
        case "processorClient": return getOrCreateConfiguration(target).getProcessorClient();
        case "produceroperation":
        case "producerOperation": return getOrCreateConfiguration(target).getProducerOperation();
        case "proxyoptions":
        case "proxyOptions": return getOrCreateConfiguration(target).getProxyOptions();
        case "scheduledenqueuetime":
        case "scheduledEnqueueTime": return getOrCreateConfiguration(target).getScheduledEnqueueTime();
        case "senderclient":
        case "senderClient": return getOrCreateConfiguration(target).getSenderClient();
        case "servicebusreceivemode":
        case "serviceBusReceiveMode": return getOrCreateConfiguration(target).getServiceBusReceiveMode();
        case "servicebustransactioncontext":
        case "serviceBusTransactionContext": return getOrCreateConfiguration(target).getServiceBusTransactionContext();
        case "servicebustype":
        case "serviceBusType": return getOrCreateConfiguration(target).getServiceBusType();
        case "subqueue":
        case "subQueue": return getOrCreateConfiguration(target).getSubQueue();
        case "subscriptionname":
        case "subscriptionName": return getOrCreateConfiguration(target).getSubscriptionName();
        case "tokencredential":
        case "tokenCredential": return getOrCreateConfiguration(target).getTokenCredential();
        default: return null;
        }
    }
}

