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

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

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        GraphqlEndpoint target = (GraphqlEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accesstoken":
        case "accessToken": target.setAccessToken(property(camelContext, java.lang.String.class, value)); return true;
        case "jwtauthorizationtype":
        case "jwtAuthorizationType": target.setJwtAuthorizationType(property(camelContext, java.lang.String.class, value)); return true;
        case "lazystartproducer":
        case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true;
        case "operationname":
        case "operationName": target.setOperationName(property(camelContext, java.lang.String.class, value)); return true;
        case "password": target.setPassword(property(camelContext, java.lang.String.class, value)); return true;
        case "proxyhost":
        case "proxyHost": target.setProxyHost(property(camelContext, java.lang.String.class, value)); return true;
        case "query": target.setQuery(property(camelContext, java.lang.String.class, value)); return true;
        case "queryfile":
        case "queryFile": target.setQueryFile(property(camelContext, java.lang.String.class, value)); return true;
        case "queryheader":
        case "queryHeader": target.setQueryHeader(property(camelContext, java.lang.String.class, value)); return true;
        case "username": target.setUsername(property(camelContext, java.lang.String.class, value)); return true;
        case "variables": target.setVariables(property(camelContext, org.apache.camel.util.json.JsonObject.class, value)); return true;
        case "variablesheader":
        case "variablesHeader": target.setVariablesHeader(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 "accesstoken":
        case "accessToken": return java.lang.String.class;
        case "jwtauthorizationtype":
        case "jwtAuthorizationType": return java.lang.String.class;
        case "lazystartproducer":
        case "lazyStartProducer": return boolean.class;
        case "operationname":
        case "operationName": return java.lang.String.class;
        case "password": return java.lang.String.class;
        case "proxyhost":
        case "proxyHost": return java.lang.String.class;
        case "query": return java.lang.String.class;
        case "queryfile":
        case "queryFile": return java.lang.String.class;
        case "queryheader":
        case "queryHeader": return java.lang.String.class;
        case "username": return java.lang.String.class;
        case "variables": return org.apache.camel.util.json.JsonObject.class;
        case "variablesheader":
        case "variablesHeader": return java.lang.String.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        GraphqlEndpoint target = (GraphqlEndpoint) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "accesstoken":
        case "accessToken": return target.getAccessToken();
        case "jwtauthorizationtype":
        case "jwtAuthorizationType": return target.getJwtAuthorizationType();
        case "lazystartproducer":
        case "lazyStartProducer": return target.isLazyStartProducer();
        case "operationname":
        case "operationName": return target.getOperationName();
        case "password": return target.getPassword();
        case "proxyhost":
        case "proxyHost": return target.getProxyHost();
        case "query": return target.getQuery();
        case "queryfile":
        case "queryFile": return target.getQueryFile();
        case "queryheader":
        case "queryHeader": return target.getQueryHeader();
        case "username": return target.getUsername();
        case "variables": return target.getVariables();
        case "variablesheader":
        case "variablesHeader": return target.getVariablesHeader();
        default: return null;
        }
    }
}

