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

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.support.component.PropertyConfigurerSupport;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
@SuppressWarnings("unchecked")
public class HuggingFaceEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        HuggingFaceEndpoint target = (HuggingFaceEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "authtoken":
        case "authToken": target.getConfiguration().setAuthToken(property(camelContext, java.lang.String.class, value)); return true;
        case "autoselect":
        case "autoSelect": target.getConfiguration().setAutoSelect(property(camelContext, boolean.class, value)); return true;
        case "device": target.getConfiguration().setDevice(property(camelContext, java.lang.String.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "maxtokens":
        case "maxTokens": target.getConfiguration().setMaxTokens(property(camelContext, int.class, value)); return true;
        case "memoryidheader":
        case "memoryIdHeader": target.getConfiguration().setMemoryIdHeader(property(camelContext, java.lang.String.class, value)); return true;
        case "minlength":
        case "minLength": target.getConfiguration().setMinLength(property(camelContext, int.class, value)); return true;
        case "modelid":
        case "modelId": target.getConfiguration().setModelId(property(camelContext, java.lang.String.class, value)); return true;
        case "modelloadingtimeout":
        case "modelLoadingTimeout": target.getConfiguration().setModelLoadingTimeout(property(camelContext, int.class, value)); return true;
        case "multilabel":
        case "multiLabel": target.getConfiguration().setMultiLabel(property(camelContext, boolean.class, value)); return true;
        case "oauthprofile":
        case "oauthProfile": target.getConfiguration().setOauthProfile(property(camelContext, java.lang.String.class, value)); return true;
        case "pooling": target.getConfiguration().setPooling(property(camelContext, boolean.class, value)); return true;
        case "predicttimeout":
        case "predictTimeout": target.getConfiguration().setPredictTimeout(property(camelContext, int.class, value)); return true;
        case "predictorbean":
        case "predictorBean": target.getConfiguration().setPredictorBean(property(camelContext, java.lang.String.class, value)); return true;
        case "revision": target.getConfiguration().setRevision(property(camelContext, java.lang.String.class, value)); return true;
        case "systemprompt":
        case "systemPrompt": target.getConfiguration().setSystemPrompt(property(camelContext, java.lang.String.class, value)); return true;
        case "temperature": target.getConfiguration().setTemperature(property(camelContext, float.class, value)); return true;
        case "topk":
        case "topK": target.getConfiguration().setTopK(property(camelContext, int.class, value)); return true;
        case "userrole":
        case "userRole": target.getConfiguration().setUserRole(property(camelContext, java.lang.String.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "authtoken":
        case "authToken": return java.lang.String.class;
        case "autoselect":
        case "autoSelect": return boolean.class;
        case "device": return java.lang.String.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "maxtokens":
        case "maxTokens": return int.class;
        case "memoryidheader":
        case "memoryIdHeader": return java.lang.String.class;
        case "minlength":
        case "minLength": return int.class;
        case "modelid":
        case "modelId": return java.lang.String.class;
        case "modelloadingtimeout":
        case "modelLoadingTimeout": return int.class;
        case "multilabel":
        case "multiLabel": return boolean.class;
        case "oauthprofile":
        case "oauthProfile": return java.lang.String.class;
        case "pooling": return boolean.class;
        case "predicttimeout":
        case "predictTimeout": return int.class;
        case "predictorbean":
        case "predictorBean": return java.lang.String.class;
        case "revision": return java.lang.String.class;
        case "systemprompt":
        case "systemPrompt": return java.lang.String.class;
        case "temperature": return float.class;
        case "topk":
        case "topK": return int.class;
        case "userrole":
        case "userRole": return java.lang.String.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        HuggingFaceEndpoint target = (HuggingFaceEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "authtoken":
        case "authToken": return target.getConfiguration().getAuthToken();
        case "autoselect":
        case "autoSelect": return target.getConfiguration().isAutoSelect();
        case "device": return target.getConfiguration().getDevice();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "maxtokens":
        case "maxTokens": return target.getConfiguration().getMaxTokens();
        case "memoryidheader":
        case "memoryIdHeader": return target.getConfiguration().getMemoryIdHeader();
        case "minlength":
        case "minLength": return target.getConfiguration().getMinLength();
        case "modelid":
        case "modelId": return target.getConfiguration().getModelId();
        case "modelloadingtimeout":
        case "modelLoadingTimeout": return target.getConfiguration().getModelLoadingTimeout();
        case "multilabel":
        case "multiLabel": return target.getConfiguration().isMultiLabel();
        case "oauthprofile":
        case "oauthProfile": return target.getConfiguration().getOauthProfile();
        case "pooling": return target.getConfiguration().isPooling();
        case "predicttimeout":
        case "predictTimeout": return target.getConfiguration().getPredictTimeout();
        case "predictorbean":
        case "predictorBean": return target.getConfiguration().getPredictorBean();
        case "revision": return target.getConfiguration().getRevision();
        case "systemprompt":
        case "systemPrompt": return target.getConfiguration().getSystemPrompt();
        case "temperature": return target.getConfiguration().getTemperature();
        case "topk":
        case "topK": return target.getConfiguration().getTopK();
        case "userrole":
        case "userRole": return target.getConfiguration().getUserRole();
        default: return null;
        }
    }
}

