/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.apache.camel.builder.endpoint.dsl;

import java.util.*;
import java.util.Map;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.stream.*;
import javax.annotation.Generated;
import org.apache.camel.builder.EndpointConsumerBuilder;
import org.apache.camel.builder.EndpointProducerBuilder;
import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;

/**
 * Invoke methods of Java beans specified by class name.
 * 
 * Generated by camel build tools - do NOT edit this file!
 */
@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
public interface ClassEndpointBuilderFactory {


    /**
     * Builder for endpoint for the Class component.
     */
    public interface ClassEndpointBuilder extends EndpointProducerBuilder {
        default AdvancedClassEndpointBuilder advanced() {
            return (AdvancedClassEndpointBuilder) this;
        }
        /**
         * Use scope option instead.
         * 
         * The option is a: &lt;code&gt;java.lang.Boolean&lt;/code&gt; type.
         * 
         * Group: common
         * 
         * @param cache the value to set
         * @return the dsl builder
         */
        @Deprecated
        default ClassEndpointBuilder cache(Boolean cache) {
            doSetProperty("cache", cache);
            return this;
        }
        /**
         * Use scope option instead.
         * 
         * The option will be converted to a
         * &lt;code&gt;java.lang.Boolean&lt;/code&gt; type.
         * 
         * Group: common
         * 
         * @param cache the value to set
         * @return the dsl builder
         */
        @Deprecated
        default ClassEndpointBuilder cache(String cache) {
            doSetProperty("cache", cache);
            return this;
        }
        /**
         * Sets the name of the method to invoke on the bean.
         * 
         * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
         * 
         * Group: common
         * 
         * @param method the value to set
         * @return the dsl builder
         */
        default ClassEndpointBuilder method(String method) {
            doSetProperty("method", method);
            return this;
        }
        /**
         * Scope of bean. When using singleton scope (default) the bean is
         * created or looked up only once and reused for the lifetime of the
         * endpoint. The bean should be thread-safe in case concurrent threads
         * is calling the bean at the same time. When using request scope the
         * bean is created or looked up once per request (exchange). This can be
         * used if you want to store state on a bean while processing a request
         * and you want to call the same bean instance multiple times while
         * processing the request. The bean does not have to be thread-safe as
         * the instance is only called from the same request. When using
         * prototype scope, then the bean will be looked up or created per call.
         * However in case of lookup then this is delegated to the bean registry
         * such as Spring or CDI (if in use), which depends on their
         * configuration can act as either singleton or prototype scope. so when
         * using prototype then this depends on the delegated registry.
         * 
         * The option is a: &lt;code&gt;org.apache.camel.BeanScope&lt;/code&gt;
         * type.
         * 
         * Default: Singleton
         * Group: common
         * 
         * @param scope the value to set
         * @return the dsl builder
         */
        default ClassEndpointBuilder scope(org.apache.camel.BeanScope scope) {
            doSetProperty("scope", scope);
            return this;
        }
        /**
         * Scope of bean. When using singleton scope (default) the bean is
         * created or looked up only once and reused for the lifetime of the
         * endpoint. The bean should be thread-safe in case concurrent threads
         * is calling the bean at the same time. When using request scope the
         * bean is created or looked up once per request (exchange). This can be
         * used if you want to store state on a bean while processing a request
         * and you want to call the same bean instance multiple times while
         * processing the request. The bean does not have to be thread-safe as
         * the instance is only called from the same request. When using
         * prototype scope, then the bean will be looked up or created per call.
         * However in case of lookup then this is delegated to the bean registry
         * such as Spring or CDI (if in use), which depends on their
         * configuration can act as either singleton or prototype scope. so when
         * using prototype then this depends on the delegated registry.
         * 
         * The option will be converted to a
         * &lt;code&gt;org.apache.camel.BeanScope&lt;/code&gt; type.
         * 
         * Default: Singleton
         * Group: common
         * 
         * @param scope the value to set
         * @return the dsl builder
         */
        default ClassEndpointBuilder scope(String scope) {
            doSetProperty("scope", scope);
            return this;
        }
        /**
         * Whether the producer should be started lazy (on the first message).
         * By starting lazy you can use this to allow CamelContext and routes to
         * startup in situations where a producer may otherwise fail during
         * starting and cause the route to fail being started. By deferring this
         * startup to be lazy then the startup failure can be handled during
         * routing messages via Camel's routing error handlers. Beware that when
         * the first message is processed then creating and starting the
         * producer may take a little time and prolong the total processing time
         * of the processing.
         * 
         * The option is a: &lt;code&gt;boolean&lt;/code&gt; type.
         * 
         * Default: false
         * Group: producer
         * 
         * @param lazyStartProducer the value to set
         * @return the dsl builder
         */
        default ClassEndpointBuilder lazyStartProducer(boolean lazyStartProducer) {
            doSetProperty("lazyStartProducer", lazyStartProducer);
            return this;
        }
        /**
         * Whether the producer should be started lazy (on the first message).
         * By starting lazy you can use this to allow CamelContext and routes to
         * startup in situations where a producer may otherwise fail during
         * starting and cause the route to fail being started. By deferring this
         * startup to be lazy then the startup failure can be handled during
         * routing messages via Camel's routing error handlers. Beware that when
         * the first message is processed then creating and starting the
         * producer may take a little time and prolong the total processing time
         * of the processing.
         * 
         * The option will be converted to a &lt;code&gt;boolean&lt;/code&gt;
         * type.
         * 
         * Default: false
         * Group: producer
         * 
         * @param lazyStartProducer the value to set
         * @return the dsl builder
         */
        default ClassEndpointBuilder lazyStartProducer(String lazyStartProducer) {
            doSetProperty("lazyStartProducer", lazyStartProducer);
            return this;
        }
    }

