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

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

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        ArangoDbEndpoint target = (ArangoDbEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "arangodb":
        case "arangoDB": target.setArangoDB(property(camelContext, com.arangodb.ArangoDB.class, value)); return true;
        case "documentcollection":
        case "documentCollection": target.getConfiguration().setDocumentCollection(property(camelContext, java.lang.String.class, value)); return true;
        case "edgecollection":
        case "edgeCollection": target.getConfiguration().setEdgeCollection(property(camelContext, java.lang.String.class, value)); return true;
        case "graph": target.getConfiguration().setGraph(property(camelContext, java.lang.String.class, value)); return true;
        case "host": target.getConfiguration().setHost(property(camelContext, java.lang.String.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "operation": target.getConfiguration().setOperation(property(camelContext, org.apache.camel.component.arangodb.ArangoDbOperation.class, value)); return true;
        case "password": target.getConfiguration().setPassword(property(camelContext, java.lang.String.class, value)); return true;
        case "port": target.getConfiguration().setPort(property(camelContext, int.class, value)); return true;
        case "user": target.getConfiguration().setUser(property(camelContext, java.lang.String.class, value)); return true;
        case "vertexcollection":
        case "vertexCollection": target.getConfiguration().setVertexCollection(property(camelContext, java.lang.String.class, value)); return true;
        case "vertx": target.setVertx(property(camelContext, io.vertx.core.Vertx.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "arangodb":
        case "arangoDB": return com.arangodb.ArangoDB.class;
        case "documentcollection":
        case "documentCollection": return java.lang.String.class;
        case "edgecollection":
        case "edgeCollection": return java.lang.String.class;
        case "graph": return java.lang.String.class;
        case "host": return java.lang.String.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "operation": return org.apache.camel.component.arangodb.ArangoDbOperation.class;
        case "password": return java.lang.String.class;
        case "port": return int.class;
        case "user": return java.lang.String.class;
        case "vertexcollection":
        case "vertexCollection": return java.lang.String.class;
        case "vertx": return io.vertx.core.Vertx.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        ArangoDbEndpoint target = (ArangoDbEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "arangodb":
        case "arangoDB": return target.getArangoDB();
        case "documentcollection":
        case "documentCollection": return target.getConfiguration().getDocumentCollection();
        case "edgecollection":
        case "edgeCollection": return target.getConfiguration().getEdgeCollection();
        case "graph": return target.getConfiguration().getGraph();
        case "host": return target.getConfiguration().getHost();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "operation": return target.getConfiguration().getOperation();
        case "password": return target.getConfiguration().getPassword();
        case "port": return target.getConfiguration().getPort();
        case "user": return target.getConfiguration().getUser();
        case "vertexcollection":
        case "vertexCollection": return target.getConfiguration().getVertexCollection();
        case "vertx": return target.getVertx();
        default: return null;
        }
    }
}

