This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git

commit f979f7cc21ed1cce27f5b4ec84aa84ec26c7eeef
Author: Andrea Cosentino <[email protected]>
AuthorDate: Fri Feb 28 16:51:55 2020 +0100

    CAMEL-14568 - Fixed AWS SQS
---
 .../component/aws/sqs/SqsComponentConfigurer.java  | 11 ++-
 .../apache/camel/component/aws/sqs/aws-sqs.json    |  8 +--
 .../src/main/docs/aws-sqs-component.adoc           |  6 +-
 .../camel/component/aws/sqs/SqsComponent.java      | 47 +------------
 .../aws/sqs/SqsComponentConfigurationTest.java     | 22 +++---
 .../dsl/AwsSqsComponentBuilderFactory.java         | 78 +++++++++++-----------
 6 files changed, 64 insertions(+), 108 deletions(-)

diff --git 
a/components/camel-aws-sqs/src/generated/java/org/apache/camel/component/aws/sqs/SqsComponentConfigurer.java
 
b/components/camel-aws-sqs/src/generated/java/org/apache/camel/component/aws/sqs/SqsComponentConfigurer.java
index d183538..d13fbd2 100644
--- 
a/components/camel-aws-sqs/src/generated/java/org/apache/camel/component/aws/sqs/SqsComponentConfigurer.java
+++ 
b/components/camel-aws-sqs/src/generated/java/org/apache/camel/component/aws/sqs/SqsComponentConfigurer.java
@@ -22,23 +22,19 @@ public class SqsComponentConfigurer extends 
PropertyConfigurerSupport implements
     public boolean configure(CamelContext camelContext, Object obj, String 
name, Object value, boolean ignoreCase) {
         SqsComponent target = (SqsComponent) obj;
         switch (ignoreCase ? name.toLowerCase() : name) {
-        case "accesskey":
-        case "accessKey": target.setAccessKey(property(camelContext, 
java.lang.String.class, value)); return true;
         case "amazonawshost":
         case "amazonAWSHost": 
getOrCreateConfiguration(target).setAmazonAWSHost(property(camelContext, 
java.lang.String.class, value)); return true;
         case "amazonsqsclient":
         case "amazonSQSClient": 
getOrCreateConfiguration(target).setAmazonSQSClient(property(camelContext, 
com.amazonaws.services.sqs.AmazonSQS.class, value)); return true;
         case "autocreatequeue":
         case "autoCreateQueue": 
getOrCreateConfiguration(target).setAutoCreateQueue(property(camelContext, 
boolean.class, value)); return true;
+        case "configuration": target.setConfiguration(property(camelContext, 
org.apache.camel.component.aws.sqs.SqsConfiguration.class, value)); return true;
         case "protocol": 
getOrCreateConfiguration(target).setProtocol(property(camelContext, 
java.lang.String.class, value)); return true;
         case "proxyprotocol":
         case "proxyProtocol": 
getOrCreateConfiguration(target).setProxyProtocol(property(camelContext, 
com.amazonaws.Protocol.class, value)); return true;
         case "queueownerawsaccountid":
         case "queueOwnerAWSAccountId": 
getOrCreateConfiguration(target).setQueueOwnerAWSAccountId(property(camelContext,
 java.lang.String.class, value)); return true;
-        case "region": target.setRegion(property(camelContext, 
java.lang.String.class, value)); return true;
         case "region": 
getOrCreateConfiguration(target).setRegion(property(camelContext, 
java.lang.String.class, value)); return true;
-        case "secretkey":
-        case "secretKey": target.setSecretKey(property(camelContext, 
java.lang.String.class, value)); return true;
         case "attributenames":
         case "attributeNames": 
getOrCreateConfiguration(target).setAttributeNames(property(camelContext, 
java.lang.String.class, value)); return true;
         case "bridgeerrorhandler":
@@ -76,7 +72,6 @@ public class SqsComponentConfigurer extends 
PropertyConfigurerSupport implements
         case "operation": 
getOrCreateConfiguration(target).setOperation(property(camelContext, 
org.apache.camel.component.aws.sqs.SqsOperations.class, value)); return true;
         case "basicpropertybinding":
         case "basicPropertyBinding": 
target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); 
return true;
-        case "configuration": target.setConfiguration(property(camelContext, 
org.apache.camel.component.aws.sqs.SqsConfiguration.class, value)); return true;
         case "delayqueue":
         case "delayQueue": 
getOrCreateConfiguration(target).setDelayQueue(property(camelContext, 
boolean.class, value)); return true;
         case "queueurl":
@@ -94,6 +89,10 @@ public class SqsComponentConfigurer extends 
PropertyConfigurerSupport implements
         case "receiveMessageWaitTimeSeconds": 
getOrCreateConfiguration(target).setReceiveMessageWaitTimeSeconds(property(camelContext,
 java.lang.Integer.class, value)); return true;
         case "redrivepolicy":
         case "redrivePolicy": 
getOrCreateConfiguration(target).setRedrivePolicy(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "accesskey":
+        case "accessKey": 
getOrCreateConfiguration(target).setAccessKey(property(camelContext, 
java.lang.String.class, value)); return true;
+        case "secretkey":
+        case "secretKey": 
getOrCreateConfiguration(target).setSecretKey(property(camelContext, 
java.lang.String.class, value)); return true;
         default: return false;
         }
     }
