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

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 LangChain4jAgentEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter {

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        LangChain4jAgentEndpoint target = (LangChain4jAgentEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "agent": target.getConfiguration().setAgent(property(camelContext, org.apache.camel.component.langchain4j.agent.api.Agent.class, value)); return true;
        case "agentfactory":
        case "agentFactory": target.getConfiguration().setAgentFactory(property(camelContext, org.apache.camel.component.langchain4j.agent.api.AgentFactory.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "mcpclients":
        case "mcpClients": target.getConfiguration().setMcpClients(property(camelContext, java.util.List.class, value)); return true;
        case "mcpserver":
        case "mcpServer": target.getConfiguration().setMcpServer(property(camelContext, java.util.Map.class, value)); return true;
        case "tags": target.getConfiguration().setTags(property(camelContext, java.lang.String.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public String[] getAutowiredNames() {
        return new String[]{"agent", "agentFactory"};
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "agent": return org.apache.camel.component.langchain4j.agent.api.Agent.class;
        case "agentfactory":
        case "agentFactory": return org.apache.camel.component.langchain4j.agent.api.AgentFactory.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "mcpclients":
        case "mcpClients": return java.util.List.class;
        case "mcpserver":
        case "mcpServer": return java.util.Map.class;
        case "tags": return java.lang.String.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        LangChain4jAgentEndpoint target = (LangChain4jAgentEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "agent": return target.getConfiguration().getAgent();
        case "agentfactory":
        case "agentFactory": return target.getConfiguration().getAgentFactory();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "mcpclients":
        case "mcpClients": return target.getConfiguration().getMcpClients();
        case "mcpserver":
        case "mcpServer": return target.getConfiguration().getMcpServer();
        case "tags": return target.getConfiguration().getTags();
        default: return null;
        }
    }

    @Override
    public Object getCollectionValueType(Object target, String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "mcpclients":
        case "mcpClients": return dev.langchain4j.mcp.client.McpClient.class;
        case "mcpserver":
        case "mcpServer": return java.lang.Object.class;
        default: return null;
        }
    }
}

