This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit 8c1fc0006f29a8e34341232d14b14fd25547e07c Author: Claus Ibsen <[email protected]> AuthorDate: Fri Nov 27 18:25:13 2026 +0100 CAMEL-23832: camel-google-functions - improve the component and option descriptions This commit rewrites the component description and the texts of 7 endpoint options and 5 headers of google-functions. The new texts say which operations need project, location and functionName, that callFunction is the default, that updateFunction works only with pojoRequest=true, and which SDK request object each operation takes in POJO mode (getFunction takes a CloudFunctionName). The old runtime header listed only old runtime IDs, many of them no longer supported, and the response object header did not say which operations set it. Documentation only, no behavior change. The component JSON, the catalog copy, the doc page header and the DSL are regenerated. camel-google-functions is marked as done in tasks/component-descriptions.md. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Claus Ibsen <[email protected]> --- .../camel/catalog/components/google-functions.json | 26 ++--- .../catalog/docs/google-functions-component.adoc | 4 +- .../google/functions/google-functions.json | 26 ++--- .../src/main/docs/google-functions-component.adoc | 4 +- .../GoogleCloudFunctionsConfiguration.java | 68 ++++++------- .../functions/GoogleCloudFunctionsConstants.java | 38 +++---- .../functions/GoogleCloudFunctionsEndpoint.java | 5 +- .../component/ComponentsBuilderFactory.java | 2 +- .../GoogleFunctionsComponentBuilderFactory.java | 4 +- .../builder/endpoint/EndpointHeaderBuilders.java | 2 +- .../builder/endpoint/StaticEndpointBuilders.java | 16 ++- ...GoogleCloudFunctionsEndpointBuilderFactory.java | 109 +++++++++++++++------ tasks/component-descriptions.md | 2 +- 13 files changed, 172 insertions(+), 134 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-functions.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-functions.json index d247754fb0c2..26a7008dd8f0 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-functions.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/google-functions.json @@ -3,7 +3,7 @@ "kind": "component", "name": "google-functions", "title": "Google Cloud Functions", - "description": "Manage and invoke Google Cloud Functions", + "description": "Manage and call functions in Google Cloud Functions.", "deprecated": false, "firstVersion": "3.9.0", "label": "cloud", @@ -28,24 +28,24 @@ "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": { - "CamelGoogleCloudFunctionsOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations", "enum": [ "listFunctions", "getFunction", "callFunction", "generateDownloadUrl", "generateUploadUrl", "createFunction", "updateFunction", "deleteFunction" ], "deprecated": false, "autowired": false, "secret": false, "description": "The operation to perform [...] - "CamelGoogleCloudFunctionsEntryPoint": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the function (as defined in source code) that will be executed. Used for createFunction operation", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#ENTRY_POINT" }, - "CamelGoogleCloudFunctionsRuntime": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The runtime in which to run the function. Possible values are: nodejs10 nodejs12 nodejs14 python37 python38 python39 go111 go113 java11 dotnet3 ruby26 nodejs6 nodejs8 Used for createFunction operation.", "constantName": "org.apache.camel.component.goog [...] - "CamelGoogleCloudFunctionsSourceArchiveUrl": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The Google Cloud Storage URL, starting with gs:\/\/, pointing to the zip archive which contains the function. Used for createFunction operation.", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#SOURC [...] - "CamelGoogleCloudFunctionsResponseObject": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Object", "deprecated": false, "autowired": false, "secret": false, "description": "The response object resulting from the Google Functions Client invocation", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#RESPONSE_OBJECT" } + "CamelGoogleCloudFunctionsOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations", "enum": [ "listFunctions", "getFunction", "callFunction", "generateDownloadUrl", "generateUploadUrl", "createFunction", "updateFunction", "deleteFunction" ], "deprecated": false, "autowired": false, "secret": false, "description": "The operation to perform [...] + "CamelGoogleCloudFunctionsEntryPoint": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the function in the source code that runs when the new function is called, such as the exported function for Node.js or the fully qualified class name for Java. createFunction requires it, unless pojoRequest=true.", "constantName": "org. [...] + "CamelGoogleCloudFunctionsRuntime": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The runtime ID of the new function, for example nodejs20, python312 or java17. createFunction requires it, unless pojoRequest=true. Google lists the supported runtime IDs in the Cloud Functions documentation.", "constantName": "org.apache.camel.compone [...] + "CamelGoogleCloudFunctionsSourceArchiveUrl": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The Cloud Storage URL, starting with gs:\/\/, of the ZIP archive that holds the source code of the new function. createFunction requires it, unless pojoRequest=true, and creates the function with an HTTPS trigger.", "constantName": "org.apache [...] + "CamelGoogleCloudFunctionsResponseObject": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Object", "deprecated": false, "autowired": false, "secret": false, "description": "The full response of the service: the CallFunctionResponse for callFunction, the GenerateDownloadUrlResponse for generateDownloadUrl, or the GenerateUploadUrlResponse for generateUploadUrl. The message body holds only the result or the signed UR [...] }, "bodyTypes": { "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "value", "map", "list", "pojo" ], "dependsOn": [ "operation" ], "byOption": [ { "option": "pojoRequest", "value": "true", "carriers": [ "pojo" ] } ], "description": "The data to call the function with, for callFunction (the default): text is sent as it is; bytes, a stream, a file, XML (a DOM Node or a Source), an enum or a character are converted to text; and a Map, a List or another POJO is marshalled to JSON with a pl [...] "producerOut": { "carriers": [ "text" ], "javaType": "java.lang.String", "byOption": [ { "option": "operation", "value": "listFunctions", "carriers": [ "list" ], "javaType": "java.util.List<com.google.cloud.functions.v1.CloudFunction>" }, { "option": "operation", "value": "getFunction", "carriers": [ "pojo" ], "javaType": "com.google.cloud.functions.v1.CloudFunction" }, { "option": "operation", "value": "createFunction", "carriers": [ "pojo" ], "javaType": "com.google.cloud.functions [...] }, "properties": { - "functionName": { "index": 0, "kind": "path", "displayName": "Function Name", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The user-defined name of the function" }, - "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.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "Service account key to authenticate an application as a service account" }, - "location": { "index": 2, "kind": "parameter", "displayName": "Location", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The Google Cloud Location (Region) where the Function is located" }, - "operation": { "index": 3, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "enum", "javaType": "org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations", "enum": [ "listFunctions", "getFunction", "callFunction", "generateDownloadUrl", "generateUploadUrl", "createFunction", "updateFunction", "deleteFunction" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.ap [...] - "pojoRequest": { "index": 4, "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.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "Specifies if the request is a pojo request" }, - "project": { "index": 5, "kind": "parameter", "displayName": "Project", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The Google Cloud Project name where the Function is located" }, + "functionName": { "index": 0, "kind": "path", "displayName": "Function Name", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The name of the function, without the projects\/{project}\/locations\/{location}\/functi [...] + "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.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The service account key file (JSON) used to create the CloudFunctionsSe [...] + "location": { "index": 2, "kind": "parameter", "displayName": "Location", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The region of the functions, for example us-central1. Every operation needs it, unless [...] + "operation": { "index": 3, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "enum", "javaType": "org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations", "enum": [ "listFunctions", "getFunction", "callFunction", "generateDownloadUrl", "generateUploadUrl", "createFunction", "updateFunction", "deleteFunction" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.ap [...] + "pojoRequest": { "index": 4, "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.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "Whether the message body is the request object of the Google Cloud SDK fo [...] + "project": { "index": 5, "kind": "parameter", "displayName": "Project", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The ID of the Google Cloud project that holds the functions. Every operation needs it, un [...] "lazyStartProducer": { "index": 6, "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": 7, "kind": "parameter", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "com.google.cloud.functions.v1.CloudFunctionsServiceClient", "deprecated": false, "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The client to use during service invocation." } + "client": { "index": 7, "kind": "parameter", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "com.google.cloud.functions.v1.CloudFunctionsServiceClient", "deprecated": false, "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The CloudFunctionsServiceClient to use for the call [...] } } diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/google-functions-component.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/google-functions-component.adoc index 31e183735267..cc7fc11e5f4a 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/google-functions-component.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/google-functions-component.adoc @@ -2,7 +2,7 @@ :doctitle: Google Cloud Functions :shortname: google-functions :artifactid: camel-google-functions -:description: Manage and invoke Google Cloud Functions +:description: Manage and call functions in Google Cloud Functions. :since: 3.9 :supportlevel: Stable :tabs-sync-option: @@ -630,5 +630,3 @@ YAML:: uri: mock:result ---- ==== - - diff --git a/components/camel-google/camel-google-functions/src/generated/resources/META-INF/org/apache/camel/component/google/functions/google-functions.json b/components/camel-google/camel-google-functions/src/generated/resources/META-INF/org/apache/camel/component/google/functions/google-functions.json index d247754fb0c2..26a7008dd8f0 100644 --- a/components/camel-google/camel-google-functions/src/generated/resources/META-INF/org/apache/camel/component/google/functions/google-functions.json +++ b/components/camel-google/camel-google-functions/src/generated/resources/META-INF/org/apache/camel/component/google/functions/google-functions.json @@ -3,7 +3,7 @@ "kind": "component", "name": "google-functions", "title": "Google Cloud Functions", - "description": "Manage and invoke Google Cloud Functions", + "description": "Manage and call functions in Google Cloud Functions.", "deprecated": false, "firstVersion": "3.9.0", "label": "cloud", @@ -28,24 +28,24 @@ "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": { - "CamelGoogleCloudFunctionsOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations", "enum": [ "listFunctions", "getFunction", "callFunction", "generateDownloadUrl", "generateUploadUrl", "createFunction", "updateFunction", "deleteFunction" ], "deprecated": false, "autowired": false, "secret": false, "description": "The operation to perform [...] - "CamelGoogleCloudFunctionsEntryPoint": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the function (as defined in source code) that will be executed. Used for createFunction operation", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#ENTRY_POINT" }, - "CamelGoogleCloudFunctionsRuntime": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The runtime in which to run the function. Possible values are: nodejs10 nodejs12 nodejs14 python37 python38 python39 go111 go113 java11 dotnet3 ruby26 nodejs6 nodejs8 Used for createFunction operation.", "constantName": "org.apache.camel.component.goog [...] - "CamelGoogleCloudFunctionsSourceArchiveUrl": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The Google Cloud Storage URL, starting with gs:\/\/, pointing to the zip archive which contains the function. Used for createFunction operation.", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#SOURC [...] - "CamelGoogleCloudFunctionsResponseObject": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Object", "deprecated": false, "autowired": false, "secret": false, "description": "The response object resulting from the Google Functions Client invocation", "constantName": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConstants#RESPONSE_OBJECT" } + "CamelGoogleCloudFunctionsOperation": { "index": 0, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations", "enum": [ "listFunctions", "getFunction", "callFunction", "generateDownloadUrl", "generateUploadUrl", "createFunction", "updateFunction", "deleteFunction" ], "deprecated": false, "autowired": false, "secret": false, "description": "The operation to perform [...] + "CamelGoogleCloudFunctionsEntryPoint": { "index": 1, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The name of the function in the source code that runs when the new function is called, such as the exported function for Node.js or the fully qualified class name for Java. createFunction requires it, unless pojoRequest=true.", "constantName": "org. [...] + "CamelGoogleCloudFunctionsRuntime": { "index": 2, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The runtime ID of the new function, for example nodejs20, python312 or java17. createFunction requires it, unless pojoRequest=true. Google lists the supported runtime IDs in the Cloud Functions documentation.", "constantName": "org.apache.camel.compone [...] + "CamelGoogleCloudFunctionsSourceArchiveUrl": { "index": 3, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "String", "deprecated": false, "autowired": false, "secret": false, "description": "The Cloud Storage URL, starting with gs:\/\/, of the ZIP archive that holds the source code of the new function. createFunction requires it, unless pojoRequest=true, and creates the function with an HTTPS trigger.", "constantName": "org.apache [...] + "CamelGoogleCloudFunctionsResponseObject": { "index": 4, "kind": "header", "displayName": "", "group": "producer", "label": "", "required": false, "javaType": "Object", "deprecated": false, "autowired": false, "secret": false, "description": "The full response of the service: the CallFunctionResponse for callFunction, the GenerateDownloadUrlResponse for generateDownloadUrl, or the GenerateUploadUrlResponse for generateUploadUrl. The message body holds only the result or the signed UR [...] }, "bodyTypes": { "producerIn": { "carriers": [ "text", "bytes", "stream", "file", "value", "map", "list", "pojo" ], "dependsOn": [ "operation" ], "byOption": [ { "option": "pojoRequest", "value": "true", "carriers": [ "pojo" ] } ], "description": "The data to call the function with, for callFunction (the default): text is sent as it is; bytes, a stream, a file, XML (a DOM Node or a Source), an enum or a character are converted to text; and a Map, a List or another POJO is marshalled to JSON with a pl [...] "producerOut": { "carriers": [ "text" ], "javaType": "java.lang.String", "byOption": [ { "option": "operation", "value": "listFunctions", "carriers": [ "list" ], "javaType": "java.util.List<com.google.cloud.functions.v1.CloudFunction>" }, { "option": "operation", "value": "getFunction", "carriers": [ "pojo" ], "javaType": "com.google.cloud.functions.v1.CloudFunction" }, { "option": "operation", "value": "createFunction", "carriers": [ "pojo" ], "javaType": "com.google.cloud.functions [...] }, "properties": { - "functionName": { "index": 0, "kind": "path", "displayName": "Function Name", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The user-defined name of the function" }, - "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.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "Service account key to authenticate an application as a service account" }, - "location": { "index": 2, "kind": "parameter", "displayName": "Location", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The Google Cloud Location (Region) where the Function is located" }, - "operation": { "index": 3, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "enum", "javaType": "org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations", "enum": [ "listFunctions", "getFunction", "callFunction", "generateDownloadUrl", "generateUploadUrl", "createFunction", "updateFunction", "deleteFunction" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.ap [...] - "pojoRequest": { "index": 4, "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.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "Specifies if the request is a pojo request" }, - "project": { "index": 5, "kind": "parameter", "displayName": "Project", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The Google Cloud Project name where the Function is located" }, + "functionName": { "index": 0, "kind": "path", "displayName": "Function Name", "group": "common", "label": "common", "required": true, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The name of the function, without the projects\/{project}\/locations\/{location}\/functi [...] + "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.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The service account key file (JSON) used to create the CloudFunctionsSe [...] + "location": { "index": 2, "kind": "parameter", "displayName": "Location", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The region of the functions, for example us-central1. Every operation needs it, unless [...] + "operation": { "index": 3, "kind": "parameter", "displayName": "Operation", "group": "producer", "label": "producer", "required": false, "type": "enum", "javaType": "org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations", "enum": [ "listFunctions", "getFunction", "callFunction", "generateDownloadUrl", "generateUploadUrl", "createFunction", "updateFunction", "deleteFunction" ], "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.ap [...] + "pojoRequest": { "index": 4, "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.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "Whether the message body is the request object of the Google Cloud SDK fo [...] + "project": { "index": 5, "kind": "parameter", "displayName": "Project", "group": "producer", "label": "producer", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The ID of the Google Cloud project that holds the functions. Every operation needs it, un [...] "lazyStartProducer": { "index": 6, "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": 7, "kind": "parameter", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "com.google.cloud.functions.v1.CloudFunctionsServiceClient", "deprecated": false, "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The client to use during service invocation." } + "client": { "index": 7, "kind": "parameter", "displayName": "Client", "group": "advanced", "label": "advanced", "required": false, "type": "object", "javaType": "com.google.cloud.functions.v1.CloudFunctionsServiceClient", "deprecated": false, "autowired": true, "secret": false, "configurationClass": "org.apache.camel.component.google.functions.GoogleCloudFunctionsConfiguration", "configurationField": "configuration", "description": "The CloudFunctionsServiceClient to use for the call [...] } } diff --git a/components/camel-google/camel-google-functions/src/main/docs/google-functions-component.adoc b/components/camel-google/camel-google-functions/src/main/docs/google-functions-component.adoc index 31e183735267..cc7fc11e5f4a 100644 --- a/components/camel-google/camel-google-functions/src/main/docs/google-functions-component.adoc +++ b/components/camel-google/camel-google-functions/src/main/docs/google-functions-component.adoc @@ -2,7 +2,7 @@ :doctitle: Google Cloud Functions :shortname: google-functions :artifactid: camel-google-functions -:description: Manage and invoke Google Cloud Functions +:description: Manage and call functions in Google Cloud Functions. :since: 3.9 :supportlevel: Stable :tabs-sync-option: @@ -630,5 +630,3 @@ YAML:: uri: mock:result ---- ==== - - diff --git a/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsConfiguration.java b/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsConfiguration.java index 4481994b7ed0..ec6b2bfce7ff 100644 --- a/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsConfiguration.java +++ b/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsConfiguration.java @@ -27,27 +27,52 @@ import org.apache.camel.spi.UriPath; @UriParams public class GoogleCloudFunctionsConfiguration implements Cloneable, GoogleCommonConfiguration { - @UriPath(label = "common", description = "The user-defined name of the function") + @UriPath(label = "common", + description = "The name of the function, without the projects/{project}/locations/{location}/functions/ prefix." + + " The producer builds the full name from it and the project and location options. Not used by" + + " listFunctions and generateUploadUrl, and not used when pojoRequest=true.") @Metadata(required = true) private String functionName; - @UriParam(label = "common", description = "Service account key to authenticate an application as a service account") + @UriParam(label = "common", + description = "The service account key file (JSON) used to create the CloudFunctionsServiceClient. It is loaded as" + + " a resource with the classpath:, file:, http: or https: prefix, and a value without a prefix is" + + " read from the classpath. When not set, the Application Default Credentials are used, for example" + + " from the GOOGLE_APPLICATION_CREDENTIALS environment variable. Not used when the client option is" + + " set.") private String serviceAccountKey; - @UriParam(label = "producer", description = "The Google Cloud Project name where the Function is located") + @UriParam(label = "producer", + description = "The ID of the Google Cloud project that holds the functions. Every operation needs it, unless" + + " pojoRequest=true, where the request object names the project.") private String project; - @UriParam(label = "producer", description = "The Google Cloud Location (Region) where the Function is located") + @UriParam(label = "producer", + description = "The region of the functions, for example us-central1. Every operation needs it, unless" + + " pojoRequest=true, where the request object names the location.") private String location; @UriParam(label = "producer", + description = "The operation that the producer performs with the Cloud Functions v1 API. When not set," + + " callFunction is used, which Google allows only for limited traffic, such as tests. The" + + " CamelGoogleCloudFunctionsOperation header overrides this option. updateFunction works only" + + " with pojoRequest=true.", enums = "listFunctions,getFunction,callFunction,generateDownloadUrl,generateUploadUrl,createFunction,updateFunction,deleteFunction") private GoogleCloudFunctionsOperations operation; - @UriParam(defaultValue = "false", description = "Specifies if the request is a pojo request") + @UriParam(defaultValue = "false", + description = "Whether the message body is the request object of the Google Cloud SDK for the operation, which" + + " is sent as it is: a ListFunctionsRequest, a CloudFunctionName for getFunction, a" + + " CallFunctionRequest, a GenerateDownloadUrlRequest, a GenerateUploadUrlRequest, a" + + " CreateFunctionRequest, an UpdateFunctionRequest or a DeleteFunctionRequest. The project," + + " location and functionName options and the createFunction headers are then not used.") private boolean pojoRequest; - @UriParam(label = "advanced") + @UriParam(label = "advanced", + description = "The CloudFunctionsServiceClient to use for the calls. When not set, a single" + + " CloudFunctionsServiceClient in the registry is used, otherwise the endpoint creates one with" + + " the serviceAccountKey or the Application Default Credentials and closes it when it stops. A" + + " client that is set or autowired is not closed by the endpoint.") @Metadata(autowired = true) private CloudFunctionsServiceClient client; @@ -55,11 +80,6 @@ public class GoogleCloudFunctionsConfiguration implements Cloneable, GoogleCommo return functionName; } - /** - * Set the function name - * - * @param functionName - */ public void setFunctionName(String functionName) { this.functionName = functionName; } @@ -69,11 +89,6 @@ public class GoogleCloudFunctionsConfiguration implements Cloneable, GoogleCommo return serviceAccountKey; } - /** - * Service account key - * - * @param serviceAccountKey - */ public void setServiceAccountKey(String serviceAccountKey) { this.serviceAccountKey = serviceAccountKey; } @@ -82,11 +97,6 @@ public class GoogleCloudFunctionsConfiguration implements Cloneable, GoogleCommo return project; } - /** - * The project to work with. - * - * @param project - */ public void setProject(String project) { this.project = project; } @@ -95,11 +105,6 @@ public class GoogleCloudFunctionsConfiguration implements Cloneable, GoogleCommo return location; } - /** - * The target location. - * - * @param location - */ public void setLocation(String location) { this.location = location; } @@ -108,9 +113,6 @@ public class GoogleCloudFunctionsConfiguration implements Cloneable, GoogleCommo return operation; } - /** - * The operation to perform on the producer. - */ public void setOperation(GoogleCloudFunctionsOperations operation) { this.operation = operation; } @@ -119,9 +121,6 @@ public class GoogleCloudFunctionsConfiguration implements Cloneable, GoogleCommo return client; } - /** - * The client to use during service invocation. - */ public void setClient(CloudFunctionsServiceClient client) { this.client = client; } @@ -130,11 +129,6 @@ public class GoogleCloudFunctionsConfiguration implements Cloneable, GoogleCommo return pojoRequest; } - /** - * Configure the input type. If true the message will be POJO type. - * - * @param pojoRequest - */ public void setPojoRequest(boolean pojoRequest) { this.pojoRequest = pojoRequest; } diff --git a/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsConstants.java b/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsConstants.java index e08c81e40f3d..a34c9de3946b 100644 --- a/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsConstants.java +++ b/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsConstants.java @@ -19,37 +19,27 @@ package org.apache.camel.component.google.functions; import org.apache.camel.spi.Metadata; public interface GoogleCloudFunctionsConstants { - @Metadata(description = "The operation to perform", + @Metadata(description = "The operation to perform, which overrides the operation option.", javaType = "org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations") String OPERATION = "CamelGoogleCloudFunctionsOperation"; - @Metadata(description = "The name of the function (as defined in source code) that will be executed. Used for createFunction operation", + @Metadata(description = "The name of the function in the source code that runs when the new function is called, such as" + + " the exported function for Node.js or the fully qualified class name for Java. createFunction" + + " requires it, unless pojoRequest=true.", javaType = "String") String ENTRY_POINT = "CamelGoogleCloudFunctionsEntryPoint"; - @Metadata(description = """ - The runtime in which to run the function. - - Possible values are: - - * `nodejs10` - * `nodejs12` - * `nodejs14` - * `python37` - * `python38` - * `python39` - * `go111` - * `go113` - * `java11` - * `dotnet3` - * `ruby26` - * `nodejs6` - * `nodejs8` - - Used for createFunction operation.""", + @Metadata(description = "The runtime ID of the new function, for example nodejs20, python312 or java17. createFunction" + + " requires it, unless pojoRequest=true. Google lists the supported runtime IDs in the Cloud" + + " Functions documentation.", javaType = "String") String RUNTIME = "CamelGoogleCloudFunctionsRuntime"; - @Metadata(description = "The Google Cloud Storage URL, starting with `gs://`, pointing to the zip archive which contains the function. Used for createFunction operation.", + @Metadata(description = "The Cloud Storage URL, starting with gs://, of the ZIP archive that holds the source code of the" + + " new function. createFunction requires it, unless pojoRequest=true, and creates the function" + + " with an HTTPS trigger.", javaType = "String") String SOURCE_ARCHIVE_URL = "CamelGoogleCloudFunctionsSourceArchiveUrl"; - @Metadata(description = "The response object resulting from the Google Functions Client invocation", javaType = "Object") + @Metadata(description = "The full response of the service: the CallFunctionResponse for callFunction, the" + + " GenerateDownloadUrlResponse for generateDownloadUrl, or the GenerateUploadUrlResponse for" + + " generateUploadUrl. The message body holds only the result or the signed URL.", + javaType = "Object") String RESPONSE_OBJECT = "CamelGoogleCloudFunctionsResponseObject"; } diff --git a/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsEndpoint.java b/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsEndpoint.java index aa65ce338686..3db120fdf17c 100644 --- a/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsEndpoint.java +++ b/components/camel-google/camel-google-functions/src/main/java/org/apache/camel/component/google/functions/GoogleCloudFunctionsEndpoint.java @@ -31,10 +31,7 @@ import org.apache.camel.support.DefaultEndpoint; import org.apache.camel.util.ObjectHelper; /** - * Manage and invoke Google Cloud Functions - * - * Google Functions Endpoint definition represents a function within the GCP and contains configuration to customize the - * behavior of Producer. + * Manage and call functions in Google Cloud Functions. */ @UriEndpoint(firstVersion = "3.9.0", scheme = "google-functions", title = "Google Cloud Functions", syntax = "google-functions:functionName", category = { 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 296ee3f601a1..93a1802bd658 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 @@ -2095,7 +2095,7 @@ public interface ComponentsBuilderFactory { } /** * Google Cloud Functions (camel-google-functions) - * Manage and invoke Google Cloud Functions + * Manage and call functions in Google Cloud Functions. * * Category: cloud * Since: 3.9 diff --git a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GoogleFunctionsComponentBuilderFactory.java b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GoogleFunctionsComponentBuilderFactory.java index 4edaca211e1a..86b693ae0f37 100644 --- a/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GoogleFunctionsComponentBuilderFactory.java +++ b/dsl/camel-componentdsl/src/generated/java/org/apache/camel/builder/component/dsl/GoogleFunctionsComponentBuilderFactory.java @@ -24,7 +24,7 @@ import org.apache.camel.builder.component.ComponentBuilder; import org.apache.camel.component.google.functions.GoogleCloudFunctionsComponent; /** - * Manage and invoke Google Cloud Functions + * Manage and call functions in Google Cloud Functions. * * Generated by camel build tools - do NOT edit this file! */ @@ -33,7 +33,7 @@ public interface GoogleFunctionsComponentBuilderFactory { /** * Google Cloud Functions (camel-google-functions) - * Manage and invoke Google Cloud Functions + * Manage and call functions in Google Cloud Functions. * * Category: cloud * Since: 3.9 diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java index 2e95820ec2c8..c2e5e45fa9ea 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/EndpointHeaderBuilders.java @@ -1685,7 +1685,7 @@ public class EndpointHeaderBuilders { } /** * Google Cloud Functions (camel-google-functions) - * Manage and invoke Google Cloud Functions + * Manage and call functions in Google Cloud Functions. * * Category: cloud * Since: 3.9 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 74e7bccfb06c..e71de456dc62 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 @@ -7092,7 +7092,7 @@ public class StaticEndpointBuilders { } /** * Google Cloud Functions (camel-google-functions) - * Manage and invoke Google Cloud Functions + * Manage and call functions in Google Cloud Functions. * * Category: cloud * Since: 3.9 @@ -7101,7 +7101,11 @@ public class StaticEndpointBuilders { * Syntax: <code>google-functions:functionName</code> * * Path parameter: functionName (required) - * The user-defined name of the function + * The name of the function, without the + * projects/{project}/locations/{location}/functions/ prefix. The producer + * builds the full name from it and the project and location options. Not + * used by listFunctions and generateUploadUrl, and not used when + * pojoRequest=true. * * @param path functionName * @return the dsl builder @@ -7111,7 +7115,7 @@ public class StaticEndpointBuilders { } /** * Google Cloud Functions (camel-google-functions) - * Manage and invoke Google Cloud Functions + * Manage and call functions in Google Cloud Functions. * * Category: cloud * Since: 3.9 @@ -7120,7 +7124,11 @@ public class StaticEndpointBuilders { * Syntax: <code>google-functions:functionName</code> * * Path parameter: functionName (required) - * The user-defined name of the function + * The name of the function, without the + * projects/{project}/locations/{location}/functions/ prefix. The producer + * builds the full name from it and the project and location options. Not + * used by listFunctions and generateUploadUrl, and not used when + * pojoRequest=true. * * @param componentName to use a custom component name for the endpoint * instead of the default name diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleCloudFunctionsEndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleCloudFunctionsEndpointBuilderFactory.java index c86ac4ad1e7e..fb29cbfddde9 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleCloudFunctionsEndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/GoogleCloudFunctionsEndpointBuilderFactory.java @@ -27,7 +27,7 @@ import org.apache.camel.builder.EndpointProducerBuilder; import org.apache.camel.builder.endpoint.AbstractEndpointBuilder; /** - * Manage and invoke Google Cloud Functions + * Manage and call functions in Google Cloud Functions. * * Generated by camel build tools - do NOT edit this file! */ @@ -45,8 +45,13 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { } /** - * Service account key to authenticate an application as a service - * account. + * The service account key file (JSON) used to create the + * CloudFunctionsServiceClient. It is loaded as a resource with the + * classpath:, file:, http: or https: prefix, and a value without a + * prefix is read from the classpath. When not set, the Application + * Default Credentials are used, for example from the + * GOOGLE_APPLICATION_CREDENTIALS environment variable. Not used when + * the client option is set. * * The option is a: <code>java.lang.String</code> type. * @@ -60,7 +65,9 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { return this; } /** - * The Google Cloud Location (Region) where the Function is located. + * The region of the functions, for example us-central1. Every operation + * needs it, unless pojoRequest=true, where the request object names the + * location. * * The option is a: <code>java.lang.String</code> type. * @@ -74,7 +81,11 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { return this; } /** - * The operation to perform on the producer. + * The operation that the producer performs with the Cloud Functions v1 + * API. When not set, callFunction is used, which Google allows only for + * limited traffic, such as tests. The + * CamelGoogleCloudFunctionsOperation header overrides this option. + * updateFunction works only with pojoRequest=true. * * The option is a: * <code>org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations</code> type. @@ -89,7 +100,11 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { return this; } /** - * The operation to perform on the producer. + * The operation that the producer performs with the Cloud Functions v1 + * API. When not set, callFunction is used, which Google allows only for + * limited traffic, such as tests. The + * CamelGoogleCloudFunctionsOperation header overrides this option. + * updateFunction works only with pojoRequest=true. * * The option will be converted to a * <code>org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations</code> type. @@ -104,7 +119,14 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { return this; } /** - * Specifies if the request is a pojo request. + * Whether the message body is the request object of the Google Cloud + * SDK for the operation, which is sent as it is: a + * ListFunctionsRequest, a CloudFunctionName for getFunction, a + * CallFunctionRequest, a GenerateDownloadUrlRequest, a + * GenerateUploadUrlRequest, a CreateFunctionRequest, an + * UpdateFunctionRequest or a DeleteFunctionRequest. The project, + * location and functionName options and the createFunction headers are + * then not used. * * The option is a: <code>boolean</code> type. * @@ -119,7 +141,14 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { return this; } /** - * Specifies if the request is a pojo request. + * Whether the message body is the request object of the Google Cloud + * SDK for the operation, which is sent as it is: a + * ListFunctionsRequest, a CloudFunctionName for getFunction, a + * CallFunctionRequest, a GenerateDownloadUrlRequest, a + * GenerateUploadUrlRequest, a CreateFunctionRequest, an + * UpdateFunctionRequest or a DeleteFunctionRequest. The project, + * location and functionName options and the createFunction headers are + * then not used. * * The option will be converted to a <code>boolean</code> type. * @@ -134,7 +163,9 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { return this; } /** - * The Google Cloud Project name where the Function is located. + * The ID of the Google Cloud project that holds the functions. Every + * operation needs it, unless pojoRequest=true, where the request object + * names the project. * * The option is a: <code>java.lang.String</code> type. * @@ -206,7 +237,11 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { return this; } /** - * The client to use during service invocation. + * The CloudFunctionsServiceClient to use for the calls. When not set, a + * single CloudFunctionsServiceClient in the registry is used, otherwise + * the endpoint creates one with the serviceAccountKey or the + * Application Default Credentials and closes it when it stops. A client + * that is set or autowired is not closed by the endpoint. * * The option is a: * <code>com.google.cloud.functions.v1.CloudFunctionsServiceClient</code> type. @@ -221,7 +256,11 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { return this; } /** - * The client to use during service invocation. + * The CloudFunctionsServiceClient to use for the calls. When not set, a + * single CloudFunctionsServiceClient in the registry is used, otherwise + * the endpoint creates one with the serviceAccountKey or the + * Application Default Credentials and closes it when it stops. A client + * that is set or autowired is not closed by the endpoint. * * The option will be converted to a * <code>com.google.cloud.functions.v1.CloudFunctionsServiceClient</code> type. @@ -240,7 +279,7 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { public interface GoogleCloudFunctionsBuilders { /** * Google Cloud Functions (camel-google-functions) - * Manage and invoke Google Cloud Functions + * Manage and call functions in Google Cloud Functions. * * Category: cloud * Since: 3.9 @@ -253,7 +292,7 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { } /** * Google Cloud Functions (camel-google-functions) - * Manage and invoke Google Cloud Functions + * Manage and call functions in Google Cloud Functions. * * Category: cloud * Since: 3.9 @@ -262,7 +301,11 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { * Syntax: <code>google-functions:functionName</code> * * Path parameter: functionName (required) - * The user-defined name of the function + * The name of the function, without the + * projects/{project}/locations/{location}/functions/ prefix. The + * producer builds the full name from it and the project and location + * options. Not used by listFunctions and generateUploadUrl, and not + * used when pojoRequest=true. * * @param path functionName * @return the dsl builder @@ -272,7 +315,7 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { } /** * Google Cloud Functions (camel-google-functions) - * Manage and invoke Google Cloud Functions + * Manage and call functions in Google Cloud Functions. * * Category: cloud * Since: 3.9 @@ -281,7 +324,11 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { * Syntax: <code>google-functions:functionName</code> * * Path parameter: functionName (required) - * The user-defined name of the function + * The name of the function, without the + * projects/{project}/locations/{location}/functions/ prefix. The + * producer builds the full name from it and the project and location + * options. Not used by listFunctions and generateUploadUrl, and not + * used when pojoRequest=true. * * @param componentName to use a custom component name for the endpoint * instead of the default name @@ -304,7 +351,7 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { public static final GoogleCloudFunctionsHeaderNameBuilder INSTANCE = new GoogleCloudFunctionsHeaderNameBuilder(); /** - * The operation to perform. + * The operation to perform, which overrides the operation option. * * The option is a: {@code * org.apache.camel.component.google.functions.GoogleCloudFunctionsOperations} type. @@ -317,8 +364,10 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { return "CamelGoogleCloudFunctionsOperation"; } /** - * The name of the function (as defined in source code) that will be - * executed. Used for createFunction operation. + * The name of the function in the source code that runs when the new + * function is called, such as the exported function for Node.js or the + * fully qualified class name for Java. createFunction requires it, + * unless pojoRequest=true. * * The option is a: {@code String} type. * @@ -331,10 +380,10 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { return "CamelGoogleCloudFunctionsEntryPoint"; } /** - * The runtime in which to run the function. Possible values are: - * nodejs10 nodejs12 nodejs14 python37 python38 python39 go111 go113 - * java11 dotnet3 ruby26 nodejs6 nodejs8 Used for createFunction - * operation. + * The runtime ID of the new function, for example nodejs20, python312 + * or java17. createFunction requires it, unless pojoRequest=true. + * Google lists the supported runtime IDs in the Cloud Functions + * documentation. * * The option is a: {@code String} type. * @@ -346,9 +395,10 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { return "CamelGoogleCloudFunctionsRuntime"; } /** - * The Google Cloud Storage URL, starting with gs://, pointing to the - * zip archive which contains the function. Used for createFunction - * operation. + * The Cloud Storage URL, starting with gs://, of the ZIP archive that + * holds the source code of the new function. createFunction requires + * it, unless pojoRequest=true, and creates the function with an HTTPS + * trigger. * * The option is a: {@code String} type. * @@ -361,8 +411,11 @@ public interface GoogleCloudFunctionsEndpointBuilderFactory { return "CamelGoogleCloudFunctionsSourceArchiveUrl"; } /** - * The response object resulting from the Google Functions Client - * invocation. + * The full response of the service: the CallFunctionResponse for + * callFunction, the GenerateDownloadUrlResponse for + * generateDownloadUrl, or the GenerateUploadUrlResponse for + * generateUploadUrl. The message body holds only the result or the + * signed URL. * * The option is a: {@code Object} type. * diff --git a/tasks/component-descriptions.md b/tasks/component-descriptions.md index 9c03b48099b1..c3512b4c98a1 100644 --- a/tasks/component-descriptions.md +++ b/tasks/component-descriptions.md @@ -187,7 +187,7 @@ or removes its row. | camel-google-calendar | google-calendar, google-calendar-stream | | | camel-google-drive | google-drive | | | camel-google-firestore | google-firestore | yes | -| camel-google-functions | google-functions | | +| camel-google-functions | google-functions | yes | | camel-google-mail | google-mail, google-mail-stream | | | camel-google-pubsub | google-pubsub | | | camel-google-secret-manager | google-secret-manager | |