diff --git 
a/components/camel-aws-sqs/src/generated/resources/org/apache/camel/component/aws/sqs/aws-sqs.json
 
b/components/camel-aws-sqs/src/generated/resources/org/apache/camel/component/aws/sqs/aws-sqs.json
index b1ec43f..2350062 100644
--- 
a/components/camel-aws-sqs/src/generated/resources/org/apache/camel/component/aws/sqs/aws-sqs.json
+++ 
b/components/camel-aws-sqs/src/generated/resources/org/apache/camel/component/aws/sqs/aws-sqs.json
@@ -19,15 +19,14 @@
     "version": "3.2.0-SNAPSHOT"
   },
   "componentProperties": {
-    "accessKey": { "kind": "property", "displayName": "Access Key", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "secret": false, "description": 
"Amazon AWS Access Key" },
     "amazonAWSHost": { "kind": "property", "displayName": "Amazon AWSHost", 
"group": "common", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "secret": false, 
"defaultValue": "amazonaws.com", "configurationClass": 
"org.apache.camel.component.aws.sqs.SqsConfiguration", "configurationField": 
"configuration", "description": "The hostname of the Amazon AWS cloud." },
     "amazonSQSClient": { "kind": "property", "displayName": "Amazon 
SQSClient", "group": "common", "label": "", "required": false, "type": 
"object", "javaType": "com.amazonaws.services.sqs.AmazonSQS", "deprecated": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws.sqs.SqsConfiguration", "configurationField": 
"configuration", "description": "To use the AmazonSQS as client" },
     "autoCreateQueue": { "kind": "property", "displayName": "Auto Create 
Queue", "group": "common", "label": "", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": 
"true", "configurationClass": 
"org.apache.camel.component.aws.sqs.SqsConfiguration", "configurationField": 
"configuration", "description": "Setting the autocreation of the queue" },
+    "configuration": { "kind": "property", "displayName": "Configuration", 
"group": "common", "label": "", "required": false, "type": "object", 
"javaType": "org.apache.camel.component.aws.sqs.SqsConfiguration", 
"deprecated": false, "secret": false, "description": "The component 
configuration" },
     "protocol": { "kind": "property", "displayName": "Protocol", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "secret": false, "defaultValue": 
"https", "configurationClass": 
"org.apache.camel.component.aws.sqs.SqsConfiguration", "configurationField": 
"configuration", "description": "The underlying protocol used to communicate 
with SQS" },
     "proxyProtocol": { "kind": "property", "displayName": "Proxy Protocol", 
"group": "common", "label": "", "required": false, "type": "object", 
"javaType": "com.amazonaws.Protocol", "enum": [ "HTTP", "HTTPS" ], 
"deprecated": false, "secret": false, "defaultValue": "HTTPS", 
"configurationClass": "org.apache.camel.component.aws.sqs.SqsConfiguration", 
"configurationField": "configuration", "description": "To define a proxy 
protocol when instantiating the SQS client" },
     "queueOwnerAWSAccountId": { "kind": "property", "displayName": "Queue 
Owner AWSAccount Id", "group": "common", "label": "", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"secret": true, "configurationClass": 
"org.apache.camel.component.aws.sqs.SqsConfiguration", "configurationField": 
"configuration", "description": "Specify the queue owner aws account id when 
you need to connect the queue with different account owner." },
     "region": { "kind": "property", "displayName": "Region", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws.sqs.SqsConfiguration", "configurationField": 
"configuration", "description": "Specify the queue region which could be used 
with queueOwnerAWSAccountId to build the service URL. When using this 
parameter, the configuration will expect the  [...]
-    "secretKey": { "kind": "property", "displayName": "Secret Key", "group": 
"common", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "secret": false, "description": 
"Amazon AWS Secret Key" },
     "attributeNames": { "kind": "property", "displayName": "Attribute Names", 
"group": "consumer", "label": "consumer", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws.sqs.SqsConfiguration", 
"configurationField": "configuration", "description": "A list of attribute 
names to receive when consuming. Multiple names can be separated by comma." },
     "bridgeErrorHandler": { "kind": "property", "displayName": "Bridge Error 
Handler", "group": "consumer", "label": "consumer", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": 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 message and handled by [...]
     "concurrentConsumers": { "kind": "property", "displayName": "Concurrent 
Consumers", "group": "consumer", "label": "consumer", "required": false, 
"type": "integer", "javaType": "int", "deprecated": false, "secret": false, 
"defaultValue": "1", "configurationClass": 
"org.apache.camel.component.aws.sqs.SqsConfiguration", "configurationField": 
"configuration", "description": "Allows you to use multiple threads to poll the 
sqs queue to increase throughput" },
@@ -47,7 +46,6 @@
     "messageGroupIdStrategy": { "kind": "property", "displayName": "Message 
Group Id Strategy", "group": "producer", "label": "producer", "required": 
false, "type": "string", "javaType": "java.lang.String", "enum": [ 
"useConstant", "useExchangeId", "usePropertyValue" ], "deprecated": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws.sqs.SqsConfiguration", "configurationField": 
"configuration", "description": "Only for FIFO queues. Strategy for setting the 
mess [...]
     "operation": { "kind": "property", "displayName": "Operation", "group": 
"producer", "label": "producer", "required": false, "type": "object", 
"javaType": "org.apache.camel.component.aws.sqs.SqsOperations", "enum": [ 
"sendBatchMessage", "deleteMessage", "listQueues" ], "deprecated": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws.sqs.SqsConfiguration", "configurationField": 
"configuration", "description": "The operation to do in case the user don't 
want t [...]
     "basicPropertyBinding": { "kind": "property", "displayName": "Basic 
Property Binding", "group": "advanced", "label": "advanced", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, 
"defaultValue": false, "description": "Whether the component should use basic 
property binding (Camel 2.x) or the newer property binding with additional 
capabilities" },
-    "configuration": { "kind": "property", "displayName": "Configuration", 
"group": "advanced", "label": "advanced", "required": false, "type": "object", 
"javaType": "org.apache.camel.component.aws.sqs.SqsConfiguration", 
"deprecated": false, "secret": false, "description": "The AWS SQS default 
configuration" },
     "delayQueue": { "kind": "property", "displayName": "Delay Queue", "group": 
"advanced", "label": "advanced", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": 
false, "configurationClass": 
"org.apache.camel.component.aws.sqs.SqsConfiguration", "configurationField": 
"configuration", "description": "Define if you want to apply delaySeconds 
option to the queue or on single messages" },
     "queueUrl": { "kind": "property", "displayName": "Queue Url", "group": 
"advanced", "label": "advanced", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws.sqs.SqsConfiguration", 
"configurationField": "configuration", "description": "To define the queueUrl 
explicitly. All other parameters, which would influence the queueUrl, are 
ignored. This parameter is intended to be used,  [...]
     "proxyHost": { "kind": "property", "displayName": "Proxy Host", "group": 
"proxy", "label": "proxy", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws.sqs.SqsConfiguration", "configurationField": 
"configuration", "description": "To define a proxy host when instantiating the 
SQS client" },
@@ -56,7 +54,9 @@
     "messageRetentionPeriod": { "kind": "property", "displayName": "Message 
Retention Period", "group": "queue", "label": "queue", "required": false, 
"type": "integer", "javaType": "java.lang.Integer", "deprecated": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.aws.sqs.SqsConfiguration", "configurationField": 
"configuration", "description": "The messageRetentionPeriod (in seconds) a 
message will be retained by SQS for this queue." },
     "policy": { "kind": "property", "displayName": "Policy", "group": "queue", 
"label": "queue", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws.sqs.SqsConfiguration", "configurationField": 
"configuration", "description": "The policy for this queue" },
     "receiveMessageWaitTimeSeconds": { "kind": "property", "displayName": 
"Receive Message Wait Time Seconds", "group": "queue", "label": "queue", 
"required": false, "type": "integer", "javaType": "java.lang.Integer", 
"deprecated": false, "secret": false, "configurationClass": 
"org.apache.camel.component.aws.sqs.SqsConfiguration", "configurationField": 
"configuration", "description": "If you do not specify WaitTimeSeconds in the 
request, the queue attribute ReceiveMessageWaitTimeSeconds  [...]
-    "redrivePolicy": { "kind": "property", "displayName": "Redrive Policy", 
"group": "queue", "label": "queue", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws.sqs.SqsConfiguration", 
"configurationField": "configuration", "description": "Specify the policy that 
send message to DeadLetter queue. See detail at Amazon docs." }
+    "redrivePolicy": { "kind": "property", "displayName": "Redrive Policy", 
"group": "queue", "label": "queue", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "secret": false, 
"configurationClass": "org.apache.camel.component.aws.sqs.SqsConfiguration", 
"configurationField": "configuration", "description": "Specify the policy that 
send message to DeadLetter queue. See detail at Amazon docs." },
+    "accessKey": { "kind": "property", "displayName": "Access Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "secret": true, 
"configurationClass": "org.apache.camel.component.aws.sqs.SqsConfiguration", 
"configurationField": "configuration", "description": "Amazon AWS Access Key" },
+    "secretKey": { "kind": "property", "displayName": "Secret Key", "group": 
"security", "label": "security", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "secret": true, 
"configurationClass": "org.apache.camel.component.aws.sqs.SqsConfiguration", 
"configurationField": "configuration", "description": "Amazon AWS Secret Key" }
   },
   "properties": {
     "queueNameOrArn": { "kind": "path", "displayName": "Queue Name Or Arn", 
"group": "common", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "secret": 
false, "description": "Queue name or ARN" },
diff --git a/components/camel-aws-sqs/src/main/docs/aws-sqs-component.adoc 
b/components/camel-aws-sqs/src/main/docs/aws-sqs-component.adoc
index 0c59448..7e047a6 100644
--- a/components/camel-aws-sqs/src/main/docs/aws-sqs-component.adoc
+++ b/components/camel-aws-sqs/src/main/docs/aws-sqs-component.adoc
@@ -38,15 +38,14 @@ The AWS Simple Queue Service component supports 38 options, 
which are listed bel
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
 | Name | Description | Default | Type
-| *accessKey* (common) | Amazon AWS Access Key |  | String
 | *amazonAWSHost* (common) | The hostname of the Amazon AWS cloud. | 
amazonaws.com | String
 | *amazonSQSClient* (common) | To use the AmazonSQS as client |  | AmazonSQS
 | *autoCreateQueue* (common) | Setting the autocreation of the queue | true | 
boolean
+| *configuration* (common) | The component configuration |  | SqsConfiguration
 | *protocol* (common) | The underlying protocol used to communicate with SQS | 
https | String
 | *proxyProtocol* (common) | To define a proxy protocol when instantiating the 
SQS client. The value can be one of: HTTP, HTTPS | HTTPS | Protocol
 | *queueOwnerAWSAccountId* (common) | Specify the queue owner aws account id 
when you need to connect the queue with different account owner. |  | String
 | *region* (common) | Specify the queue region which could be used with 
queueOwnerAWSAccountId to build the service URL. When using this parameter, the 
configuration will expect the capitalized name of the region (for example 
AP_EAST_1) You'll need to use the name Regions.EU_WEST_1.name() |  | String
-| *secretKey* (common) | Amazon AWS Secret Key |  | String
 | *attributeNames* (consumer) | A list of attribute names to receive when 
consuming. Multiple names can be separated by comma. |  | String
 | *bridgeErrorHandler* (consumer) | 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 message and handled by the routing Error Handler. By default the 
consumer will use the org.apache.camel.spi.ExceptionHandler to deal with 
exceptions, that will be logged at WARN or ERROR level and ignored. | false | 
boolean
 | *concurrentConsumers* (consumer) | Allows you to use multiple threads to 
poll the sqs queue to increase throughput | 1 | int
@@ -66,7 +65,6 @@ The AWS Simple Queue Service component supports 38 options, 
which are listed bel
 | *messageGroupIdStrategy* (producer) | Only for FIFO queues. Strategy for 
setting the messageGroupId on the message. Can be one of the following options: 
useConstant, useExchangeId, usePropertyValue. For the usePropertyValue option, 
the value of property CamelAwsMessageGroupId will be used. The value can be one 
of: useConstant, useExchangeId, usePropertyValue |  | String
 | *operation* (producer) | The operation to do in case the user don't want to 
send only a message. The value can be one of: sendBatchMessage, deleteMessage, 
listQueues |  | SqsOperations
 | *basicPropertyBinding* (advanced) | Whether the component should use basic 
property binding (Camel 2.x) or the newer property binding with additional 
capabilities | false | boolean
-| *configuration* (advanced) | The AWS SQS default configuration |  | 
SqsConfiguration
 | *delayQueue* (advanced) | Define if you want to apply delaySeconds option to 
the queue or on single messages | false | boolean
 | *queueUrl* (advanced) | To define the queueUrl explicitly. All other 
parameters, which would influence the queueUrl, are ignored. This parameter is 
intended to be used, to connect to a mock implementation of SQS, for testing 
purposes. |  | String
 | *proxyHost* (proxy) | To define a proxy host when instantiating the SQS 
client |  | String
@@ -76,6 +74,8 @@ The AWS Simple Queue Service component supports 38 options, 
which are listed bel
 | *policy* (queue) | The policy for this queue |  | String
 | *receiveMessageWaitTimeSeconds* (queue) | If you do not specify 
WaitTimeSeconds in the request, the queue attribute 
ReceiveMessageWaitTimeSeconds is used to determine how long to wait. |  | 
Integer
 | *redrivePolicy* (queue) | Specify the policy that send message to DeadLetter 
queue. See detail at Amazon docs. |  | String
+| *accessKey* (security) | Amazon AWS Access Key |  | String
+| *secretKey* (security) | Amazon AWS Secret Key |  | String
 |===
 // component options: END
 
diff --git 
a/components/camel-aws-sqs/src/main/java/org/apache/camel/component/aws/sqs/SqsComponent.java
 
b/components/camel-aws-sqs/src/main/java/org/apache/camel/component/aws/sqs/SqsComponent.java
index 79c564b..ec5cbd7 100644
--- 
a/components/camel-aws-sqs/src/main/java/org/apache/camel/component/aws/sqs/SqsComponent.java
+++ 
b/components/camel-aws-sqs/src/main/java/org/apache/camel/component/aws/sqs/SqsComponent.java
@@ -31,13 +31,7 @@ import org.apache.camel.support.DefaultComponent;
 public class SqsComponent extends DefaultComponent {
 
     @Metadata
-    private String accessKey;
-    @Metadata
-    private String secretKey;
-    @Metadata
-    private String region;
-    @Metadata(label = "advanced")
-    private SqsConfiguration configuration;
+    private SqsConfiguration configuration = new SqsConfiguration();
 
     public SqsComponent() {
         this(null);
@@ -68,9 +62,6 @@ public class SqsComponent extends DefaultComponent {
             configuration.setQueueName(remaining);
         }
         SqsEndpoint sqsEndpoint = new SqsEndpoint(uri, this, configuration);
-        sqsEndpoint.getConfiguration().setAccessKey(accessKey);
-        sqsEndpoint.getConfiguration().setSecretKey(secretKey);
-        sqsEndpoint.getConfiguration().setRegion(region);
         setProperties(sqsEndpoint, parameters);
         checkAndSetRegistryClient(configuration);
         if (configuration.getAmazonSQSClient() == null && 
(configuration.getAccessKey() == null || configuration.getSecretKey() == null)) 
{
@@ -90,46 +81,12 @@ public class SqsComponent extends DefaultComponent {
     }
 
     /**
-     * The AWS SQS default configuration
+     * The component configuration
      */
     public void setConfiguration(SqsConfiguration configuration) {
         this.configuration = configuration;
     }
 
-    public String getAccessKey() {
-        return accessKey;
-    }
-
-    /**
-     * Amazon AWS Access Key
-     */
-    public void setAccessKey(String accessKey) {
-        this.accessKey = accessKey;
-    }
-
-    public String getSecretKey() {
-        return secretKey;
-    }
-
-    /**
-     * Amazon AWS Secret Key
-     */
-    public void setSecretKey(String secretKey) {
-        this.secretKey = secretKey;
-    }
-
-    public String getRegion() {
-        return region;
-    }
-
-    /**
-     * Specify the queue region which could be used with queueOwnerAWSAccountId
-     * to build the service URL.
-     */
-    public void setRegion(String region) {
-        this.region = region;
-    }
-
     private void checkAndSetRegistryClient(SqsConfiguration configuration) {
         Set<AmazonSQS> clients = 
getCamelContext().getRegistry().findByType(AmazonSQS.class);
         if (clients.size() == 1) {
diff --git 
a/components/camel-aws-sqs/src/test/java/org/apache/camel/component/aws/sqs/SqsComponentConfigurationTest.java
 
b/components/camel-aws-sqs/src/test/java/org/apache/camel/component/aws/sqs/SqsComponentConfigurationTest.java
index 4ce3e46..c01fb99 100644
--- 
a/components/camel-aws-sqs/src/test/java/org/apache/camel/component/aws/sqs/SqsComponentConfigurationTest.java
+++ 
b/components/camel-aws-sqs/src/test/java/org/apache/camel/component/aws/sqs/SqsComponentConfigurationTest.java
@@ -246,8 +246,8 @@ public class SqsComponentConfigurationTest extends 
CamelTestSupport {
 
         context.getRegistry().bind("amazonSQSClient", mock);
         SqsComponent component = context.getComponent("aws-sqs", 
SqsComponent.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
         SqsEndpoint endpoint = 
(SqsEndpoint)component.createEndpoint("aws-sqs://MyQueue?amazonSQSClient=#amazonSQSClient");
 
         assertEquals("MyQueue", endpoint.getConfiguration().getQueueName());
@@ -258,9 +258,9 @@ public class SqsComponentConfigurationTest extends 
CamelTestSupport {
     @Test
     public void createEndpointWithComponentAndEndpointElements() throws 
Exception {
         SqsComponent component = context.getComponent("aws-sqs", 
SqsComponent.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
-        component.setRegion(Regions.US_WEST_1.toString());
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
+        component.getConfiguration().setRegion(Regions.US_WEST_1.toString());
         SqsEndpoint endpoint = 
(SqsEndpoint)component.createEndpoint("aws-sqs://MyQueue?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1");
 
         assertEquals("MyQueue", endpoint.getConfiguration().getQueueName());
@@ -272,9 +272,9 @@ public class SqsComponentConfigurationTest extends 
CamelTestSupport {
     @Test
     public void createEndpointWithoutAutoCreation() throws Exception {
         SqsComponent component = context.getComponent("aws-sqs", 
SqsComponent.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
-        component.setRegion(Regions.US_WEST_1.toString());
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
+        component.getConfiguration().setRegion(Regions.US_WEST_1.toString());
         SqsEndpoint endpoint = 
(SqsEndpoint)component.createEndpoint("aws-sqs://MyQueue?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1&autoCreateQueue=false");
 
         assertEquals("MyQueue", endpoint.getConfiguration().getQueueName());
@@ -287,9 +287,9 @@ public class SqsComponentConfigurationTest extends 
CamelTestSupport {
     @Test
     public void createEndpointWithComponentEndpointElementsAndProxy() throws 
Exception {
         SqsComponent component = context.getComponent("aws-sqs", 
SqsComponent.class);
-        component.setAccessKey("XXX");
-        component.setSecretKey("YYY");
-        component.setRegion(Regions.US_WEST_1.toString());
+        component.getConfiguration().setAccessKey("XXX");
+        component.getConfiguration().setSecretKey("YYY");
+        component.getConfiguration().setRegion(Regions.US_WEST_1.toString());
         SqsEndpoint endpoint = 
(SqsEndpoint)component.createEndpoint("aws-sqs://label?accessKey=xxxxxx&secretKey=yyyyy&region=US_EAST_1&proxyHost=localhost&proxyPort=9000&proxyProtocol=HTTP");
         
         assertEquals("xxxxxx", endpoint.getConfiguration().getAccessKey());
diff --git 
a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSqsComponentBuilderFactory.java
 
b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSqsComponentBuilderFactory.java
index 8f09070..92654bd 100644
--- 
a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSqsComponentBuilderFactory.java
+++ 
b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/AwsSqsComponentBuilderFactory.java
@@ -49,17 +49,6 @@ public interface AwsSqsComponentBuilderFactory {
      */
     interface AwsSqsComponentBuilder extends ComponentBuilder<SqsComponent> {
         /**
-         * Amazon AWS Access Key.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: common
-         */
-        default AwsSqsComponentBuilder accessKey(java.lang.String accessKey) {
-            doSetProperty("accessKey", accessKey);
-            return this;
-        }
-        /**
          * The hostname of the Amazon AWS cloud.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -98,6 +87,20 @@ public interface AwsSqsComponentBuilderFactory {
             return this;
         }
         /**
+         * The component configuration.
+         * 
+         * The option is a:
+         * <code>org.apache.camel.component.aws.sqs.SqsConfiguration</code>
+         * type.
+         * 
+         * Group: common
+         */
+        default AwsSqsComponentBuilder configuration(
+                org.apache.camel.component.aws.sqs.SqsConfiguration 
configuration) {
+            doSetProperty("configuration", configuration);
+            return this;
+        }
+        /**
          * The underlying protocol used to communicate with SQS.
          * 
          * The option is a: <code>java.lang.String</code> type.
@@ -151,17 +154,6 @@ public interface AwsSqsComponentBuilderFactory {
             return this;
         }
         /**
-         * Amazon AWS Secret Key.
-         * 
-         * The option is a: <code>java.lang.String</code> type.
-         * 
-         * Group: common
-         */
-        default AwsSqsComponentBuilder secretKey(java.lang.String secretKey) {
-            doSetProperty("secretKey", secretKey);
-            return this;
-        }
-        /**
          * A list of attribute names to receive when consuming. Multiple names
          * can be separated by comma.
          * 
@@ -439,20 +431,6 @@ public interface AwsSqsComponentBuilderFactory {
             return this;
         }
         /**
-         * The AWS SQS default configuration.
-         * 
-         * The option is a:
-         * <code>org.apache.camel.component.aws.sqs.SqsConfiguration</code>
-         * type.
-         * 
-         * Group: advanced
-         */
-        default AwsSqsComponentBuilder configuration(
-                org.apache.camel.component.aws.sqs.SqsConfiguration 
configuration) {
-            doSetProperty("configuration", configuration);
-            return this;
-        }
-        /**
          * Define if you want to apply delaySeconds option to the queue or on
          * single messages.
          * 
@@ -565,6 +543,28 @@ public interface AwsSqsComponentBuilderFactory {
             doSetProperty("redrivePolicy", redrivePolicy);
             return this;
         }
+        /**
+         * Amazon AWS Access Key.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group: security
+         */
+        default AwsSqsComponentBuilder accessKey(java.lang.String accessKey) {
+            doSetProperty("accessKey", accessKey);
+            return this;
+        }
+        /**
+         * Amazon AWS Secret Key.
+         * 
+         * The option is a: <code>java.lang.String</code> type.
+         * 
+         * Group: security
+         */
+        default AwsSqsComponentBuilder secretKey(java.lang.String secretKey) {
+            doSetProperty("secretKey", secretKey);
+            return this;
+        }
     }
 
     class AwsSqsComponentBuilderImpl
@@ -589,15 +589,14 @@ public interface AwsSqsComponentBuilderFactory {
                 String name,
                 Object value) {
             switch (name) {
-            case "accessKey": ((SqsComponent) 
component).setAccessKey((java.lang.String) value); return true;
             case "amazonAWSHost": getOrCreateConfiguration((SqsComponent) 
component).setAmazonAWSHost((java.lang.String) value); return true;
             case "amazonSQSClient": getOrCreateConfiguration((SqsComponent) 
component).setAmazonSQSClient((com.amazonaws.services.sqs.AmazonSQS) value); 
return true;
             case "autoCreateQueue": getOrCreateConfiguration((SqsComponent) 
component).setAutoCreateQueue((boolean) value); return true;
+            case "configuration": ((SqsComponent) 
component).setConfiguration((org.apache.camel.component.aws.sqs.SqsConfiguration)
 value); return true;
             case "protocol": getOrCreateConfiguration((SqsComponent) 
component).setProtocol((java.lang.String) value); return true;
             case "proxyProtocol": getOrCreateConfiguration((SqsComponent) 
component).setProxyProtocol((com.amazonaws.Protocol) value); return true;
             case "queueOwnerAWSAccountId": 
getOrCreateConfiguration((SqsComponent) 
component).setQueueOwnerAWSAccountId((java.lang.String) value); return true;
             case "region": getOrCreateConfiguration((SqsComponent) 
component).setRegion((java.lang.String) value); return true;
-            case "secretKey": ((SqsComponent) 
component).setSecretKey((java.lang.String) value); return true;
             case "attributeNames": getOrCreateConfiguration((SqsComponent) 
component).setAttributeNames((java.lang.String) value); return true;
             case "bridgeErrorHandler": ((SqsComponent) 
component).setBridgeErrorHandler((boolean) value); return true;
             case "concurrentConsumers": 
getOrCreateConfiguration((SqsComponent) component).setConcurrentConsumers((int) 
value); return true;
@@ -617,7 +616,6 @@ public interface AwsSqsComponentBuilderFactory {
             case "messageGroupIdStrategy": 
getOrCreateConfiguration((SqsComponent) 
component).setMessageGroupIdStrategy((java.lang.String) value); return true;
             case "operation": getOrCreateConfiguration((SqsComponent) 
component).setOperation((org.apache.camel.component.aws.sqs.SqsOperations) 
value); return true;
             case "basicPropertyBinding": ((SqsComponent) 
component).setBasicPropertyBinding((boolean) value); return true;
-            case "configuration": ((SqsComponent) 
component).setConfiguration((org.apache.camel.component.aws.sqs.SqsConfiguration)
 value); return true;
             case "delayQueue": getOrCreateConfiguration((SqsComponent) 
component).setDelayQueue((boolean) value); return true;
             case "queueUrl": getOrCreateConfiguration((SqsComponent) 
component).setQueueUrl((java.lang.String) value); return true;
             case "proxyHost": getOrCreateConfiguration((SqsComponent) 
component).setProxyHost((java.lang.String) value); return true;
@@ -627,6 +625,8 @@ public interface AwsSqsComponentBuilderFactory {
             case "policy": getOrCreateConfiguration((SqsComponent) 
component).setPolicy((java.lang.String) value); return true;
             case "receiveMessageWaitTimeSeconds": 
getOrCreateConfiguration((SqsComponent) 
component).setReceiveMessageWaitTimeSeconds((java.lang.Integer) value); return 
true;
             case "redrivePolicy": getOrCreateConfiguration((SqsComponent) 
component).setRedrivePolicy((java.lang.String) value); return true;
+            case "accessKey": getOrCreateConfiguration((SqsComponent) 
component).setAccessKey((java.lang.String) value); return true;
+            case "secretKey": getOrCreateConfiguration((SqsComponent) 
component).setSecretKey((java.lang.String) value); return true;
             default: return false;
             }
         }

Reply via email to