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

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.component.file.cluster.FileLockClusterService;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.GenerateConfigurerMojo")
@SuppressWarnings("unchecked")
public class FileLockClusterServiceConfigurer 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.component.file.cluster.FileLockClusterService target = (org.apache.camel.component.file.cluster.FileLockClusterService) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "acquirelockdelay":
        case "acquireLockDelay": target.setAcquireLockDelay(property(camelContext, long.class, value)); return true;
        case "acquirelockdelayunit":
        case "acquireLockDelayUnit": target.setAcquireLockDelayUnit(property(camelContext, java.util.concurrent.TimeUnit.class, value)); return true;
        case "acquirelockinterval":
        case "acquireLockInterval": target.setAcquireLockInterval(property(camelContext, long.class, value)); return true;
        case "acquirelockintervalunit":
        case "acquireLockIntervalUnit": target.setAcquireLockIntervalUnit(property(camelContext, java.util.concurrent.TimeUnit.class, value)); return true;
        case "clusterdatataskmaxattempts":
        case "clusterDataTaskMaxAttempts": target.setClusterDataTaskMaxAttempts(property(camelContext, int.class, value)); return true;
        case "clusterdatatasktimeout":
        case "clusterDataTaskTimeout": target.setClusterDataTaskTimeout(property(camelContext, long.class, value)); return true;
        case "clusterdatatasktimeoutunit":
        case "clusterDataTaskTimeoutUnit": target.setClusterDataTaskTimeoutUnit(property(camelContext, java.util.concurrent.TimeUnit.class, value)); return true;
        case "heartbeattimeoutmultiplier":
        case "heartbeatTimeoutMultiplier": target.setHeartbeatTimeoutMultiplier(property(camelContext, int.class, value)); return true;
        case "root": target.setRoot(property(camelContext, java.lang.String.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "acquirelockdelay":
        case "acquireLockDelay": return long.class;
        case "acquirelockdelayunit":
        case "acquireLockDelayUnit": return java.util.concurrent.TimeUnit.class;
        case "acquirelockinterval":
        case "acquireLockInterval": return long.class;
        case "acquirelockintervalunit":
        case "acquireLockIntervalUnit": return java.util.concurrent.TimeUnit.class;
        case "clusterdatataskmaxattempts":
        case "clusterDataTaskMaxAttempts": return int.class;
        case "clusterdatatasktimeout":
        case "clusterDataTaskTimeout": return long.class;
        case "clusterdatatasktimeoutunit":
        case "clusterDataTaskTimeoutUnit": return java.util.concurrent.TimeUnit.class;
        case "heartbeattimeoutmultiplier":
        case "heartbeatTimeoutMultiplier": return int.class;
        case "root": return java.lang.String.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        org.apache.camel.component.file.cluster.FileLockClusterService target = (org.apache.camel.component.file.cluster.FileLockClusterService) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "acquirelockdelay":
        case "acquireLockDelay": return target.getAcquireLockDelay();
        case "acquirelockdelayunit":
        case "acquireLockDelayUnit": return target.getAcquireLockDelayUnit();
        case "acquirelockinterval":
        case "acquireLockInterval": return target.getAcquireLockInterval();
        case "acquirelockintervalunit":
        case "acquireLockIntervalUnit": return target.getAcquireLockIntervalUnit();
        case "clusterdatataskmaxattempts":
        case "clusterDataTaskMaxAttempts": return target.getClusterDataTaskMaxAttempts();
        case "clusterdatatasktimeout":
        case "clusterDataTaskTimeout": return target.getClusterDataTaskTimeout();
        case "clusterdatatasktimeoutunit":
        case "clusterDataTaskTimeoutUnit": return target.getClusterDataTaskTimeoutUnit();
        case "heartbeattimeoutmultiplier":
        case "heartbeatTimeoutMultiplier": return target.getHeartbeatTimeoutMultiplier();
        case "root": return target.getRoot();
        default: return null;
        }
    }
}

