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

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.tensorflow.serving.TensorFlowServingConfiguration;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.GenerateConfigurerMojo")
@SuppressWarnings("unchecked")
public class TensorFlowServingConfigurationConfigurer 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.tensorflow.serving.TensorFlowServingConfiguration target = (org.apache.camel.component.tensorflow.serving.TensorFlowServingConfiguration) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "credentials": target.setCredentials(property(camelContext, io.grpc.ChannelCredentials.class, value)); return true;
        case "modelname":
        case "modelName": target.setModelName(property(camelContext, java.lang.String.class, value)); return true;
        case "modelversion":
        case "modelVersion": target.setModelVersion(property(camelContext, java.lang.Long.class, value)); return true;
        case "modelversionlabel":
        case "modelVersionLabel": target.setModelVersionLabel(property(camelContext, java.lang.String.class, value)); return true;
        case "signaturename":
        case "signatureName": target.setSignatureName(property(camelContext, java.lang.String.class, value)); return true;
        case "target": target.setTarget(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 "credentials": return io.grpc.ChannelCredentials.class;
        case "modelname":
        case "modelName": return java.lang.String.class;
        case "modelversion":
        case "modelVersion": return java.lang.Long.class;
        case "modelversionlabel":
        case "modelVersionLabel": return java.lang.String.class;
        case "signaturename":
        case "signatureName": return java.lang.String.class;
        case "target": return java.lang.String.class;
        default: return null;
        }
    }

    @Override
    public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
        org.apache.camel.component.tensorflow.serving.TensorFlowServingConfiguration target = (org.apache.camel.component.tensorflow.serving.TensorFlowServingConfiguration) obj;
        switch (ignoreCase ? name.toLowerCase() : name) {
        case "credentials": return target.getCredentials();
        case "modelname":
        case "modelName": return target.getModelName();
        case "modelversion":
        case "modelVersion": return target.getModelVersion();
        case "modelversionlabel":
        case "modelVersionLabel": return target.getModelVersionLabel();
        case "signaturename":
        case "signatureName": return target.getSignatureName();
        case "target": return target.getTarget();
        default: return null;
        }
    }
}

