/* 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.component.langchain4j.agent.LangChain4jAgentConfiguration;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.GenerateConfigurerMojo")
@SuppressWarnings("unchecked")
public class LangChain4jAgentConfigurationConfigurer 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.agent.LangChain4jAgentConfiguration target = (org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "agent": target.setAgent(property(camelContext, org.apache.camel.component.langchain4j.agent.api.Agent.class, value)); return true;
        case "agentfactory":
        case "agentFactory": target.setAgentFactory(property(camelContext, org.apache.camel.component.langchain4j.agent.api.AgentFactory.class, value)); return true;
        case "mcpclients":
        case "mcpClients": target.setMcpClients(property(camelContext, java.util.List.class, value)); return true;
        case "mcpserver":
        case "mcpServer": target.setMcpServer(property(camelContext, java.util.Map.class, value)); return true;
        case "tags": target.setTags(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 "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 "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) {
        org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration target = (org.apache.camel.component.langchain4j.agent.LangChain4jAgentConfiguration) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "agent": return target.getAgent();
        case "agentfactory":
        case "agentFactory": return target.getAgentFactory();
        case "mcpclients":
        case "mcpClients": return target.getMcpClients();
        case "mcpserver":
        case "mcpServer": return target.getMcpServer();
        case "tags": return target.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;
        }
    }
}

