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

import java.util.Map;

import org.apache.camel.CamelContext;
import org.apache.camel.spi.GeneratedPropertyConfigurer;
import org.apache.camel.spi.PropertyConfigurerGetter;
import org.apache.camel.util.CaseInsensitiveMap;
import org.apache.camel.support.component.PropertyConfigurerSupport;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@SuppressWarnings("unchecked")
public class JMXEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        JMXEndpoint target = (JMXEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "basicpropertybinding":
        case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "differencemode":
        case "differenceMode": target.setDifferenceMode(property(camelContext, boolean.class, value)); return true;
        case "exceptionhandler":
        case "exceptionHandler": target.setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
        case "exchangepattern":
        case "exchangePattern": target.setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
        case "executorservice":
        case "executorService": target.setExecutorService(property(camelContext, java.util.concurrent.ExecutorService.class, value)); return true;
        case "format": target.setFormat(property(camelContext, java.lang.String.class, value)); return true;
        case "granularityperiod":
        case "granularityPeriod": target.setGranularityPeriod(property(camelContext, java.time.Duration.class, value).toMillis()); return true;
        case "handback": target.setHandback(property(camelContext, java.lang.Object.class, value)); return true;
        case "initthreshold":
        case "initThreshold": target.setInitThreshold(property(camelContext, int.class, value)); return true;
        case "modulus": target.setModulus(property(camelContext, int.class, value)); return true;
        case "monitortype":
        case "monitorType": target.setMonitorType(property(camelContext, java.lang.String.class, value)); return true;
        case "notificationfilter":
        case "notificationFilter": target.setNotificationFilter(property(camelContext, javax.management.NotificationFilter.class, value)); return true;
        case "notifydiffer":
        case "notifyDiffer": target.setNotifyDiffer(property(camelContext, boolean.class, value)); return true;
        case "notifyhigh":
        case "notifyHigh": target.setNotifyHigh(property(camelContext, boolean.class, value)); return true;
        case "notifylow":
        case "notifyLow": target.setNotifyLow(property(camelContext, boolean.class, value)); return true;
        case "notifymatch":
        case "notifyMatch": target.setNotifyMatch(property(camelContext, boolean.class, value)); return true;
        case "objectdomain":
        case "objectDomain": target.setObjectDomain(property(camelContext, java.lang.String.class, value)); return true;
        case "objectname":
        case "objectName": target.setObjectName(property(camelContext, java.lang.String.class, value)); return true;
        case "objectproperties":
        case "objectProperties": target.setObjectProperties(property(camelContext, java.util.Map.class, value)); return true;
        case "observedattribute":
        case "observedAttribute": target.setObservedAttribute(property(camelContext, java.lang.String.class, value)); return true;
        case "offset": target.setOffset(property(camelContext, int.class, value)); return true;
        case "password": target.setPassword(property(camelContext, java.lang.String.class, value)); return true;
        case "reconnectdelay":
        case "reconnectDelay": target.setReconnectDelay(property(camelContext, int.class, value)); return true;
        case "reconnectonconnectionfailure":
        case "reconnectOnConnectionFailure": target.setReconnectOnConnectionFailure(property(camelContext, boolean.class, value)); return true;
        case "stringtocompare":
        case "stringToCompare": target.setStringToCompare(property(camelContext, java.lang.String.class, value)); return true;
        case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true;
        case "testconnectiononstartup":
        case "testConnectionOnStartup": target.setTestConnectionOnStartup(property(camelContext, boolean.class, value)); return true;
        case "thresholdhigh":
        case "thresholdHigh": target.setThresholdHigh(property(camelContext, java.lang.Double.class, value)); return true;
        case "thresholdlow":
        case "thresholdLow": target.setThresholdLow(property(camelContext, java.lang.Double.class, value)); return true;
        case "user": target.setUser(property(camelContext, java.lang.String.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Map<String, Object> getAllOptions(Object target) {
        Map<String, Object> answer = new CaseInsensitiveMap();
        answer.put("basicPropertyBinding", boolean.class);
        answer.put("bridgeErrorHandler", boolean.class);
        answer.put("differenceMode", boolean.class);
        answer.put("exceptionHandler", org.apache.camel.spi.ExceptionHandler.class);
        answer.put("exchangePattern", org.apache.camel.ExchangePattern.class);
        answer.put("executorService", java.util.concurrent.ExecutorService.class);
        answer.put("format", java.lang.String.class);
        answer.put("granularityPeriod", long.class);
        answer.put("handback", java.lang.Object.class);
        answer.put("initThreshold", int.class);
        answer.put("modulus", int.class);
        answer.put("monitorType", java.lang.String.class);
        answer.put("notificationFilter", javax.management.NotificationFilter.class);
        answer.put("notifyDiffer", boolean.class);
        answer.put("notifyHigh", boolean.class);
        answer.put("notifyLow", boolean.class);
        answer.put("notifyMatch", boolean.class);
        answer.put("objectDomain", java.lang.String.class);
        answer.put("objectName", java.lang.String.class);
        answer.put("objectProperties", java.util.Map.class);
        answer.put("observedAttribute", java.lang.String.class);
        answer.put("offset", int.class);
        answer.put("password", java.lang.String.class);
        answer.put("reconnectDelay", int.class);
        answer.put("reconnectOnConnectionFailure", boolean.class);
        answer.put("stringToCompare", java.lang.String.class);
        answer.put("synchronous", boolean.class);
        answer.put("testConnectionOnStartup", boolean.class);
        answer.put("thresholdHigh", java.lang.Double.class);
        answer.put("thresholdLow", java.lang.Double.class);
        answer.put("user", java.lang.String.class);
        return answer;
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        JMXEndpoint target = (JMXEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "basicpropertybinding":
        case "basicPropertyBinding": return target.isBasicPropertyBinding();
        case "bridgeerrorhandler":
        case "bridgeErrorHandler": return target.isBridgeErrorHandler();
        case "differencemode":
        case "differenceMode": return target.isDifferenceMode();
        case "exceptionhandler":
        case "exceptionHandler": return target.getExceptionHandler();
        case "exchangepattern":
        case "exchangePattern": return target.getExchangePattern();
        case "executorservice":
        case "executorService": return target.getExecutorService();
        case "format": return target.getFormat();
        case "granularityperiod":
        case "granularityPeriod": return target.getGranularityPeriod();
        case "handback": return target.getHandback();
        case "initthreshold":
        case "initThreshold": return target.getInitThreshold();
        case "modulus": return target.getModulus();
        case "monitortype":
        case "monitorType": return target.getMonitorType();
        case "notificationfilter":
        case "notificationFilter": return target.getNotificationFilter();
        case "notifydiffer":
        case "notifyDiffer": return target.isNotifyDiffer();
        case "notifyhigh":
        case "notifyHigh": return target.isNotifyHigh();
        case "notifylow":
        case "notifyLow": return target.isNotifyLow();
        case "notifymatch":
        case "notifyMatch": return target.isNotifyMatch();
        case "objectdomain":
        case "objectDomain": return target.getObjectDomain();
        case "objectname":
        case "objectName": return target.getObjectName();
        case "objectproperties":
        case "objectProperties": return target.getObjectProperties();
        case "observedattribute":
        case "observedAttribute": return target.getObservedAttribute();
        case "offset": return target.getOffset();
        case "password": return target.getPassword();
        case "reconnectdelay":
        case "reconnectDelay": return target.getReconnectDelay();
        case "reconnectonconnectionfailure":
        case "reconnectOnConnectionFailure": return target.isReconnectOnConnectionFailure();
        case "stringtocompare":
        case "stringToCompare": return target.getStringToCompare();
        case "synchronous": return target.isSynchronous();
        case "testconnectiononstartup":
        case "testConnectionOnStartup": return target.isTestConnectionOnStartup();
        case "thresholdhigh":
        case "thresholdHigh": return target.getThresholdHigh();
        case "thresholdlow":
        case "thresholdLow": return target.getThresholdLow();
        case "user": return target.getUser();
        default: return null;
        }
    }
}

