/* 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.Dhis2ResourceTablesEndpointConfiguration;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.GenerateConfigurerMojo")
@SuppressWarnings("unchecked")
public class Dhis2ResourceTablesEndpointConfigurationConfigurer 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("Async", java.lang.Boolean.class);
        map.put("BaseApiUrl", java.lang.String.class);
        map.put("Client", org.hisp.dhis.integration.sdk.api.Dhis2Client.class);
        map.put("Interval", java.lang.Integer.class);
        map.put("LastYears", java.lang.Integer.class);
        map.put("MethodName", java.lang.String.class);
        map.put("Password", java.lang.String.class);
        map.put("PersonalAccessToken", java.lang.String.class);
        map.put("SkipAggregate", java.lang.Boolean.class);
        map.put("SkipEvents", java.lang.Boolean.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.Dhis2ResourceTablesEndpointConfiguration target = (org.apache.camel.component.dhis2.Dhis2ResourceTablesEndpointConfiguration) 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 "async": target.setAsync(property(camelContext, java.lang.Boolean.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 "interval": target.setInterval(property(camelContext, java.lang.Integer.class, value)); return true;
        case "lastyears":
        case "lastYears": target.setLastYears(property(camelContext, java.lang.Integer.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 "personalaccesstoken":
        case "personalAccessToken": target.setPersonalAccessToken(property(camelContext, java.lang.String.class, value)); return true;
        case "skipaggregate":
        case "skipAggregate": target.setSkipAggregate(property(camelContext, java.lang.Boolean.class, value)); return true;
        case "skipevents":
        case "skipEvents": target.setSkipEvents(property(camelContext, java.lang.Boolean.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 "async": return java.lang.Boolean.class;
        case "baseapiurl":
        case "baseApiUrl": return java.lang.String.class;
        case "client": return org.hisp.dhis.integration.sdk.api.Dhis2Client.class;
        case "interval": return java.lang.Integer.class;
        case "lastyears":
        case "lastYears": return java.lang.Integer.class;
        case "methodname":
        case "methodName": return java.lang.String.class;
        case "password": return java.lang.String.class;
        case "personalaccesstoken":
        case "personalAccessToken": return java.lang.String.class;
        case "skipaggregate":
        case "skipAggregate": return java.lang.Boolean.class;
        case "skipevents":
        case "skipEvents": return java.lang.Boolean.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.Dhis2ResourceTablesEndpointConfiguration target = (org.apache.camel.component.dhis2.Dhis2ResourceTablesEndpointConfiguration) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "apiname":
        case "apiName": return target.getApiName();
        case "async": return target.getAsync();
        case "baseapiurl":
        case "baseApiUrl": return target.getBaseApiUrl();
        case "client": return target.getClient();
        case "interval": return target.getInterval();
        case "lastyears":
        case "lastYears": return target.getLastYears();
        case "methodname":
        case "methodName": return target.getMethodName();
        case "password": return target.getPassword();
        case "personalaccesstoken":
        case "personalAccessToken": return target.getPersonalAccessToken();
        case "skipaggregate":
        case "skipAggregate": return target.getSkipAggregate();
        case "skipevents":
        case "skipEvents": return target.getSkipEvents();
        case "username": return target.getUsername();
        default: return null;
        }
    }
}

