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 2020/09/21 16:30:38 UTC
[camel] 05/10: CAMEL-15375 - Camel-AWS2-Eventbridge: Support
loading with ResourceHelper
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 c37e89b5d97b875c08eb4d9ac6da415ed71bf8f2
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Sep 21 12:19:22 2020 +0200
CAMEL-15375 - Camel-AWS2-Eventbridge: Support loading with ResourceHelper
---
components/camel-aws2-eventbridge/pom.xml | 4 ++
.../EventbridgeComponentConfigurer.java | 5 +++
.../eventbridge/EventbridgeEndpointConfigurer.java | 5 +++
.../aws2/eventbridge/aws2-eventbridge.json | 2 +
.../aws2/eventbridge/EventbridgeConfiguration.java | 12 ++++++
.../aws2/eventbridge/EventbridgeProducer.java | 23 ++++++++---
.../EventbridgePutRuleIntegrationTest.java | 9 ++---
.../src/test/resources/eventpattern.json | 5 +++
.../aws2/sts/STSComponentSpringTest-context.xml | 45 ----------------------
.../Aws2EventbridgeComponentBuilderFactory.java | 13 +++++++
.../dsl/EventbridgeEndpointBuilderFactory.java | 12 ++++++
11 files changed, 79 insertions(+), 56 deletions(-)
diff --git a/components/camel-aws2-eventbridge/pom.xml b/components/camel-aws2-eventbridge/pom.xml
index 9bf0e28..0170ff2 100644
--- a/components/camel-aws2-eventbridge/pom.xml
+++ b/components/camel-aws2-eventbridge/pom.xml
@@ -50,6 +50,10 @@
<artifactId>apache-client</artifactId>
<version>${aws-java-sdk2-version}</version>
</dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
<!-- for testing -->
<dependency>
diff --git a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurer.java b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurer.java
index 0e4966f..6865a61 100644
--- a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurer.java
+++ b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeComponentConfigurer.java
@@ -33,6 +33,8 @@ public class EventbridgeComponentConfigurer extends PropertyConfigurerSupport im
case "basicpropertybinding":
case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
case "configuration": target.setConfiguration(property(camelContext, org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration.class, value)); return true;
+ case "eventpatternfile":
+ case "eventPatternFile": getOrCreateConfiguration(target).setEventPatternFile(property(camelContext, java.lang.String.class, value)); return true;
case "eventbridgeclient":
case "eventbridgeClient": getOrCreateConfiguration(target).setEventbridgeClient(property(camelContext, software.amazon.awssdk.services.eventbridge.EventBridgeClient.class, value)); return true;
case "lazystartproducer":
@@ -62,6 +64,7 @@ public class EventbridgeComponentConfigurer extends PropertyConfigurerSupport im
answer.put("autoDiscoverClient", boolean.class);
answer.put("basicPropertyBinding", boolean.class);
answer.put("configuration", org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration.class);
+ answer.put("eventPatternFile", java.lang.String.class);
answer.put("eventbridgeClient", software.amazon.awssdk.services.eventbridge.EventBridgeClient.class);
answer.put("lazyStartProducer", boolean.class);
answer.put("operation", org.apache.camel.component.aws2.eventbridge.EvenbridgeOperations.class);
@@ -86,6 +89,8 @@ public class EventbridgeComponentConfigurer extends PropertyConfigurerSupport im
case "basicpropertybinding":
case "basicPropertyBinding": return target.isBasicPropertyBinding();
case "configuration": return target.getConfiguration();
+ case "eventpatternfile":
+ case "eventPatternFile": return getOrCreateConfiguration(target).getEventPatternFile();
case "eventbridgeclient":
case "eventbridgeClient": return getOrCreateConfiguration(target).getEventbridgeClient();
case "lazystartproducer":
diff --git a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointConfigurer.java b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointConfigurer.java
index a6b177a..f9de694 100644
--- a/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointConfigurer.java
+++ b/components/camel-aws2-eventbridge/src/generated/java/org/apache/camel/component/aws2/eventbridge/EventbridgeEndpointConfigurer.java
@@ -25,6 +25,8 @@ public class EventbridgeEndpointConfigurer extends PropertyConfigurerSupport imp
case "autoDiscoverClient": target.getConfiguration().setAutoDiscoverClient(property(camelContext, boolean.class, value)); return true;
case "basicpropertybinding":
case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true;
+ case "eventpatternfile":
+ case "eventPatternFile": target.getConfiguration().setEventPatternFile(property(camelContext, java.lang.String.class, value)); return true;
case "eventbridgeclient":
case "eventbridgeClient": target.getConfiguration().setEventbridgeClient(property(camelContext, software.amazon.awssdk.services.eventbridge.EventBridgeClient.class, value)); return true;
case "lazystartproducer":
@@ -54,6 +56,7 @@ public class EventbridgeEndpointConfigurer extends PropertyConfigurerSupport imp
answer.put("accessKey", java.lang.String.class);
answer.put("autoDiscoverClient", boolean.class);
answer.put("basicPropertyBinding", boolean.class);
+ answer.put("eventPatternFile", java.lang.String.class);
answer.put("eventbridgeClient", software.amazon.awssdk.services.eventbridge.EventBridgeClient.class);
answer.put("lazyStartProducer", boolean.class);
answer.put("operation", org.apache.camel.component.aws2.eventbridge.EvenbridgeOperations.class);
@@ -78,6 +81,8 @@ public class EventbridgeEndpointConfigurer extends PropertyConfigurerSupport imp
case "autoDiscoverClient": return target.getConfiguration().isAutoDiscoverClient();
case "basicpropertybinding":
case "basicPropertyBinding": return target.isBasicPropertyBinding();
+ case "eventpatternfile":
+ case "eventPatternFile": return target.getConfiguration().getEventPatternFile();
case "eventbridgeclient":
case "eventbridgeClient": return target.getConfiguration().getEventbridgeClient();
case "lazystartproducer":
diff --git a/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json b/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json
index c2cc268..b644136 100644
--- a/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json
+++ b/components/camel-aws2-eventbridge/src/generated/resources/org/apache/camel/component/aws2/eventbridge/aws2-eventbridge.json
@@ -25,6 +25,7 @@
"autoDiscoverClient": { "kind": "property", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client instanc [...]
"configuration": { "kind": "property", "displayName": "Configuration", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "deprecated": false, "secret": false, "description": "Component configuration" },
"eventbridgeClient": { "kind": "property", "displayName": "Eventbridge Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eventbridge.EventBridgeClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AWS Eventbridge as client" },
+ "eventPatternFile": { "kind": "property", "displayName": "Event Pattern File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "EventPattern File" },
"lazyStartProducer": { "kind": "property", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 starting and cause the r [...]
"operation": { "kind": "property", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EvenbridgeOperations", "enum": [ "putRule", "putTarget" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "assumeRole", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": [...]
"pojoRequest": { "kind": "property", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
@@ -41,6 +42,7 @@
"label": { "kind": "path", "displayName": "Label", "group": "producer", "label": "", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "deprecationNote": "", "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "Logical name" },
"autoDiscoverClient": { "kind": "parameter", "displayName": "Auto Discover Client", "group": "common", "label": "common", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "true", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "Setting the autoDiscoverClient mechanism, if true, the component will look for a client instan [...]
"eventbridgeClient": { "kind": "parameter", "displayName": "Eventbridge Client", "group": "producer", "label": "", "required": false, "type": "object", "javaType": "software.amazon.awssdk.services.eventbridge.EventBridgeClient", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "To use a existing configured AWS Eventbridge as client" },
+ "eventPatternFile": { "kind": "parameter", "displayName": "Event Pattern File", "group": "producer", "label": "", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "secret": false, "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "EventPattern File" },
"lazyStartProducer": { "kind": "parameter", "displayName": "Lazy Start Producer", "group": "producer", "label": "producer", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": 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 starting and cause the [...]
"operation": { "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "", "required": true, "type": "object", "javaType": "org.apache.camel.component.aws2.eventbridge.EvenbridgeOperations", "enum": [ "putRule", "putTarget" ], "deprecated": false, "deprecationNote": "", "secret": false, "defaultValue": "assumeRole", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": [...]
"pojoRequest": { "kind": "parameter", "displayName": "Pojo Request", "group": "producer", "label": "", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "secret": false, "defaultValue": "false", "configurationClass": "org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration", "configurationField": "configuration", "description": "If we want to use a POJO request as body or not" },
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
index 9b7707d..cfb4fa6 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeConfiguration.java
@@ -54,6 +54,8 @@ public class EventbridgeConfiguration implements Cloneable {
private boolean trustAllCertificates;
@UriParam(label = "common", defaultValue = "true")
private boolean autoDiscoverClient = true;
+ @UriParam
+ private String eventPatternFile;
public EventBridgeClient getEventbridgeClient() {
return eventbridgeClient;
@@ -178,6 +180,16 @@ public class EventbridgeConfiguration implements Cloneable {
this.autoDiscoverClient = autoDiscoverClient;
}
+ public String getEventPatternFile() {
+ return eventPatternFile;
+ }
+
+ /**
+ * EventPattern File
+ */
+ public void setEventPatternFile(String eventPatternFile) {
+ this.eventPatternFile = eventPatternFile;
+ }
// *************************************************
//
// *************************************************
diff --git a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
index c73bfa1..6486104 100644
--- a/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
+++ b/components/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java
@@ -16,13 +16,19 @@
*/
package org.apache.camel.component.aws2.eventbridge;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.Charset;
+
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.InvalidPayloadException;
import org.apache.camel.Message;
import org.apache.camel.support.DefaultProducer;
+import org.apache.camel.support.ResourceHelper;
import org.apache.camel.util.ObjectHelper;
import org.apache.camel.util.URISupport;
+import org.apache.commons.io.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import software.amazon.awssdk.awscore.exception.AwsServiceException;
@@ -75,7 +81,7 @@ public class EventbridgeProducer extends DefaultProducer {
return eventbridgeProducerToString;
}
- private void putRule(EventBridgeClient eventbridgeClient, Exchange exchange) throws InvalidPayloadException {
+ private void putRule(EventBridgeClient eventbridgeClient, Exchange exchange) throws InvalidPayloadException, IOException {
if (getConfiguration().isPojoRequest()) {
Object payload = exchange.getIn().getMandatoryBody();
if (payload instanceof PutRuleRequest) {
@@ -98,6 +104,11 @@ public class EventbridgeProducer extends DefaultProducer {
if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(EventbridgeConstants.EVENT_PATTERN))) {
String eventPattern = exchange.getIn().getHeader(EventbridgeConstants.EVENT_PATTERN, String.class);
builder.eventPattern(eventPattern);
+ } else {
+ InputStream s = ResourceHelper.resolveMandatoryResourceAsInputStream(this.getEndpoint().getCamelContext(),
+ getConfiguration().getEventPatternFile());
+ String eventPattern = IOUtils.toString(s, Charset.defaultCharset());
+ builder.eventPattern(eventPattern);
}
PutRuleResponse result;
try {
@@ -114,19 +125,19 @@ public class EventbridgeProducer extends DefaultProducer {
// private void putTarget(EventBridgeClient eventbridgeClient, Exchange exchange) throws InvalidPayloadException {
// if (getConfiguration().isPojoRequest()) {
// Object payload = exchange.getIn().getMandatoryBody();
- // if (payload instanceof PutRuleRequest) {
- // PutRuleResponse result;
+ // if (payload instanceof PutTargetsRequest) {
+ // PutTargetsResponse result;
// try {
- // result = eventbridgeClient.putRule((PutRuleRequest) payload);
+ // result = eventbridgeClient.putTargets((PutTargetsRequest) payload);
// } catch (AwsServiceException ase) {
- // LOG.trace("PutRule command returned the error code {}", ase.awsErrorDetails().errorCode());
+ // LOG.trace("PutTargets command returned the error code {}", ase.awsErrorDetails().errorCode());
// throw ase;
// }
// Message message = getMessageForResponse(exchange);
// message.setBody(result);
// }
// } else {
- // PutRuleRequest.Builder builder = PutRuleRequest.builder();
+ // Put.Builder builder = PutRuleRequest.builder();
// if (ObjectHelper.isNotEmpty(exchange.getIn().getHeader(EventbridgeConstants.RULE_NAME))) {
// String ruleName = exchange.getIn().getHeader(EventbridgeConstants.RULE_NAME, String.class);
// builder.name(ruleName);
diff --git a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/integration/EventbridgePutRuleIntegrationTest.java b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/integration/EventbridgePutRuleIntegrationTest.java
index 5fa9636..7432268 100644
--- a/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/integration/EventbridgePutRuleIntegrationTest.java
+++ b/components/camel-aws2-eventbridge/src/test/java/org/apache/camel/component/aws2/eventbridge/integration/EventbridgePutRuleIntegrationTest.java
@@ -25,7 +25,6 @@ import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.aws2.eventbridge.EventbridgeConstants;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
-import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
@@ -38,8 +37,9 @@ public class EventbridgePutRuleIntegrationTest extends CamelTestSupport {
@BindToRegistry("eventbridge-client")
EventBridgeClient client
= EventBridgeClient.builder()
- .credentialsProvider(StaticCredentialsProvider.create(AwsBasicCredentials.create("xxx", "yyy")))
- .region(Region.US_WEST_1).build();
+ .credentialsProvider(StaticCredentialsProvider.create(
+ AwsBasicCredentials.create("xxxx", "yyy")))
+ .region(Region.EU_WEST_1).build();
@EndpointInject
private ProducerTemplate template;
@@ -56,7 +56,6 @@ public class EventbridgePutRuleIntegrationTest extends CamelTestSupport {
@Override
public void process(Exchange exchange) throws Exception {
exchange.getIn().setHeader(EventbridgeConstants.RULE_NAME, "firstrule");
- exchange.getIn().setHeader(EventbridgeConstants.EVENT_PATTERN, "{ \"source\": [\"aws.s3\"] }");
}
});
assertMockEndpointsSatisfied();
@@ -68,7 +67,7 @@ public class EventbridgePutRuleIntegrationTest extends CamelTestSupport {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
- String awsEndpoint = "aws2-eventbridge://test?operation=putRule";
+ String awsEndpoint = "aws2-eventbridge://test?operation=putRule&eventPatternFile=file:src/test/resources/eventpattern.json";
from("direct:evs").to(awsEndpoint).log("${body}").to("mock:result");
diff --git a/components/camel-aws2-eventbridge/src/test/resources/eventpattern.json b/components/camel-aws2-eventbridge/src/test/resources/eventpattern.json
new file mode 100644
index 0000000..454ccba
--- /dev/null
+++ b/components/camel-aws2-eventbridge/src/test/resources/eventpattern.json
@@ -0,0 +1,5 @@
+{
+ "source":[
+ "aws.s3"
+ ]
+}
diff --git a/components/camel-aws2-eventbridge/src/test/resources/org/apache/camel/component/aws2/sts/STSComponentSpringTest-context.xml b/components/camel-aws2-eventbridge/src/test/resources/org/apache/camel/component/aws2/sts/STSComponentSpringTest-context.xml
deleted file mode 100644
index 9b0e2d9..0000000
--- a/components/camel-aws2-eventbridge/src/test/resources/org/apache/camel/component/aws2/sts/STSComponentSpringTest-context.xml
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- 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.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
- http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">
-
- <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
- <route>
- <from uri="direct:assumeRole"/>
- <to uri="aws2-sts://test?stsClient=#amazonStsClient&operation=assumeRole"/>
- <to uri="mock:result"/>
- </route>
- <route>
- <from uri="direct:getSessionToken"/>
- <to uri="aws2-sts://test?stsClient=#amazonStsClient&operation=getSessionToken"/>
- <to uri="mock:result"/>
- </route>
- <route>
- <from uri="direct:getFederationToken"/>
- <to uri="aws2-sts://test?stsClient=#amazonStsClient&operation=getFederationToken"/>
- <to uri="mock:result"/>
- </route>
- </camelContext>
-
- <bean id="amazonStsClient" class="org.apache.camel.component.aws2.sts.AmazonSTSClientMock"/>
-</beans>
\ No newline at end of file
diff --git a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2EventbridgeComponentBuilderFactory.java b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2EventbridgeComponentBuilderFactory.java
index 2eb1051..815a6ba 100644
--- a/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2EventbridgeComponentBuilderFactory.java
+++ b/core/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/Aws2EventbridgeComponentBuilderFactory.java
@@ -90,6 +90,18 @@ public interface Aws2EventbridgeComponentBuilderFactory {
return this;
}
/**
+ * EventPattern File.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ */
+ default Aws2EventbridgeComponentBuilder eventPatternFile(
+ java.lang.String eventPatternFile) {
+ doSetProperty("eventPatternFile", eventPatternFile);
+ 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
@@ -269,6 +281,7 @@ public interface Aws2EventbridgeComponentBuilderFactory {
case "autoDiscoverClient": getOrCreateConfiguration((EventbridgeComponent) component).setAutoDiscoverClient((boolean) value); return true;
case "configuration": ((EventbridgeComponent) component).setConfiguration((org.apache.camel.component.aws2.eventbridge.EventbridgeConfiguration) value); return true;
case "eventbridgeClient": getOrCreateConfiguration((EventbridgeComponent) component).setEventbridgeClient((software.amazon.awssdk.services.eventbridge.EventBridgeClient) value); return true;
+ case "eventPatternFile": getOrCreateConfiguration((EventbridgeComponent) component).setEventPatternFile((java.lang.String) value); return true;
case "lazyStartProducer": ((EventbridgeComponent) component).setLazyStartProducer((boolean) value); return true;
case "operation": getOrCreateConfiguration((EventbridgeComponent) component).setOperation((org.apache.camel.component.aws2.eventbridge.EvenbridgeOperations) value); return true;
case "pojoRequest": getOrCreateConfiguration((EventbridgeComponent) component).setPojoRequest((boolean) value); return true;
diff --git a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java
index c0f4dd4..6316c76 100644
--- a/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java
+++ b/core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/EventbridgeEndpointBuilderFactory.java
@@ -96,6 +96,18 @@ public interface EventbridgeEndpointBuilderFactory {
return this;
}
/**
+ * EventPattern File.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: producer
+ */
+ default EventbridgeEndpointBuilder eventPatternFile(
+ String eventPatternFile) {
+ doSetProperty("eventPatternFile", eventPatternFile);
+ 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