You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2022/03/30 13:53:42 UTC

[camel] 04/04: CAMEL-17687 - Create a Camel Azure Key Vault component - Adding client instance to configuration

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 80e4991d6f6a8591b7fe096bf29b1cc22178747a
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Wed Mar 30 15:51:18 2022 +0200

    CAMEL-17687 - Create a Camel Azure Key Vault component - Adding client instance to configuration
---
 .../camel/catalog/components/azure-key-vault.json  |   7 +-
 .../dsl/KeyVaultEndpointBuilderFactory.java        | 102 +++++++++++++++++++--
 2 files changed, 97 insertions(+), 12 deletions(-)

diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-key-vault.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-key-vault.json
index 4b78c18..a3c7d4b 100644
--- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-key-vault.json
+++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/azure-key-vault.json
@@ -32,13 +32,14 @@
   },
   "properties": {
     "vaultName": { "kind": "path", "displayName": "Vault Name", "group": "common", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.key.vault.KeyVaultConfiguration", "configurationField": "configuration", "description": "Vault Name to be used" },
+    "secretClient": { "kind": "parameter", "displayName": "Secret Client", "group": "common", "label": "", "required": false, "type": "object", "javaType": "com.azure.security.keyvault.secrets.SecretClient", "deprecated": false, "deprecationNote": "", "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.azure.key.vault.KeyVaultConfiguration", "configurationField": "configuration", "description": "Instance of Secret client" },
     "bridgeErrorHandler": { "kind": "parameter", "displayName": "Bridge Error Handler", "group": "consumer", "label": "consumer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": false, "description": "Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions occurred while the consumer is trying to pickup incoming messages, or the likes, will now be processed as a m [...]
     "exceptionHandler": { "kind": "parameter", "displayName": "Exception Handler", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.spi.ExceptionHandler", "optionalPrefix": "consumer.", "deprecated": false, "autowired": false, "secret": false, "description": "To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this option is not in use. By default the con [...]
     "exchangePattern": { "kind": "parameter", "displayName": "Exchange Pattern", "group": "consumer (advanced)", "label": "consumer,advanced", "required": false, "type": "object", "javaType": "org.apache.camel.ExchangePattern", "enum": [ "InOnly", "InOut", "InOptionalOut" ], "deprecated": false, "autowired": false, "secret": false, "description": "Sets the exchange pattern when the consumer creates an exchange." },
     "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.azure.key.vault.KeyVaultOperation", "enum": [ "createSecret", "getSecret", "deleteSecret" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.azure.key.vault.KeyVaultConfiguration", "configurationField": "configuration", "description": "Operation [...]
-    "clientId": { "kind": "parameter", "displayName": "Client Id", "group": "security", "label": "security", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.key.vault.KeyVaultConfiguration", "configurationField": "configuration", "description": "Client Id to be used" },
-    "clientSecret": { "kind": "parameter", "displayName": "Client Secret", "group": "security", "label": "security", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.key.vault.KeyVaultConfiguration", "configurationField": "configuration", "description": "Client Secret to be used" },
-    "tenantId": { "kind": "parameter", "displayName": "Tenant Id", "group": "security", "label": "security", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.key.vault.KeyVaultConfiguration", "configurationField": "configuration", "description": "Tenant Id to be used" }
+    "clientId": { "kind": "parameter", "displayName": "Client Id", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.key.vault.KeyVaultConfiguration", "configurationField": "configuration", "description": "Client Id to be used" },
+    "clientSecret": { "kind": "parameter", "displayName": "Client Secret", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.key.vault.KeyVaultConfiguration", "configurationField": "configuration", "description": "Client Secret to be used" },
+    "tenantId": { "kind": "parameter", "displayName": "Tenant Id", "group": "security", "label": "security", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": true, "configurationClass": "org.apache.camel.component.azure.key.vault.KeyVaultConfiguration", "configurationField": "configuration", "description": "Tenant Id to be used" }
   }
 }
diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeyVaultEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeyVaultEndpointBuilderFactory.java
index 4676409..c191792 100644
--- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeyVaultEndpointBuilderFactory.java
+++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/KeyVaultEndpointBuilderFactory.java
@@ -44,6 +44,37 @@ public interface KeyVaultEndpointBuilderFactory {
             return (AdvancedKeyVaultEndpointConsumerBuilder) this;
         }
         /**
+         * Instance of Secret client.
+         * 
+         * The option is a:
+         * &lt;code&gt;com.azure.security.keyvault.secrets.SecretClient&lt;/code&gt; type.
+         * 
+         * Group: common
+         * 
+         * @param secretClient the value to set
+         * @return the dsl builder
+         */
+        default KeyVaultEndpointConsumerBuilder secretClient(
+                com.azure.security.keyvault.secrets.SecretClient secretClient) {
+            doSetProperty("secretClient", secretClient);
+            return this;
+        }
+        /**
+         * Instance of Secret client.
+         * 
+         * The option will be converted to a
+         * &lt;code&gt;com.azure.security.keyvault.secrets.SecretClient&lt;/code&gt; type.
+         * 
+         * Group: common
+         * 
+         * @param secretClient the value to set
+         * @return the dsl builder
+         */
+        default KeyVaultEndpointConsumerBuilder secretClient(String secretClient) {
+            doSetProperty("secretClient", secretClient);
+            return this;
+        }
+        /**
          * Allows for bridging the consumer to the Camel routing Error Handler,
          * which mean any exceptions occurred while the consumer is trying to
          * pickup incoming messages, or the likes, will now be processed as a
@@ -93,7 +124,6 @@ public interface KeyVaultEndpointBuilderFactory {
          * 
          * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
          * 
-         * Required: true
          * Group: security
          * 
          * @param clientId the value to set
@@ -108,7 +138,6 @@ public interface KeyVaultEndpointBuilderFactory {
          * 
          * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
          * 
-         * Required: true
          * Group: security
          * 
          * @param clientSecret the value to set
@@ -123,7 +152,6 @@ public interface KeyVaultEndpointBuilderFactory {
          * 
          * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
          * 
-         * Required: true
          * Group: security
          * 
          * @param tenantId the value to set
@@ -227,6 +255,37 @@ public interface KeyVaultEndpointBuilderFactory {
             return (AdvancedKeyVaultEndpointProducerBuilder) this;
         }
         /**
+         * Instance of Secret client.
+         * 
+         * The option is a:
+         * &lt;code&gt;com.azure.security.keyvault.secrets.SecretClient&lt;/code&gt; type.
+         * 
+         * Group: common
+         * 
+         * @param secretClient the value to set
+         * @return the dsl builder
+         */
+        default KeyVaultEndpointProducerBuilder secretClient(
+                com.azure.security.keyvault.secrets.SecretClient secretClient) {
+            doSetProperty("secretClient", secretClient);
+            return this;
+        }
+        /**
+         * Instance of Secret client.
+         * 
+         * The option will be converted to a
+         * &lt;code&gt;com.azure.security.keyvault.secrets.SecretClient&lt;/code&gt; type.
+         * 
+         * Group: common
+         * 
+         * @param secretClient the value to set
+         * @return the dsl builder
+         */
+        default KeyVaultEndpointProducerBuilder secretClient(String secretClient) {
+            doSetProperty("secretClient", secretClient);
+            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
@@ -311,7 +370,6 @@ public interface KeyVaultEndpointBuilderFactory {
          * 
          * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
          * 
-         * Required: true
          * Group: security
          * 
          * @param clientId the value to set
@@ -326,7 +384,6 @@ public interface KeyVaultEndpointBuilderFactory {
          * 
          * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
          * 
-         * Required: true
          * Group: security
          * 
          * @param clientSecret the value to set
@@ -341,7 +398,6 @@ public interface KeyVaultEndpointBuilderFactory {
          * 
          * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
          * 
-         * Required: true
          * Group: security
          * 
          * @param tenantId the value to set
@@ -376,11 +432,41 @@ public interface KeyVaultEndpointBuilderFactory {
             return (AdvancedKeyVaultEndpointBuilder) this;
         }
         /**
+         * Instance of Secret client.
+         * 
+         * The option is a:
+         * &lt;code&gt;com.azure.security.keyvault.secrets.SecretClient&lt;/code&gt; type.
+         * 
+         * Group: common
+         * 
+         * @param secretClient the value to set
+         * @return the dsl builder
+         */
+        default KeyVaultEndpointBuilder secretClient(
+                com.azure.security.keyvault.secrets.SecretClient secretClient) {
+            doSetProperty("secretClient", secretClient);
+            return this;
+        }
+        /**
+         * Instance of Secret client.
+         * 
+         * The option will be converted to a
+         * &lt;code&gt;com.azure.security.keyvault.secrets.SecretClient&lt;/code&gt; type.
+         * 
+         * Group: common
+         * 
+         * @param secretClient the value to set
+         * @return the dsl builder
+         */
+        default KeyVaultEndpointBuilder secretClient(String secretClient) {
+            doSetProperty("secretClient", secretClient);
+            return this;
+        }
+        /**
          * Client Id to be used.
          * 
          * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
          * 
-         * Required: true
          * Group: security
          * 
          * @param clientId the value to set
@@ -395,7 +481,6 @@ public interface KeyVaultEndpointBuilderFactory {
          * 
          * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
          * 
-         * Required: true
          * Group: security
          * 
          * @param clientSecret the value to set
@@ -410,7 +495,6 @@ public interface KeyVaultEndpointBuilderFactory {
          * 
          * The option is a: &lt;code&gt;java.lang.String&lt;/code&gt; type.
          * 
-         * Required: true
          * Group: security
          * 
          * @param tenantId the value to set