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

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.k.tracing.TracingContextCustomizer;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@SuppressWarnings("unchecked")
public class TracingContextCustomizerConfigurer 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.k.tracing.TracingContextCustomizer target = (org.apache.camel.k.tracing.TracingContextCustomizer) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "reporter":
        case "Reporter": target.setReporter(property(camelContext, io.jaegertracing.Configuration.ReporterConfiguration.class, value)); return true;
        case "sampler":
        case "Sampler": target.setSampler(property(camelContext, io.jaegertracing.Configuration.SamplerConfiguration.class, value)); return true;
        case "servicename":
        case "ServiceName": target.setServiceName(property(camelContext, java.lang.String.class, value)); return true;
        case "tags":
        case "Tags": target.setTags(property(camelContext, java.util.Map.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Map<String, Object> getAllOptions(Object target) {
        Map<String, Object> answer = new CaseInsensitiveMap();
        answer.put("Reporter", io.jaegertracing.Configuration.ReporterConfiguration.class);
        answer.put("Sampler", io.jaegertracing.Configuration.SamplerConfiguration.class);
        answer.put("ServiceName", java.lang.String.class);
        answer.put("Tags", java.util.Map.class);
        return answer;
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        org.apache.camel.k.tracing.TracingContextCustomizer target = (org.apache.camel.k.tracing.TracingContextCustomizer) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "reporter":
        case "Reporter": return target.getReporter();
        case "sampler":
        case "Sampler": return target.getSampler();
        case "servicename":
        case "ServiceName": return target.getServiceName();
        case "tags":
        case "Tags": return target.getTags();
        default: return null;
        }
    }

    @Override
    public Object getCollectionValueType(Object target, String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "tags":
        case "Tags": return java.lang.String.class;
        default: return null;
        }
    }
}

