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

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.SourceDefinition;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@SuppressWarnings("unchecked")
public class SourceDefinitionConfigurer 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.SourceDefinition target = (org.apache.camel.k.SourceDefinition) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "compressed":
        case "Compressed": target.setCompressed(property(camelContext, boolean.class, value)); return true;
        case "content":
        case "Content": target.setContent(property(camelContext, byte[].class, value)); return true;
        case "id":
        case "Id": target.setId(property(camelContext, java.lang.String.class, value)); return true;
        case "interceptors":
        case "Interceptors": target.setInterceptors(property(camelContext, java.util.List.class, value)); return true;
        case "language":
        case "Language": target.setLanguage(property(camelContext, java.lang.String.class, value)); return true;
        case "loader":
        case "Loader": target.setLoader(property(camelContext, java.lang.String.class, value)); return true;
        case "location":
        case "Location": target.setLocation(property(camelContext, java.lang.String.class, value)); return true;
        case "name":
        case "Name": target.setName(property(camelContext, java.lang.String.class, value)); return true;
        case "propertynames":
        case "PropertyNames": target.setPropertyNames(property(camelContext, java.util.List.class, value)); return true;
        case "type":
        case "Type": target.setType(property(camelContext, org.apache.camel.k.SourceType.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Map<String, Object> getAllOptions(Object target) {
        Map<String, Object> answer = new CaseInsensitiveMap();
        answer.put("Compressed", boolean.class);
        answer.put("Content", byte[].class);
        answer.put("Id", java.lang.String.class);
        answer.put("Interceptors", java.util.List.class);
        answer.put("Language", java.lang.String.class);
        answer.put("Loader", java.lang.String.class);
        answer.put("Location", java.lang.String.class);
        answer.put("Name", java.lang.String.class);
        answer.put("PropertyNames", java.util.List.class);
        answer.put("Type", org.apache.camel.k.SourceType.class);
        return answer;
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        org.apache.camel.k.SourceDefinition target = (org.apache.camel.k.SourceDefinition) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "compressed":
        case "Compressed": return target.isCompressed();
        case "content":
        case "Content": return target.getContent();
        case "id":
        case "Id": return target.getId();
        case "interceptors":
        case "Interceptors": return target.getInterceptors();
        case "language":
        case "Language": return target.getLanguage();
        case "loader":
        case "Loader": return target.getLoader();
        case "location":
        case "Location": return target.getLocation();
        case "name":
        case "Name": return target.getName();
        case "propertynames":
        case "PropertyNames": return target.getPropertyNames();
        case "type":
        case "Type": return target.getType();
        default: return null;
        }
    }

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

