All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.camel.component.aws.cw.CwEndpointConfigurer Maven / Gradle / Ivy

There is a newer version: 3.8.0
Show newest version
/* Generated by org.apache.camel:apt */
package org.apache.camel.component.aws.cw;

import java.util.HashMap;
import java.util.Map;

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

/**
 * Source code generated by org.apache.camel:apt
 */
@SuppressWarnings("unchecked")
public class CwEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer {

    @Override
    public boolean configure(CamelContext camelContext, Object endpoint, String name, Object value, boolean ignoreCase) {
        if (ignoreCase) {
            return doConfigureIgnoreCase(camelContext, endpoint, name, value);
        } else {
            return doConfigure(camelContext, endpoint, name, value);
        }
    }

    private static boolean doConfigure(CamelContext camelContext, Object endpoint, String name, Object value) {
        switch (name) {
        case "amazonCwClient": ((CwEndpoint) endpoint).getConfiguration().setAmazonCwClient(property(camelContext, com.amazonaws.services.cloudwatch.AmazonCloudWatch.class, value)); return true;
        case "accessKey": ((CwEndpoint) endpoint).getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
        case "secretKey": ((CwEndpoint) endpoint).getConfiguration().setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
        case "name": ((CwEndpoint) endpoint).getConfiguration().setName(property(camelContext, java.lang.String.class, value)); return true;
        case "value": ((CwEndpoint) endpoint).getConfiguration().setValue(property(camelContext, java.lang.Double.class, value)); return true;
        case "unit": ((CwEndpoint) endpoint).getConfiguration().setUnit(property(camelContext, java.lang.String.class, value)); return true;
        case "timestamp": ((CwEndpoint) endpoint).getConfiguration().setTimestamp(property(camelContext, java.util.Date.class, value)); return true;
        case "proxyProtocol": ((CwEndpoint) endpoint).getConfiguration().setProxyProtocol(property(camelContext, com.amazonaws.Protocol.class, value)); return true;
        case "proxyHost": ((CwEndpoint) endpoint).getConfiguration().setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
        case "proxyPort": ((CwEndpoint) endpoint).getConfiguration().setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
        case "region": ((CwEndpoint) endpoint).getConfiguration().setRegion(property(camelContext, java.lang.String.class, value)); return true;
        case "lazyStartProducer": ((CwEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "bridgeErrorHandler": ((CwEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "exceptionHandler": ((CwEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
        case "exchangePattern": ((CwEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
        case "synchronous": ((CwEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
        case "basicPropertyBinding": ((CwEndpoint) endpoint).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
            default: return false;
        }
    }

    private static boolean doConfigureIgnoreCase(CamelContext camelContext, Object endpoint, String name, Object value) {
        switch (name.toLowerCase()) {
        case "amazoncwclient": ((CwEndpoint) endpoint).getConfiguration().setAmazonCwClient(property(camelContext, com.amazonaws.services.cloudwatch.AmazonCloudWatch.class, value)); return true;
        case "accesskey": ((CwEndpoint) endpoint).getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true;
        case "secretkey": ((CwEndpoint) endpoint).getConfiguration().setSecretKey(property(camelContext, java.lang.String.class, value)); return true;
        case "name": ((CwEndpoint) endpoint).getConfiguration().setName(property(camelContext, java.lang.String.class, value)); return true;
        case "value": ((CwEndpoint) endpoint).getConfiguration().setValue(property(camelContext, java.lang.Double.class, value)); return true;
        case "unit": ((CwEndpoint) endpoint).getConfiguration().setUnit(property(camelContext, java.lang.String.class, value)); return true;
        case "timestamp": ((CwEndpoint) endpoint).getConfiguration().setTimestamp(property(camelContext, java.util.Date.class, value)); return true;
        case "proxyprotocol": ((CwEndpoint) endpoint).getConfiguration().setProxyProtocol(property(camelContext, com.amazonaws.Protocol.class, value)); return true;
        case "proxyhost": ((CwEndpoint) endpoint).getConfiguration().setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
        case "proxyport": ((CwEndpoint) endpoint).getConfiguration().setProxyPort(property(camelContext, java.lang.Integer.class, value)); return true;
        case "region": ((CwEndpoint) endpoint).getConfiguration().setRegion(property(camelContext, java.lang.String.class, value)); return true;
        case "lazystartproducer": ((CwEndpoint) endpoint).setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "bridgeerrorhandler": ((CwEndpoint) endpoint).setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true;
        case "exceptionhandler": ((CwEndpoint) endpoint).setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true;
        case "exchangepattern": ((CwEndpoint) endpoint).setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true;
        case "synchronous": ((CwEndpoint) endpoint).setSynchronous(property(camelContext, boolean.class, value)); return true;
        case "basicpropertybinding": ((CwEndpoint) endpoint).setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
            default: return false;
        }
    }

}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy