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

org.apache.camel.component.stitch.StitchComponentConfigurer Maven / Gradle / Ivy

There is a newer version: 4.8.1
Show newest version
/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.component.stitch;

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!
 */
@SuppressWarnings("unchecked")
public class StitchComponentConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    private org.apache.camel.component.stitch.StitchConfiguration getOrCreateConfiguration(StitchComponent target) {
        if (target.getConfiguration() == null) {
            target.setConfiguration(new org.apache.camel.component.stitch.StitchConfiguration());
        }
        return target.getConfiguration();
    }

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        StitchComponent target = (StitchComponent) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "autowiredenabled":
        case "autowiredEnabled": target.setAutowiredEnabled(property(camelContext, boolean.class, value)); return true;
        case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.stitch.StitchConfiguration.class, value)); return true;
        case "connectionprovider":
        case "connectionProvider": getOrCreateConfiguration(target).setConnectionProvider(property(camelContext, reactor.netty.resources.ConnectionProvider.class, value)); return true;
        case "httpclient":
        case "httpClient": getOrCreateConfiguration(target).setHttpClient(property(camelContext, reactor.netty.http.client.HttpClient.class, value)); return true;
        case "keynames":
        case "keyNames": getOrCreateConfiguration(target).setKeyNames(property(camelContext, java.lang.String.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "region": getOrCreateConfiguration(target).setRegion(property(camelContext, org.apache.camel.component.stitch.client.StitchRegion.class, value)); return true;
        case "stitchclient":
        case "stitchClient": getOrCreateConfiguration(target).setStitchClient(property(camelContext, org.apache.camel.component.stitch.client.StitchClient.class, value)); return true;
        case "stitchschema":
        case "stitchSchema": getOrCreateConfiguration(target).setStitchSchema(property(camelContext, org.apache.camel.component.stitch.client.models.StitchSchema.class, value)); return true;
        case "token": getOrCreateConfiguration(target).setToken(property(camelContext, java.lang.String.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public String[] getAutowiredNames() {
        return new String[]{"connectionProvider","httpClient","stitchClient","stitchSchema"};
    }

    @Override
    public Class getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "autowiredenabled":
        case "autowiredEnabled": return boolean.class;
        case "configuration": return org.apache.camel.component.stitch.StitchConfiguration.class;
        case "connectionprovider":
        case "connectionProvider": return reactor.netty.resources.ConnectionProvider.class;
        case "httpclient":
        case "httpClient": return reactor.netty.http.client.HttpClient.class;
        case "keynames":
        case "keyNames": return java.lang.String.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "region": return org.apache.camel.component.stitch.client.StitchRegion.class;
        case "stitchclient":
        case "stitchClient": return org.apache.camel.component.stitch.client.StitchClient.class;
        case "stitchschema":
        case "stitchSchema": return org.apache.camel.component.stitch.client.models.StitchSchema.class;
        case "token": return java.lang.String.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        StitchComponent target = (StitchComponent) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "autowiredenabled":
        case "autowiredEnabled": return target.isAutowiredEnabled();
        case "configuration": return target.getConfiguration();
        case "connectionprovider":
        case "connectionProvider": return getOrCreateConfiguration(target).getConnectionProvider();
        case "httpclient":
        case "httpClient": return getOrCreateConfiguration(target).getHttpClient();
        case "keynames":
        case "keyNames": return getOrCreateConfiguration(target).getKeyNames();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "region": return getOrCreateConfiguration(target).getRegion();
        case "stitchclient":
        case "stitchClient": return getOrCreateConfiguration(target).getStitchClient();
        case "stitchschema":
        case "stitchSchema": return getOrCreateConfiguration(target).getStitchSchema();
        case "token": return getOrCreateConfiguration(target).getToken();
        default: return null;
        }
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy