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

acosentino pushed a commit to branch CAMEL-20543-2
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 9ce9815137122d7e91863d64160bb34fe46495da
Author: Andrea Cosentino <[email protected]>
AuthorDate: Tue Mar 12 09:33:00 2024 +0100

    CAMEL-20543 - Camel-AWS-Bedrock-Agent: Support more operations on the 
producer side
    
    Signed-off-by: Andrea Cosentino <[email protected]>
---
 .../apache/camel/component/aws2/bedrock/agent/aws-bedrock-agent.json  | 4 ++--
 .../camel/component/aws2/bedrock/agent/BedrockAgentConstants.java     | 2 +-
 .../camel/component/aws2/bedrock/agent/BedrockAgentProducer.java      | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git 
a/components/camel-aws/camel-aws-bedrock/src/generated/resources/META-INF/org/apache/camel/component/aws2/bedrock/agent/aws-bedrock-agent.json
 
b/components/camel-aws/camel-aws-bedrock/src/generated/resources/META-INF/org/apache/camel/component/aws2/bedrock/agent/aws-bedrock-agent.json
index 5038d9dfe2a..b8860108341 100644
--- 
a/components/camel-aws/camel-aws-bedrock/src/generated/resources/META-INF/org/apache/camel/component/aws2/bedrock/agent/aws-bedrock-agent.json
+++ 
b/components/camel-aws/camel-aws-bedrock/src/generated/resources/META-INF/org/apache/camel/component/aws2/bedrock/agent/aws-bedrock-agent.json
@@ -27,7 +27,7 @@
     "dataSourceId": { "index": 1, "kind": "property", "displayName": "Data 
Source Id", "group": "common", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configurationField": "configuration", "description": "Define the Data source 
Id we are going to use" },
     "knowledgeBaseId": { "index": 2, "kind": "property", "displayName": 
"Knowledge Base Id", "group": "common", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configurationField": "configuration", "description": "Define the Knowledge 
Base Id we are going to use" },
     "modelId": { "index": 3, "kind": "property", "displayName": "Model Id", 
"group": "common", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "enum": [ "anthropic.claude-instant-v1", 
"anthropic.claude-v2", "anthropic.claude-v2:1" ], "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configurationField": "configuration", "descrip [...]
-    "operation": { "index": 4, "kind": "property", "displayName": "Operation", 
"group": "common", "label": "", "required": true, "type": "object", "javaType": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": 
[ "startIngestionJob", "listIngestionJobs" ], "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configurationField": "config [...]
+    "operation": { "index": 4, "kind": "property", "displayName": "Operation", 
"group": "common", "label": "", "required": true, "type": "object", "javaType": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": 
[ "startIngestionJob", "listIngestionJobs", "getIngestionJob" ], "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configura [...]
     "overrideEndpoint": { "index": 5, "kind": "property", "displayName": 
"Override Endpoint", "group": "common", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configurationField": "configuration", "description": "Set the need for 
overriding the endpoint. This option needs to be used i [...]
     "pojoRequest": { "index": 6, "kind": "property", "displayName": "Pojo 
Request", "group": "common", "label": "", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configurationField": "configuration", "description": "If we want to use a POJO 
request as body or not" },
     "profileCredentialsName": { "index": 7, "kind": "property", "displayName": 
"Profile Credentials Name", "group": "common", "label": "", "required": false, 
"type": "string", "javaType": "java.lang.String", "deprecated": false, 
"autowired": false, "secret": false, "defaultValue": "false", 
"configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configurationField": "configuration", "description": "If using a profile 
credentials provider, this par [...]
@@ -61,7 +61,7 @@
     "dataSourceId": { "index": 1, "kind": "parameter", "displayName": "Data 
Source Id", "group": "common", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configurationField": "configuration", "description": "Define the Data source 
Id we are going to use" },
     "knowledgeBaseId": { "index": 2, "kind": "parameter", "displayName": 
"Knowledge Base Id", "group": "common", "label": "", "required": false, "type": 
"string", "javaType": "java.lang.String", "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configurationField": "configuration", "description": "Define the Knowledge 
Base Id we are going to use" },
     "modelId": { "index": 3, "kind": "parameter", "displayName": "Model Id", 
"group": "common", "label": "", "required": true, "type": "string", "javaType": 
"java.lang.String", "enum": [ "anthropic.claude-instant-v1", 
"anthropic.claude-v2", "anthropic.claude-v2:1" ], "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configurationField": "configuration", "descri [...]
-    "operation": { "index": 4, "kind": "parameter", "displayName": 
"Operation", "group": "common", "label": "", "required": true, "type": 
"object", "javaType": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": 
[ "startIngestionJob", "listIngestionJobs" ], "deprecated": false, 
"deprecationNote": "", "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configurationField": "confi [...]
+    "operation": { "index": 4, "kind": "parameter", "displayName": 
"Operation", "group": "common", "label": "", "required": true, "type": 
"object", "javaType": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentOperations", "enum": 
[ "startIngestionJob", "listIngestionJobs", "getIngestionJob" ], "deprecated": 
false, "deprecationNote": "", "autowired": false, "secret": false, 
"configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configur [...]
     "overrideEndpoint": { "index": 5, "kind": "parameter", "displayName": 
"Override Endpoint", "group": "common", "label": "", "required": false, "type": 
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false, 
"secret": false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configurationField": "configuration", "description": "Set the need for 
overriding the endpoint. This option needs to be used  [...]
     "pojoRequest": { "index": 6, "kind": "parameter", "displayName": "Pojo 
Request", "group": "common", "label": "", "required": false, "type": "boolean", 
"javaType": "boolean", "deprecated": false, "autowired": false, "secret": 
false, "defaultValue": false, "configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configurationField": "configuration", "description": "If we want to use a POJO 
request as body or not" },
     "profileCredentialsName": { "index": 7, "kind": "parameter", 
"displayName": "Profile Credentials Name", "group": "common", "label": "", 
"required": false, "type": "string", "javaType": "java.lang.String", 
"deprecated": false, "autowired": false, "secret": false, "defaultValue": 
"false", "configurationClass": 
"org.apache.camel.component.aws2.bedrock.agent.BedrockAgentConfiguration", 
"configurationField": "configuration", "description": "If using a profile 
credentials provider, this pa [...]
diff --git 
a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConstants.java
 
b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConstants.java
index 2461c482e10..3fd88d8c9c8 100644
--- 
a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConstants.java
+++ 
b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentConstants.java
@@ -42,6 +42,6 @@ public interface BedrockAgentConstants {
     String INGESTION_JOB_STATUS = "CamelAwsBedrockAgentIngestionJobStatus";
 
     @Metadata(description = "The header contains the id of the ingestion job",
-            javaType = "String", label = "producer")
+              javaType = "String", label = "producer")
     String INGESTION_JOB_ID = "CamelAwsBedrockAgentIngestionJobId";
 }
diff --git 
a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducer.java
 
b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducer.java
index d74b9593258..0dc35211750 100644
--- 
a/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducer.java
+++ 
b/components/camel-aws/camel-aws-bedrock/src/main/java/org/apache/camel/component/aws2/bedrock/agent/BedrockAgentProducer.java
@@ -243,8 +243,8 @@ public class BedrockAgentProducer extends DefaultProducer {
     }
 
     private void prepareGetIngestionJobResponse(GetIngestionJobResponse 
result, Message message) {
-            message.setBody(result.ingestionJob().ingestionJobId());
-            message.setHeader(BedrockAgentConstants.INGESTION_JOB_STATUS, 
result.ingestionJob().status());
+        message.setBody(result.ingestionJob().ingestionJobId());
+        message.setHeader(BedrockAgentConstants.INGESTION_JOB_STATUS, 
result.ingestionJob().status());
     }
 
     public static Message getMessageForResponse(final Exchange exchange) {

Reply via email to