This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 0ed6c56517bd21078c815fc7db23e8050f0472a0 Author: Andrea Cosentino <anco...@gmail.com> AuthorDate: Wed Jun 8 14:54:07 2022 +0200 CAMEL-17689 - Create a Camel Hashicorp Vault Component - First iteration regen --- catalog/camel-allcomponents/pom.xml | 4 - .../org/apache/camel/catalog/components.properties | 1 + .../camel/catalog/components/hashicorp-vault.json | 42 +++ .../org/apache/camel/main/components.properties | 1 + .../ROOT/examples/json/hashicorp-vault.json | 1 + docs/components/modules/ROOT/nav.adoc | 1 + .../ROOT/pages/hashicorp-vault-component.adoc | 1 + .../component/ComponentsBuilderFactory.java | 13 + .../dsl/HashicorpVaultComponentBuilderFactory.java | 121 +++++++++ .../src/generated/resources/metadata.json | 22 ++ .../builder/endpoint/EndpointBuilderFactory.java | 1 + .../camel/builder/endpoint/EndpointBuilders.java | 1 + .../builder/endpoint/StaticEndpointBuilders.java | 43 ++++ .../dsl/HashicorpVaultEndpointBuilderFactory.java | 284 +++++++++++++++++++++ parent/pom.xml | 5 - 15 files changed, 532 insertions(+), 9 deletions(-) diff --git a/catalog/camel-allcomponents/pom.xml b/catalog/camel-allcomponents/pom.xml index cf9348f3c31..4d4952915e5 100644 --- a/catalog/camel-allcomponents/pom.xml +++ b/catalog/camel-allcomponents/pom.xml @@ -597,10 +597,6 @@ <groupId>org.apache.camel</groupId> <artifactId>camel-hashicorp-vault</artifactId> </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-hashicorp-vault</artifactId> - </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-hazelcast</artifactId> diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties index e5655177c61..7dd261e6ccb 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties @@ -124,6 +124,7 @@ grape graphql grpc guava-eventbus +hashicorp-vault hazelcast-atomicvalue hazelcast-instance hazelcast-list diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hashicorp-vault.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hashicorp-vault.json new file mode 100644 index 00000000000..036ce798670 --- /dev/null +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/hashicorp-vault.json @@ -0,0 +1,42 @@ +{ + "component": { + "kind": "component", + "name": "hashicorp-vault", + "title": "Hashicorp Vault", + "description": "Manage secrets in Hashicorp Vault Service", + "deprecated": false, + "firstVersion": "3.18.0", + "label": "cloud,cloud", + "javaType": "org.apache.camel.component.hashicorp.vault.HashicorpVaultComponent", + "supportLevel": "Preview", + "groupId": "org.apache.camel", + "artifactId": "camel-hashicorp-vault", + "version": "3.18.0-SNAPSHOT", + "scheme": "hashicorp-vault", + "extendsScheme": "", + "syntax": "hashicorp-vault:vaultName", + "async": false, + "api": false, + "consumerOnly": false, + "producerOnly": true, + "lenientProperties": false + }, + "componentProperties": { + "lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 star [...] + "autowiredEnabled": { "kind": "property", "displayName": "Autowired Enabled", "group": "advanced", "label": "advanced", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Whether autowiring is enabled. This is used for automatic autowiring options (the option must be marked as autowired) by looking up in the registry to find if there is a single instance of matching type, which t [...] + }, + "headers": { + "CamelHashicorpVaultProducerOperation": { "kind": "header", "displayName": "", "group": "producer", "label": "producer", "required": false, "javaType": "org.apache.camel.component.azure.key.vault.KeyVaultOperationDefinition", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Overrides the desired operation to be used in the producer.", "constantName": "org.apache.camel.component.hashicorp.vault.HashicorpVaultConstants#OPERATION" } + }, + "properties": { + "secretsEngine": { "kind": "path", "displayName": "Secrets Engine", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", "configurationField": "configuration", "description": "Vault Name to be used" }, + "host": { "kind": "parameter", "displayName": "Host", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", "configurationField": "configuration", "description": "Hashicorp Vault instance host to be used" }, + "lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "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 sta [...] + "operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "object", "javaType": "org.apache.camel.component.hashicorp.vault.HashicorpVaultOperation", "enum": [ "createSecret" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", "configurationField": "configuration", "description": "Operation to be performed" }, + "port": { "kind": "parameter", "displayName": "Port", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "8200", "configurationClass": "org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", "configurationField": "configuration", "description": "Hashicorp Vault instance port to be used" }, + "scheme": { "kind": "parameter", "displayName": "Scheme", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "https", "configurationClass": "org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", "configurationField": "configuration", "description": "Hashicorp Vault instance scheme to be used" }, + "secretPath": { "kind": "parameter", "displayName": "Secret Path", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", "configurationField": "configuration", "description": "Hashicorp Vault instance secret Path to be used" }, + "vaultTemplate": { "kind": "parameter", "displayName": "Vault Template", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.springframework.vault.core.VaultTemplate", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", "configurationField": "configuration", "description": "Instance of Vault template" }, + "token": { "kind": "parameter", "displayName": "Token", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.hashicorp.vault.HashicorpVaultConfiguration", "configurationField": "configuration", "description": "Token to be used" } + } +} diff --git a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties index e5655177c61..7dd261e6ccb 100644 --- a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties +++ b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties @@ -124,6 +124,7 @@ grape graphql grpc guava-eventbus +hashicorp-vault hazelcast-atomicvalue hazelcast-instance hazelcast-list diff --git a/docs/components/modules/ROOT/examples/json/hashicorp-vault.json b/docs/components/modules/ROOT/examples/json/hashicorp-vault.json new file mode 120000 index 00000000000..a9b2683da1e --- /dev/null +++ b/docs/components/modules/ROOT/examples/json/hashicorp-vault.json @@ -0,0 +1 @@ +../../../../../../components/camel-hashicorp-vault/src/generated/resources/org/apache/camel/component/hashicorp/vault/hashicorp-vault.json \ No newline at end of file diff --git a/docs/components/modules/ROOT/nav.adoc b/docs/components/modules/ROOT/nav.adoc index 003fb99ba23..b6ad7a420b1 100644 --- a/docs/components/modules/ROOT/nav.adoc +++ b/docs/components/modules/ROOT/nav.adoc @@ -45,6 +45,7 @@ *** xref:azure-storage-blob-component.adoc[Azure Storage Blob Service] *** xref:azure-storage-datalake-component.adoc[Azure Storage Datalake Service] *** xref:azure-storage-queue-component.adoc[Azure Storage Queue Service] +*** xref:hashicorp-vault-component.adoc[Hashicorp Vault] ** xref:bean-component.adoc[Bean] ** xref:bean-validator-component.adoc[Bean Validator] ** xref:bonita-component.adoc[Bonita] diff --git a/docs/components/modules/ROOT/pages/hashicorp-vault-component.adoc b/docs/components/modules/ROOT/pages/hashicorp-vault-component.adoc new file mode 120000 index 00000000000..d6ac0616ec9 --- /dev/null +++ b/docs/components/modules/ROOT/pages/hashicorp-vault-component.adoc @@ -0,0 +1 @@ +../../../../../components/camel-hashicorp-vault/src/main/docs/hashicorp-vault-component.adoc \ No newline at end of file diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java index a6af1f3cb58..1dffa9002c8 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java @@ -1719,6 +1719,19 @@ public interface ComponentsBuilderFactory { static org.apache.camel.builder.component.dsl.GuavaEventbusComponentBuilderFactory.GuavaEventbusComponentBuilder guavaEventbus() { return org.apache.camel.builder.component.dsl.GuavaEventbusComponentBuilderFactory.guavaEventbus(); } + /** + * Hashicorp Vault (camel-hashicorp-vault) + * Manage secrets in Hashicorp Vault Service + * + * Category: cloud,cloud + * Since: 3.18 + * Maven coordinates: org.apache.camel:camel-hashicorp-vault + * + * @return the dsl builder + */ + static org.apache.camel.builder.component.dsl.HashicorpVaultComponentBuilderFactory.HashicorpVaultComponentBuilder hashicorpVault() { + return org.apache.camel.builder.component.dsl.HashicorpVaultComponentBuilderFactory.hashicorpVault(); + } /** * Hazelcast Atomic Number (camel-hazelcast) * Increment, decrement, set, etc. Hazelcast atomic number (a grid wide diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/HashicorpVaultComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/HashicorpVaultComponentBuilderFactory.java new file mode 100644 index 00000000000..e0b8c3ebaf4 --- /dev/null +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/HashicorpVaultComponentBuilderFactory.java @@ -0,0 +1,121 @@ +/* + * 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.component.dsl; + +import javax.annotation.Generated; +import org.apache.camel.Component; +import org.apache.camel.builder.component.AbstractComponentBuilder; +import org.apache.camel.builder.component.ComponentBuilder; +import org.apache.camel.component.hashicorp.vault.HashicorpVaultComponent; + +/** + * Manage secrets in Hashicorp Vault Service + * + * Generated by camel-package-maven-plugin - do not edit this file! + */ +@Generated("org.apache.camel.maven.packaging.ComponentDslMojo") +public interface HashicorpVaultComponentBuilderFactory { + + /** + * Hashicorp Vault (camel-hashicorp-vault) + * Manage secrets in Hashicorp Vault Service + * + * Category: cloud,cloud + * Since: 3.18 + * Maven coordinates: org.apache.camel:camel-hashicorp-vault + * + * @return the dsl builder + */ + static HashicorpVaultComponentBuilder hashicorpVault() { + return new HashicorpVaultComponentBuilderImpl(); + } + + /** + * Builder for the Hashicorp Vault component. + */ + interface HashicorpVaultComponentBuilder + extends + ComponentBuilder<HashicorpVaultComponent> { + /** + * 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: <code>boolean</code> type. + * + * Default: false + * Group: producer + * + * @param lazyStartProducer the value to set + * @return the dsl builder + */ + default HashicorpVaultComponentBuilder lazyStartProducer( + boolean lazyStartProducer) { + doSetProperty("lazyStartProducer", lazyStartProducer); + return this; + } + /** + * Whether autowiring is enabled. This is used for automatic autowiring + * options (the option must be marked as autowired) by looking up in the + * registry to find if there is a single instance of matching type, + * which then gets configured on the component. This can be used for + * automatic configuring JDBC data sources, JMS connection factories, + * AWS Clients, etc. + * + * The option is a: <code>boolean</code> type. + * + * Default: true + * Group: advanced + * + * @param autowiredEnabled the value to set + * @return the dsl builder + */ + default HashicorpVaultComponentBuilder autowiredEnabled( + boolean autowiredEnabled) { + doSetProperty("autowiredEnabled", autowiredEnabled); + return this; + } + } + + class HashicorpVaultComponentBuilderImpl + extends + AbstractComponentBuilder<HashicorpVaultComponent> + implements + HashicorpVaultComponentBuilder { + @Override + protected HashicorpVaultComponent buildConcreteComponent() { + return new HashicorpVaultComponent(); + } + @Override + protected boolean setPropertyOnComponent( + Component component, + String name, + Object value) { + switch (name) { + case "lazyStartProducer": ((HashicorpVaultComponent) component).setLazyStartProducer((boolean) value); return true; + case "autowiredEnabled": ((HashicorpVaultComponent) component).setAutowiredEnabled((boolean) value); return true; + default: return false; + } + } + } +} \ No newline at end of file diff --git a/dsl/camel-componentdsl/src/generated/resources/metadata.json b/dsl/camel-componentdsl/src/generated/resources/metadata.json index edbfee42add..8171223dcea 100644 --- a/dsl/camel-componentdsl/src/generated/resources/metadata.json +++ b/dsl/camel-componentdsl/src/generated/resources/metadata.json @@ -2797,6 +2797,28 @@ "producerOnly": false, "lenientProperties": false }, + "HashicorpVaultComponentBuilderFactory": { + "kind": "component", + "name": "hashicorp-vault", + "title": "Hashicorp Vault", + "description": "Manage secrets in Hashicorp Vault Service", + "deprecated": false, + "firstVersion": "3.18.0", + "label": "cloud,cloud", + "javaType": "org.apache.camel.component.hashicorp.vault.HashicorpVaultComponent", + "supportLevel": "Preview", + "groupId": "org.apache.camel", + "artifactId": "camel-hashicorp-vault", + "version": "3.18.0-SNAPSHOT", + "scheme": "hashicorp-vault", + "extendsScheme": "", + "syntax": "hashicorp-vault:vaultName", + "async": false, + "api": false, + "consumerOnly": false, + "producerOnly": true, + "lenientProperties": false + }, "HazelcastAtomicvalueComponentBuilderFactory": { "kind": "component", "name": "hazelcast-atomicvalue", diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java index e9a12d12b84..a11ab6944aa 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java @@ -141,6 +141,7 @@ public interface EndpointBuilderFactory org.apache.camel.builder.endpoint.dsl.GrpcEndpointBuilderFactory.GrpcBuilders, org.apache.camel.builder.endpoint.dsl.GuavaEventBusEndpointBuilderFactory.GuavaEventBusBuilders, org.apache.camel.builder.endpoint.dsl.HBaseEndpointBuilderFactory.HBaseBuilders, + org.apache.camel.builder.endpoint.dsl.HashicorpVaultEndpointBuilderFactory.HashicorpVaultBuilders, org.apache.camel.builder.endpoint.dsl.HazelcastAtomicnumberEndpointBuilderFactory.HazelcastAtomicnumberBuilders, org.apache.camel.builder.endpoint.dsl.HazelcastInstanceEndpointBuilderFactory.HazelcastInstanceBuilders, org.apache.camel.builder.endpoint.dsl.HazelcastListEndpointBuilderFactory.HazelcastListBuilders, diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java index b82aa0bee9d..239649a5e86 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java @@ -138,6 +138,7 @@ public interface EndpointBuilders org.apache.camel.builder.endpoint.dsl.GrpcEndpointBuilderFactory, org.apache.camel.builder.endpoint.dsl.GuavaEventBusEndpointBuilderFactory, org.apache.camel.builder.endpoint.dsl.HBaseEndpointBuilderFactory, + org.apache.camel.builder.endpoint.dsl.HashicorpVaultEndpointBuilderFactory, org.apache.camel.builder.endpoint.dsl.HazelcastAtomicnumberEndpointBuilderFactory, org.apache.camel.builder.endpoint.dsl.HazelcastInstanceEndpointBuilderFactory, org.apache.camel.builder.endpoint.dsl.HazelcastListEndpointBuilderFactory, diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java index 4eb6093336d..422e69a9ede 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java @@ -5856,6 +5856,49 @@ public class StaticEndpointBuilders { String path) { return org.apache.camel.builder.endpoint.dsl.GuavaEventBusEndpointBuilderFactory.endpointBuilder(componentName, path); } + /** + * Hashicorp Vault (camel-hashicorp-vault) + * Manage secrets in Hashicorp Vault Service + * + * Category: cloud,cloud + * Since: 3.18 + * Maven coordinates: org.apache.camel:camel-hashicorp-vault + * + * Syntax: <code>hashicorp-vault:vaultName</code> + * + * Path parameter: secretsEngine + * Vault Name to be used + * + * @param path vaultName + * @return the dsl builder + */ + public static org.apache.camel.builder.endpoint.dsl.HashicorpVaultEndpointBuilderFactory.HashicorpVaultEndpointBuilder hashicorpVault( + String path) { + return org.apache.camel.builder.endpoint.dsl.HashicorpVaultEndpointBuilderFactory.endpointBuilder("hashicorp-vault", path); + } + /** + * Hashicorp Vault (camel-hashicorp-vault) + * Manage secrets in Hashicorp Vault Service + * + * Category: cloud,cloud + * Since: 3.18 + * Maven coordinates: org.apache.camel:camel-hashicorp-vault + * + * Syntax: <code>hashicorp-vault:vaultName</code> + * + * Path parameter: secretsEngine + * Vault Name to be used + * + * @param componentName to use a custom component name for the endpoint + * instead of the default name + * @param path vaultName + * @return the dsl builder + */ + public static org.apache.camel.builder.endpoint.dsl.HashicorpVaultEndpointBuilderFactory.HashicorpVaultEndpointBuilder hashicorpVault( + String componentName, + String path) { + return org.apache.camel.builder.endpoint.dsl.HashicorpVaultEndpointBuilderFactory.endpointBuilder(componentName, path); + } /** * Hazelcast Atomic Number (camel-hazelcast) * Increment, decrement, set, etc. Hazelcast atomic number (a grid wide diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HashicorpVaultEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HashicorpVaultEndpointBuilderFactory.java new file mode 100644 index 00000000000..1726f52fb5a --- /dev/null +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HashicorpVaultEndpointBuilderFactory.java @@ -0,0 +1,284 @@ +/* + * 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.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; + +/** + * Manage secrets in Hashicorp Vault Service + * + * Generated by camel build tools - do NOT edit this file! + */ +@Generated("org.apache.camel.maven.packaging.EndpointDslMojo") +public interface HashicorpVaultEndpointBuilderFactory { + + + /** + * Builder for endpoint for the Hashicorp Vault component. + */ + public interface HashicorpVaultEndpointBuilder + extends + EndpointProducerBuilder { + /** + * Hashicorp Vault instance host to be used. + * + * The option is a: <code>java.lang.String</code> type. + * + * Group: producer + * + * @param host the value to set + * @return the dsl builder + */ + default HashicorpVaultEndpointBuilder host(String host) { + doSetProperty("host", host); + 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: <code>boolean</code> type. + * + * Default: false + * Group: producer + * + * @param lazyStartProducer the value to set + * @return the dsl builder + */ + default HashicorpVaultEndpointBuilder 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 <code>boolean</code> + * type. + * + * Default: false + * Group: producer + * + * @param lazyStartProducer the value to set + * @return the dsl builder + */ + default HashicorpVaultEndpointBuilder lazyStartProducer( + String lazyStartProducer) { + doSetProperty("lazyStartProducer", lazyStartProducer); + return this; + } + /** + * Operation to be performed. + * + * The option is a: + * <code>org.apache.camel.component.hashicorp.vault.HashicorpVaultOperation</code> type. + * + * Group: producer + * + * @param operation the value to set + * @return the dsl builder + */ + default HashicorpVaultEndpointBuilder operation( + org.apache.camel.component.hashicorp.vault.HashicorpVaultOperation operation) { + doSetProperty("operation", operation); + return this; + } + /** + * Operation to be performed. + * + * The option will be converted to a + * <code>org.apache.camel.component.hashicorp.vault.HashicorpVaultOperation</code> type. + * + * Group: producer + * + * @param operation the value to set + * @return the dsl builder + */ + default HashicorpVaultEndpointBuilder operation(String operation) { + doSetProperty("operation", operation); + return this; + } + /** + * Hashicorp Vault instance port to be used. + * + * The option is a: <code>java.lang.String</code> type. + * + * Default: 8200 + * Group: producer + * + * @param port the value to set + * @return the dsl builder + */ + default HashicorpVaultEndpointBuilder port(String port) { + doSetProperty("port", port); + return this; + } + /** + * Hashicorp Vault instance scheme to be used. + * + * The option is a: <code>java.lang.String</code> type. + * + * Default: https + * Group: producer + * + * @param scheme the value to set + * @return the dsl builder + */ + default HashicorpVaultEndpointBuilder scheme(String scheme) { + doSetProperty("scheme", scheme); + return this; + } + /** + * Hashicorp Vault instance secret Path to be used. + * + * The option is a: <code>java.lang.String</code> type. + * + * Group: producer + * + * @param secretPath the value to set + * @return the dsl builder + */ + default HashicorpVaultEndpointBuilder secretPath(String secretPath) { + doSetProperty("secretPath", secretPath); + return this; + } + /** + * Instance of Vault template. + * + * The option is a: + * <code>org.springframework.vault.core.VaultTemplate</code> + * type. + * + * Group: producer + * + * @param vaultTemplate the value to set + * @return the dsl builder + */ + default HashicorpVaultEndpointBuilder vaultTemplate( + org.springframework.vault.core.VaultTemplate vaultTemplate) { + doSetProperty("vaultTemplate", vaultTemplate); + return this; + } + /** + * Instance of Vault template. + * + * The option will be converted to a + * <code>org.springframework.vault.core.VaultTemplate</code> + * type. + * + * Group: producer + * + * @param vaultTemplate the value to set + * @return the dsl builder + */ + default HashicorpVaultEndpointBuilder vaultTemplate(String vaultTemplate) { + doSetProperty("vaultTemplate", vaultTemplate); + return this; + } + /** + * Token to be used. + * + * The option is a: <code>java.lang.String</code> type. + * + * Group: security + * + * @param token the value to set + * @return the dsl builder + */ + default HashicorpVaultEndpointBuilder token(String token) { + doSetProperty("token", token); + return this; + } + } + + public interface HashicorpVaultBuilders { + /** + * Hashicorp Vault (camel-hashicorp-vault) + * Manage secrets in Hashicorp Vault Service + * + * Category: cloud,cloud + * Since: 3.18 + * Maven coordinates: org.apache.camel:camel-hashicorp-vault + * + * Syntax: <code>hashicorp-vault:vaultName</code> + * + * Path parameter: secretsEngine + * Vault Name to be used + * + * @param path vaultName + * @return the dsl builder + */ + default HashicorpVaultEndpointBuilder hashicorpVault(String path) { + return HashicorpVaultEndpointBuilderFactory.endpointBuilder("hashicorp-vault", path); + } + /** + * Hashicorp Vault (camel-hashicorp-vault) + * Manage secrets in Hashicorp Vault Service + * + * Category: cloud,cloud + * Since: 3.18 + * Maven coordinates: org.apache.camel:camel-hashicorp-vault + * + * Syntax: <code>hashicorp-vault:vaultName</code> + * + * Path parameter: secretsEngine + * Vault Name to be used + * + * @param componentName to use a custom component name for the endpoint + * instead of the default name + * @param path vaultName + * @return the dsl builder + */ + default HashicorpVaultEndpointBuilder hashicorpVault( + String componentName, + String path) { + return HashicorpVaultEndpointBuilderFactory.endpointBuilder(componentName, path); + } + } + static HashicorpVaultEndpointBuilder endpointBuilder( + String componentName, + String path) { + class HashicorpVaultEndpointBuilderImpl extends AbstractEndpointBuilder implements HashicorpVaultEndpointBuilder { + public HashicorpVaultEndpointBuilderImpl(String path) { + super(componentName, path); + } + } + return new HashicorpVaultEndpointBuilderImpl(path); + } +} \ No newline at end of file diff --git a/parent/pom.xml b/parent/pom.xml index 497115729d0..54e2ee70b07 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -1523,11 +1523,6 @@ <artifactId>camel-hashicorp-vault</artifactId> <version>${project.version}</version> </dependency> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-hashicorp-vault</artifactId> - <version>${project.version}</version> - </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-hazelcast</artifactId>