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

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.quarkus.k.core.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.quarkus.k.core.SourceDefinition target = (org.apache.camel.quarkus.k.core.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.quarkus.k.core.SourceType.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "compressed":
        case "Compressed": return boolean.class;
        case "content":
        case "Content": return byte[].class;
        case "id":
        case "Id": return java.lang.String.class;
        case "interceptors":
        case "Interceptors": return java.util.List.class;
        case "language":
        case "Language": return java.lang.String.class;
        case "loader":
        case "Loader": return java.lang.String.class;
        case "location":
        case "Location": return java.lang.String.class;
        case "name":
        case "Name": return java.lang.String.class;
        case "propertynames":
        case "PropertyNames": return java.util.List.class;
        case "type":
        case "Type": return org.apache.camel.quarkus.k.core.SourceType.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        org.apache.camel.quarkus.k.core.SourceDefinition target = (org.apache.camel.quarkus.k.core.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;
        }
    }
}

