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

davsclaus pushed a commit to branch camel-spring-boot-3.20.x
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git

commit 8cefe0e53354e3dcd2e748134f9e9ca20d91a2da
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Mon Sep 18 16:30:22 2023 +0200

    Regen
---
 .../camel/springboot/catalog/components/aws2-ec2.json  |  2 +-
 .../springboot/catalog/components/elasticsearch.json   |  5 ++++-
 .../src/main/docs/elasticsearch.json                   |  7 +++++++
 .../ElasticsearchComponentConfiguration.java           | 18 ++++++++++++++++++
 4 files changed, 30 insertions(+), 2 deletions(-)

diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/aws2-ec2.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/aws2-ec2.json
index b380dbfa7e4..5c3e5b3d2a3 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/aws2-ec2.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/aws2-ec2.json
@@ -41,7 +41,7 @@
   },
   "headers": {
     "CamelAwsEC2ImageId": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "An image ID of the AWS marketplace", "constantName": 
"org.apache.camel.component.aws2.ec2.AWS2EC2Constants#IMAGE_ID" },
-    "CamelAwsEC2InstanceType": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": 
"software.amazon.awssdk.services.ec2.model.InstanceType", "enum": [ 
"a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", 
"c1.medium", "c1.xlarge", "c3.large", "c3.xlarge", "c3.2xlarge", "c3.4xlarge", 
"c3.8xlarge", "c4.large", "c4.xlarge", "c4.2xlarge", "c4.4xlarge", 
"c4.8xlarge", "c5.large", "c5.xlarge", "c5.2xlarge", "c5.4xlarge" [...]
+    "CamelAwsEC2InstanceType": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": 
"software.amazon.awssdk.services.ec2.model.InstanceType", "enum": [ 
"a1.medium", "a1.large", "a1.xlarge", "a1.2xlarge", "a1.4xlarge", "a1.metal", 
"c1.medium", "c1.xlarge", "c3.large", "c3.xlarge", "c3.2xlarge", "c3.4xlarge", 
"c3.8xlarge", "c4.large", "c4.xlarge", "c4.2xlarge", "c4.4xlarge", 
"c4.8xlarge", "c5.large", "c5.xlarge", "c5.2xlarge", "c5.4xlarge" [...]
     "CamelAwsEC2Operation": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": "String", "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"description": "The operation we want to perform", "constantName": 
"org.apache.camel.component.aws2.ec2.AWS2EC2Constants#OPERATION" },
     "CamelAwsEC2InstanceMinCount": { "kind": "header", "displayName": "", 
"group": "producer", "label": "", "required": false, "javaType": "Integer", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The minimum number of instances we want to run.", 
"constantName": 
"org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_MIN_COUNT" },
     "CamelAwsEC2InstanceMaxCount": { "kind": "header", "displayName": "", 
"group": "producer", "label": "", "required": false, "javaType": "Integer", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The maximum number of instances we want to run.", 
"constantName": 
"org.apache.camel.component.aws2.ec2.AWS2EC2Constants#INSTANCE_MAX_COUNT" },
diff --git 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/elasticsearch.json
 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/elasticsearch.json
index f3b1fa46e32..01c63c8409d 100644
--- 
a/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/elasticsearch.json
+++ 
b/catalog/camel-catalog-provider-springboot/src/main/resources/org/apache/camel/springboot/catalog/components/elasticsearch.json
@@ -23,6 +23,7 @@
   },
   "componentProperties": {
     "connectionTimeout": { "kind": "property", "displayName": "Connection 
Timeout", "group": "producer", "label": "", "required": false, "type": 
"integer", "javaType": "int", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 30000, "description": "The time in ms to wait 
before connection will timeout." },
+    "enableDocumentOnlyMode": { "kind": "property", "displayName": "Enable 
Document Only Mode", "group": "producer", "label": "", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "description": "Indicates 
whether the body of the message contains only documents. By default, it is set 
to false to be able to do the same requests as what the Document API supports 
(see https:\/\/www.elastic.co\/guide\ [...]
     "hostAddresses": { "kind": "property", "displayName": "Host Addresses", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "description": "Comma separated list with ip:port formatted 
remote transport addresses to use. The ip and port options must be left blank 
for hostAddresses to be considered instead." },
     "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 [...]
     "maxRetryTimeout": { "kind": "property", "displayName": "Max Retry 
Timeout", "group": "producer", "label": "", "required": false, "type": 
"integer", "javaType": "int", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 30000, "description": "The time in ms before 
retry" },
@@ -46,12 +47,14 @@
     "scrollKeepAliveMs": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": "Integer", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "description": "The starting index of the response.", "constantName": 
"org.apache.camel.component.es.ElasticsearchConstants#PARAM_SCROLL_KEEP_ALIVE_MS"
 },
     "useScroll": { "kind": "header", "displayName": "", "group": "producer", 
"label": "", "required": false, "javaType": "Boolean", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "Set 
to true to enable scroll usage", "constantName": 
"org.apache.camel.component.es.ElasticsearchConstants#PARAM_SCROLL" },
     "size": { "kind": "header", "displayName": "", "group": "producer", 
"label": "", "required": false, "javaType": "Integer", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
size of the response.", "constantName": 
"org.apache.camel.component.es.ElasticsearchConstants#PARAM_SIZE" },
-    "from": { "kind": "header", "displayName": "", "group": "producer", 
"label": "", "required": false, "javaType": "Integer", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
starting index of the response.", "constantName": 
"org.apache.camel.component.es.ElasticsearchConstants#PARAM_FROM" }
+    "from": { "kind": "header", "displayName": "", "group": "producer", 
"label": "", "required": false, "javaType": "Integer", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, "description": "The 
starting index of the response.", "constantName": 
"org.apache.camel.component.es.ElasticsearchConstants#PARAM_FROM" },
+    "enableDocumentOnlyMode": { "kind": "header", "displayName": "", "group": 
"producer", "label": "", "required": false, "javaType": "Boolean", 
"deprecated": false, "deprecationNote": "", "autowired": false, "secret": 
false, "defaultValue": "false", "description": "Indicates whether the body of 
the message contains only documents.", "constantName": 
"org.apache.camel.component.es.ElasticsearchConstants#PARAM_DOCUMENT_MODE" }
   },
   "properties": {
     "clusterName": { "kind": "path", "displayName": "Cluster Name", "group": 
"producer", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired": 
false, "secret": false, "configurationClass": 
"org.apache.camel.component.es.ElasticsearchConfiguration", 
"configurationField": "configuration", "description": "Name of the cluster" },
     "connectionTimeout": { "kind": "parameter", "displayName": "Connection 
Timeout", "group": "producer", "label": "", "required": false, "type": 
"integer", "javaType": "int", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": 30000, "configurationClass": 
"org.apache.camel.component.es.ElasticsearchConfiguration", 
"configurationField": "configuration", "description": "The time in ms to wait 
before connection will timeout." },
     "disconnect": { "kind": "parameter", "displayName": "Disconnect", "group": 
"producer", "label": "", "required": false, "type": "boolean", "javaType": 
"boolean", "deprecated": false, "autowired": false, "secret": false, 
"defaultValue": false, "configurationClass": 
"org.apache.camel.component.es.ElasticsearchConfiguration", 
"configurationField": "configuration", "description": "Disconnect after it 
finish calling the producer" },
+    "enableDocumentOnlyMode": { "kind": "parameter", "displayName": "Enable 
Document Only Mode", "group": "producer", "label": "", "required": false, 
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": 
false, "secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.es.ElasticsearchConfiguration", 
"configurationField": "configuration", "description": "Indicates whether the 
body of the message contains only documents. By default, it  [...]
     "from": { "kind": "parameter", "displayName": "From", "group": "producer", 
"label": "", "required": false, "type": "integer", "javaType": 
"java.lang.Integer", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.es.ElasticsearchConfiguration", 
"configurationField": "configuration", "description": "Starting index of the 
response." },
     "hostAddresses": { "kind": "parameter", "displayName": "Host Addresses", 
"group": "producer", "label": "", "required": false, "type": "string", 
"javaType": "java.lang.String", "deprecated": false, "autowired": false, 
"secret": false, "configurationClass": 
"org.apache.camel.component.es.ElasticsearchConfiguration", 
"configurationField": "configuration", "description": "Comma separated list 
with ip:port formatted remote transport addresses to use." },
     "indexName": { "kind": "parameter", "displayName": "Index Name", "group": 
"producer", "label": "", "required": false, "type": "string", "javaType": 
"java.lang.String", "deprecated": false, "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.es.ElasticsearchConfiguration", 
"configurationField": "configuration", "description": "The name of the index to 
act against" },
diff --git 
a/components-starter/camel-elasticsearch-starter/src/main/docs/elasticsearch.json
 
b/components-starter/camel-elasticsearch-starter/src/main/docs/elasticsearch.json
index 06367aaf487..1728eba5739 100644
--- 
a/components-starter/camel-elasticsearch-starter/src/main/docs/elasticsearch.json
+++ 
b/components-starter/camel-elasticsearch-starter/src/main/docs/elasticsearch.json
@@ -44,6 +44,13 @@
       "type": "java.lang.Boolean",
       "sourceType": 
"org.apache.camel.spring.boot.ComponentConfigurationPropertiesCommon$CustomizerProperties"
     },
+    {
+      "name": "camel.component.elasticsearch.enable-document-only-mode",
+      "type": "java.lang.Boolean",
+      "description": "Indicates whether the body of the message contains only 
documents. By default, it is set to false to be able to do the same requests as 
what the Document API supports (see 
https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/docs.html
 for more details). To ease the migration of routes based on the legacy 
component camel-elasticsearch-rest, you should consider enabling the mode 
especially if your routes do update operations.",
+      "sourceType": 
"org.apache.camel.component.es.springboot.ElasticsearchComponentConfiguration",
+      "defaultValue": false
+    },
     {
       "name": "camel.component.elasticsearch.enable-s-s-l",
       "type": "java.lang.Boolean",
diff --git 
a/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/es/springboot/ElasticsearchComponentConfiguration.java
 
b/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/es/springboot/ElasticsearchComponentConfiguration.java
index 91e24831003..9253e529157 100644
--- 
a/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/es/springboot/ElasticsearchComponentConfiguration.java
+++ 
b/components-starter/camel-elasticsearch-starter/src/main/java/org/apache/camel/component/es/springboot/ElasticsearchComponentConfiguration.java
@@ -41,6 +41,16 @@ public class ElasticsearchComponentConfiguration
      * The time in ms to wait before connection will timeout.
      */
     private Integer connectionTimeout = 30000;
+    /**
+     * Indicates whether the body of the message contains only documents. By
+     * default, it is set to false to be able to do the same requests as what
+     * the Document API supports (see
+     * 
https://www.elastic.co/guide/en/elasticsearch/reference/current/docs.html
+     * for more details). To ease the migration of routes based on the legacy
+     * component camel-elasticsearch-rest, you should consider enabling the 
mode
+     * especially if your routes do update operations.
+     */
+    private Boolean enableDocumentOnlyMode = false;
     /**
      * Comma separated list with ip:port formatted remote transport addresses 
to
      * use. The ip and port options must be left blank for hostAddresses to be
@@ -124,6 +134,14 @@ public class ElasticsearchComponentConfiguration
         this.connectionTimeout = connectionTimeout;
     }
 
+    public Boolean getEnableDocumentOnlyMode() {
+        return enableDocumentOnlyMode;
+    }
+
+    public void setEnableDocumentOnlyMode(Boolean enableDocumentOnlyMode) {
+        this.enableDocumentOnlyMode = enableDocumentOnlyMode;
+    }
+
     public String getHostAddresses() {
         return hostAddresses;
     }

Reply via email to