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

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!
 */
public class AMQPEndpointUriFactory extends org.apache.camel.support.component.EndpointUriFactorySupport implements EndpointUriFactory {

    private static final String BASE = ":destinationType:destinationName";

    private static final Set<String> PROPERTY_NAMES;
    private static final Set<String> SECRET_PROPERTY_NAMES;
    static {
        Set<String> props = new HashSet<>(96);
        props.add("includeSentJMSMessageID");
        props.add("asyncConsumer");
        props.add("mapJmsMessage");
        props.add("messageListenerContainerFactory");
        props.add("requestTimeoutCheckerInterval");
        props.add("synchronous");
        props.add("includeAllJMSXProperties");
        props.add("cacheLevel");
        props.add("errorHandlerLogStackTrace");
        props.add("transactedInOut");
        props.add("eagerLoadingOfProperties");
        props.add("timeToLive");
        props.add("password");
        props.add("replyToMaxConcurrentConsumers");
        props.add("deliveryMode");
        props.add("transferException");
        props.add("exceptionListener");
        props.add("destinationType");
        props.add("asyncStartListener");
        props.add("waitForProvisionCorrelationToBeUpdatedThreadSleepingTime");
        props.add("transactionManager");
        props.add("eagerPoisonBody");
        props.add("alwaysCopyMessage");
        props.add("replyToConcurrentConsumers");
        props.add("artemisStreamingEnabled");
        props.add("replyToDestinationSelectorName");
        props.add("maxConcurrentConsumers");
        props.add("taskExecutor");
        props.add("disableTimeToLive");
        props.add("deliveryPersistent");
        props.add("priority");
        props.add("concurrentConsumers");
        props.add("acceptMessagesWhileStopping");
        props.add("consumerType");
        props.add("acknowledgementModeName");
        props.add("lazyStartProducer");
        props.add("exposeListenerSession");
        props.add("receiveTimeout");
        props.add("subscriptionDurable");
        props.add("destinationResolver");
        props.add("replyTo");
        props.add("replyToOverride");
        props.add("errorHandlerLoggingLevel");
        props.add("errorHandler");
        props.add("exceptionHandler");
        props.add("allowReplyManagerQuickStop");
        props.add("idleConsumerLimit");
        props.add("replyToOnTimeoutMaxConcurrentConsumers");
        props.add("explicitQosEnabled");
        props.add("messageConverter");
        props.add("maxMessagesPerTask");
        props.add("transacted");
        props.add("transactionName");
        props.add("correlationProperty");
        props.add("autoStartup");
        props.add("messageTimestampEnabled");
        props.add("jmsKeyFormatStrategy");
        props.add("streamMessageTypeEnabled");
        props.add("headerFilterStrategy");
        props.add("waitForProvisionCorrelationToBeUpdatedCounter");
        props.add("lazyCreateTransactionManager");
        props.add("destinationName");
        props.add("messageCreatedStrategy");
        props.add("asyncStopListener");
        props.add("transferExchange");
        props.add("selector");
        props.add("requestTimeout");
        props.add("allowNullBody");
        props.add("replyToDeliveryPersistent");
        props.add("deliveryDelay");
        props.add("disableReplyTo");
        props.add("formatDateHeadersToIso8601");
        props.add("allowAdditionalHeaders");
        props.add("clientId");
        props.add("recoveryInterval");
        props.add("replyToCacheLevelName");
        props.add("messageIdEnabled");
        props.add("exchangePattern");
        props.add("allowSerializedHeaders");
        props.add("pubSubNoLocal");
        props.add("preserveMessageQos");
        props.add("forceSendOriginalMessage");
        props.add("subscriptionShared");
        props.add("replyToType");
        props.add("connectionFactory");
        props.add("testConnectionOnStartup");
        props.add("subscriptionName");
        props.add("useMessageIDAsCorrelationID");
        props.add("transactionTimeout");
        props.add("durableSubscriptionName");
        props.add("replyToSameDestinationAllowed");
        props.add("jmsMessageType");
        props.add("defaultTaskExecutorType");
        props.add("cacheLevelName");
        props.add("idleTaskExecutionLimit");
        props.add("username");
        PROPERTY_NAMES = Collections.unmodifiableSet(props);
        Set<String> secretProps = new HashSet<>(2);
        secretProps.add("password");
        secretProps.add("username");
        SECRET_PROPERTY_NAMES = Collections.unmodifiableSet(secretProps);
    }

    @Override
    public boolean isEnabled(String scheme) {
        return "amqp".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, "destinationType", "queue", false, copy);
        uri = buildPathParameter(syntax, uri, "destinationName", 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 boolean isLenientProperties() {
        return false;
    }
}

