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
The following commit(s) were added to refs/heads/main by this push:
new 0d9ff406f411 CAMEL-23153 - Camel-Google: Add Google Cloud Vision AI
component (#21853)
0d9ff406f411 is described below
commit 0d9ff406f41109450b1e2cfa7e46dd0b78d10db0
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Mar 9 11:52:33 2026 +0100
CAMEL-23153 - Camel-Google: Add Google Cloud Vision AI component (#21853)
* CAMEL-23153 - Camel-Google: Add Google Cloud Vision AI component
Signed-off-by: Andrea Cosentino <[email protected]>
* CAMEL-23153 - Camel-Google: Add Google Cloud Vision AI component
Signed-off-by: Andrea Cosentino <[email protected]>
* CAMEL-23153 - Camel-Google: Add Google Cloud Vision AI component
Signed-off-by: Andrea Cosentino <[email protected]>
* CAMEL-23153: Clean up GoogleCloudVisionProducer
- Add error check in processPojo() (was missing unlike processImage())
- Use RuntimeCamelException instead of raw RuntimeException
- Use enhanced switch expressions (Java 21+)
- Use List.of() instead of ArrayList for single-element lists
- Remove unnecessary static getMessageForResponse() helper
- Make endpoint field final
Signed-off-by: Guillaume Nodet <[email protected]>
* CAMEL-23153: Remove redundant operationType parameter
The operation is already specified in the URI path (e.g.,
google-vision:labelDetection). Having a separate operationType
query parameter with the same purpose is confusing. Remove it
and simplify the producer's operation resolution.
Signed-off-by: Guillaume Nodet <[email protected]>
---------
Signed-off-by: Andrea Cosentino <[email protected]>
Signed-off-by: Guillaume Nodet <[email protected]>
Co-authored-by: Guillaume Nodet <[email protected]>
---
bom/camel-bom/pom.xml | 5 +
catalog/camel-allcomponents/pom.xml | 5 +
.../org/apache/camel/catalog/components.properties | 1 +
.../camel/catalog/components/google-vision.json | 42 +++
.../camel-google/camel-google-vision/pom.xml | 61 ++++
.../GoogleCloudVisionComponentConfigurer.java | 57 ++++
.../GoogleCloudVisionEndpointConfigurer.java | 77 +++++
.../GoogleCloudVisionEndpointUriFactory.java | 75 +++++
.../component/google/vision/google-vision.json | 42 +++
.../services/org/apache/camel/component.properties | 7 +
.../org/apache/camel/component/google-vision | 2 +
.../camel/configurer/google-vision-component | 2 +
.../apache/camel/configurer/google-vision-endpoint | 2 +
.../apache/camel/urifactory/google-vision-endpoint | 2 +
.../src/main/docs/google-vision-component.adoc | 259 +++++++++++++++++
.../vision/GoogleCloudVisionClientFactory.java | 47 +++
.../google/vision/GoogleCloudVisionComponent.java | 57 ++++
.../vision/GoogleCloudVisionConfiguration.java | 121 ++++++++
.../google/vision/GoogleCloudVisionConstants.java | 28 ++
.../google/vision/GoogleCloudVisionEndpoint.java | 108 +++++++
.../google/vision/GoogleCloudVisionOperations.java | 32 ++
.../google/vision/GoogleCloudVisionProducer.java | 155 ++++++++++
.../unit/GoogleCloudVisionComponentTest.java | 50 ++++
.../unit/GoogleCloudVisionConfigurationTest.java | 65 +++++
components/camel-google/pom.xml | 1 +
.../org/apache/camel/main/components.properties | 1 +
.../modules/ROOT/examples/json/google-vision.json | 1 +
docs/components/modules/ROOT/nav.adoc | 1 +
.../ROOT/pages/google-vision-component.adoc | 1 +
.../component/ComponentsBuilderFactory.java | 14 +
.../dsl/GoogleVisionComponentBuilderFactory.java | 122 ++++++++
.../builder/endpoint/EndpointBuilderFactory.java | 1 +
.../camel/builder/endpoint/EndpointBuilders.java | 1 +
.../builder/endpoint/StaticEndpointBuilders.java | 42 +++
.../GoogleCloudVisionEndpointBuilderFactory.java | 321 +++++++++++++++++++++
.../camel-component-known-dependencies.properties | 1 +
parent/pom.xml | 6 +
.../apache/camel/maven/packaging/MojoHelper.java | 3 +-
38 files changed, 1817 insertions(+), 1 deletion(-)
diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml
index bc4951b1c51f..e9d137156544 100644
--- a/bom/camel-bom/pom.xml
+++ b/bom/camel-bom/pom.xml
@@ -977,6 +977,11 @@
<artifactId>camel-google-vertexai</artifactId>
<version>4.19.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-google-vision</artifactId>
+ <version>4.19.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-grape</artifactId>
diff --git a/catalog/camel-allcomponents/pom.xml
b/catalog/camel-allcomponents/pom.xml
index a2f051c9c62f..97359d22feca 100644
--- a/catalog/camel-allcomponents/pom.xml
+++ b/catalog/camel-allcomponents/pom.xml
@@ -847,6 +847,11 @@
<artifactId>camel-google-vertexai</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-google-vision</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-grape</artifactId>
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
index 3941fb9b3055..ec3a84d7b477 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components.properties
@@ -139,6 +139,7 @@ google-sheets
google-sheets-stream
google-storage
google-vertexai
+google-vision
grape
graphql
grpc
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-vision.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-vision.json
new file mode 100644
index 000000000000..af92869f0e3e
--- /dev/null
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-vision.json
@@ -0,0 +1,42 @@
+{
+ "component": {
+ "kind": "component",
+ "name": "google-vision",
+ "title": "Google Cloud Vision",
+ "description": "Detect labels, text, faces, logos and more on images
through Google Cloud Vision API",
+ "deprecated": false,
+ "firstVersion": "4.19.0",
+ "label": "cloud,ai",
+ "javaType":
"org.apache.camel.component.google.vision.GoogleCloudVisionComponent",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-google-vision",
+ "version": "4.19.0-SNAPSHOT",
+ "scheme": "google-vision",
+ "extendsScheme": "",
+ "syntax": "google-vision:operation",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": true,
+ "lenientProperties": false,
+ "browsable": false,
+ "remote": true
+ },
+ "componentProperties": {
+ "lazyStartProducer": { "index": 0, "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 [...]
+ "autowiredEnabled": { "index": 1, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching t [...]
+ },
+ "headers": {
+ "GoogleCloudVisionOperation": { "index": 0, "kind": "header",
"displayName": "", "group": "producer", "label": "", "required": false,
"javaType":
"org.apache.camel.component.google.vision.GoogleCloudVisionOperations", "enum":
[ "labelDetection", "textDetection", "faceDetection", "landmarkDetection",
"logoDetection", "safeSearchDetection", "imagePropertiesDetection",
"webDetection", "objectLocalization", "cropHintsDetection",
"documentTextDetection" ], "deprecated": false, "deprecatio [...]
+ "GoogleCloudVisionResponseObject": { "index": 1, "kind": "header",
"displayName": "", "group": "producer", "label": "", "required": false,
"javaType": "com.google.cloud.vision.v1.AnnotateImageResponse", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The response object resulting from the Google Cloud Vision API
invocation", "constantName":
"org.apache.camel.component.google.vision.GoogleCloudVisionConstants#RESPONSE_OBJECT"
}
+ },
+ "properties": {
+ "operation": { "index": 0, "kind": "path", "displayName": "Operation",
"group": "common", "label": "common", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.google.vision.GoogleCloudVisionConfiguration",
"configurationField": "configuration", "description": "The operation name" },
+ "serviceAccountKey": { "index": 1, "kind": "parameter", "displayName":
"Service Account Key", "group": "common", "label": "common", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.google.vision.GoogleCloudVisionConfiguration",
"configurationField": "configuration", "description": "Service account key to
authenticate an application as a service account" },
+ "maxResults": { "index": 2, "kind": "parameter", "displayName": "Max
Results", "group": "producer", "label": "producer", "required": false, "type":
"integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.google.vision.GoogleCloudVisionConfiguration",
"configurationField": "configuration", "description": "The max number of
results to return per feature type. Default is unset (API default)." },
+ "pojoRequest": { "index": 3, "kind": "parameter", "displayName": "Pojo
Request", "group": "producer", "label": "", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.google.vision.GoogleCloudVisionConfiguration",
"configurationField": "configuration", "description": "Specifies if the request
is a pojo request" },
+ "lazyStartProducer": { "index": 4, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "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 produc [...]
+ "client": { "index": 5, "kind": "parameter", "displayName": "Client",
"group": "advanced", "label": "advanced", "required": false, "type": "object",
"javaType": "com.google.cloud.vision.v1.ImageAnnotatorClient", "deprecated":
false, "deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.google.vision.GoogleCloudVisionConfiguration",
"configurationField": "configuration", "description": "The client to use during
service invocation." }
+ }
+}
diff --git a/components/camel-google/camel-google-vision/pom.xml
b/components/camel-google/camel-google-vision/pom.xml
new file mode 100644
index 000000000000..2670bf924f91
--- /dev/null
+++ b/components/camel-google/camel-google-vision/pom.xml
@@ -0,0 +1,61 @@
+<?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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-google-parent</artifactId>
+ <version>4.19.0-SNAPSHOT</version>
+ </parent>
+ <artifactId>camel-google-vision</artifactId>
+ <packaging>jar</packaging>
+ <name>Camel :: Google :: Vision</name>
+ <description>Camel Component for Google Cloud Vision AI</description>
+ <properties>
+ <firstVersion>4.19.0</firstVersion>
+ <camel.surefire.forkTimeout>300</camel.surefire.forkTimeout>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-google-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-support</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.cloud</groupId>
+ <artifactId>google-cloud-vision</artifactId>
+ <version>${google-cloud-vision-version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>com.google.code.findbugs</groupId>
+ <artifactId>jsr305</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
diff --git
a/components/camel-google/camel-google-vision/src/generated/java/org/apache/camel/component/google/vision/GoogleCloudVisionComponentConfigurer.java
b/components/camel-google/camel-google-vision/src/generated/java/org/apache/camel/component/google/vision/GoogleCloudVisionComponentConfigurer.java
new file mode 100644
index 000000000000..99a6110666c4
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/generated/java/org/apache/camel/component/google/vision/GoogleCloudVisionComponentConfigurer.java
@@ -0,0 +1,57 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.google.vision;
+
+import javax.annotation.processing.Generated;
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
+@SuppressWarnings("unchecked")
+public class GoogleCloudVisionComponentConfigurer extends
PropertyConfigurerSupport implements GeneratedPropertyConfigurer,
PropertyConfigurerGetter {
+
+ @Override
+ public boolean configure(CamelContext camelContext, Object obj, String
name, Object value, boolean ignoreCase) {
+ GoogleCloudVisionComponent target = (GoogleCloudVisionComponent) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "autowiredenabled":
+ case "autowiredEnabled":
target.setAutowiredEnabled(property(camelContext, boolean.class, value));
return true;
+ case "lazystartproducer":
+ case "lazyStartProducer":
target.setLazyStartProducer(property(camelContext, boolean.class, value));
return true;
+ default: return false;
+ }
+ }
+
+ @Override
+ public Class<?> getOptionType(String name, boolean ignoreCase) {
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "autowiredenabled":
+ case "autowiredEnabled": return boolean.class;
+ case "lazystartproducer":
+ case "lazyStartProducer": return boolean.class;
+ default: return null;
+ }
+ }
+
+ @Override
+ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+ GoogleCloudVisionComponent target = (GoogleCloudVisionComponent) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "autowiredenabled":
+ case "autowiredEnabled": return target.isAutowiredEnabled();
+ case "lazystartproducer":
+ case "lazyStartProducer": return target.isLazyStartProducer();
+ default: return null;
+ }
+ }
+}
+
diff --git
a/components/camel-google/camel-google-vision/src/generated/java/org/apache/camel/component/google/vision/GoogleCloudVisionEndpointConfigurer.java
b/components/camel-google/camel-google-vision/src/generated/java/org/apache/camel/component/google/vision/GoogleCloudVisionEndpointConfigurer.java
new file mode 100644
index 000000000000..b9b77a67d66c
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/generated/java/org/apache/camel/component/google/vision/GoogleCloudVisionEndpointConfigurer.java
@@ -0,0 +1,77 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.google.vision;
+
+import javax.annotation.processing.Generated;
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.spi.ExtendedPropertyConfigurerGetter;
+import org.apache.camel.spi.PropertyConfigurerGetter;
+import org.apache.camel.spi.ConfigurerStrategy;
+import org.apache.camel.spi.GeneratedPropertyConfigurer;
+import org.apache.camel.util.CaseInsensitiveMap;
+import org.apache.camel.support.component.PropertyConfigurerSupport;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointSchemaGeneratorMojo")
+@SuppressWarnings("unchecked")
+public class GoogleCloudVisionEndpointConfigurer extends
PropertyConfigurerSupport implements GeneratedPropertyConfigurer,
PropertyConfigurerGetter {
+
+ @Override
+ public boolean configure(CamelContext camelContext, Object obj, String
name, Object value, boolean ignoreCase) {
+ GoogleCloudVisionEndpoint target = (GoogleCloudVisionEndpoint) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "client":
target.getConfiguration().setClient(property(camelContext,
com.google.cloud.vision.v1.ImageAnnotatorClient.class, value)); return true;
+ case "lazystartproducer":
+ case "lazyStartProducer":
target.setLazyStartProducer(property(camelContext, boolean.class, value));
return true;
+ case "maxresults":
+ case "maxResults":
target.getConfiguration().setMaxResults(property(camelContext,
java.lang.Integer.class, value)); return true;
+ case "pojorequest":
+ case "pojoRequest":
target.getConfiguration().setPojoRequest(property(camelContext, boolean.class,
value)); return true;
+ case "serviceaccountkey":
+ case "serviceAccountKey":
target.getConfiguration().setServiceAccountKey(property(camelContext,
java.lang.String.class, value)); return true;
+ default: return false;
+ }
+ }
+
+ @Override
+ public String[] getAutowiredNames() {
+ return new String[]{"client"};
+ }
+
+ @Override
+ public Class<?> getOptionType(String name, boolean ignoreCase) {
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "client": return
com.google.cloud.vision.v1.ImageAnnotatorClient.class;
+ case "lazystartproducer":
+ case "lazyStartProducer": return boolean.class;
+ case "maxresults":
+ case "maxResults": return java.lang.Integer.class;
+ case "pojorequest":
+ case "pojoRequest": return boolean.class;
+ case "serviceaccountkey":
+ case "serviceAccountKey": return java.lang.String.class;
+ default: return null;
+ }
+ }
+
+ @Override
+ public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
+ GoogleCloudVisionEndpoint target = (GoogleCloudVisionEndpoint) obj;
+ switch (ignoreCase ? name.toLowerCase() : name) {
+ case "client": return target.getConfiguration().getClient();
+ case "lazystartproducer":
+ case "lazyStartProducer": return target.isLazyStartProducer();
+ case "maxresults":
+ case "maxResults": return target.getConfiguration().getMaxResults();
+ case "pojorequest":
+ case "pojoRequest": return target.getConfiguration().isPojoRequest();
+ case "serviceaccountkey":
+ case "serviceAccountKey": return
target.getConfiguration().getServiceAccountKey();
+ default: return null;
+ }
+ }
+}
+
diff --git
a/components/camel-google/camel-google-vision/src/generated/java/org/apache/camel/component/google/vision/GoogleCloudVisionEndpointUriFactory.java
b/components/camel-google/camel-google-vision/src/generated/java/org/apache/camel/component/google/vision/GoogleCloudVisionEndpointUriFactory.java
new file mode 100644
index 000000000000..0bc9b4882f1f
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/generated/java/org/apache/camel/component/google/vision/GoogleCloudVisionEndpointUriFactory.java
@@ -0,0 +1,75 @@
+/* Generated by camel build tools - do NOT edit this file! */
+package org.apache.camel.component.google.vision;
+
+import javax.annotation.processing.Generated;
+import java.net.URISyntaxException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.camel.spi.EndpointUriFactory;
+
+/**
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.GenerateEndpointUriFactoryMojo")
+public class GoogleCloudVisionEndpointUriFactory extends
org.apache.camel.support.component.EndpointUriFactorySupport implements
EndpointUriFactory {
+
+ private static final String BASE = ":operation";
+
+ private static final Set<String> PROPERTY_NAMES;
+ private static final Set<String> SECRET_PROPERTY_NAMES;
+ private static final Map<String, String> MULTI_VALUE_PREFIXES;
+ static {
+ Set<String> props = new HashSet<>(6);
+ props.add("client");
+ props.add("lazyStartProducer");
+ props.add("maxResults");
+ props.add("operation");
+ props.add("pojoRequest");
+ props.add("serviceAccountKey");
+ PROPERTY_NAMES = Collections.unmodifiableSet(props);
+ SECRET_PROPERTY_NAMES = Collections.emptySet();
+ MULTI_VALUE_PREFIXES = Collections.emptyMap();
+ }
+
+ @Override
+ public boolean isEnabled(String scheme) {
+ return "google-vision".equals(scheme);
+ }
+
+ @Override
+ public String buildUri(String scheme, Map<String, Object> properties,
boolean encode) throws URISyntaxException {
+ String syntax = scheme + BASE;
+ String uri = syntax;
+
+ Map<String, Object> copy = new HashMap<>(properties);
+
+ uri = buildPathParameter(syntax, uri, "operation", null, true, copy);
+ uri = buildQueryParameters(uri, copy, encode);
+ return uri;
+ }
+
+ @Override
+ public Set<String> propertyNames() {
+ return PROPERTY_NAMES;
+ }
+
+ @Override
+ public Set<String> secretPropertyNames() {
+ return SECRET_PROPERTY_NAMES;
+ }
+
+ @Override
+ public Map<String, String> multiValuePrefixes() {
+ return MULTI_VALUE_PREFIXES;
+ }
+
+ @Override
+ public boolean isLenientProperties() {
+ return false;
+ }
+}
+
diff --git
a/components/camel-google/camel-google-vision/src/generated/resources/META-INF/org/apache/camel/component/google/vision/google-vision.json
b/components/camel-google/camel-google-vision/src/generated/resources/META-INF/org/apache/camel/component/google/vision/google-vision.json
new file mode 100644
index 000000000000..af92869f0e3e
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/generated/resources/META-INF/org/apache/camel/component/google/vision/google-vision.json
@@ -0,0 +1,42 @@
+{
+ "component": {
+ "kind": "component",
+ "name": "google-vision",
+ "title": "Google Cloud Vision",
+ "description": "Detect labels, text, faces, logos and more on images
through Google Cloud Vision API",
+ "deprecated": false,
+ "firstVersion": "4.19.0",
+ "label": "cloud,ai",
+ "javaType":
"org.apache.camel.component.google.vision.GoogleCloudVisionComponent",
+ "supportLevel": "Preview",
+ "groupId": "org.apache.camel",
+ "artifactId": "camel-google-vision",
+ "version": "4.19.0-SNAPSHOT",
+ "scheme": "google-vision",
+ "extendsScheme": "",
+ "syntax": "google-vision:operation",
+ "async": false,
+ "api": false,
+ "consumerOnly": false,
+ "producerOnly": true,
+ "lenientProperties": false,
+ "browsable": false,
+ "remote": true
+ },
+ "componentProperties": {
+ "lazyStartProducer": { "index": 0, "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 [...]
+ "autowiredEnabled": { "index": 1, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching t [...]
+ },
+ "headers": {
+ "GoogleCloudVisionOperation": { "index": 0, "kind": "header",
"displayName": "", "group": "producer", "label": "", "required": false,
"javaType":
"org.apache.camel.component.google.vision.GoogleCloudVisionOperations", "enum":
[ "labelDetection", "textDetection", "faceDetection", "landmarkDetection",
"logoDetection", "safeSearchDetection", "imagePropertiesDetection",
"webDetection", "objectLocalization", "cropHintsDetection",
"documentTextDetection" ], "deprecated": false, "deprecatio [...]
+ "GoogleCloudVisionResponseObject": { "index": 1, "kind": "header",
"displayName": "", "group": "producer", "label": "", "required": false,
"javaType": "com.google.cloud.vision.v1.AnnotateImageResponse", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The response object resulting from the Google Cloud Vision API
invocation", "constantName":
"org.apache.camel.component.google.vision.GoogleCloudVisionConstants#RESPONSE_OBJECT"
}
+ },
+ "properties": {
+ "operation": { "index": 0, "kind": "path", "displayName": "Operation",
"group": "common", "label": "common", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.google.vision.GoogleCloudVisionConfiguration",
"configurationField": "configuration", "description": "The operation name" },
+ "serviceAccountKey": { "index": 1, "kind": "parameter", "displayName":
"Service Account Key", "group": "common", "label": "common", "required": false,
"type": "string", "javaType": "java.lang.String", "deprecated": false,
"autowired": false, "secret": false, "configurationClass":
"org.apache.camel.component.google.vision.GoogleCloudVisionConfiguration",
"configurationField": "configuration", "description": "Service account key to
authenticate an application as a service account" },
+ "maxResults": { "index": 2, "kind": "parameter", "displayName": "Max
Results", "group": "producer", "label": "producer", "required": false, "type":
"integer", "javaType": "java.lang.Integer", "deprecated": false, "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.google.vision.GoogleCloudVisionConfiguration",
"configurationField": "configuration", "description": "The max number of
results to return per feature type. Default is unset (API default)." },
+ "pojoRequest": { "index": 3, "kind": "parameter", "displayName": "Pojo
Request", "group": "producer", "label": "", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.google.vision.GoogleCloudVisionConfiguration",
"configurationField": "configuration", "description": "Specifies if the request
is a pojo request" },
+ "lazyStartProducer": { "index": 4, "kind": "parameter", "displayName":
"Lazy Start Producer", "group": "producer (advanced)", "label":
"producer,advanced", "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 produc [...]
+ "client": { "index": 5, "kind": "parameter", "displayName": "Client",
"group": "advanced", "label": "advanced", "required": false, "type": "object",
"javaType": "com.google.cloud.vision.v1.ImageAnnotatorClient", "deprecated":
false, "deprecationNote": "", "autowired": true, "secret": false,
"configurationClass":
"org.apache.camel.component.google.vision.GoogleCloudVisionConfiguration",
"configurationField": "configuration", "description": "The client to use during
service invocation." }
+ }
+}
diff --git
a/components/camel-google/camel-google-vision/src/generated/resources/META-INF/services/org/apache/camel/component.properties
b/components/camel-google/camel-google-vision/src/generated/resources/META-INF/services/org/apache/camel/component.properties
new file mode 100644
index 000000000000..be9aafd4a442
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/generated/resources/META-INF/services/org/apache/camel/component.properties
@@ -0,0 +1,7 @@
+# Generated by camel build tools - do NOT edit this file!
+components=google-vision
+groupId=org.apache.camel
+artifactId=camel-google-vision
+version=4.19.0-SNAPSHOT
+projectName=Camel :: Google :: Vision
+projectDescription=Camel Component for Google Cloud Vision AI
diff --git
a/components/camel-google/camel-google-vision/src/generated/resources/META-INF/services/org/apache/camel/component/google-vision
b/components/camel-google/camel-google-vision/src/generated/resources/META-INF/services/org/apache/camel/component/google-vision
new file mode 100644
index 000000000000..54c67cd9ebbe
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/generated/resources/META-INF/services/org/apache/camel/component/google-vision
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.google.vision.GoogleCloudVisionComponent
diff --git
a/components/camel-google/camel-google-vision/src/generated/resources/META-INF/services/org/apache/camel/configurer/google-vision-component
b/components/camel-google/camel-google-vision/src/generated/resources/META-INF/services/org/apache/camel/configurer/google-vision-component
new file mode 100644
index 000000000000..30f432566a94
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/generated/resources/META-INF/services/org/apache/camel/configurer/google-vision-component
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.google.vision.GoogleCloudVisionComponentConfigurer
diff --git
a/components/camel-google/camel-google-vision/src/generated/resources/META-INF/services/org/apache/camel/configurer/google-vision-endpoint
b/components/camel-google/camel-google-vision/src/generated/resources/META-INF/services/org/apache/camel/configurer/google-vision-endpoint
new file mode 100644
index 000000000000..e3e3e823f879
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/generated/resources/META-INF/services/org/apache/camel/configurer/google-vision-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.google.vision.GoogleCloudVisionEndpointConfigurer
diff --git
a/components/camel-google/camel-google-vision/src/generated/resources/META-INF/services/org/apache/camel/urifactory/google-vision-endpoint
b/components/camel-google/camel-google-vision/src/generated/resources/META-INF/services/org/apache/camel/urifactory/google-vision-endpoint
new file mode 100644
index 000000000000..121a03f926c4
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/generated/resources/META-INF/services/org/apache/camel/urifactory/google-vision-endpoint
@@ -0,0 +1,2 @@
+# Generated by camel build tools - do NOT edit this file!
+class=org.apache.camel.component.google.vision.GoogleCloudVisionEndpointUriFactory
diff --git
a/components/camel-google/camel-google-vision/src/main/docs/google-vision-component.adoc
b/components/camel-google/camel-google-vision/src/main/docs/google-vision-component.adoc
new file mode 100644
index 000000000000..d00bd8824a16
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/main/docs/google-vision-component.adoc
@@ -0,0 +1,259 @@
+= Google Cloud Vision Component
+:doctitle: Google Cloud Vision
+:shortname: google-vision
+:artifactid: camel-google-vision
+:description: Detect labels, text, faces, logos and more on images through
Google Cloud Vision API
+:since: 4.19
+:supportlevel: Preview
+:tabs-sync-option:
+:component-header: Only producer is supported
+//Manually maintained attributes
+:group: Google
+:camel-spring-boot-name: google-vision
+
+*Since Camel {since}*
+
+*{component-header}*
+
+The Google Cloud Vision component provides access to
https://cloud.google.com/vision[Google Cloud Vision API] via
+the https://github.com/googleapis/java-cloud-vision[Google Cloud Vision Client
for Java].
+
+Maven users will need to add the following dependency to their pom.xml
+for this component:
+
+[source,xml]
+------------------------------------------------------
+<dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-google-vision</artifactId>
+ <!-- use the same version as your Camel core version -->
+ <version>x.x.x</version>
+</dependency>
+------------------------------------------------------
+
+[[GoogleVision-AuthenticationConfiguration]]
+
+== Authentication Configuration
+
+Google Cloud Vision component authentication is targeted for use with the GCP
Service Accounts.
+For more information, please refer to
https://github.com/googleapis/google-cloud-java#authentication[Google Cloud
Authentication].
+
+When you have the **service account key**, you can provide authentication
credentials to your application code.
+Google security credentials can be set through the component endpoint:
+
+[source,java]
+--------------------------------------------------------
+String endpoint =
"google-vision://labelDetection?serviceAccountKey=/home/user/Downloads/my-key.json";
+--------------------------------------------------------
+
+Or by setting the environment variable `GOOGLE_APPLICATION_CREDENTIALS` :
+
+--------------------------------------------------------
+export GOOGLE_APPLICATION_CREDENTIALS="/home/user/Downloads/my-key.json"
+--------------------------------------------------------
+
+
+== URI Format
+
+--------------------------------------------------------
+google-vision://operation[?options]
+--------------------------------------------------------
+
+You can append query options to the URI in the following format,
+`?options=value&option2=value&...`
+
+For example, in order to perform label detection on an image, use the
following snippet:
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:start")
+
.to("google-vision://labelDetection?serviceAccountKey=/home/user/Downloads/my-key.json");
+--------------------------------------------------------------------------------
+
+
+
+// component options: START
+include::partial$component-configure-options.adoc[]
+include::partial$component-endpoint-options.adoc[]
+include::partial$component-endpoint-headers.adoc[]
+// component options: END
+
+
+== Usage
+
+=== Message body
+
+The message body should contain the image data as a `byte[]`.
+
+When `pojoRequest=true`, the body should be a
`com.google.cloud.vision.v1.AnnotateImageRequest` instance instead.
+
+=== Google Cloud Vision Producer operations
+
+Google Cloud Vision component provides the following operation on the producer
side:
+
+- labelDetection
+- textDetection
+- documentTextDetection
+- faceDetection
+- landmarkDetection
+- logoDetection
+- safeSearchDetection
+- imagePropertiesDetection
+- webDetection
+- objectLocalization
+- cropHintsDetection
+
+The operation is specified as part of the endpoint URI (e.g.,
`google-vision://labelDetection`).
+You can override the operation at runtime by setting the
`GoogleCloudVisionOperation` message header.
+
+=== Advanced component configuration
+
+If you need to have more control over the `ImageAnnotatorClient` instance
configuration, you can create your own instance and refer to it in your Camel
google-vision component configuration:
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:start")
+ .to("google-vision://labelDetection?client=#myVisionClient");
+--------------------------------------------------------------------------------
+
+=== Google Cloud Vision Producer Operation examples
+
+- `labelDetection`: this operation detects labels in an image
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:start")
+ .process(exchange -> {
+ byte[] imageData = Files.readAllBytes(Path.of("/path/to/image.jpg"));
+ exchange.getIn().setBody(imageData);
+ })
+
.to("google-vision://labelDetection?serviceAccountKey=/home/user/Downloads/my-key.json&maxResults=10")
+ .log("body:${body}")
+ .to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation will return a `List<EntityAnnotation>` with the detected labels.
+
+- `textDetection`: this operation extracts text from an image (OCR)
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:start")
+ .process(exchange -> {
+ byte[] imageData =
Files.readAllBytes(Path.of("/path/to/document.png"));
+ exchange.getIn().setBody(imageData);
+ })
+
.to("google-vision://textDetection?serviceAccountKey=/home/user/Downloads/my-key.json")
+ .log("body:${body}")
+ .to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation will return a `List<EntityAnnotation>` with the detected text.
+
+- `faceDetection`: this operation detects faces in an image
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:start")
+ .process(exchange -> {
+ byte[] imageData = Files.readAllBytes(Path.of("/path/to/photo.jpg"));
+ exchange.getIn().setBody(imageData);
+ })
+
.to("google-vision://faceDetection?serviceAccountKey=/home/user/Downloads/my-key.json")
+ .log("body:${body}")
+ .to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation will return a `List<FaceAnnotation>` with the detected faces.
+
+- `safeSearchDetection`: this operation detects explicit content
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:start")
+ .process(exchange -> {
+ byte[] imageData = Files.readAllBytes(Path.of("/path/to/image.jpg"));
+ exchange.getIn().setBody(imageData);
+ })
+
.to("google-vision://safeSearchDetection?serviceAccountKey=/home/user/Downloads/my-key.json")
+ .log("body:${body}")
+ .to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation will return a `SafeSearchAnnotation` with likelihood ratings
for adult, spoof, medical, violence and racy content.
+
+- `objectLocalization`: this operation detects and localizes objects
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:start")
+ .process(exchange -> {
+ byte[] imageData = Files.readAllBytes(Path.of("/path/to/image.jpg"));
+ exchange.getIn().setBody(imageData);
+ })
+
.to("google-vision://objectLocalization?serviceAccountKey=/home/user/Downloads/my-key.json")
+ .log("body:${body}")
+ .to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation will return a `List<LocalizedObjectAnnotation>` with detected
objects and their bounding polygons.
+
+- `webDetection`: this operation finds web references and visually similar
images
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:start")
+ .process(exchange -> {
+ byte[] imageData = Files.readAllBytes(Path.of("/path/to/image.jpg"));
+ exchange.getIn().setBody(imageData);
+ })
+
.to("google-vision://webDetection?serviceAccountKey=/home/user/Downloads/my-key.json")
+ .log("body:${body}")
+ .to("mock:result");
+--------------------------------------------------------------------------------
+
+This operation will return a `WebDetection` with matching pages, images and
best guess labels.
+
+- Using POJO request for full control:
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:start")
+ .process(exchange -> {
+ Image image = Image.newBuilder()
+ .setContent(ByteString.copyFrom(imageData))
+ .build();
+ Feature feature = Feature.newBuilder()
+ .setType(Feature.Type.LABEL_DETECTION)
+ .setMaxResults(5)
+ .build();
+ AnnotateImageRequest request = AnnotateImageRequest.newBuilder()
+ .addFeatures(feature)
+ .setImage(image)
+ .build();
+ exchange.getIn().setBody(request);
+ })
+
.to("google-vision://labelDetection?serviceAccountKey=/home/user/Downloads/my-key.json&pojoRequest=true")
+ .log("body:${body}")
+ .to("mock:result");
+--------------------------------------------------------------------------------
+
+When using `pojoRequest=true`, the body should be an `AnnotateImageRequest`
and the full `AnnotateImageResponse` is returned.
+
+- Overriding the operation at runtime via header:
+
+[source,java]
+--------------------------------------------------------------------------------
+from("direct:start")
+ .process(exchange -> {
+ byte[] imageData = Files.readAllBytes(Path.of("/path/to/image.jpg"));
+ exchange.getIn().setBody(imageData);
+ exchange.getIn().setHeader(GoogleCloudVisionConstants.OPERATION,
GoogleCloudVisionOperations.logoDetection);
+ })
+
.to("google-vision://labelDetection?serviceAccountKey=/home/user/Downloads/my-key.json")
+ .log("body:${body}")
+ .to("mock:result");
+--------------------------------------------------------------------------------
+
+
+include::spring-boot:partial$starter.adoc[]
diff --git
a/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionClientFactory.java
b/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionClientFactory.java
new file mode 100644
index 000000000000..7522b8f03e87
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionClientFactory.java
@@ -0,0 +1,47 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.google.vision;
+
+import com.google.api.gax.core.FixedCredentialsProvider;
+import com.google.auth.Credentials;
+import com.google.cloud.vision.v1.ImageAnnotatorClient;
+import com.google.cloud.vision.v1.ImageAnnotatorSettings;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.google.common.GoogleCredentialsHelper;
+
+public final class GoogleCloudVisionClientFactory {
+
+ private GoogleCloudVisionClientFactory() {
+ }
+
+ public static ImageAnnotatorClient create(
+ CamelContext context,
+ GoogleCloudVisionConfiguration configuration)
+ throws Exception {
+
+ Credentials credentials =
GoogleCredentialsHelper.getCredentials(context, configuration);
+
+ if (credentials != null) {
+ ImageAnnotatorSettings settings =
ImageAnnotatorSettings.newBuilder()
+
.setCredentialsProvider(FixedCredentialsProvider.create(credentials)).build();
+ return ImageAnnotatorClient.create(settings);
+ } else {
+ ImageAnnotatorSettings settings =
ImageAnnotatorSettings.newBuilder().build();
+ return ImageAnnotatorClient.create(settings);
+ }
+ }
+}
diff --git
a/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionComponent.java
b/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionComponent.java
new file mode 100644
index 000000000000..9ee6fc95b802
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionComponent.java
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.google.vision;
+
+import java.util.Map;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Endpoint;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.annotations.Component;
+import org.apache.camel.support.DefaultComponent;
+
+@Component("google-vision")
+public class GoogleCloudVisionComponent extends DefaultComponent {
+
+ @Metadata
+ private GoogleCloudVisionConfiguration configuration = new
GoogleCloudVisionConfiguration();
+
+ public GoogleCloudVisionComponent() {
+ }
+
+ public GoogleCloudVisionComponent(CamelContext context) {
+ super(context);
+ }
+
+ @Override
+ protected Endpoint createEndpoint(String uri, String remaining,
Map<String, Object> parameters) throws Exception {
+ if (remaining == null || remaining.isBlank()) {
+ throw new IllegalArgumentException("Operation must be specified.");
+ }
+ final GoogleCloudVisionConfiguration configurationCopy
+ = this.configuration != null ? this.configuration.copy() : new
GoogleCloudVisionConfiguration();
+ configurationCopy.setOperation(remaining);
+
+ Endpoint endpoint = new GoogleCloudVisionEndpoint(uri, this,
configurationCopy);
+ setProperties(endpoint, parameters);
+ return endpoint;
+ }
+
+ public GoogleCloudVisionConfiguration getConfiguration() {
+ return configuration;
+ }
+}
diff --git
a/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionConfiguration.java
b/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionConfiguration.java
new file mode 100644
index 000000000000..884a45041fe5
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionConfiguration.java
@@ -0,0 +1,121 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.google.vision;
+
+import com.google.cloud.vision.v1.ImageAnnotatorClient;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.component.google.common.GoogleCommonConfiguration;
+import org.apache.camel.spi.Metadata;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.spi.UriParams;
+import org.apache.camel.spi.UriPath;
+
+@UriParams
+public class GoogleCloudVisionConfiguration implements Cloneable,
GoogleCommonConfiguration {
+
+ @UriPath(label = "common", description = "The operation name")
+ @Metadata(required = true)
+ private String operation;
+
+ @UriParam(label = "common", description = "Service account key to
authenticate an application as a service account")
+ private String serviceAccountKey;
+
+ @UriParam(label = "producer",
+ description = "The max number of results to return per feature
type. Default is unset (API default).")
+ private Integer maxResults;
+
+ @UriParam(defaultValue = "false", description = "Specifies if the request
is a pojo request")
+ private boolean pojoRequest;
+
+ @UriParam(label = "advanced")
+ @Metadata(autowired = true)
+ private ImageAnnotatorClient client;
+
+ public String getOperation() {
+ return operation;
+ }
+
+ /**
+ * Set the operation name
+ *
+ * @param operation
+ */
+ public void setOperation(String operation) {
+ this.operation = operation;
+ }
+
+ @Override
+ public String getServiceAccountKey() {
+ return serviceAccountKey;
+ }
+
+ /**
+ * Service account key
+ *
+ * @param serviceAccountKey
+ */
+ public void setServiceAccountKey(String serviceAccountKey) {
+ this.serviceAccountKey = serviceAccountKey;
+ }
+
+ public Integer getMaxResults() {
+ return maxResults;
+ }
+
+ /**
+ * Max results to return per feature type.
+ *
+ * @param maxResults
+ */
+ public void setMaxResults(Integer maxResults) {
+ this.maxResults = maxResults;
+ }
+
+ public ImageAnnotatorClient getClient() {
+ return client;
+ }
+
+ /**
+ * The client to use during service invocation.
+ *
+ * @param client
+ */
+ public void setClient(ImageAnnotatorClient client) {
+ this.client = client;
+ }
+
+ public boolean isPojoRequest() {
+ return pojoRequest;
+ }
+
+ /**
+ * Configure the input type. If true the message will be POJO type.
+ *
+ * @param pojoRequest
+ */
+ public void setPojoRequest(boolean pojoRequest) {
+ this.pojoRequest = pojoRequest;
+ }
+
+ public GoogleCloudVisionConfiguration copy() {
+ try {
+ return (GoogleCloudVisionConfiguration) super.clone();
+ } catch (CloneNotSupportedException e) {
+ throw new RuntimeCamelException(e);
+ }
+ }
+}
diff --git
a/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionConstants.java
b/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionConstants.java
new file mode 100644
index 000000000000..25432c4402c6
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionConstants.java
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.google.vision;
+
+import org.apache.camel.spi.Metadata;
+
+public interface GoogleCloudVisionConstants {
+ @Metadata(description = "The operation to perform",
+ javaType =
"org.apache.camel.component.google.vision.GoogleCloudVisionOperations")
+ String OPERATION = "GoogleCloudVisionOperation";
+ @Metadata(description = "The response object resulting from the Google
Cloud Vision API invocation",
+ javaType = "com.google.cloud.vision.v1.AnnotateImageResponse")
+ String RESPONSE_OBJECT = "GoogleCloudVisionResponseObject";
+}
diff --git
a/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionEndpoint.java
b/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionEndpoint.java
new file mode 100644
index 000000000000..d1639ade92dd
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionEndpoint.java
@@ -0,0 +1,108 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.google.vision;
+
+import com.google.cloud.vision.v1.ImageAnnotatorClient;
+import org.apache.camel.Category;
+import org.apache.camel.Consumer;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
+import org.apache.camel.spi.EndpointServiceLocation;
+import org.apache.camel.spi.UriEndpoint;
+import org.apache.camel.spi.UriParam;
+import org.apache.camel.support.DefaultEndpoint;
+import org.apache.camel.util.ObjectHelper;
+
+/**
+ * Detect labels, text, faces, logos and more on images through Google Cloud
Vision API
+ */
+@UriEndpoint(firstVersion = "4.19.0", scheme = "google-vision", title =
"Google Cloud Vision",
+ syntax = "google-vision:operation", category = {
+ Category.CLOUD, Category.AI },
+ producerOnly = true, headersClass =
GoogleCloudVisionConstants.class)
+public class GoogleCloudVisionEndpoint extends DefaultEndpoint implements
EndpointServiceLocation {
+
+ @UriParam
+ private GoogleCloudVisionConfiguration configuration;
+
+ private ImageAnnotatorClient visionClient;
+
+ public GoogleCloudVisionEndpoint(String uri, GoogleCloudVisionComponent
component,
+ GoogleCloudVisionConfiguration
configuration) {
+ super(uri, component);
+ this.configuration = configuration;
+ }
+
+ @Override
+ public Producer createProducer() throws Exception {
+ return new GoogleCloudVisionProducer(this);
+ }
+
+ @Override
+ public Consumer createConsumer(Processor processor) throws Exception {
+ throw new UnsupportedOperationException(
+ "Cannot consume from the google-vision endpoint: " +
getEndpointUri());
+ }
+
+ public GoogleCloudVisionConfiguration getConfiguration() {
+ return configuration;
+ }
+
+ /**
+ * Set the endpoint configuration.
+ *
+ * @param configuration
+ */
+ public void setConfiguration(GoogleCloudVisionConfiguration configuration)
{
+ this.configuration = configuration;
+ }
+
+ @Override
+ protected void doStart() throws Exception {
+ super.doStart();
+ if (configuration.getClient() != null) {
+ visionClient = configuration.getClient();
+ } else {
+ visionClient =
GoogleCloudVisionClientFactory.create(this.getCamelContext(), configuration);
+ }
+ }
+
+ @Override
+ protected void doStop() throws Exception {
+ super.doStop();
+ if (configuration.getClient() == null && visionClient != null) {
+ visionClient.close();
+ }
+ }
+
+ public ImageAnnotatorClient getClient() {
+ return visionClient;
+ }
+
+ @Override
+ public String getServiceUrl() {
+ if (ObjectHelper.isNotEmpty(configuration.getOperation())) {
+ return getServiceProtocol() + ":" + configuration.getOperation();
+ }
+ return null;
+ }
+
+ @Override
+ public String getServiceProtocol() {
+ return "vision";
+ }
+}
diff --git
a/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionOperations.java
b/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionOperations.java
new file mode 100644
index 000000000000..75633ba8f72f
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionOperations.java
@@ -0,0 +1,32 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.google.vision;
+
+public enum GoogleCloudVisionOperations {
+
+ labelDetection,
+ textDetection,
+ faceDetection,
+ landmarkDetection,
+ logoDetection,
+ safeSearchDetection,
+ imagePropertiesDetection,
+ webDetection,
+ objectLocalization,
+ cropHintsDetection,
+ documentTextDetection;
+}
diff --git
a/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionProducer.java
b/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionProducer.java
new file mode 100644
index 000000000000..39d892888b71
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/main/java/org/apache/camel/component/google/vision/GoogleCloudVisionProducer.java
@@ -0,0 +1,155 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.google.vision;
+
+import java.util.List;
+
+import com.google.cloud.vision.v1.AnnotateImageRequest;
+import com.google.cloud.vision.v1.AnnotateImageResponse;
+import com.google.cloud.vision.v1.BatchAnnotateImagesResponse;
+import com.google.cloud.vision.v1.Feature;
+import com.google.cloud.vision.v1.Image;
+import com.google.cloud.vision.v1.ImageAnnotatorClient;
+import com.google.protobuf.ByteString;
+import org.apache.camel.Exchange;
+import org.apache.camel.InvalidPayloadException;
+import org.apache.camel.Message;
+import org.apache.camel.RuntimeCamelException;
+import org.apache.camel.support.DefaultProducer;
+
+public class GoogleCloudVisionProducer extends DefaultProducer {
+
+ private final GoogleCloudVisionEndpoint endpoint;
+
+ public GoogleCloudVisionProducer(GoogleCloudVisionEndpoint endpoint) {
+ super(endpoint);
+ this.endpoint = endpoint;
+ }
+
+ @Override
+ public void process(final Exchange exchange) throws Exception {
+ if (getConfiguration().isPojoRequest()) {
+ processPojo(exchange);
+ } else {
+ processImage(exchange);
+ }
+ }
+
+ private void processPojo(Exchange exchange) throws InvalidPayloadException
{
+ ImageAnnotatorClient client = endpoint.getClient();
+ AnnotateImageRequest request =
exchange.getIn().getMandatoryBody(AnnotateImageRequest.class);
+
+ BatchAnnotateImagesResponse batchResponse =
client.batchAnnotateImages(List.of(request));
+ AnnotateImageResponse response = batchResponse.getResponses(0);
+
+ if (response.hasError()) {
+ throw new RuntimeCamelException(
+ "Google Cloud Vision API error: " +
response.getError().getMessage());
+ }
+
+ Message message = exchange.getMessage();
+ message.setHeader(GoogleCloudVisionConstants.RESPONSE_OBJECT,
response);
+ message.setBody(response);
+ }
+
+ private void processImage(Exchange exchange) throws
InvalidPayloadException {
+ ImageAnnotatorClient client = endpoint.getClient();
+ GoogleCloudVisionOperations operation = determineOperation(exchange);
+
+ byte[] imageData = exchange.getIn().getMandatoryBody(byte[].class);
+
+ Image image = Image.newBuilder()
+ .setContent(ByteString.copyFrom(imageData))
+ .build();
+
+ Feature.Builder featureBuilder = Feature.newBuilder()
+ .setType(mapOperationToFeatureType(operation));
+
+ if (getConfiguration().getMaxResults() != null) {
+ featureBuilder.setMaxResults(getConfiguration().getMaxResults());
+ }
+
+ AnnotateImageRequest request = AnnotateImageRequest.newBuilder()
+ .addFeatures(featureBuilder.build())
+ .setImage(image)
+ .build();
+
+ BatchAnnotateImagesResponse batchResponse =
client.batchAnnotateImages(List.of(request));
+ AnnotateImageResponse response = batchResponse.getResponses(0);
+
+ if (response.hasError()) {
+ throw new RuntimeCamelException(
+ "Google Cloud Vision API error: " +
response.getError().getMessage());
+ }
+
+ Message message = exchange.getMessage();
+ message.setHeader(GoogleCloudVisionConstants.RESPONSE_OBJECT,
response);
+ message.setBody(extractResult(response, operation));
+ }
+
+ private Feature.Type mapOperationToFeatureType(GoogleCloudVisionOperations
operation) {
+ return switch (operation) {
+ case labelDetection -> Feature.Type.LABEL_DETECTION;
+ case textDetection -> Feature.Type.TEXT_DETECTION;
+ case faceDetection -> Feature.Type.FACE_DETECTION;
+ case landmarkDetection -> Feature.Type.LANDMARK_DETECTION;
+ case logoDetection -> Feature.Type.LOGO_DETECTION;
+ case safeSearchDetection -> Feature.Type.SAFE_SEARCH_DETECTION;
+ case imagePropertiesDetection -> Feature.Type.IMAGE_PROPERTIES;
+ case webDetection -> Feature.Type.WEB_DETECTION;
+ case objectLocalization -> Feature.Type.OBJECT_LOCALIZATION;
+ case cropHintsDetection -> Feature.Type.CROP_HINTS;
+ case documentTextDetection -> Feature.Type.DOCUMENT_TEXT_DETECTION;
+ };
+ }
+
+ private Object extractResult(AnnotateImageResponse response,
GoogleCloudVisionOperations operation) {
+ return switch (operation) {
+ case labelDetection -> response.getLabelAnnotationsList();
+ case textDetection -> response.getTextAnnotationsList();
+ case faceDetection -> response.getFaceAnnotationsList();
+ case landmarkDetection -> response.getLandmarkAnnotationsList();
+ case logoDetection -> response.getLogoAnnotationsList();
+ case safeSearchDetection -> response.getSafeSearchAnnotation();
+ case imagePropertiesDetection ->
response.getImagePropertiesAnnotation();
+ case webDetection -> response.getWebDetection();
+ case objectLocalization ->
response.getLocalizedObjectAnnotationsList();
+ case cropHintsDetection -> response.getCropHintsAnnotation();
+ case documentTextDetection -> response.getFullTextAnnotation();
+ };
+ }
+
+ private GoogleCloudVisionOperations determineOperation(Exchange exchange) {
+ GoogleCloudVisionOperations operation =
exchange.getIn().getHeader(GoogleCloudVisionConstants.OPERATION,
+ GoogleCloudVisionOperations.class);
+ if (operation == null) {
+ String operationName = getConfiguration().getOperation();
+ if (operationName != null) {
+ operation = GoogleCloudVisionOperations.valueOf(operationName);
+ }
+ }
+ if (operation == null) {
+ throw new IllegalArgumentException(
+ "Operation must be specified via endpoint URI,
configuration, or message header.");
+ }
+ return operation;
+ }
+
+ private GoogleCloudVisionConfiguration getConfiguration() {
+ return this.endpoint.getConfiguration();
+ }
+}
diff --git
a/components/camel-google/camel-google-vision/src/test/java/org/apache/camel/component/google/vision/unit/GoogleCloudVisionComponentTest.java
b/components/camel-google/camel-google-vision/src/test/java/org/apache/camel/component/google/vision/unit/GoogleCloudVisionComponentTest.java
new file mode 100644
index 000000000000..f454f6938f12
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/test/java/org/apache/camel/component/google/vision/unit/GoogleCloudVisionComponentTest.java
@@ -0,0 +1,50 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.google.vision.unit;
+
+import org.apache.camel.component.google.vision.GoogleCloudVisionComponent;
+import org.apache.camel.component.google.vision.GoogleCloudVisionEndpoint;
+import org.apache.camel.test.junit5.CamelTestSupport;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+public class GoogleCloudVisionComponentTest extends CamelTestSupport {
+
+ @Test
+ public void testCreateEndpoint() throws Exception {
+ GoogleCloudVisionComponent component =
context.getComponent("google-vision", GoogleCloudVisionComponent.class);
+ assertNotNull(component);
+
+ GoogleCloudVisionEndpoint endpoint = (GoogleCloudVisionEndpoint)
component
+
.createEndpoint("google-vision:labelDetection?serviceAccountKey=test.json");
+ assertNotNull(endpoint);
+ assertNotNull(endpoint.getConfiguration());
+ assertEquals("labelDetection",
endpoint.getConfiguration().getOperation());
+ }
+
+ @Test
+ public void testCreateEndpointWithoutOperation() {
+ GoogleCloudVisionComponent component =
context.getComponent("google-vision", GoogleCloudVisionComponent.class);
+ assertNotNull(component);
+
+ assertThrows(IllegalArgumentException.class,
+ () ->
component.createEndpoint("google-vision:?serviceAccountKey=test.json"));
+ }
+}
diff --git
a/components/camel-google/camel-google-vision/src/test/java/org/apache/camel/component/google/vision/unit/GoogleCloudVisionConfigurationTest.java
b/components/camel-google/camel-google-vision/src/test/java/org/apache/camel/component/google/vision/unit/GoogleCloudVisionConfigurationTest.java
new file mode 100644
index 000000000000..fed0b8ee6f78
--- /dev/null
+++
b/components/camel-google/camel-google-vision/src/test/java/org/apache/camel/component/google/vision/unit/GoogleCloudVisionConfigurationTest.java
@@ -0,0 +1,65 @@
+/*
+ * 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.
+ */
+package org.apache.camel.component.google.vision.unit;
+
+import org.apache.camel.component.google.vision.GoogleCloudVisionConfiguration;
+import org.apache.camel.component.google.vision.GoogleCloudVisionOperations;
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNotSame;
+
+public class GoogleCloudVisionConfigurationTest {
+
+ @Test
+ public void testConfigurationDefaults() {
+ GoogleCloudVisionConfiguration config = new
GoogleCloudVisionConfiguration();
+ assertFalse(config.isPojoRequest());
+ }
+
+ @Test
+ public void testConfigurationCopy() {
+ GoogleCloudVisionConfiguration config = new
GoogleCloudVisionConfiguration();
+ config.setOperation("labelDetection");
+ config.setServiceAccountKey("test-key.json");
+ config.setMaxResults(10);
+ config.setPojoRequest(true);
+
+ GoogleCloudVisionConfiguration copy = config.copy();
+ assertNotSame(config, copy);
+ assertEquals("labelDetection", copy.getOperation());
+ assertEquals("test-key.json", copy.getServiceAccountKey());
+ assertEquals(10, copy.getMaxResults());
+ }
+
+ @Test
+ public void testOperationsEnum() {
+ assertNotNull(GoogleCloudVisionOperations.valueOf("labelDetection"));
+ assertNotNull(GoogleCloudVisionOperations.valueOf("textDetection"));
+ assertNotNull(GoogleCloudVisionOperations.valueOf("faceDetection"));
+
assertNotNull(GoogleCloudVisionOperations.valueOf("landmarkDetection"));
+ assertNotNull(GoogleCloudVisionOperations.valueOf("logoDetection"));
+
assertNotNull(GoogleCloudVisionOperations.valueOf("safeSearchDetection"));
+
assertNotNull(GoogleCloudVisionOperations.valueOf("imagePropertiesDetection"));
+ assertNotNull(GoogleCloudVisionOperations.valueOf("webDetection"));
+
assertNotNull(GoogleCloudVisionOperations.valueOf("objectLocalization"));
+
assertNotNull(GoogleCloudVisionOperations.valueOf("cropHintsDetection"));
+
assertNotNull(GoogleCloudVisionOperations.valueOf("documentTextDetection"));
+ }
+}
diff --git a/components/camel-google/pom.xml b/components/camel-google/pom.xml
index c007b58af354..14d1ea0a6362 100644
--- a/components/camel-google/pom.xml
+++ b/components/camel-google/pom.xml
@@ -45,6 +45,7 @@
<module>camel-google-sheets</module>
<module>camel-google-storage</module>
<module>camel-google-vertexai</module>
+ <module>camel-google-vision</module>
</modules>
</project>
diff --git
a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
index 3941fb9b3055..ec3a84d7b477 100644
---
a/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
+++
b/core/camel-main/src/generated/resources/org/apache/camel/main/components.properties
@@ -139,6 +139,7 @@ google-sheets
google-sheets-stream
google-storage
google-vertexai
+google-vision
grape
graphql
grpc
diff --git a/docs/components/modules/ROOT/examples/json/google-vision.json
b/docs/components/modules/ROOT/examples/json/google-vision.json
new file mode 120000
index 000000000000..72d289f89573
--- /dev/null
+++ b/docs/components/modules/ROOT/examples/json/google-vision.json
@@ -0,0 +1 @@
+../../../../../../components/camel-google/camel-google-vision/src/generated/resources/META-INF/org/apache/camel/component/google/vision/google-vision.json
\ No newline at end of file
diff --git a/docs/components/modules/ROOT/nav.adoc
b/docs/components/modules/ROOT/nav.adoc
index 6ba21b9a2674..8a0d98049306 100644
--- a/docs/components/modules/ROOT/nav.adoc
+++ b/docs/components/modules/ROOT/nav.adoc
@@ -154,6 +154,7 @@
*** xref:google-calendar-component.adoc[Google Calendar]
*** xref:google-calendar-stream-component.adoc[Google Calendar Stream]
*** xref:google-functions-component.adoc[Google Cloud Functions]
+*** xref:google-vision-component.adoc[Google Cloud Vision]
*** xref:google-drive-component.adoc[Google Drive]
*** xref:google-firestore-component.adoc[Google Firestore]
*** xref:google-mail-component.adoc[Google Mail]
diff --git a/docs/components/modules/ROOT/pages/google-vision-component.adoc
b/docs/components/modules/ROOT/pages/google-vision-component.adoc
new file mode 120000
index 000000000000..535dbbaf69b3
--- /dev/null
+++ b/docs/components/modules/ROOT/pages/google-vision-component.adoc
@@ -0,0 +1 @@
+../../../../../components/camel-google/camel-google-vision/src/main/docs/google-vision-component.adoc
\ No newline at end of file
diff --git
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
index 2aa9ebba2cf0..5faa67135951 100644
---
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
+++
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/ComponentsBuilderFactory.java
@@ -1916,6 +1916,20 @@ public interface ComponentsBuilderFactory {
static
GoogleVertexaiComponentBuilderFactory.GoogleVertexaiComponentBuilder
googleVertexai() {
return GoogleVertexaiComponentBuilderFactory.googleVertexai();
}
+ /**
+ * Google Cloud Vision (camel-google-vision)
+ * Detect labels, text, faces, logos and more on images through Google
Cloud
+ * Vision API
+ *
+ * Category: cloud,ai
+ * Since: 4.19
+ * Maven coordinates: org.apache.camel:camel-google-vision
+ *
+ * @return the dsl builder
+ */
+ static GoogleVisionComponentBuilderFactory.GoogleVisionComponentBuilder
googleVision() {
+ return GoogleVisionComponentBuilderFactory.googleVision();
+ }
/**
* Grape (camel-grape)
* Fetch, load and manage additional jars dynamically after Camel Context
diff --git
a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GoogleVisionComponentBuilderFactory.java
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GoogleVisionComponentBuilderFactory.java
new file mode 100644
index 000000000000..5c6af0a5697e
--- /dev/null
+++
b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GoogleVisionComponentBuilderFactory.java
@@ -0,0 +1,122 @@
+/* Generated by camel build tools - do NOT edit this file! */
+/*
+ * 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.
+ */
+package org.apache.camel.builder.component.dsl;
+
+import javax.annotation.processing.Generated;
+import org.apache.camel.Component;
+import org.apache.camel.builder.component.AbstractComponentBuilder;
+import org.apache.camel.builder.component.ComponentBuilder;
+import org.apache.camel.component.google.vision.GoogleCloudVisionComponent;
+
+/**
+ * Detect labels, text, faces, logos and more on images through Google Cloud
+ * Vision API
+ *
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.ComponentDslMojo")
+public interface GoogleVisionComponentBuilderFactory {
+
+ /**
+ * Google Cloud Vision (camel-google-vision)
+ * Detect labels, text, faces, logos and more on images through Google
Cloud
+ * Vision API
+ *
+ * Category: cloud,ai
+ * Since: 4.19
+ * Maven coordinates: org.apache.camel:camel-google-vision
+ *
+ * @return the dsl builder
+ */
+ static GoogleVisionComponentBuilder googleVision() {
+ return new GoogleVisionComponentBuilderImpl();
+ }
+
+ /**
+ * Builder for the Google Cloud Vision component.
+ */
+ interface GoogleVisionComponentBuilder extends
ComponentBuilder<GoogleCloudVisionComponent> {
+
+
+ /**
+ * 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 route to fail being started. By deferring
this
+ * startup to be lazy then the startup failure can be handled during
+ * routing messages via Camel's routing error handlers. Beware that
when
+ * the first message is processed then creating and starting the
+ * producer may take a little time and prolong the total processing
time
+ * of the processing.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default GoogleVisionComponentBuilder lazyStartProducer(boolean
lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+
+
+ /**
+ * Whether autowiring is enabled. This is used for automatic autowiring
+ * options (the option must be marked as autowired) by looking up in
the
+ * registry to find if there is a single instance of matching type,
+ * which then gets configured on the component. This can be used for
+ * automatic configuring JDBC data sources, JMS connection factories,
+ * AWS Clients, etc.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: true
+ * Group: advanced
+ *
+ * @param autowiredEnabled the value to set
+ * @return the dsl builder
+ */
+ default GoogleVisionComponentBuilder autowiredEnabled(boolean
autowiredEnabled) {
+ doSetProperty("autowiredEnabled", autowiredEnabled);
+ return this;
+ }
+ }
+
+ class GoogleVisionComponentBuilderImpl
+ extends AbstractComponentBuilder<GoogleCloudVisionComponent>
+ implements GoogleVisionComponentBuilder {
+ @Override
+ protected GoogleCloudVisionComponent buildConcreteComponent() {
+ return new GoogleCloudVisionComponent();
+ }
+ @Override
+ protected boolean setPropertyOnComponent(
+ Component component,
+ String name,
+ Object value) {
+ switch (name) {
+ case "lazyStartProducer": ((GoogleCloudVisionComponent)
component).setLazyStartProducer((boolean) value); return true;
+ case "autowiredEnabled": ((GoogleCloudVisionComponent)
component).setAutowiredEnabled((boolean) value); return true;
+ default: return false;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
index 5b419175f44c..e2db56a0ca10 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilderFactory.java
@@ -139,6 +139,7 @@ public interface EndpointBuilderFactory
org.apache.camel.builder.endpoint.dsl.GoogleCalendarStreamEndpointBuilderFactory.GoogleCalendarStreamBuilders,
org.apache.camel.builder.endpoint.dsl.GoogleCloudFunctionsEndpointBuilderFactory.GoogleCloudFunctionsBuilders,
org.apache.camel.builder.endpoint.dsl.GoogleCloudStorageEndpointBuilderFactory.GoogleCloudStorageBuilders,
+
org.apache.camel.builder.endpoint.dsl.GoogleCloudVisionEndpointBuilderFactory.GoogleCloudVisionBuilders,
org.apache.camel.builder.endpoint.dsl.GoogleDriveEndpointBuilderFactory.GoogleDriveBuilders,
org.apache.camel.builder.endpoint.dsl.GoogleFirestoreEndpointBuilderFactory.GoogleFirestoreBuilders,
org.apache.camel.builder.endpoint.dsl.GoogleMailEndpointBuilderFactory.GoogleMailBuilders,
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
index 971f9f3b4a51..b73cacd5ec91 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointBuilders.java
@@ -136,6 +136,7 @@ public interface EndpointBuilders
org.apache.camel.builder.endpoint.dsl.GoogleCalendarStreamEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.GoogleCloudFunctionsEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.GoogleCloudStorageEndpointBuilderFactory,
+
org.apache.camel.builder.endpoint.dsl.GoogleCloudVisionEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.GoogleDriveEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.GoogleFirestoreEndpointBuilderFactory,
org.apache.camel.builder.endpoint.dsl.GoogleMailEndpointBuilderFactory,
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
index 0ae95d853158..c46db4d576b0 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/StaticEndpointBuilders.java
@@ -6283,6 +6283,48 @@ public class StaticEndpointBuilders {
public static
GoogleVertexAIEndpointBuilderFactory.GoogleVertexAIEndpointBuilder
googleVertexai(String componentName, String path) {
return
GoogleVertexAIEndpointBuilderFactory.endpointBuilder(componentName, path);
}
+ /**
+ * Google Cloud Vision (camel-google-vision)
+ * Detect labels, text, faces, logos and more on images through Google
Cloud
+ * Vision API
+ *
+ * Category: cloud,ai
+ * Since: 4.19
+ * Maven coordinates: org.apache.camel:camel-google-vision
+ *
+ * Syntax: <code>google-vision:operation</code>
+ *
+ * Path parameter: operation (required)
+ * The operation name
+ *
+ * @param path operation
+ * @return the dsl builder
+ */
+ public static
GoogleCloudVisionEndpointBuilderFactory.GoogleCloudVisionEndpointBuilder
googleVision(String path) {
+ return googleVision("google-vision", path);
+ }
+ /**
+ * Google Cloud Vision (camel-google-vision)
+ * Detect labels, text, faces, logos and more on images through Google
Cloud
+ * Vision API
+ *
+ * Category: cloud,ai
+ * Since: 4.19
+ * Maven coordinates: org.apache.camel:camel-google-vision
+ *
+ * Syntax: <code>google-vision:operation</code>
+ *
+ * Path parameter: operation (required)
+ * The operation name
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path operation
+ * @return the dsl builder
+ */
+ public static
GoogleCloudVisionEndpointBuilderFactory.GoogleCloudVisionEndpointBuilder
googleVision(String componentName, String path) {
+ return
GoogleCloudVisionEndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
/**
* Grape (camel-grape)
* Fetch, load and manage additional jars dynamically after Camel Context
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleCloudVisionEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleCloudVisionEndpointBuilderFactory.java
new file mode 100644
index 000000000000..cfd0e437df48
--- /dev/null
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleCloudVisionEndpointBuilderFactory.java
@@ -0,0 +1,321 @@
+/* Generated by camel build tools - do NOT edit this file! */
+/*
+ * 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.
+ */
+package org.apache.camel.builder.endpoint.dsl;
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.function.*;
+import java.util.stream.*;
+import javax.annotation.processing.Generated;
+import org.apache.camel.builder.EndpointConsumerBuilder;
+import org.apache.camel.builder.EndpointProducerBuilder;
+import org.apache.camel.builder.endpoint.AbstractEndpointBuilder;
+
+/**
+ * Detect labels, text, faces, logos and more on images through Google Cloud
+ * Vision API
+ *
+ * Generated by camel build tools - do NOT edit this file!
+ */
+@Generated("org.apache.camel.maven.packaging.EndpointDslMojo")
+public interface GoogleCloudVisionEndpointBuilderFactory {
+
+ /**
+ * Builder for endpoint for the Google Cloud Vision component.
+ */
+ public interface GoogleCloudVisionEndpointBuilder
+ extends
+ EndpointProducerBuilder {
+ default AdvancedGoogleCloudVisionEndpointBuilder advanced() {
+ return (AdvancedGoogleCloudVisionEndpointBuilder) this;
+ }
+
+ /**
+ * Service account key to authenticate an application as a service
+ * account.
+ *
+ * The option is a: <code>java.lang.String</code> type.
+ *
+ * Group: common
+ *
+ * @param serviceAccountKey the value to set
+ * @return the dsl builder
+ */
+ default GoogleCloudVisionEndpointBuilder serviceAccountKey(String
serviceAccountKey) {
+ doSetProperty("serviceAccountKey", serviceAccountKey);
+ return this;
+ }
+ /**
+ * The max number of results to return per feature type. Default is
+ * unset (API default).
+ *
+ * The option is a: <code>java.lang.Integer</code> type.
+ *
+ * Group: producer
+ *
+ * @param maxResults the value to set
+ * @return the dsl builder
+ */
+ default GoogleCloudVisionEndpointBuilder maxResults(Integer
maxResults) {
+ doSetProperty("maxResults", maxResults);
+ return this;
+ }
+ /**
+ * The max number of results to return per feature type. Default is
+ * unset (API default).
+ *
+ * The option will be converted to a <code>java.lang.Integer</code>
+ * type.
+ *
+ * Group: producer
+ *
+ * @param maxResults the value to set
+ * @return the dsl builder
+ */
+ default GoogleCloudVisionEndpointBuilder maxResults(String maxResults)
{
+ doSetProperty("maxResults", maxResults);
+ return this;
+ }
+ /**
+ * Specifies if the request is a pojo request.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param pojoRequest the value to set
+ * @return the dsl builder
+ */
+ default GoogleCloudVisionEndpointBuilder pojoRequest(boolean
pojoRequest) {
+ doSetProperty("pojoRequest", pojoRequest);
+ return this;
+ }
+ /**
+ * Specifies if the request is a pojo request.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer
+ *
+ * @param pojoRequest the value to set
+ * @return the dsl builder
+ */
+ default GoogleCloudVisionEndpointBuilder pojoRequest(String
pojoRequest) {
+ doSetProperty("pojoRequest", pojoRequest);
+ return this;
+ }
+ }
+
+ /**
+ * Advanced builder for endpoint for the Google Cloud Vision component.
+ */
+ public interface AdvancedGoogleCloudVisionEndpointBuilder
+ extends
+ EndpointProducerBuilder {
+ default GoogleCloudVisionEndpointBuilder basic() {
+ return (GoogleCloudVisionEndpointBuilder) 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
+ * starting and cause the route to fail being started. By deferring
this
+ * startup to be lazy then the startup failure can be handled during
+ * routing messages via Camel's routing error handlers. Beware that
when
+ * the first message is processed then creating and starting the
+ * producer may take a little time and prolong the total processing
time
+ * of the processing.
+ *
+ * The option is a: <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer (advanced)
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default AdvancedGoogleCloudVisionEndpointBuilder
lazyStartProducer(boolean lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ 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
+ * starting and cause the route to fail being started. By deferring
this
+ * startup to be lazy then the startup failure can be handled during
+ * routing messages via Camel's routing error handlers. Beware that
when
+ * the first message is processed then creating and starting the
+ * producer may take a little time and prolong the total processing
time
+ * of the processing.
+ *
+ * The option will be converted to a <code>boolean</code> type.
+ *
+ * Default: false
+ * Group: producer (advanced)
+ *
+ * @param lazyStartProducer the value to set
+ * @return the dsl builder
+ */
+ default AdvancedGoogleCloudVisionEndpointBuilder
lazyStartProducer(String lazyStartProducer) {
+ doSetProperty("lazyStartProducer", lazyStartProducer);
+ return this;
+ }
+ /**
+ * The client to use during service invocation.
+ *
+ * The option is a:
+ * <code>com.google.cloud.vision.v1.ImageAnnotatorClient</code> type.
+ *
+ * Group: advanced
+ *
+ * @param client the value to set
+ * @return the dsl builder
+ */
+ default AdvancedGoogleCloudVisionEndpointBuilder
client(com.google.cloud.vision.v1.ImageAnnotatorClient client) {
+ doSetProperty("client", client);
+ return this;
+ }
+ /**
+ * The client to use during service invocation.
+ *
+ * The option will be converted to a
+ * <code>com.google.cloud.vision.v1.ImageAnnotatorClient</code> type.
+ *
+ * Group: advanced
+ *
+ * @param client the value to set
+ * @return the dsl builder
+ */
+ default AdvancedGoogleCloudVisionEndpointBuilder client(String client)
{
+ doSetProperty("client", client);
+ return this;
+ }
+ }
+
+ public interface GoogleCloudVisionBuilders {
+ /**
+ * Google Cloud Vision (camel-google-vision)
+ * Detect labels, text, faces, logos and more on images through Google
+ * Cloud Vision API
+ *
+ * Category: cloud,ai
+ * Since: 4.19
+ * Maven coordinates: org.apache.camel:camel-google-vision
+ *
+ * @return the dsl builder for the headers' name.
+ */
+ default GoogleCloudVisionHeaderNameBuilder googleVision() {
+ return GoogleCloudVisionHeaderNameBuilder.INSTANCE;
+ }
+ /**
+ * Google Cloud Vision (camel-google-vision)
+ * Detect labels, text, faces, logos and more on images through Google
+ * Cloud Vision API
+ *
+ * Category: cloud,ai
+ * Since: 4.19
+ * Maven coordinates: org.apache.camel:camel-google-vision
+ *
+ * Syntax: <code>google-vision:operation</code>
+ *
+ * Path parameter: operation (required)
+ * The operation name
+ *
+ * @param path operation
+ * @return the dsl builder
+ */
+ default GoogleCloudVisionEndpointBuilder googleVision(String path) {
+ return
GoogleCloudVisionEndpointBuilderFactory.endpointBuilder("google-vision", path);
+ }
+ /**
+ * Google Cloud Vision (camel-google-vision)
+ * Detect labels, text, faces, logos and more on images through Google
+ * Cloud Vision API
+ *
+ * Category: cloud,ai
+ * Since: 4.19
+ * Maven coordinates: org.apache.camel:camel-google-vision
+ *
+ * Syntax: <code>google-vision:operation</code>
+ *
+ * Path parameter: operation (required)
+ * The operation name
+ *
+ * @param componentName to use a custom component name for the endpoint
+ * instead of the default name
+ * @param path operation
+ * @return the dsl builder
+ */
+ default GoogleCloudVisionEndpointBuilder googleVision(String
componentName, String path) {
+ return
GoogleCloudVisionEndpointBuilderFactory.endpointBuilder(componentName, path);
+ }
+
+ }
+ /**
+ * The builder of headers' name for the Google Cloud Vision component.
+ */
+ public static class GoogleCloudVisionHeaderNameBuilder {
+ /**
+ * The internal instance of the builder used to access to all the
+ * methods representing the name of headers.
+ */
+ private static final GoogleCloudVisionHeaderNameBuilder INSTANCE = new
GoogleCloudVisionHeaderNameBuilder();
+
+ /**
+ * The operation to perform.
+ *
+ * The option is a: {@code
+ *
org.apache.camel.component.google.vision.GoogleCloudVisionOperations}
+ * type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code GoogleCloudVisionOperation}.
+ */
+ public String googleCloudVisionOperation() {
+ return "GoogleCloudVisionOperation";
+ }
+ /**
+ * The response object resulting from the Google Cloud Vision API
+ * invocation.
+ *
+ * The option is a: {@code
+ * com.google.cloud.vision.v1.AnnotateImageResponse} type.
+ *
+ * Group: producer
+ *
+ * @return the name of the header {@code
+ * GoogleCloudVisionResponseObject}.
+ */
+ public String googleCloudVisionResponseObject() {
+ return "GoogleCloudVisionResponseObject";
+ }
+ }
+ static GoogleCloudVisionEndpointBuilder endpointBuilder(String
componentName, String path) {
+ class GoogleCloudVisionEndpointBuilderImpl extends
AbstractEndpointBuilder implements GoogleCloudVisionEndpointBuilder,
AdvancedGoogleCloudVisionEndpointBuilder {
+ public GoogleCloudVisionEndpointBuilderImpl(String path) {
+ super(componentName, path);
+ }
+ }
+ return new GoogleCloudVisionEndpointBuilderImpl(path);
+ }
+}
\ No newline at end of file
diff --git
a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
index 609ab9b75ed0..76415541cbe2 100644
---
a/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
+++
b/dsl/camel-kamelet-main/src/generated/resources/camel-component-known-dependencies.properties
@@ -156,6 +156,7 @@
org.apache.camel.component.google.sheets.GoogleSheetsComponent=camel:google-shee
org.apache.camel.component.google.sheets.stream.GoogleSheetsStreamComponent=camel:google-sheets
org.apache.camel.component.google.storage.GoogleCloudStorageComponent=camel:google-storage
org.apache.camel.component.google.vertexai.GoogleVertexAIComponent=camel:google-vertexai
+org.apache.camel.component.google.vision.GoogleCloudVisionComponent=camel:google-vision
org.apache.camel.component.grape.GrapeComponent=camel:grape
org.apache.camel.component.graphql.GraphqlComponent=camel:graphql
org.apache.camel.component.grpc.GrpcComponent=camel:grpc
diff --git a/parent/pom.xml b/parent/pom.xml
index a4aab5190e01..5317bdac2bfb 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -219,6 +219,7 @@
<google-cloud-secretmanager-version>2.86.0</google-cloud-secretmanager-version>
<google-cloud-storage-version>2.64.0</google-cloud-storage-version>
<google-cloud-aiplatform-version>3.86.0</google-cloud-aiplatform-version>
+ <google-cloud-vision-version>3.59.0</google-cloud-vision-version>
<google-genai-version>1.42.0</google-genai-version>
<graaljs-version>25.0.2</graaljs-version>
<graphql-java-version>25.0</graphql-java-version>
@@ -1526,6 +1527,11 @@
<artifactId>camel-google-vertexai</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-google-vision</artifactId>
+ <version>${project.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-grape</artifactId>
diff --git
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
index 84ecac4da6bf..fed133489a2f 100644
---
a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
+++
b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/MojoHelper.java
@@ -83,7 +83,8 @@ public final class MojoHelper {
dir.resolve("camel-google-mail"),
dir.resolve("camel-google-pubsub"),
dir.resolve("camel-google-sheets"),
dir.resolve("camel-google-storage"),
dir.resolve("camel-google-functions"),
- dir.resolve("camel-google-secret-manager"),
dir.resolve("camel-google-vertexai"));
+ dir.resolve("camel-google-secret-manager"),
dir.resolve("camel-google-vertexai"),
+ dir.resolve("camel-google-vision"));
case "camel-debezium":
return Arrays.asList(dir.resolve("camel-debezium-mongodb"),
dir.resolve("camel-debezium-mysql"),
dir.resolve("camel-debezium-postgres"),
dir.resolve("camel-debezium-sqlserver"),