/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.processor.idempotent.cassandra;

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.processor.idempotent.cassandra.CassandraIdempotentRepository;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.GenerateConfigurerMojo")
@SuppressWarnings("unchecked")
public class CassandraIdempotentRepositoryConfigurer extends org.apache.camel.support.component.PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        org.apache.camel.processor.idempotent.cassandra.CassandraIdempotentRepository target = (org.apache.camel.processor.idempotent.cassandra.CassandraIdempotentRepository) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "pkcolumns":
        case "pkColumns": target.setPkColumns(property(camelContext, java.lang.String.class, value)); return true;
        case "prefixpkvalues":
        case "prefixPKValues": target.setPrefixPKValues(property(camelContext, java.lang.String.class, value)); return true;
        case "readconsistencylevel":
        case "readConsistencyLevel": target.setReadConsistencyLevel(property(camelContext, com.datastax.oss.driver.api.core.ConsistencyLevel.class, value)); return true;
        case "session": target.setSession(property(camelContext, com.datastax.oss.driver.api.core.CqlSession.class, value)); return true;
        case "table": target.setTable(property(camelContext, java.lang.String.class, value)); return true;
        case "ttl": target.setTtl(property(camelContext, java.lang.Integer.class, value)); return true;
        case "writeconsistencylevel":
        case "writeConsistencyLevel": target.setWriteConsistencyLevel(property(camelContext, com.datastax.oss.driver.api.core.ConsistencyLevel.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "pkcolumns":
        case "pkColumns": return java.lang.String.class;
        case "prefixpkvalues":
        case "prefixPKValues": return java.lang.String.class;
        case "readconsistencylevel":
        case "readConsistencyLevel": return com.datastax.oss.driver.api.core.ConsistencyLevel.class;
        case "session": return com.datastax.oss.driver.api.core.CqlSession.class;
        case "table": return java.lang.String.class;
        case "ttl": return java.lang.Integer.class;
        case "writeconsistencylevel":
        case "writeConsistencyLevel": return com.datastax.oss.driver.api.core.ConsistencyLevel.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        org.apache.camel.processor.idempotent.cassandra.CassandraIdempotentRepository target = (org.apache.camel.processor.idempotent.cassandra.CassandraIdempotentRepository) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "pkcolumns":
        case "pkColumns": return target.getPkColumns();
        case "prefixpkvalues":
        case "prefixPKValues": return target.getPrefixPKValues();
        case "readconsistencylevel":
        case "readConsistencyLevel": return target.getReadConsistencyLevel();
        case "session": return target.getSession();
        case "table": return target.getTable();
        case "ttl": return target.getTtl();
        case "writeconsistencylevel":
        case "writeConsistencyLevel": return target.getWriteConsistencyLevel();
        default: return null;
        }
    }
}