    /**
     * Advanced builder for endpoint for the Class component.
     */
    public interface AdvancedClassEndpointBuilder
            extends
                EndpointProducerBuilder {
        default ClassEndpointBuilder basic() {
            return (ClassEndpointBuilder) this;
        }
        /**
         * Used for configuring additional properties on the bean.
         * 
         * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String,
         * java.lang.Object&amp;gt;&lt;/code&gt; type.
         * The option is multivalued, and you can use the parameters(String,
         * Object) method to add a value (call the method multiple times to set
         * more values).
         * 
         * Group: advanced
         * 
         * @param key the option key
         * @param value the option value
         * @return the dsl builder
         */
        default AdvancedClassEndpointBuilder parameters(String key, Object value) {
            doSetMultiValueProperty("parameters", "bean." + key, value);
            return this;
        }
        /**
         * Used for configuring additional properties on the bean.
         * 
         * The option is a: &lt;code&gt;java.util.Map&amp;lt;java.lang.String,
         * java.lang.Object&amp;gt;&lt;/code&gt; type.
         * The option is multivalued, and you can use the parameters(String,
         * Object) method to add a value (call the method multiple times to set
         * more values).
         * 
         * Group: advanced
         * 
         * @param values the values
         * @return the dsl builder
         */
        default AdvancedClassEndpointBuilder parameters(Map values) {
            doSetMultiValueProperties("parameters", "bean.", values);
            return this;
        }
    }

    public interface ClassBuilders {
        /**
         * Class (camel-bean)
         * Invoke methods of Java beans specified by class name.
         * 
         * Category: core,java
         * Since: 2.4
         * Maven coordinates: org.apache.camel:camel-bean
         * 
         * Syntax: <code>class:beanName</code>
         * 
         * Path parameter: beanName (required)
         * Sets the name of the bean to invoke
         * 
         * @param path beanName
         * @return the dsl builder
         */
        default ClassEndpointBuilder clas(String path) {
            return ClassEndpointBuilderFactory.endpointBuilder("class", path);
        }
        /**
         * Class (camel-bean)
         * Invoke methods of Java beans specified by class name.
         * 
         * Category: core,java
         * Since: 2.4
         * Maven coordinates: org.apache.camel:camel-bean
         * 
         * Syntax: <code>class:beanName</code>
         * 
         * Path parameter: beanName (required)
         * Sets the name of the bean to invoke
         * 
         * @param componentName to use a custom component name for the endpoint
         * instead of the default name
         * @param path beanName
         * @return the dsl builder
         */
        default ClassEndpointBuilder clas(String componentName, String path) {
            return ClassEndpointBuilderFactory.endpointBuilder(componentName, path);
        }
    }
    static ClassEndpointBuilder endpointBuilder(
            String componentName,
            String path) {
        class ClassEndpointBuilderImpl extends AbstractEndpointBuilder implements ClassEndpointBuilder, AdvancedClassEndpointBuilder {
            public ClassEndpointBuilderImpl(String path) {
                super(componentName, path);
            }
        }
        return new ClassEndpointBuilderImpl(path);
    }
}