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

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

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        Neo4jEndpoint target = (Neo4jEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "alias": target.getConfiguration().setAlias(property(camelContext, java.lang.String.class, value)); return true;
        case "databaseurl":
        case "databaseUrl": target.getConfiguration().setDatabaseUrl(property(camelContext, java.lang.String.class, value)); return true;
        case "detachrelationship":
        case "detachRelationship": target.getConfiguration().setDetachRelationship(property(camelContext, boolean.class, value)); return true;
        case "dimension": target.getConfiguration().setDimension(property(camelContext, java.lang.Integer.class, value)); return true;
        case "driver": target.getConfiguration().setDriver(property(camelContext, org.neo4j.driver.Driver.class, value)); return true;
        case "kerberosauthticket":
        case "kerberosAuthTicket": target.getConfiguration().setKerberosAuthTicket(property(camelContext, java.lang.String.class, value)); return true;
        case "label": target.getConfiguration().setLabel(property(camelContext, java.lang.String.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "maxresults":
        case "maxResults": target.getConfiguration().setMaxResults(property(camelContext, int.class, value)); return true;
        case "minscore":
        case "minScore": target.getConfiguration().setMinScore(property(camelContext, double.class, value)); return true;
        case "password": target.getConfiguration().setPassword(property(camelContext, java.lang.String.class, value)); return true;
        case "query": target.getConfiguration().setQuery(property(camelContext, java.lang.String.class, value)); return true;
        case "realm": target.getConfiguration().setRealm(property(camelContext, java.lang.String.class, value)); return true;
        case "similarityfunction":
        case "similarityFunction": target.getConfiguration().setSimilarityFunction(property(camelContext, org.apache.camel.component.neo4j.Neo4jSimilarityFunction.class, value)); return true;
        case "token": target.getConfiguration().setToken(property(camelContext, java.lang.String.class, value)); return true;
        case "username": target.getConfiguration().setUsername(property(camelContext, java.lang.String.class, value)); return true;
        case "vectorindexname":
        case "vectorIndexName": target.getConfiguration().setVectorIndexName(property(camelContext, java.lang.String.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public String[] getAutowiredNames() {
        return new String[]{"driver"};
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "alias": return java.lang.String.class;
        case "databaseurl":
        case "databaseUrl": return java.lang.String.class;
        case "detachrelationship":
        case "detachRelationship": return boolean.class;
        case "dimension": return java.lang.Integer.class;
        case "driver": return org.neo4j.driver.Driver.class;
        case "kerberosauthticket":
        case "kerberosAuthTicket": return java.lang.String.class;
        case "label": return java.lang.String.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "maxresults":
        case "maxResults": return int.class;
        case "minscore":
        case "minScore": return double.class;
        case "password": return java.lang.String.class;
        case "query": return java.lang.String.class;
        case "realm": return java.lang.String.class;
        case "similarityfunction":
        case "similarityFunction": return org.apache.camel.component.neo4j.Neo4jSimilarityFunction.class;
        case "token": return java.lang.String.class;
        case "username": return java.lang.String.class;
        case "vectorindexname":
        case "vectorIndexName": return java.lang.String.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        Neo4jEndpoint target = (Neo4jEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "alias": return target.getConfiguration().getAlias();
        case "databaseurl":
        case "databaseUrl": return target.getConfiguration().getDatabaseUrl();
        case "detachrelationship":
        case "detachRelationship": return target.getConfiguration().isDetachRelationship();
        case "dimension": return target.getConfiguration().getDimension();
        case "driver": return target.getConfiguration().getDriver();
        case "kerberosauthticket":
        case "kerberosAuthTicket": return target.getConfiguration().getKerberosAuthTicket();
        case "label": return target.getConfiguration().getLabel();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "maxresults":
        case "maxResults": return target.getConfiguration().getMaxResults();
        case "minscore":
        case "minScore": return target.getConfiguration().getMinScore();
        case "password": return target.getConfiguration().getPassword();
        case "query": return target.getConfiguration().getQuery();
        case "realm": return target.getConfiguration().getRealm();
        case "similarityfunction":
        case "similarityFunction": return target.getConfiguration().getSimilarityFunction();
        case "token": return target.getConfiguration().getToken();
        case "username": return target.getConfiguration().getUsername();
        case "vectorindexname":
        case "vectorIndexName": return target.getConfiguration().getVectorIndexName();
        default: return null;
        }
    }
}

