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

org.apache.camel.component.influxdb2.InfluxDb2EndpointConfigurer Maven / Gradle / Ivy

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

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 InfluxDb2EndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        InfluxDb2Endpoint target = (InfluxDb2Endpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "autocreatebucket":
        case "autoCreateBucket": target.setAutoCreateBucket(property(camelContext, boolean.class, value)); return true;
        case "autocreateorg":
        case "autoCreateOrg": target.setAutoCreateOrg(property(camelContext, boolean.class, value)); return true;
        case "bucket": target.setBucket(property(camelContext, java.lang.String.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "operation": target.setOperation(property(camelContext, org.apache.camel.component.influxdb2.enums.Operation.class, value)); return true;
        case "org": target.setOrg(property(camelContext, java.lang.String.class, value)); return true;
        case "retentionpolicy":
        case "retentionPolicy": target.setRetentionPolicy(property(camelContext, java.lang.String.class, value)); return true;
        case "writeprecision":
        case "writePrecision": target.setWritePrecision(property(camelContext, com.influxdb.client.domain.WritePrecision.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "autocreatebucket":
        case "autoCreateBucket": return boolean.class;
        case "autocreateorg":
        case "autoCreateOrg": return boolean.class;
        case "bucket": return java.lang.String.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "operation": return org.apache.camel.component.influxdb2.enums.Operation.class;
        case "org": return java.lang.String.class;
        case "retentionpolicy":
        case "retentionPolicy": return java.lang.String.class;
        case "writeprecision":
        case "writePrecision": return com.influxdb.client.domain.WritePrecision.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        InfluxDb2Endpoint target = (InfluxDb2Endpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "autocreatebucket":
        case "autoCreateBucket": return target.isAutoCreateBucket();
        case "autocreateorg":
        case "autoCreateOrg": return target.isAutoCreateOrg();
        case "bucket": return target.getBucket();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "operation": return target.getOperation();
        case "org": return target.getOrg();
        case "retentionpolicy":
        case "retentionPolicy": return target.getRetentionPolicy();
        case "writeprecision":
        case "writePrecision": return target.getWritePrecision();
        default: return null;
        }
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy