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

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

    private org.apache.camel.component.dapr.DaprConfiguration getOrCreateConfiguration(DaprComponent target) {
        if (target.getConfiguration() == null) {
            target.setConfiguration(new org.apache.camel.component.dapr.DaprConfiguration());
        }
        return target.getConfiguration();
    }

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        DaprComponent target = (DaprComponent) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "autowiredenabled":
        case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
        case "bindingname":
        case "bindingName": getOrCreateConfiguration(target).setBindingName(property(camelContext, java.lang.String.class, value)); return true;
        case "bindingoperation":
        case "bindingOperation": getOrCreateConfiguration(target).setBindingOperation(property(camelContext, java.lang.String.class, value)); return true;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "client": getOrCreateConfiguration(target).setClient(property(camelContext, io.dapr.client.DaprClient.class, value)); return true;
        case "concurrency": getOrCreateConfiguration(target).setConcurrency(property(camelContext, io.dapr.client.domain.StateOptions.Concurrency.class, value)); return true;
        case "configkeys":
        case "configKeys": getOrCreateConfiguration(target).setConfigKeys(property(camelContext, java.lang.String.class, value)); return true;
        case "configstore":
        case "configStore": getOrCreateConfiguration(target).setConfigStore(property(camelContext, java.lang.String.class, value)); return true;
        case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.dapr.DaprConfiguration.class, value)); return true;
        case "consistency": getOrCreateConfiguration(target).setConsistency(property(camelContext, io.dapr.client.domain.StateOptions.Consistency.class, value)); return true;
        case "contenttype":
        case "contentType": getOrCreateConfiguration(target).setContentType(property(camelContext, java.lang.String.class, value)); return true;
        case "etag":
        case "eTag": getOrCreateConfiguration(target).setETag(property(camelContext, java.lang.String.class, value)); return true;
        case "eventname":
        case "eventName": getOrCreateConfiguration(target).setEventName(property(camelContext, java.lang.String.class, value)); return true;
        case "expiryinseconds":
        case "expiryInSeconds": getOrCreateConfiguration(target).setExpiryInSeconds(property(camelContext, java.lang.Integer.class, value)); return true;
        case "getworkflowio":
        case "getWorkflowIO": getOrCreateConfiguration(target).setGetWorkflowIO(property(camelContext, boolean.class, value)); return true;
        case "httpextension":
        case "httpExtension": getOrCreateConfiguration(target).setHttpExtension(property(camelContext, io.dapr.client.domain.HttpExtension.class, value)); return true;
        case "key": getOrCreateConfiguration(target).setKey(property(camelContext, java.lang.String.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "lockoperation":
        case "lockOperation": getOrCreateConfiguration(target).setLockOperation(property(camelContext, org.apache.camel.component.dapr.LockOperation.class, value)); return true;
        case "lockowner":
        case "lockOwner": getOrCreateConfiguration(target).setLockOwner(property(camelContext, java.lang.String.class, value)); return true;
        case "methodtoinvoke":
        case "methodToInvoke": getOrCreateConfiguration(target).setMethodToInvoke(property(camelContext, java.lang.String.class, value)); return true;
        case "previewclient":
        case "previewClient": getOrCreateConfiguration(target).setPreviewClient(property(camelContext, io.dapr.client.DaprPreviewClient.class, value)); return true;
        case "pubsubname":
        case "pubSubName": getOrCreateConfiguration(target).setPubSubName(property(camelContext, java.lang.String.class, value)); return true;
        case "reason": getOrCreateConfiguration(target).setReason(property(camelContext, java.lang.String.class, value)); return true;
        case "resourceid":
        case "resourceId": getOrCreateConfiguration(target).setResourceId(property(camelContext, java.lang.String.class, value)); return true;
        case "secretstore":
        case "secretStore": getOrCreateConfiguration(target).setSecretStore(property(camelContext, java.lang.String.class, value)); return true;
        case "servicetoinvoke":
        case "serviceToInvoke": getOrCreateConfiguration(target).setServiceToInvoke(property(camelContext, java.lang.String.class, value)); return true;
        case "stateoperation":
        case "stateOperation": getOrCreateConfiguration(target).setStateOperation(property(camelContext, org.apache.camel.component.dapr.StateOperation.class, value)); return true;
        case "statestore":
        case "stateStore": getOrCreateConfiguration(target).setStateStore(property(camelContext, java.lang.String.class, value)); return true;
        case "storename":
        case "storeName": getOrCreateConfiguration(target).setStoreName(property(camelContext, java.lang.String.class, value)); return true;
        case "timeout": getOrCreateConfiguration(target).setTimeout(property(camelContext, java.time.Duration.class, value)); return true;
        case "topic": getOrCreateConfiguration(target).setTopic(property(camelContext, java.lang.String.class, value)); return true;
        case "verb": getOrCreateConfiguration(target).setVerb(property(camelContext, java.lang.String.class, value)); return true;
        case "workflowclass":
        case "workflowClass": getOrCreateConfiguration(target).setWorkflowClass(property(camelContext, java.lang.String.class, value)); return true;
        case "workflowclient":
        case "workflowClient": getOrCreateConfiguration(target).setWorkflowClient(property(camelContext, io.dapr.workflows.client.DaprWorkflowClient.class, value)); return true;
        case "workflowinstanceid":
        case "workflowInstanceId": getOrCreateConfiguration(target).setWorkflowInstanceId(property(camelContext, java.lang.String.class, value)); return true;
        case "workflowoperation":
        case "workflowOperation": getOrCreateConfiguration(target).setWorkflowOperation(property(camelContext, org.apache.camel.component.dapr.WorkflowOperation.class, value)); return true;
        case "workflowstarttime":
        case "workflowStartTime": getOrCreateConfiguration(target).setWorkflowStartTime(property(camelContext, java.time.Instant.class, value)); return true;
        case "workflowversion":
        case "workflowVersion": getOrCreateConfiguration(target).setWorkflowVersion(property(camelContext, java.lang.String.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public String[] getAutowiredNames() {
        return new String[]{"client", "httpExtension", "previewClient", "workflowClient"};
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "autowiredenabled":
        case "autowiredEnabled": return boolean.class;
        case "bindingname":
        case "bindingName": return java.lang.String.class;
        case "bindingoperation":
        case "bindingOperation": return java.lang.String.class;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return boolean.class;
        case "client": return io.dapr.client.DaprClient.class;
        case "concurrency": return io.dapr.client.domain.StateOptions.Concurrency.class;
        case "configkeys":
        case "configKeys": return java.lang.String.class;
        case "configstore":
        case "configStore": return java.lang.String.class;
        case "configuration": return org.apache.camel.component.dapr.DaprConfiguration.class;
        case "consistency": return io.dapr.client.domain.StateOptions.Consistency.class;
        case "contenttype":
        case "contentType": return java.lang.String.class;
        case "etag":
        case "eTag": return java.lang.String.class;
        case "eventname":
        case "eventName": return java.lang.String.class;
        case "expiryinseconds":
        case "expiryInSeconds": return java.lang.Integer.class;
        case "getworkflowio":
        case "getWorkflowIO": return boolean.class;
        case "httpextension":
        case "httpExtension": return io.dapr.client.domain.HttpExtension.class;
        case "key": return java.lang.String.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "lockoperation":
        case "lockOperation": return org.apache.camel.component.dapr.LockOperation.class;
        case "lockowner":
        case "lockOwner": return java.lang.String.class;
        case "methodtoinvoke":
        case "methodToInvoke": return java.lang.String.class;
        case "previewclient":
        case "previewClient": return io.dapr.client.DaprPreviewClient.class;
        case "pubsubname":
        case "pubSubName": return java.lang.String.class;
        case "reason": return java.lang.String.class;
        case "resourceid":
        case "resourceId": return java.lang.String.class;
        case "secretstore":
        case "secretStore": return java.lang.String.class;
        case "servicetoinvoke":
        case "serviceToInvoke": return java.lang.String.class;
        case "stateoperation":
        case "stateOperation": return org.apache.camel.component.dapr.StateOperation.class;
        case "statestore":
        case "stateStore": return java.lang.String.class;
        case "storename":
        case "storeName": return java.lang.String.class;
        case "timeout": return java.time.Duration.class;
        case "topic": return java.lang.String.class;
        case "verb": return java.lang.String.class;
        case "workflowclass":
        case "workflowClass": return java.lang.String.class;
        case "workflowclient":
        case "workflowClient": return io.dapr.workflows.client.DaprWorkflowClient.class;
        case "workflowinstanceid":
        case "workflowInstanceId": return java.lang.String.class;
        case "workflowoperation":
        case "workflowOperation": return org.apache.camel.component.dapr.WorkflowOperation.class;
        case "workflowstarttime":
        case "workflowStartTime": return java.time.Instant.class;
        case "workflowversion":
        case "workflowVersion": return java.lang.String.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        DaprComponent target = (DaprComponent) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "autowiredenabled":
        case "autowiredEnabled": return target.isAutowiredEnabled();
        case "bindingname":
        case "bindingName": return getOrCreateConfiguration(target).getBindingName();
        case "bindingoperation":
        case "bindingOperation": return getOrCreateConfiguration(target).getBindingOperation();
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return target.isBridgeErrorHandler();
        case "client": return getOrCreateConfiguration(target).getClient();
        case "concurrency": return getOrCreateConfiguration(target).getConcurrency();
        case "configkeys":
        case "configKeys": return getOrCreateConfiguration(target).getConfigKeys();
        case "configstore":
        case "configStore": return getOrCreateConfiguration(target).getConfigStore();
        case "configuration": return target.getConfiguration();
        case "consistency": return getOrCreateConfiguration(target).getConsistency();
        case "contenttype":
        case "contentType": return getOrCreateConfiguration(target).getContentType();
        case "etag":
        case "eTag": return getOrCreateConfiguration(target).getETag();
        case "eventname":
        case "eventName": return getOrCreateConfiguration(target).getEventName();
        case "expiryinseconds":
        case "expiryInSeconds": return getOrCreateConfiguration(target).getExpiryInSeconds();
        case "getworkflowio":
        case "getWorkflowIO": return getOrCreateConfiguration(target).isGetWorkflowIO();
        case "httpextension":
        case "httpExtension": return getOrCreateConfiguration(target).getHttpExtension();
        case "key": return getOrCreateConfiguration(target).getKey();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "lockoperation":
        case "lockOperation": return getOrCreateConfiguration(target).getLockOperation();
        case "lockowner":
        case "lockOwner": return getOrCreateConfiguration(target).getLockOwner();
        case "methodtoinvoke":
        case "methodToInvoke": return getOrCreateConfiguration(target).getMethodToInvoke();
        case "previewclient":
        case "previewClient": return getOrCreateConfiguration(target).getPreviewClient();
        case "pubsubname":
        case "pubSubName": return getOrCreateConfiguration(target).getPubSubName();
        case "reason": return getOrCreateConfiguration(target).getReason();
        case "resourceid":
        case "resourceId": return getOrCreateConfiguration(target).getResourceId();
        case "secretstore":
        case "secretStore": return getOrCreateConfiguration(target).getSecretStore();
        case "servicetoinvoke":
        case "serviceToInvoke": return getOrCreateConfiguration(target).getServiceToInvoke();
        case "stateoperation":
        case "stateOperation": return getOrCreateConfiguration(target).getStateOperation();
        case "statestore":
        case "stateStore": return getOrCreateConfiguration(target).getStateStore();
        case "storename":
        case "storeName": return getOrCreateConfiguration(target).getStoreName();
        case "timeout": return getOrCreateConfiguration(target).getTimeout();
        case "topic": return getOrCreateConfiguration(target).getTopic();
        case "verb": return getOrCreateConfiguration(target).getVerb();
        case "workflowclass":
        case "workflowClass": return getOrCreateConfiguration(target).getWorkflowClass();
        case "workflowclient":
        case "workflowClient": return getOrCreateConfiguration(target).getWorkflowClient();
        case "workflowinstanceid":
        case "workflowInstanceId": return getOrCreateConfiguration(target).getWorkflowInstanceId();
        case "workflowoperation":
        case "workflowOperation": return getOrCreateConfiguration(target).getWorkflowOperation();
        case "workflowstarttime":
        case "workflowStartTime": return getOrCreateConfiguration(target).getWorkflowStartTime();
        case "workflowversion":
        case "workflowVersion": return getOrCreateConfiguration(target).getWorkflowVersion();
        default: return null;
        }
    }
}

