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

import javax.annotation.processing.Generated;
import java.net.URISyntaxException;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;

import org.apache.camel.spi.EndpointUriFactory;

/**
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.GenerateEndpointUriFactoryMojo")
public class BraintreeEndpointUriFactory extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory {

    private static final String BASE = ":apiName/methodName";

    private static final Set<String> PROPERTY_NAMES;
    private static final Set<String> SECRET_PROPERTY_NAMES;
    private static final Set<String> ENDPOINT_IDENTITY_PROPERTY_NAMES;
    private static final Map<String, String> MULTI_VALUE_PREFIXES;
    static {
        Set<String> props = new HashSet<>(48);
        props.add("accessToken");
        props.add("amount");
        props.add("apiName");
        props.add("associationFilterId");
        props.add("challenge");
        props.add("cloneRequest");
        props.add("connectRequest");
        props.add("content");
        props.add("currencyRequest");
        props.add("customerId");
        props.add("deleteRequest");
        props.add("disputeId");
        props.add("documentId");
        props.add("environment");
        props.add("evidenceId");
        props.add("fileEvidenceRequest");
        props.add("grantRequest");
        props.add("groupByCustomField");
        props.add("httpLogLevel");
        props.add("httpLogName");
        props.add("httpReadTimeout");
        props.add("id");
        props.add("inBody");
        props.add("lazyStartProducer");
        props.add("logHandlerEnabled");
        props.add("merchantId");
        props.add("methodName");
        props.add("packageTrackingRequest");
        props.add("page");
        props.add("payload");
        props.add("paymentMethodNonce");
        props.add("paymentMethodToken");
        props.add("privateKey");
        props.add("proxyHost");
        props.add("proxyPort");
        props.add("publicKey");
        props.add("query");
        props.add("refundRequest");
        props.add("request");
        props.add("searchRequest");
        props.add("settlementDate");
        props.add("signature");
        props.add("submitForSettlement");
        props.add("subscriptionId");
        props.add("textEvidenceRequest");
        props.add("token");
        props.add("transactionRequest");
        props.add("voidRequest");
        PROPERTY_NAMES = Collections.unmodifiableSet(props);
        Set<String> secretProps = new HashSet<>(3);
        secretProps.add("accessToken");
        secretProps.add("privateKey");
        secretProps.add("publicKey");
        SECRET_PROPERTY_NAMES = Collections.unmodifiableSet(secretProps);
        ENDPOINT_IDENTITY_PROPERTY_NAMES = Collections.emptySet();
        MULTI_VALUE_PREFIXES = Collections.emptyMap();
    }

    @Override
    public boolean isEnabled(String scheme) {
        return "braintree".equals(scheme);
    }

    @Override
    public String buildUri(String scheme, Map<String, Object> properties, boolean encode) throws URISyntaxException {
        String syntax = scheme + BASE;
        String uri = syntax;

        Map<String, Object> copy = new HashMap<>(properties);

        uri = buildPathParameter(syntax, uri, "apiName", null, true, copy);
        uri = buildPathParameter(syntax, uri, "methodName", null, true, copy);
        uri = buildQueryParameters(uri, copy, encode);
        return uri;
    }

    @Override
    public Set<String> propertyNames() {
        return PROPERTY_NAMES;
    }

    @Override
    public Set<String> secretPropertyNames() {
        return SECRET_PROPERTY_NAMES;
    }

    @Override
    public Set<String> endpointIdentityPropertyNames() {
        return ENDPOINT_IDENTITY_PROPERTY_NAMES;
    }

    @Override
    public Map<String, String> multiValuePrefixes() {
        return MULTI_VALUE_PREFIXES;
    }

    @Override
    public boolean isLenientProperties() {
        return false;
    }
}

