/* Generated by camel build tools - do NOT edit this file! */
package org.apache.camel.component.langchain4j.web.search;

import javax.annotation.processing.Generated;
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.component.langchain4j.web.search.LangChain4jWebSearchConfiguration;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.GenerateConfigurerMojo")
@SuppressWarnings("unchecked")
public class LangChain4jWebSearchConfigurationConfigurer 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.component.langchain4j.web.search.LangChain4jWebSearchConfiguration target = (org.apache.camel.component.langchain4j.web.search.LangChain4jWebSearchConfiguration) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "additionalparams":
        case "additionalParams": target.setAdditionalParams(property(camelContext, java.util.Map.class, value)); return true;
        case "geolocation":
        case "geoLocation": target.setGeoLocation(property(camelContext, java.lang.String.class, value)); return true;
        case "language": target.setLanguage(property(camelContext, java.lang.String.class, value)); return true;
        case "maxresults":
        case "maxResults": target.setMaxResults(property(camelContext, java.lang.Integer.class, value)); return true;
        case "resulttype":
        case "resultType": target.setResultType(property(camelContext, org.apache.camel.component.langchain4j.web.search.LangChain4jWebSearchResultType.class, value)); return true;
        case "safesearch":
        case "safeSearch": target.setSafeSearch(property(camelContext, java.lang.Boolean.class, value)); return true;
        case "startindex":
        case "startIndex": target.setStartIndex(property(camelContext, java.lang.Integer.class, value)); return true;
        case "startpage":
        case "startPage": target.setStartPage(property(camelContext, java.lang.Integer.class, value)); return true;
        case "websearchengine":
        case "webSearchEngine": target.setWebSearchEngine(property(camelContext, dev.langchain4j.web.search.WebSearchEngine.class, value)); return true;
        case "websearchrequest":
        case "webSearchRequest": target.setWebSearchRequest(property(camelContext, dev.langchain4j.web.search.WebSearchRequest.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "additionalparams":
        case "additionalParams": return java.util.Map.class;
        case "geolocation":
        case "geoLocation": return java.lang.String.class;
        case "language": return java.lang.String.class;
        case "maxresults":
        case "maxResults": return java.lang.Integer.class;
        case "resulttype":
        case "resultType": return org.apache.camel.component.langchain4j.web.search.LangChain4jWebSearchResultType.class;
        case "safesearch":
        case "safeSearch": return java.lang.Boolean.class;
        case "startindex":
        case "startIndex": return java.lang.Integer.class;
        case "startpage":
        case "startPage": return java.lang.Integer.class;
        case "websearchengine":
        case "webSearchEngine": return dev.langchain4j.web.search.WebSearchEngine.class;
        case "websearchrequest":
        case "webSearchRequest": return dev.langchain4j.web.search.WebSearchRequest.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        org.apache.camel.component.langchain4j.web.search.LangChain4jWebSearchConfiguration target = (org.apache.camel.component.langchain4j.web.search.LangChain4jWebSearchConfiguration) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "additionalparams":
        case "additionalParams": return target.getAdditionalParams();
        case "geolocation":
        case "geoLocation": return target.getGeoLocation();
        case "language": return target.getLanguage();
        case "maxresults":
        case "maxResults": return target.getMaxResults();
        case "resulttype":
        case "resultType": return target.getResultType();
        case "safesearch":
        case "safeSearch": return target.getSafeSearch();
        case "startindex":
        case "startIndex": return target.getStartIndex();
        case "startpage":
        case "startPage": return target.getStartPage();
        case "websearchengine":
        case "webSearchEngine": return target.getWebSearchEngine();
        case "websearchrequest":
        case "webSearchRequest": return target.getWebSearchRequest();
        default: return null;
        }
    }

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

