davsclaus opened a new pull request, #30435: URL: https://github.com/apache/camel/pull/30435
## Description [CAMEL-27189](https://issues.apache.org/jira/browse/CAMEL-27189): the `storageClass` option (component and endpoint) is typed `com.google.cloud.storage.StorageClass`. That type is a `StringEnumValue`, not a Java enum, and Camel had no type converter for it. So `storageClass=NEARLINE` in a URI, or `camel.component.google-storage.storageClass=...`, failed with `No type converter available to convert from type: java.lang.String to the required type: com.google.cloud.storage.StorageClass`. This happened even for the documented default `STANDARD`. Only a bean reference worked. - New `GoogleCloudStorageConverter` (generated loader): it converts with `StorageClass.valueOfStrict(name)`, after trimming and upper-casing the name. An unknown name fails instead of creating a storage class that Cloud Storage would reject. - The option lists the known storage classes as `enums` (`STANDARD`, `NEARLINE`, `COLDLINE`, `ARCHIVE`, and the legacy `REGIONAL`, `MULTI_REGIONAL`, `DURABLE_REDUCED_AVAILABILITY`), so tooling can offer them. The catalog is regenerated. The option still only sets the class of a bucket that `autoCreateBucket` creates. Setting the class of uploaded objects is [CAMEL-27190](https://issues.apache.org/jira/browse/CAMEL-27190), a separate PR on top of this one. Both are needed for a `storageClass` option on the `google-storage-sink` Kamelet (apache/camel-kamelets#3280). ## Tests `GoogleCloudStorageClassConverterTest` (on the local fake storage): - `NEARLINE` and lower-case `coldline` from the URI - `ARCHIVE` bound on the component through its configurer - an unknown name fails to resolve the endpoint - a bucket that `autoCreateBucket` creates gets the configured class All 81 unit tests of the module pass. _Claude Code on behalf of Claus Ibsen_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
