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

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.dhis2.Dhis2PostEndpointConfiguration;

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

    private static final Map<String, Object> ALL_OPTIONS;
    static {
        Map<String, Object> map = new CaseInsensitiveMap();
        map.put("ApiName", org.apache.camel.component.dhis2.internal.Dhis2ApiName.class);
        map.put("BaseApiUrl", java.lang.String.class);
        map.put("Client", org.hisp.dhis.integration.sdk.api.Dhis2Client.class);
        map.put("MethodName", java.lang.String.class);
        map.put("Password", java.lang.String.class);
        map.put("Path", java.lang.String.class);
        map.put("PersonalAccessToken", java.lang.String.class);
        map.put("QueryParams", java.util.Map.class);
        map.put("Resource", java.lang.Object.class);
        map.put("Username", java.lang.String.class);
        ALL_OPTIONS = map;
    }

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        org.apache.camel.component.dhis2.Dhis2PostEndpointConfiguration target = (org.apache.camel.component.dhis2.Dhis2PostEndpointConfiguration) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "apiname":
        case "apiName": target.setApiName(property(camelContext, org.apache.camel.component.dhis2.internal.Dhis2ApiName.class, value)); return true;
        case "baseapiurl":
        case "baseApiUrl": target.setBaseApiUrl(property(camelContext, java.lang.String.class, value)); return true;
        case "client": target.setClient(property(camelContext, org.hisp.dhis.integration.sdk.api.Dhis2Client.class, value)); return true;
        case "methodname":
        case "methodName": target.setMethodName(property(camelContext, java.lang.String.class, value)); return true;
        case "password": target.setPassword(property(camelContext, java.lang.String.class, value)); return true;
        case "path": target.setPath(property(camelContext, java.lang.String.class, value)); return true;
        case "personalaccesstoken":
        case "personalAccessToken": target.setPersonalAccessToken(property(camelContext, java.lang.String.class, value)); return true;
        case "queryparams":
        case "queryParams": target.setQueryParams(property(camelContext, java.util.Map.class, value)); return true;
        case "resource": target.setResource(property(camelContext, java.lang.Object.class, value)); return true;
        case "username": target.setUsername(property(camelContext, java.lang.String.class, value)); return true;
        default: return false;
        }
    }

    @Override
    public Map<String, Object> getAllOptions(Object target) {
        return ALL_OPTIONS;
    }

    @Override
    public Class<?> getOptionType(String name, boolean ignoreCase) {
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "apiname":
        case "apiName": return org.apache.camel.component.dhis2.internal.Dhis2ApiName.class;
        case "baseapiurl":
        case "baseApiUrl": return java.lang.String.class;
        case "client": return org.hisp.dhis.integration.sdk.api.Dhis2Client.class;
        case "methodname":
        case "methodName": return java.lang.String.class;
        case "password": return java.lang.String.class;
        case "path": return java.lang.String.class;
        case "personalaccesstoken":
        case "personalAccessToken": return java.lang.String.class;
        case "queryparams":
        case "queryParams": return java.util.Map.class;
        case "resource": return java.lang.Object.class;
        case "username": return java.lang.String.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        org.apache.camel.component.dhis2.Dhis2PostEndpointConfiguration target = (org.apache.camel.component.dhis2.Dhis2PostEndpointConfiguration) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "apiname":
        case "apiName": return target.getApiName();
        case "baseapiurl":
        case "baseApiUrl": return target.getBaseApiUrl();
        case "client": return target.getClient();
        case "methodname":
        case "methodName": return target.getMethodName();
        case "password": return target.getPassword();
        case "path": return target.getPath();
        case "personalaccesstoken":
        case "personalAccessToken": return target.getPersonalAccessToken();
        case "queryparams":
        case "queryParams": return target.getQueryParams();
        case "resource": return target.getResource();
        case "username": return target.getUsername();
        default: return null;
        }
    }

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

