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

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.PackageDataFormatMojo")
@SuppressWarnings("unchecked")
public class FhirXmlDataFormatConfigurer 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("ContentTypeHeader", boolean.class);
        map.put("DontEncodeElements", java.util.Set.class);
        map.put("DontStripVersionsFromReferencesAtPaths", java.util.List.class);
        map.put("EncodeElements", java.util.Set.class);
        map.put("EncodeElementsAppliesToChildResourcesOnly", boolean.class);
        map.put("FhirContext", ca.uhn.fhir.context.FhirContext.class);
        map.put("FhirVersion", java.lang.String.class);
        map.put("ForceResourceId", org.hl7.fhir.instance.model.api.IIdType.class);
        map.put("OmitResourceId", boolean.class);
        map.put("OverrideResourceIdWithBundleEntryFullUrl", java.lang.Boolean.class);
        map.put("ParserErrorHandler", ca.uhn.fhir.parser.IParserErrorHandler.class);
        map.put("ParserOptions", ca.uhn.fhir.context.ParserOptions.class);
        map.put("PreferTypes", java.util.List.class);
        map.put("PrettyPrint", boolean.class);
        map.put("ServerBaseUrl", java.lang.String.class);
        map.put("StripVersionsFromReferences", java.lang.Boolean.class);
        map.put("SummaryMode", boolean.class);
        map.put("SuppressNarratives", boolean.class);
        ALL_OPTIONS = map;
    }

    @Override
    public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) {
        FhirXmlDataFormat target = (FhirXmlDataFormat) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "contenttypeheader":
        case "contentTypeHeader": target.setContentTypeHeader(property(camelContext, boolean.class, value)); return true;
        case "dontencodeelements":
        case "dontEncodeElements": target.setDontEncodeElements(property(camelContext, java.util.Set.class, value)); return true;
        case "dontstripversionsfromreferencesatpaths":
        case "dontStripVersionsFromReferencesAtPaths": target.setDontStripVersionsFromReferencesAtPaths(property(camelContext, java.util.List.class, value)); return true;
        case "encodeelements":
        case "encodeElements": target.setEncodeElements(property(camelContext, java.util.Set.class, value)); return true;
        case "encodeelementsappliestochildresourcesonly":
        case "encodeElementsAppliesToChildResourcesOnly": target.setEncodeElementsAppliesToChildResourcesOnly(property(camelContext, boolean.class, value)); return true;
        case "fhircontext":
        case "fhirContext": target.setFhirContext(property(camelContext, ca.uhn.fhir.context.FhirContext.class, value)); return true;
        case "fhirversion":
        case "fhirVersion": target.setFhirVersion(property(camelContext, java.lang.String.class, value)); return true;
        case "forceresourceid":
        case "forceResourceId": target.setForceResourceId(property(camelContext, org.hl7.fhir.instance.model.api.IIdType.class, value)); return true;
        case "omitresourceid":
        case "omitResourceId": target.setOmitResourceId(property(camelContext, boolean.class, value)); return true;
        case "overrideresourceidwithbundleentryfullurl":
        case "overrideResourceIdWithBundleEntryFullUrl": target.setOverrideResourceIdWithBundleEntryFullUrl(property(camelContext, java.lang.Boolean.class, value)); return true;
        case "parsererrorhandler":
        case "parserErrorHandler": target.setParserErrorHandler(property(camelContext, ca.uhn.fhir.parser.IParserErrorHandler.class, value)); return true;
        case "parseroptions":
        case "parserOptions": target.setParserOptions(property(camelContext, ca.uhn.fhir.context.ParserOptions.class, value)); return true;
        case "prefertypes":
        case "preferTypes": target.setPreferTypes(property(camelContext, java.util.List.class, value)); return true;
        case "prettyprint":
        case "prettyPrint": target.setPrettyPrint(property(camelContext, boolean.class, value)); return true;
        case "serverbaseurl":
        case "serverBaseUrl": target.setServerBaseUrl(property(camelContext, java.lang.String.class, value)); return true;
        case "stripversionsfromreferences":
        case "stripVersionsFromReferences": target.setStripVersionsFromReferences(property(camelContext, java.lang.Boolean.class, value)); return true;
        case "summarymode":
        case "summaryMode": target.setSummaryMode(property(camelContext, boolean.class, value)); return true;
        case "suppressnarratives":
        case "suppressNarratives": target.setSuppressNarratives(property(camelContext, boolean.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 "contenttypeheader":
        case "contentTypeHeader": return boolean.class;
        case "dontencodeelements":
        case "dontEncodeElements": return java.util.Set.class;
        case "dontstripversionsfromreferencesatpaths":
        case "dontStripVersionsFromReferencesAtPaths": return java.util.List.class;
        case "encodeelements":
        case "encodeElements": return java.util.Set.class;
        case "encodeelementsappliestochildresourcesonly":
        case "encodeElementsAppliesToChildResourcesOnly": return boolean.class;
        case "fhircontext":
        case "fhirContext": return ca.uhn.fhir.context.FhirContext.class;
        case "fhirversion":
        case "fhirVersion": return java.lang.String.class;
        case "forceresourceid":
        case "forceResourceId": return org.hl7.fhir.instance.model.api.IIdType.class;
        case "omitresourceid":
        case "omitResourceId": return boolean.class;
        case "overrideresourceidwithbundleentryfullurl":
        case "overrideResourceIdWithBundleEntryFullUrl": return java.lang.Boolean.class;
        case "parsererrorhandler":
        case "parserErrorHandler": return ca.uhn.fhir.parser.IParserErrorHandler.class;
        case "parseroptions":
        case "parserOptions": return ca.uhn.fhir.context.ParserOptions.class;
        case "prefertypes":
        case "preferTypes": return java.util.List.class;
        case "prettyprint":
        case "prettyPrint": return boolean.class;
        case "serverbaseurl":
        case "serverBaseUrl": return java.lang.String.class;
        case "stripversionsfromreferences":
        case "stripVersionsFromReferences": return java.lang.Boolean.class;
        case "summarymode":
        case "summaryMode": return boolean.class;
        case "suppressnarratives":
        case "suppressNarratives": return boolean.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        FhirXmlDataFormat target = (FhirXmlDataFormat) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "contenttypeheader":
        case "contentTypeHeader": return target.isContentTypeHeader();
        case "dontencodeelements":
        case "dontEncodeElements": return target.getDontEncodeElements();
        case "dontstripversionsfromreferencesatpaths":
        case "dontStripVersionsFromReferencesAtPaths": return target.getDontStripVersionsFromReferencesAtPaths();
        case "encodeelements":
        case "encodeElements": return target.getEncodeElements();
        case "encodeelementsappliestochildresourcesonly":
        case "encodeElementsAppliesToChildResourcesOnly": return target.isEncodeElementsAppliesToChildResourcesOnly();
        case "fhircontext":
        case "fhirContext": return target.getFhirContext();
        case "fhirversion":
        case "fhirVersion": return target.getFhirVersion();
        case "forceresourceid":
        case "forceResourceId": return target.getForceResourceId();
        case "omitresourceid":
        case "omitResourceId": return target.isOmitResourceId();
        case "overrideresourceidwithbundleentryfullurl":
        case "overrideResourceIdWithBundleEntryFullUrl": return target.getOverrideResourceIdWithBundleEntryFullUrl();
        case "parsererrorhandler":
        case "parserErrorHandler": return target.getParserErrorHandler();
        case "parseroptions":
        case "parserOptions": return target.getParserOptions();
        case "prefertypes":
        case "preferTypes": return target.getPreferTypes();
        case "prettyprint":
        case "prettyPrint": return target.isPrettyPrint();
        case "serverbaseurl":
        case "serverBaseUrl": return target.getServerBaseUrl();
        case "stripversionsfromreferences":
        case "stripVersionsFromReferences": return target.getStripVersionsFromReferences();
        case "summarymode":
        case "summaryMode": return target.isSummaryMode();
        case "suppressnarratives":
        case "suppressNarratives": return target.isSuppressNarratives();
        default: return null;
        }
    }
}

