From b8613865aafa70ca30bfcd0e8a1c0b2c424b34f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Pupier?= Date: Mon, 9 Sep 2024 10:23:49 +0200 Subject: [PATCH] CAMEL-20888 - Remove Kotlin DSL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Kotlin DSL was deprecated in Camel 4.7 It was not used a lot and it takes a fair part of the build time. Signed-off-by: Aurélien Pupier --- README.md | 2 +- bom/camel-bom/pom.xml | 10 - .../camel-main-configuration-metadata.json | 2 +- .../apache/camel/catalog/others.properties | 2 - .../camel/catalog/others/kotlin-api.json | 15 - .../camel/catalog/others/kotlin-dsl.json | 16 - .../camel/catalog/schemas/camel-spring.xsd | 6 +- .../apache/camel/spring/xml/camelContext.json | 2 +- .../spring/xml/CamelContextFactoryBean.java | 2 +- .../java/org/apache/camel/CamelContext.java | 4 +- .../docs/modules/eips/pages/choice-eip.adoc | 2 +- .../camel-main-configuration-metadata.json | 2 +- core/camel-main/src/main/docs/main.adoc | 2 +- .../main/DefaultConfigurationProperties.java | 4 +- docs/components/modules/others/nav.adoc | 2 - docs/gulpfile.js | 1 - .../pages/camel-4x-upgrade-guide-4_9.adoc | 19 + docs/user-manual/modules/ROOT/pages/dsl.adoc | 1 - .../user-manual/modules/ROOT/pages/index.adoc | 2 +- .../ROOT/pages/route-configuration.adoc | 2 +- .../modules/faq/pages/what-is-camel.adoc | 2 +- .../core/commands/ExportBaseCommand.java | 2 - .../dsl/jbang/core/common/GistHelper.java | 3 +- .../dsl/jbang/core/common/GitHubHelper.java | 4 +- .../dsl/jbang/core/common/ProcessHelper.java | 2 +- .../dsl/jbang/core/common/SourceHelper.java | 2 +- .../src/main/resources/templates/kts.tmpl | 4 - .../camel/dsl/jbang/it/RunCommandITCase.java | 1 - .../camel/dsl/jsh/JshRoutesBuilderLoader.java | 2 +- .../DependencyDownloaderRoutesLoader.java | 2 - dsl/camel-kotlin-api/pom.xml | 218 -- .../kotlin/components/Activemq6UriDsl.kt | 1543 -------------- .../camel/kotlin/components/ActivemqUriDsl.kt | 1543 -------------- .../camel/kotlin/components/AmqpUriDsl.kt | 1532 -------------- .../camel/kotlin/components/ArangodbUriDsl.kt | 169 -- .../camel/kotlin/components/As2UriDsl.kt | 398 ---- .../camel/kotlin/components/AsteriskUriDsl.kt | 150 -- .../components/AtmosphereWebsocketUriDsl.kt | 472 ----- .../camel/kotlin/components/AtomUriDsl.kt | 365 ---- .../camel/kotlin/components/AvroUriDsl.kt | 221 -- .../kotlin/components/Aws2AthenaUriDsl.kt | 407 ---- .../camel/kotlin/components/Aws2CwUriDsl.kt | 271 --- .../camel/kotlin/components/Aws2DdbUriDsl.kt | 321 --- .../kotlin/components/Aws2DdbstreamUriDsl.kt | 483 ----- .../camel/kotlin/components/Aws2Ec2UriDsl.kt | 258 --- .../camel/kotlin/components/Aws2EcsUriDsl.kt | 256 --- .../camel/kotlin/components/Aws2EksUriDsl.kt | 256 --- .../components/Aws2EventbridgeUriDsl.kt | 263 --- .../camel/kotlin/components/Aws2IamUriDsl.kt | 257 --- .../components/Aws2KinesisFirehoseUriDsl.kt | 258 --- .../kotlin/components/Aws2KinesisUriDsl.kt | 603 ------ .../camel/kotlin/components/Aws2KmsUriDsl.kt | 256 --- .../kotlin/components/Aws2LambdaUriDsl.kt | 257 --- .../camel/kotlin/components/Aws2MqUriDsl.kt | 256 --- .../camel/kotlin/components/Aws2MskUriDsl.kt | 256 --- .../components/Aws2RedshiftDataUriDsl.kt | 258 --- .../camel/kotlin/components/Aws2S3UriDsl.kt | 989 --------- .../camel/kotlin/components/Aws2SesUriDsl.kt | 290 --- .../camel/kotlin/components/Aws2SnsUriDsl.kt | 338 --- .../camel/kotlin/components/Aws2SqsUriDsl.kt | 878 -------- .../components/Aws2StepFunctionsUriDsl.kt | 259 --- .../camel/kotlin/components/Aws2StsUriDsl.kt | 233 -- .../kotlin/components/Aws2TimestreamUriDsl.kt | 255 --- .../kotlin/components/Aws2TranslateUriDsl.kt | 284 --- .../AwsBedrockAgentRuntimeUriDsl.kt | 272 --- .../components/AwsBedrockAgentUriDsl.kt | 536 ----- .../kotlin/components/AwsBedrockUriDsl.kt | 263 --- .../kotlin/components/AwsCloudtrailUriDsl.kt | 484 ----- .../kotlin/components/AwsConfigUriDsl.kt | 256 --- .../components/AwsSecretsManagerUriDsl.kt | 272 --- .../kotlin/components/AzureCosmosdbUriDsl.kt | 462 ---- .../kotlin/components/AzureEventhubsUriDsl.kt | 329 --- .../kotlin/components/AzureFilesUriDsl.kt | 1447 ------------- .../kotlin/components/AzureKeyVaultUriDsl.kt | 118 -- .../components/AzureServicebusUriDsl.kt | 333 --- .../components/AzureStorageBlobUriDsl.kt | 668 ------ .../components/AzureStorageDatalakeUriDsl.kt | 649 ------ .../components/AzureStorageQueueUriDsl.kt | 459 ---- .../camel/kotlin/components/BeanUriDsl.kt | 106 - .../kotlin/components/BeanValidatorUriDsl.kt | 132 -- .../camel/kotlin/components/BonitaUriDsl.kt | 111 - .../camel/kotlin/components/BoxUriDsl.kt | 225 -- .../kotlin/components/BraintreeUriDsl.kt | 197 -- .../camel/kotlin/components/BrowseUriDsl.kt | 122 -- .../kotlin/components/CaffeineCacheUriDsl.kt | 238 --- .../components/CaffeineLoadcacheUriDsl.kt | 238 --- .../kotlin/components/ChatscriptUriDsl.kt | 127 -- .../camel/kotlin/components/ChunkUriDsl.kt | 166 -- .../camel/kotlin/components/ClassUriDsl.kt | 106 - .../camel/kotlin/components/CmSmsUriDsl.kt | 123 -- .../camel/kotlin/components/CoapUriDsl.kt | 256 --- .../camel/kotlin/components/CometdUriDsl.kt | 313 --- .../camel/kotlin/components/ConsulUriDsl.kt | 298 --- .../kotlin/components/ControlbusUriDsl.kt | 148 -- .../kotlin/components/CouchbaseUriDsl.kt | 603 ------ .../camel/kotlin/components/CouchdbUriDsl.kt | 252 --- .../camel/kotlin/components/CqlUriDsl.kt | 450 ---- .../camel/kotlin/components/CronUriDsl.kt | 105 - .../camel/kotlin/components/CryptoUriDsl.kt | 243 --- .../camel/kotlin/components/CxfUriDsl.kt | 464 ---- .../camel/kotlin/components/CxfrsUriDsl.kt | 437 ---- .../kotlin/components/DataformatUriDsl.kt | 86 - .../kotlin/components/DatasetTestUriDsl.kt | 319 --- .../camel/kotlin/components/DatasetUriDsl.kt | 379 ---- .../kotlin/components/DebeziumDb2UriDsl.kt | 953 --------- .../components/DebeziumMongodbUriDsl.kt | 838 -------- .../kotlin/components/DebeziumMysqlUriDsl.kt | 1355 ------------ .../kotlin/components/DebeziumOracleUriDsl.kt | 1442 ------------- .../components/DebeziumPostgresUriDsl.kt | 1250 ----------- .../components/DebeziumSqlserverUriDsl.kt | 1071 ---------- .../camel/kotlin/components/Dhis2UriDsl.kt | 383 ---- .../kotlin/components/DigitaloceanUriDsl.kt | 163 -- .../camel/kotlin/components/DirectUriDsl.kt | 189 -- .../kotlin/components/DisruptorUriDsl.kt | 232 -- .../kotlin/components/DisruptorVmUriDsl.kt | 232 -- .../camel/kotlin/components/DjlUriDsl.kt | 111 - .../camel/kotlin/components/DnsUriDsl.kt | 76 - .../camel/kotlin/components/DockerUriDsl.kt | 305 --- .../camel/kotlin/components/DrillUriDsl.kt | 113 - .../camel/kotlin/components/DropboxUriDsl.kt | 218 -- .../components/DynamicRouterControlUriDsl.kt | 134 -- .../kotlin/components/DynamicRouterUriDsl.kt | 360 ---- .../camel/kotlin/components/EhcacheUriDsl.kt | 223 -- .../ElasticsearchRestClientUriDsl.kt | 196 -- .../kotlin/components/ElasticsearchUriDsl.kt | 324 --- .../camel/kotlin/components/Etcd3UriDsl.kt | 306 --- .../camel/kotlin/components/ExecUriDsl.kt | 156 -- .../camel/kotlin/components/FhirUriDsl.kt | 567 ----- .../camel/kotlin/components/FileUriDsl.kt | 1490 ------------- .../kotlin/components/FileWatchUriDsl.kt | 216 -- .../camel/kotlin/components/FlatpackUriDsl.kt | 409 ---- .../camel/kotlin/components/FlinkUriDsl.kt | 118 -- .../camel/kotlin/components/FopUriDsl.kt | 90 - .../kotlin/components/FreemarkerUriDsl.kt | 160 -- .../camel/kotlin/components/FtpUriDsl.kt | 1666 --------------- .../camel/kotlin/components/FtpsUriDsl.kt | 1748 --------------- .../camel/kotlin/components/GeocoderUriDsl.kt | 199 -- .../camel/kotlin/components/GitUriDsl.kt | 207 -- .../camel/kotlin/components/GithubUriDsl.kt | 397 ---- .../components/GoogleBigquerySqlUriDsl.kt | 102 - .../kotlin/components/GoogleBigqueryUriDsl.kt | 119 -- .../components/GoogleCalendarStreamUriDsl.kt | 459 ---- .../kotlin/components/GoogleCalendarUriDsl.kt | 429 ---- .../kotlin/components/GoogleDriveUriDsl.kt | 414 ---- .../components/GoogleFunctionsUriDsl.kt | 125 -- .../components/GoogleMailStreamUriDsl.kt | 421 ---- .../kotlin/components/GoogleMailUriDsl.kt | 405 ---- .../components/GooglePubsubLiteUriDsl.kt | 233 -- .../kotlin/components/GooglePubsubUriDsl.kt | 259 --- .../components/GoogleSecretManagerUriDsl.kt | 111 - .../components/GoogleSheetsStreamUriDsl.kt | 433 ---- .../kotlin/components/GoogleSheetsUriDsl.kt | 424 ---- .../kotlin/components/GoogleStorageUriDsl.kt | 482 ----- .../camel/kotlin/components/GrapeUriDsl.kt | 76 - .../camel/kotlin/components/GraphqlUriDsl.kt | 153 -- .../camel/kotlin/components/GrpcUriDsl.kt | 635 ------ .../kotlin/components/GuavaEventbusUriDsl.kt | 142 -- .../kotlin/components/HashicorpVaultUriDsl.kt | 125 -- .../components/HazelcastAtomicvalueUriDsl.kt | 106 - .../components/HazelcastInstanceUriDsl.kt | 128 -- .../kotlin/components/HazelcastListUriDsl.kt | 152 -- .../kotlin/components/HazelcastMapUriDsl.kt | 152 -- .../components/HazelcastMultimapUriDsl.kt | 152 -- .../kotlin/components/HazelcastQueueUriDsl.kt | 188 -- .../HazelcastReplicatedmapUriDsl.kt | 152 -- .../components/HazelcastRingbufferUriDsl.kt | 106 - .../kotlin/components/HazelcastSedaUriDsl.kt | 232 -- .../kotlin/components/HazelcastSetUriDsl.kt | 152 -- .../kotlin/components/HazelcastTopicUriDsl.kt | 166 -- .../camel/kotlin/components/HttpUriDsl.kt | 651 ------ .../kotlin/components/HwcloudDmsUriDsl.kt | 312 --- .../kotlin/components/HwcloudFrsUriDsl.kt | 298 --- .../components/HwcloudFunctiongraphUriDsl.kt | 182 -- .../kotlin/components/HwcloudIamUriDsl.kt | 168 -- .../HwcloudImagerecognitionUriDsl.kt | 237 --- .../kotlin/components/HwcloudObsUriDsl.kt | 522 ----- .../kotlin/components/HwcloudSmnUriDsl.kt | 190 -- .../kotlin/components/Iec60870ClientUriDsl.kt | 298 --- .../kotlin/components/Iec60870ServerUriDsl.kt | 312 --- .../kotlin/components/IgniteCacheUriDsl.kt | 280 --- .../kotlin/components/IgniteComputeUriDsl.kt | 156 -- .../kotlin/components/IgniteEventsUriDsl.kt | 146 -- .../kotlin/components/IgniteIdgenUriDsl.kt | 147 -- .../components/IgniteMessagingUriDsl.kt | 184 -- .../kotlin/components/IgniteQueueUriDsl.kt | 155 -- .../kotlin/components/IgniteSetUriDsl.kt | 126 -- .../camel/kotlin/components/ImapUriDsl.kt | 917 -------- .../components/InfinispanEmbeddedUriDsl.kt | 259 --- .../kotlin/components/InfinispanUriDsl.kt | 292 --- .../kotlin/components/Influxdb2UriDsl.kt | 139 -- .../camel/kotlin/components/InfluxdbUriDsl.kt | 146 -- .../camel/kotlin/components/IrcUriDsl.kt | 407 ---- .../camel/kotlin/components/IronmqUriDsl.kt | 469 ----- .../camel/kotlin/components/JcacheUriDsl.kt | 323 --- .../camel/kotlin/components/JcrUriDsl.kt | 235 --- .../camel/kotlin/components/JdbcUriDsl.kt | 248 --- .../camel/kotlin/components/JettyUriDsl.kt | 610 ------ .../kotlin/components/JgroupsRaftUriDsl.kt | 138 -- .../camel/kotlin/components/JgroupsUriDsl.kt | 145 -- .../camel/kotlin/components/JiraUriDsl.kt | 431 ---- .../camel/kotlin/components/JmsUriDsl.kt | 1532 -------------- .../camel/kotlin/components/JmxUriDsl.kt | 404 ---- .../camel/kotlin/components/JoltUriDsl.kt | 132 -- .../camel/kotlin/components/JooqUriDsl.kt | 364 ---- .../camel/kotlin/components/JpaUriDsl.kt | 673 ------ .../camel/kotlin/components/JsltUriDsl.kt | 166 -- .../kotlin/components/JsonPatchUriDsl.kt | 113 - .../kotlin/components/JsonValidatorUriDsl.kt | 188 -- .../camel/kotlin/components/JsonataUriDsl.kt | 134 -- .../camel/kotlin/components/Jt400UriDsl.kt | 511 ----- .../camel/kotlin/components/JteUriDsl.kt | 131 -- .../camel/kotlin/components/KafkaUriDsl.kt | 1563 -------------- .../camel/kotlin/components/KameletUriDsl.kt | 204 -- .../camel/kotlin/components/KnativeUriDsl.kt | 238 --- .../components/KubernetesConfigMapsUriDsl.kt | 351 ---- .../components/KubernetesCronjobUriDsl.kt | 235 --- .../KubernetesCustomResourcesUriDsl.kt | 351 ---- .../components/KubernetesDeploymentsUriDsl.kt | 351 ---- .../components/KubernetesEventsUriDsl.kt | 351 ---- .../kotlin/components/KubernetesHpaUriDsl.kt | 352 ---- .../kotlin/components/KubernetesJobUriDsl.kt | 235 --- .../components/KubernetesNamespacesUriDsl.kt | 351 ---- .../components/KubernetesNodesUriDsl.kt | 351 ---- ...KubernetesPersistentVolumesClaimsUriDsl.kt | 237 --- .../KubernetesPersistentVolumesUriDsl.kt | 236 --- .../kotlin/components/KubernetesPodsUriDsl.kt | 351 ---- .../KubernetesReplicationControllersUriDsl.kt | 353 ---- .../KubernetesResourcesQuotaUriDsl.kt | 235 --- .../components/KubernetesSecretsUriDsl.kt | 235 --- .../KubernetesServiceAccountsUriDsl.kt | 235 --- .../components/KubernetesServicesUriDsl.kt | 351 ---- .../camel/kotlin/components/KuduUriDsl.kt | 104 - .../components/Langchain4jChatUriDsl.kt | 158 -- .../components/Langchain4jEmbeddingsUriDsl.kt | 83 - .../components/Langchain4jToolsUriDsl.kt | 157 -- .../components/Langchain4jWebSearchUriDsl.kt | 189 -- .../camel/kotlin/components/LanguageUriDsl.kt | 182 -- .../camel/kotlin/components/LdapUriDsl.kt | 123 -- .../camel/kotlin/components/LdifUriDsl.kt | 77 - .../camel/kotlin/components/LogUriDsl.kt | 523 ----- .../camel/kotlin/components/LprUriDsl.kt | 193 -- .../camel/kotlin/components/LuceneUriDsl.kt | 126 -- .../kotlin/components/LumberjackUriDsl.kt | 124 -- .../kotlin/components/MapstructUriDsl.kt | 90 - .../camel/kotlin/components/MasterUriDsl.kt | 109 - .../camel/kotlin/components/MetricsUriDsl.kt | 157 -- .../kotlin/components/MicrometerUriDsl.kt | 131 -- .../camel/kotlin/components/MilvusUriDsl.kt | 119 -- .../camel/kotlin/components/MinaUriDsl.kt | 455 ---- .../camel/kotlin/components/MinioUriDsl.kt | 809 ------- .../camel/kotlin/components/MllpUriDsl.kt | 493 ----- .../camel/kotlin/components/MockUriDsl.kt | 271 --- .../kotlin/components/MongodbGridfsUriDsl.kt | 214 -- .../camel/kotlin/components/MongodbUriDsl.kt | 748 ------- .../camel/kotlin/components/MustacheUriDsl.kt | 152 -- .../camel/kotlin/components/MvelUriDsl.kt | 138 -- .../kotlin/components/MybatisBeanUriDsl.kt | 117 -- .../camel/kotlin/components/MybatisUriDsl.kt | 447 ---- .../camel/kotlin/components/NatsUriDsl.kt | 439 ---- .../kotlin/components/NettyHttpUriDsl.kt | 1259 ----------- .../camel/kotlin/components/NettyUriDsl.kt | 1069 ---------- .../camel/kotlin/components/NitriteUriDsl.kt | 158 -- .../camel/kotlin/components/OaipmhUriDsl.kt | 416 ---- .../camel/kotlin/components/Olingo2UriDsl.kt | 476 ----- .../camel/kotlin/components/Olingo4UriDsl.kt | 458 ---- .../kotlin/components/OpensearchUriDsl.kt | 302 --- .../components/OpenshiftBuildConfigsUriDsl.kt | 235 --- .../components/OpenshiftBuildsUriDsl.kt | 235 --- .../OpenshiftDeploymentconfigsUriDsl.kt | 351 ---- .../components/OpenstackCinderUriDsl.kt | 132 -- .../components/OpenstackGlanceUriDsl.kt | 125 -- .../components/OpenstackKeystoneUriDsl.kt | 126 -- .../components/OpenstackNeutronUriDsl.kt | 132 -- .../kotlin/components/OpenstackNovaUriDsl.kt | 132 -- .../kotlin/components/OpenstackSwiftUriDsl.kt | 132 -- .../kotlin/components/OptaplannerUriDsl.kt | 187 -- .../kotlin/components/PahoMqtt5UriDsl.kt | 534 ----- .../camel/kotlin/components/PahoUriDsl.kt | 515 ----- .../camel/kotlin/components/PdfUriDsl.kt | 173 -- .../components/PgReplicationSlotUriDsl.kt | 402 ---- .../camel/kotlin/components/PgeventUriDsl.kt | 184 -- .../camel/kotlin/components/PineconeUriDsl.kt | 83 - .../kotlin/components/PlatformHttpUriDsl.kt | 287 --- .../camel/kotlin/components/Plc4xUriDsl.kt | 165 -- .../camel/kotlin/components/PubnubUriDsl.kt | 214 -- .../camel/kotlin/components/PulsarUriDsl.kt | 615 ------ .../camel/kotlin/components/QdrantUriDsl.kt | 126 -- .../camel/kotlin/components/QuartzUriDsl.kt | 303 --- .../camel/kotlin/components/QuickfixUriDsl.kt | 154 -- .../components/ReactiveStreamsUriDsl.kt | 216 -- .../camel/kotlin/components/RefUriDsl.kt | 122 -- .../camel/kotlin/components/RestApiUriDsl.kt | 117 -- .../kotlin/components/RestOpenapiUriDsl.kt | 260 --- .../camel/kotlin/components/RestUriDsl.kt | 238 --- .../kotlin/components/RobotframeworkUriDsl.kt | 764 ------- .../camel/kotlin/components/RocketmqUriDsl.kt | 229 -- .../camel/kotlin/components/RssUriDsl.kt | 365 ---- .../camel/kotlin/components/SagaUriDsl.kt | 76 - .../kotlin/components/SalesforceUriDsl.kt | 720 ------- .../kotlin/components/SapNetweaverUriDsl.kt | 136 -- .../kotlin/components/SchedulerUriDsl.kt | 349 --- .../kotlin/components/SchematronUriDsl.kt | 105 - .../camel/kotlin/components/ScpUriDsl.kt | 357 ---- .../camel/kotlin/components/SedaUriDsl.kt | 332 --- .../camel/kotlin/components/ServiceUriDsl.kt | 98 - .../kotlin/components/ServicenowUriDsl.kt | 517 ----- .../camel/kotlin/components/ServletUriDsl.kt | 402 ---- .../camel/kotlin/components/SftpUriDsl.kt | 1872 ----------------- .../camel/kotlin/components/Sjms2UriDsl.kt | 760 ------- .../camel/kotlin/components/SjmsUriDsl.kt | 725 ------- .../camel/kotlin/components/SlackUriDsl.kt | 395 ---- .../camel/kotlin/components/SmbUriDsl.kt | 464 ---- .../camel/kotlin/components/SmooksUriDsl.kt | 329 --- .../camel/kotlin/components/SmppUriDsl.kt | 670 ------ .../camel/kotlin/components/SnmpUriDsl.kt | 513 ----- .../camel/kotlin/components/SolrUriDsl.kt | 288 --- .../kotlin/components/SplunkHecUriDsl.kt | 201 -- .../camel/kotlin/components/SplunkUriDsl.kt | 582 ----- .../kotlin/components/SpringBatchUriDsl.kt | 104 - .../kotlin/components/SpringEventUriDsl.kt | 122 -- .../kotlin/components/SpringJdbcUriDsl.kt | 248 --- .../kotlin/components/SpringLdapUriDsl.kt | 90 - .../kotlin/components/SpringRabbitmqUriDsl.kt | 588 ------ .../kotlin/components/SpringRedisUriDsl.kt | 184 -- .../camel/kotlin/components/SpringWsUriDsl.kt | 346 --- .../kotlin/components/SqlStoredUriDsl.kt | 161 -- .../camel/kotlin/components/SqlUriDsl.kt | 648 ------ .../camel/kotlin/components/SshUriDsl.kt | 516 ----- .../camel/kotlin/components/StaxUriDsl.kt | 76 - .../camel/kotlin/components/StitchUriDsl.kt | 133 -- .../camel/kotlin/components/StompUriDsl.kt | 179 -- .../camel/kotlin/components/StreamUriDsl.kt | 378 ---- .../kotlin/components/StringTemplateUriDsl.kt | 145 -- .../camel/kotlin/components/StubUriDsl.kt | 332 --- .../camel/kotlin/components/TahuEdgeUriDsl.kt | 240 --- .../camel/kotlin/components/TahuHostUriDsl.kt | 179 -- .../camel/kotlin/components/TahuUriDsl.kt | 296 --- .../camel/kotlin/components/TelegramUriDsl.kt | 434 ---- .../camel/kotlin/components/ThriftUriDsl.kt | 245 --- .../kotlin/components/ThymeleafUriDsl.kt | 205 -- .../camel/kotlin/components/TikaUriDsl.kt | 106 - .../camel/kotlin/components/TimerUriDsl.kt | 222 -- .../camel/kotlin/components/TwilioUriDsl.kt | 346 --- .../components/TwitterDirectmessageUriDsl.kt | 567 ----- .../kotlin/components/TwitterSearchUriDsl.kt | 567 ----- .../components/TwitterTimelineUriDsl.kt | 581 ----- .../camel/kotlin/components/UndertowUriDsl.kt | 445 ---- .../kotlin/components/ValidatorUriDsl.kt | 167 -- .../camel/kotlin/components/VelocityUriDsl.kt | 159 -- .../kotlin/components/VertxHttpUriDsl.kt | 310 --- .../camel/kotlin/components/VertxUriDsl.kt | 136 -- .../kotlin/components/VertxWebsocketUriDsl.kt | 329 --- .../camel/kotlin/components/WasmUriDsl.kt | 84 - .../camel/kotlin/components/WeatherUriDsl.kt | 497 ----- .../camel/kotlin/components/Web3jUriDsl.kt | 380 ---- .../camel/kotlin/components/WebhookUriDsl.kt | 141 -- .../camel/kotlin/components/WhatsappUriDsl.kt | 126 -- .../kotlin/components/WordpressUriDsl.kt | 206 -- .../camel/kotlin/components/WorkdayUriDsl.kt | 135 -- .../camel/kotlin/components/XchangeUriDsl.kt | 104 - .../camel/kotlin/components/XjUriDsl.kt | 297 --- .../components/XmlsecuritySignUriDsl.kt | 362 ---- .../components/XmlsecurityVerifyUriDsl.kt | 275 --- .../camel/kotlin/components/XmppUriDsl.kt | 318 --- .../camel/kotlin/components/XqueryUriDsl.kt | 429 ---- .../kotlin/components/XsltSaxonUriDsl.kt | 290 --- .../camel/kotlin/components/XsltUriDsl.kt | 238 --- .../camel/kotlin/components/ZeebeUriDsl.kt | 158 -- .../camel/kotlin/components/ZendeskUriDsl.kt | 371 ---- .../components/ZookeeperMasterUriDsl.kt | 109 - .../kotlin/components/ZookeeperUriDsl.kt | 224 -- .../kotlin/dataformats/Asn1DataFormatDsl.kt | 70 - .../kotlin/dataformats/AvroDataFormatDsl.kt | 52 - .../dataformats/AvroJacksonDataFormatDsl.kt | 244 --- .../dataformats/BarcodeDataFormatDsl.kt | 88 - .../kotlin/dataformats/Base64DataFormatDsl.kt | 84 - .../kotlin/dataformats/BeanioDataFormatDsl.kt | 139 -- .../dataformats/BindyCsvDataFormatDsl.kt | 109 - .../dataformats/BindyFixedDataFormatDsl.kt | 109 - .../dataformats/BindyKvpDataFormatDsl.kt | 109 - .../kotlin/dataformats/CborDataFormatDsl.kt | 165 -- .../kotlin/dataformats/CryptoDataFormatDsl.kt | 137 -- .../kotlin/dataformats/CsvDataFormatDsl.kt | 370 ---- .../dataformats/FastjsonDataFormatDsl.kt | 65 - .../dataformats/FhirJsonDataFormatDsl.kt | 298 --- .../dataformats/FhirXmlDataFormatDsl.kt | 298 --- .../dataformats/FlatpackDataFormatDsl.kt | 134 -- .../kotlin/dataformats/GrokDataFormatDsl.kt | 99 - .../kotlin/dataformats/GsonDataFormatDsl.kt | 86 - .../dataformats/GzipDeflaterDataFormatDsl.kt | 45 - .../kotlin/dataformats/Hl7DataFormatDsl.kt | 60 - .../kotlin/dataformats/IcalDataFormatDsl.kt | 60 - .../dataformats/JacksonDataFormatDsl.kt | 267 --- .../dataformats/JacksonXmlDataFormatDsl.kt | 225 -- .../kotlin/dataformats/JaxbDataFormatDsl.kt | 287 --- .../dataformats/JsonApiDataFormatDsl.kt | 60 - .../kotlin/dataformats/JsonbDataFormatDsl.kt | 68 - .../kotlin/dataformats/LzfDataFormatDsl.kt | 60 - .../dataformats/MimeMultipartDataFormatDsl.kt | 109 - .../dataformats/ParquetAvroDataFormatDsl.kt | 78 - .../kotlin/dataformats/PgpDataFormatDsl.kt | 214 -- .../dataformats/ProtobufDataFormatDsl.kt | 80 - .../ProtobufJacksonDataFormatDsl.kt | 244 --- .../kotlin/dataformats/RssDataFormatDsl.kt | 45 - .../dataformats/SnakeYamlDataFormatDsl.kt | 170 -- .../kotlin/dataformats/SoapDataFormatDsl.kt | 102 - .../dataformats/SwiftMtDataFormatDsl.kt | 60 - .../dataformats/SwiftMxDataFormatDsl.kt | 84 - .../kotlin/dataformats/SyslogDataFormatDsl.kt | 45 - .../dataformats/TarFileDataFormatDsl.kt | 113 - .../kotlin/dataformats/ThriftDataFormatDsl.kt | 80 - .../dataformats/UnivocityCsvDataFormatDsl.kt | 238 --- .../UnivocityFixedDataFormatDsl.kt | 239 --- .../dataformats/UnivocityTsvDataFormatDsl.kt | 210 -- .../dataformats/XmlSecurityDataFormatDsl.kt | 167 -- .../dataformats/ZipDeflaterDataFormatDsl.kt | 62 - .../dataformats/ZipFileDataFormatDsl.kt | 113 - .../camel/kotlin/languages/BeanLanguageDsl.kt | 125 -- .../kotlin/languages/ConstantLanguageDsl.kt | 72 - .../kotlin/languages/CsimpleLanguageDsl.kt | 72 - .../kotlin/languages/DatasonnetLanguageDsl.kt | 96 - .../languages/ExchangePropertyLanguageDsl.kt | 65 - .../camel/kotlin/languages/FileLanguageDsl.kt | 72 - .../kotlin/languages/GroovyLanguageDsl.kt | 72 - .../kotlin/languages/HeaderLanguageDsl.kt | 64 - .../kotlin/languages/Hl7terserLanguageDsl.kt | 82 - .../camel/kotlin/languages/JavaLanguageDsl.kt | 104 - .../camel/kotlin/languages/JoorLanguageDsl.kt | 104 - .../camel/kotlin/languages/JqLanguageDsl.kt | 81 - .../camel/kotlin/languages/JsLanguageDsl.kt | 72 - .../kotlin/languages/JsonpathLanguageDsl.kt | 160 -- .../camel/kotlin/languages/MvelLanguageDsl.kt | 72 - .../camel/kotlin/languages/OgnlLanguageDsl.kt | 72 - .../kotlin/languages/PythonLanguageDsl.kt | 72 - .../camel/kotlin/languages/RefLanguageDsl.kt | 72 - .../kotlin/languages/SimpleLanguageDsl.kt | 72 - .../camel/kotlin/languages/SpelLanguageDsl.kt | 72 - .../kotlin/languages/TokenizeLanguageDsl.kt | 181 -- .../kotlin/languages/VariableLanguageDsl.kt | 64 - .../camel/kotlin/languages/WasmLanguageDsl.kt | 80 - .../kotlin/languages/XpathLanguageDsl.kt | 194 -- .../kotlin/languages/XqueryLanguageDsl.kt | 99 - .../kotlin/languages/XtokenizeLanguageDsl.kt | 116 - .../org/apache/camel/other.properties | 7 - .../src/generated/resources/kotlin-api.json | 15 - .../src/main/docs/kotlin-api.adoc | 332 --- .../org/apache/camel/kotlin/BeanFactoryDsl.kt | 41 - .../org/apache/camel/kotlin/DataFormatDsl.kt | 25 - .../kotlin/org/apache/camel/kotlin/Main.kt | 30 - .../org/apache/camel/kotlin/Predicates.kt | 115 - .../kotlin/org/apache/camel/kotlin/RootDsl.kt | 99 - .../apache/camel/kotlin/RouteBuilderImpl.kt | 24 - .../org/apache/camel/kotlin/RouteDsl.kt | 191 -- .../org/apache/camel/kotlin/StepsDsl.kt | 450 ---- .../kotlin/org/apache/camel/kotlin/UriDsl.kt | 55 - .../camel/kotlin/languages/Expressions.kt | 38 - .../apache/camel/kotlin/model/AggregateDsl.kt | 271 --- .../org/apache/camel/kotlin/model/BeanDsl.kt | 55 - .../org/apache/camel/kotlin/model/CatchDsl.kt | 37 - .../apache/camel/kotlin/model/ChoiceDsl.kt | 50 - .../camel/kotlin/model/CircuitBreakerDsl.kt | 303 --- .../camel/kotlin/model/ClaimCheckDsl.kt | 56 - .../camel/kotlin/model/ConvertBodyDsl.kt | 38 - .../camel/kotlin/model/ConvertHeaderDsl.kt | 38 - .../camel/kotlin/model/ConvertVariableDsl.kt | 42 - .../org/apache/camel/kotlin/model/DelayDsl.kt | 51 - .../camel/kotlin/model/DynamicRouterDsl.kt | 46 - .../apache/camel/kotlin/model/EnrichDsl.kt | 108 - .../apache/camel/kotlin/model/FilterDsl.kt | 35 - .../kotlin/model/IdempotentConsumerDsl.kt | 67 - .../apache/camel/kotlin/model/InterceptDsl.kt | 36 - .../camel/kotlin/model/InterceptFromDsl.kt | 35 - .../model/InterceptSendToEndpointDsl.kt | 48 - .../camel/kotlin/model/LoadBalanceDsl.kt | 136 -- .../org/apache/camel/kotlin/model/LogDsl.kt | 56 - .../org/apache/camel/kotlin/model/LoopDsl.kt | 42 - .../apache/camel/kotlin/model/MulticastDsl.kt | 124 -- .../camel/kotlin/model/OnExceptionDsl.kt | 235 --- .../kotlin/model/OptionalIdentifiedDsl.kt | 32 - .../apache/camel/kotlin/model/PausableDsl.kt | 44 - .../camel/kotlin/model/PollEnrichDsl.kt | 100 - .../camel/kotlin/model/RecipientListDsl.kt | 141 -- .../camel/kotlin/model/ResequenceDsl.kt | 155 -- .../apache/camel/kotlin/model/ResumableDsl.kt | 58 - .../camel/kotlin/model/RoutingSlipDsl.kt | 46 - .../org/apache/camel/kotlin/model/SagaDsl.kt | 85 - .../apache/camel/kotlin/model/SampleDsl.kt | 43 - .../org/apache/camel/kotlin/model/SplitDsl.kt | 125 -- .../apache/camel/kotlin/model/ThreadsDsl.kt | 105 - .../apache/camel/kotlin/model/ThrottleDsl.kt | 76 - .../apache/camel/kotlin/model/ToDynamicDsl.kt | 67 - .../org/apache/camel/kotlin/model/TryDsl.kt | 48 - .../apache/camel/kotlin/model/ValidateDsl.kt | 35 - .../apache/camel/kotlin/model/WireTapDsl.kt | 60 - .../camel/kotlin/model/rest/ApiKeyDsl.kt | 54 - .../camel/kotlin/model/rest/BasicAuthDsl.kt | 25 - .../camel/kotlin/model/rest/BearerTokenDsl.kt | 30 - .../camel/kotlin/model/rest/MutualTLSDsl.kt | 25 - .../camel/kotlin/model/rest/OAuth2Dsl.kt | 47 - .../kotlin/model/rest/OpenIdConnectDsl.kt | 30 - .../camel/kotlin/model/rest/ParamDsl.kt | 87 - .../camel/kotlin/model/rest/ParamsDsl.kt | 34 - .../kotlin/model/rest/ResponseHeaderDsl.kt | 68 - .../kotlin/model/rest/ResponseMessageDsl.kt | 56 - .../camel/kotlin/model/rest/ResponsesDsl.kt | 34 - .../apache/camel/kotlin/model/rest/RestDsl.kt | 145 -- .../kotlin/model/rest/RestSecuritiesDsl.kt | 63 - .../kotlin/model/rest/RestSecurityDsl.kt | 34 - .../camel/kotlin/model/rest/RestVerbDsl.kt | 142 -- .../camel/kotlin/model/rest/SecuritiesDsl.kt | 33 - .../camel/kotlin/ComplexScenarioTest.kt | 129 -- .../org/apache/camel/kotlin/EipsTest.kt | 164 -- .../org/apache/camel/kotlin/RestTest.kt | 71 - .../src/test/resources/log4j2-test.properties | 31 - dsl/camel-kotlin-dsl/pom.xml | 219 -- .../org/apache/camel/other.properties | 8 - .../org/apache/camel/routes-loader/kts | 2 - .../src/generated/resources/kotlin-dsl.json | 16 - .../src/main/docs/kotlin-dsl.adoc | 103 - .../kotlin/KotlinCompilationConfiguration.kt | 52 - .../camel/dsl/kotlin/KotlinConstants.kt | 20 - .../org/apache/camel/dsl/kotlin/KotlinDSL.kt | 96 - .../dsl/kotlin/KotlinRoutesBuilderLoader.kt | 71 - .../dsl/kotlin/model/BeansConfiguration.kt | 46 - .../dsl/kotlin/model/CamelConfiguration.kt | 41 - .../kotlin/model/ComponentsConfiguration.kt | 47 - .../kotlin/model/DataFormatsConfiguration.kt | 40 - .../kotlin/model/LanguagesConfiguration.kt | 40 - .../dsl/kotlin/model/RegistryConfiguration.kt | 26 - .../dsl/kotlin/model/RestConfiguration.kt | 33 - .../dsl/kotlin/model/RestVerbConfiguration.kt | 45 - ...pache.camel.dsl.kotlin.KotlinDSL.classname | 0 .../kotlin/KotlinRoutesBuilderLoaderTest.kt | 200 -- .../apache/camel/dsl/kotlin/support/MyBean.kt | 21 - .../src/test/resources/log4j2-test.properties | 31 - .../src/test/resources/routes/routes-new.kts | 17 - .../resources/routes/routes-with-beans.kts | 33 - ...es-with-components-configuration-error.kts | 27 - .../routes-with-components-configuration.kts | 42 - .../routes-with-dataformats-configuration.kts | 31 - .../routes/routes-with-endpoint-dsl.kts | 21 - .../routes/routes-with-error-handler.kts | 25 - .../routes-with-languages-configuration.kts | 28 - .../resources/routes/routes-with-rest.kts | 45 - .../src/test/resources/routes/routes.kts | 21 - dsl/pom.xml | 2 - parent/pom.xml | 12 - pom.xml | 1 - .../maven/camel-package-maven-plugin/pom.xml | 5 - .../maven/packaging/AllDslKotlinMojo.java | 667 ------ .../maven/packaging/PrepareComponentMojo.java | 6 - 551 files changed, 41 insertions(+), 133672 deletions(-) delete mode 100644 catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/kotlin-api.json delete mode 100644 catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/kotlin-dsl.json create mode 100644 docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_9.adoc delete mode 100644 dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/kts.tmpl delete mode 100644 dsl/camel-kotlin-api/pom.xml delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Activemq6UriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ActivemqUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AmqpUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ArangodbUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/As2UriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AsteriskUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AtmosphereWebsocketUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AtomUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AvroUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2AthenaUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2CwUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2DdbUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2DdbstreamUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2Ec2UriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2EcsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2EksUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2EventbridgeUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2IamUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2KinesisFirehoseUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2KinesisUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2KmsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2LambdaUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2MqUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2MskUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2RedshiftDataUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2S3UriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2SesUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2SnsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2SqsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2StepFunctionsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2StsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2TimestreamUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2TranslateUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsBedrockAgentRuntimeUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsBedrockAgentUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsBedrockUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsCloudtrailUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsConfigUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsSecretsManagerUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureCosmosdbUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureEventhubsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureFilesUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureKeyVaultUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureServicebusUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureStorageBlobUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureStorageDatalakeUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureStorageQueueUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BeanUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BeanValidatorUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BonitaUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BoxUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BraintreeUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BrowseUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CaffeineCacheUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CaffeineLoadcacheUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ChatscriptUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ChunkUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ClassUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CmSmsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CoapUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CometdUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ConsulUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ControlbusUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CouchbaseUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CouchdbUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CqlUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CronUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CryptoUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CxfUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CxfrsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DataformatUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetTestUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumDb2UriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumMongodbUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumMysqlUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumOracleUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumPostgresUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumSqlserverUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Dhis2UriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DigitaloceanUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DirectUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DisruptorUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DisruptorVmUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DjlUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DnsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DockerUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DrillUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DropboxUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DynamicRouterControlUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DynamicRouterUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/EhcacheUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ElasticsearchRestClientUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ElasticsearchUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Etcd3UriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ExecUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FhirUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FileUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FileWatchUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FlatpackUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FlinkUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FopUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FreemarkerUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FtpUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FtpsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GeocoderUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GitUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GithubUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleBigquerySqlUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleBigqueryUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleCalendarStreamUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleCalendarUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleDriveUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleFunctionsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleMailStreamUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleMailUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GooglePubsubLiteUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GooglePubsubUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleSecretManagerUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleSheetsStreamUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleSheetsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleStorageUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GrapeUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GraphqlUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GrpcUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GuavaEventbusUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HashicorpVaultUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastAtomicvalueUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastInstanceUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastListUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastMapUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastMultimapUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastQueueUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastReplicatedmapUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastRingbufferUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastSedaUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastSetUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastTopicUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HttpUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudDmsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudFrsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudFunctiongraphUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudIamUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudImagerecognitionUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudObsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudSmnUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Iec60870ClientUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Iec60870ServerUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteCacheUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteComputeUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteEventsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteIdgenUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteMessagingUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteQueueUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteSetUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ImapUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/InfinispanEmbeddedUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/InfinispanUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Influxdb2UriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/InfluxdbUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IrcUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IronmqUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JcacheUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JcrUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JdbcUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JettyUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JgroupsRaftUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JgroupsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JiraUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JmsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JmxUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JoltUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JooqUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JpaUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsltUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsonPatchUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsonValidatorUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsonataUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Jt400UriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JteUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KafkaUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KameletUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KnativeUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesConfigMapsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesCronjobUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesCustomResourcesUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesDeploymentsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesEventsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesHpaUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesJobUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesNamespacesUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesNodesUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesPersistentVolumesClaimsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesPersistentVolumesUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesPodsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesReplicationControllersUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesResourcesQuotaUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesSecretsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesServiceAccountsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesServicesUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KuduUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jChatUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jEmbeddingsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jToolsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jWebSearchUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LanguageUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LdapUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LdifUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LogUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LprUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LuceneUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LumberjackUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MapstructUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MasterUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MetricsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MicrometerUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MilvusUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MinaUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MinioUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MllpUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MockUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MongodbGridfsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MongodbUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MustacheUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MvelUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MybatisBeanUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MybatisUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NatsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NettyHttpUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NettyUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NitriteUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OaipmhUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Olingo2UriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Olingo4UriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpensearchUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenshiftBuildConfigsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenshiftBuildsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenshiftDeploymentconfigsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackCinderUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackGlanceUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackKeystoneUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackNeutronUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackNovaUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackSwiftUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OptaplannerUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PahoMqtt5UriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PahoUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PdfUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PgReplicationSlotUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PgeventUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PineconeUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PlatformHttpUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Plc4xUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PubnubUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PulsarUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/QdrantUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/QuartzUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/QuickfixUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ReactiveStreamsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RefUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestApiUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestOpenapiUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RobotframeworkUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RocketmqUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RssUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SagaUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SalesforceUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SapNetweaverUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SchedulerUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SchematronUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ScpUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SedaUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ServiceUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ServicenowUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ServletUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SftpUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Sjms2UriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SjmsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SlackUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SmbUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SmooksUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SmppUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SnmpUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SolrUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SplunkHecUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SplunkUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringBatchUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringEventUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringJdbcUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringLdapUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringRabbitmqUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringRedisUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringWsUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SqlStoredUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SqlUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SshUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StaxUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StitchUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StompUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StreamUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StringTemplateUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StubUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TahuEdgeUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TahuHostUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TahuUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TelegramUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ThriftUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ThymeleafUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TikaUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TimerUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwilioUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwitterDirectmessageUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwitterSearchUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwitterTimelineUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/UndertowUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ValidatorUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VelocityUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VertxHttpUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VertxUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VertxWebsocketUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WasmUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WeatherUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Web3jUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WebhookUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WhatsappUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WordpressUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WorkdayUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XchangeUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XjUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XmlsecuritySignUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XmlsecurityVerifyUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XmppUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XqueryUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XsltSaxonUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XsltUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZeebeUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZendeskUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZookeeperMasterUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZookeeperUriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/Asn1DataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/AvroDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/AvroJacksonDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BarcodeDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/Base64DataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BeanioDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BindyCsvDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BindyFixedDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BindyKvpDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/CborDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/CryptoDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/CsvDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FastjsonDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FhirJsonDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FhirXmlDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FlatpackDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/GrokDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/GsonDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/GzipDeflaterDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/Hl7DataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/IcalDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JacksonDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JacksonXmlDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JaxbDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JsonApiDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JsonbDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/LzfDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/MimeMultipartDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ParquetAvroDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/PgpDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ProtobufDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ProtobufJacksonDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/RssDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SnakeYamlDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SoapDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SwiftMtDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SwiftMxDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SyslogDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/TarFileDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ThriftDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/UnivocityCsvDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/UnivocityFixedDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/UnivocityTsvDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/XmlSecurityDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ZipDeflaterDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ZipFileDataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/BeanLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/ConstantLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/CsimpleLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/DatasonnetLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/ExchangePropertyLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/FileLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/GroovyLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/HeaderLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/Hl7terserLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JavaLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JoorLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JqLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JsLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JsonpathLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/MvelLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/OgnlLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/PythonLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/RefLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/SimpleLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/SpelLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/TokenizeLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/VariableLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/WasmLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/XpathLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/XqueryLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/XtokenizeLanguageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/generated/resources/META-INF/services/org/apache/camel/other.properties delete mode 100644 dsl/camel-kotlin-api/src/generated/resources/kotlin-api.json delete mode 100644 dsl/camel-kotlin-api/src/main/docs/kotlin-api.adoc delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/BeanFactoryDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/DataFormatDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/Main.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/Predicates.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/RootDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/RouteBuilderImpl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/RouteDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/StepsDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/UriDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/languages/Expressions.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/AggregateDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/BeanDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/CatchDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ChoiceDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/CircuitBreakerDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ClaimCheckDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ConvertBodyDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ConvertHeaderDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ConvertVariableDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/DelayDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/DynamicRouterDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/EnrichDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/FilterDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/IdempotentConsumerDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/InterceptDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/InterceptFromDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/InterceptSendToEndpointDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/LoadBalanceDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/LogDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/LoopDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/MulticastDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/OnExceptionDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/OptionalIdentifiedDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/PausableDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/PollEnrichDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/RecipientListDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ResequenceDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ResumableDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/RoutingSlipDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/SagaDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/SampleDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/SplitDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ThreadsDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ThrottleDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ToDynamicDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/TryDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ValidateDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/WireTapDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ApiKeyDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/BasicAuthDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/BearerTokenDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/MutualTLSDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/OAuth2Dsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/OpenIdConnectDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ParamDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ParamsDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ResponseHeaderDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ResponseMessageDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ResponsesDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestSecuritiesDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestSecurityDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestVerbDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/SecuritiesDsl.kt delete mode 100644 dsl/camel-kotlin-api/src/test/kotlin/org/apache/camel/kotlin/ComplexScenarioTest.kt delete mode 100644 dsl/camel-kotlin-api/src/test/kotlin/org/apache/camel/kotlin/EipsTest.kt delete mode 100644 dsl/camel-kotlin-api/src/test/kotlin/org/apache/camel/kotlin/RestTest.kt delete mode 100644 dsl/camel-kotlin-api/src/test/resources/log4j2-test.properties delete mode 100644 dsl/camel-kotlin-dsl/pom.xml delete mode 100644 dsl/camel-kotlin-dsl/src/generated/resources/META-INF/services/org/apache/camel/other.properties delete mode 100644 dsl/camel-kotlin-dsl/src/generated/resources/META-INF/services/org/apache/camel/routes-loader/kts delete mode 100644 dsl/camel-kotlin-dsl/src/generated/resources/kotlin-dsl.json delete mode 100644 dsl/camel-kotlin-dsl/src/main/docs/kotlin-dsl.adoc delete mode 100644 dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinCompilationConfiguration.kt delete mode 100644 dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinConstants.kt delete mode 100644 dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinDSL.kt delete mode 100644 dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinRoutesBuilderLoader.kt delete mode 100644 dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/BeansConfiguration.kt delete mode 100644 dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/CamelConfiguration.kt delete mode 100644 dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/ComponentsConfiguration.kt delete mode 100644 dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/DataFormatsConfiguration.kt delete mode 100644 dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/LanguagesConfiguration.kt delete mode 100644 dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/RegistryConfiguration.kt delete mode 100644 dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/RestConfiguration.kt delete mode 100644 dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/RestVerbConfiguration.kt delete mode 100644 dsl/camel-kotlin-dsl/src/main/resources/META-INF/kotlin/script/templates/org.apache.camel.dsl.kotlin.KotlinDSL.classname delete mode 100644 dsl/camel-kotlin-dsl/src/test/kotlin/org/apache/camel/dsl/kotlin/KotlinRoutesBuilderLoaderTest.kt delete mode 100644 dsl/camel-kotlin-dsl/src/test/kotlin/org/apache/camel/dsl/kotlin/support/MyBean.kt delete mode 100644 dsl/camel-kotlin-dsl/src/test/resources/log4j2-test.properties delete mode 100644 dsl/camel-kotlin-dsl/src/test/resources/routes/routes-new.kts delete mode 100644 dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-beans.kts delete mode 100644 dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-components-configuration-error.kts delete mode 100644 dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-components-configuration.kts delete mode 100644 dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-dataformats-configuration.kts delete mode 100644 dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-endpoint-dsl.kts delete mode 100644 dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-error-handler.kts delete mode 100644 dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-languages-configuration.kts delete mode 100644 dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-rest.kts delete mode 100644 dsl/camel-kotlin-dsl/src/test/resources/routes/routes.kts delete mode 100644 tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/AllDslKotlinMojo.java diff --git a/README.md b/README.md index e5a9de663277d..4acfaf0d43a37 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ ### Introduction -Camel empowers you to define routing and mediation rules in a variety of domain-specific languages (DSL, such as Java, XML, Groovy, Kotlin, and YAML). This means you get smart completion of routing rules in your IDE, whether in a Java or XML editor. +Camel empowers you to define routing and mediation rules in a variety of domain-specific languages (DSL, such as Java, XML, Groovy and YAML). This means you get smart completion of routing rules in your IDE, whether in a Java or XML editor. Apache Camel uses URIs to enable easier integration with all kinds of transport or messaging model including HTTP, ActiveMQ, JMS, JBI, SCA, MINA diff --git a/bom/camel-bom/pom.xml b/bom/camel-bom/pom.xml index d7e9e6d7702a9..b1a8a61ffe429 100644 --- a/bom/camel-bom/pom.xml +++ b/bom/camel-bom/pom.xml @@ -1292,16 +1292,6 @@ camel-knative-http 4.8.0-SNAPSHOT - - org.apache.camel - camel-kotlin-api - 4.8.0-SNAPSHOT - - - org.apache.camel - camel-kotlin-dsl - 4.8.0-SNAPSHOT - org.apache.camel camel-kubernetes diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json index e169a45d9a565..db3b4711ef21d 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json @@ -110,7 +110,7 @@ { "name": "camel.main.shutdownRoutesInReverseOrder", "description": "Sets whether routes should be shutdown in reverse or the same order as they were started.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": true }, { "name": "camel.main.shutdownSuppressLoggingOnTimeout", "description": "Whether Camel should try to suppress logging during shutdown and timeout was triggered, meaning forced shutdown is happening. And during forced shutdown we want to avoid logging errors\/warnings et all in the logs as a side-effect of the forced timeout. Notice the suppress is a best effort as there may still be some logs coming from 3rd party libraries and whatnot, which Camel cannot control. This option is default false.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.main.shutdownTimeout", "description": "Timeout in seconds to graceful shutdown all the Camel routes.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "int", "defaultValue": 45 }, - { "name": "camel.main.sourceLocationEnabled", "description": "Whether to capture precise source location:line-number for all EIPs in Camel routes. Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this uses JDK StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only impact startup, not the performance of the routes at runtime.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, + { "name": "camel.main.sourceLocationEnabled", "description": "Whether to capture precise source location:line-number for all EIPs in Camel routes. Enabling this will impact parsing Java based routes (also Groovy etc.) on startup as this uses JDK StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only impact startup, not the performance of the routes at runtime.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.main.startupRecorder", "description": "To use startup recorder for capturing execution time during starting Camel. The recorder can be one of: false (or off), logging, backlog, java-flight-recorder (or jfr).", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "string", "javaType": "java.lang.String", "enum": [ "false", "off", "java-flight-recorder", "jfr", "logging", "backlog" ] }, { "name": "camel.main.startupRecorderDir", "description": "Directory to store the recording. By default the current directory will be used. Use false to turn off saving recording to disk.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.main.startupRecorderDuration", "description": "How long time to run the startup recorder. Use 0 (default) to keep the recorder running until the JVM is exited. Use -1 to stop the recorder right after Camel has been started (to only focus on potential Camel startup performance bottlenecks) Use a positive value to keep recording for N seconds. When the recorder is stopped then the recording is auto saved to disk (note: save to disk can be disabled by setting startupRecorderDir to false)", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "long" }, diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties index 31d97b45c11a5..2460d2239ceaa 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others.properties @@ -22,8 +22,6 @@ js-dsl jsh-dsl jta kamelet-main -kotlin-api -kotlin-dsl langchain4j-tokenizer leveldb lra diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/kotlin-api.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/kotlin-api.json deleted file mode 100644 index 4e73d4b4aba71..0000000000000 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/kotlin-api.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "other": { - "kind": "other", - "name": "kotlin-api", - "title": "Kotlin API", - "description": "Camel Kotlin API (deprecated)", - "deprecated": true, - "firstVersion": "4.4.0", - "label": "dsl", - "supportLevel": "Experimental", - "groupId": "org.apache.camel", - "artifactId": "camel-kotlin-api", - "version": "4.8.0-SNAPSHOT" - } -} diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/kotlin-dsl.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/kotlin-dsl.json deleted file mode 100644 index 8c27da4d36873..0000000000000 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/others/kotlin-dsl.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "other": { - "kind": "other", - "name": "kotlin-dsl", - "title": "Kotlin DSL", - "description": "Camel DSL with Kotlin (deprecated)", - "deprecated": true, - "firstVersion": "3.9.0", - "label": "dsl", - "supportLevel": "Experimental", - "metadata": { "routes.language": "kotlin" }, - "groupId": "org.apache.camel", - "artifactId": "camel-kotlin-dsl", - "version": "4.8.0-SNAPSHOT" - } -} diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd index 8ab41d30d3c6b..74160e680a532 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/schemas/camel-spring.xsd @@ -17744,9 +17744,9 @@ Sets whether message history is enabled or not. Default value: false diff --git a/components/camel-spring-xml/src/generated/resources/META-INF/org/apache/camel/spring/xml/camelContext.json b/components/camel-spring-xml/src/generated/resources/META-INF/org/apache/camel/spring/xml/camelContext.json index b37c77a658384..9cd5ce8594f3b 100644 --- a/components/camel-spring-xml/src/generated/resources/META-INF/org/apache/camel/spring/xml/camelContext.json +++ b/components/camel-spring-xml/src/generated/resources/META-INF/org/apache/camel/spring/xml/camelContext.json @@ -21,7 +21,7 @@ "traceLoggingFormat": { "index": 6, "kind": "attribute", "displayName": "Trace Logging Format", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "To use a custom tracing logging format. The default format (arrow, routeId, label) is: %-4.4s %-12.12s %-33.33s" }, "debug": { "index": 7, "kind": "attribute", "displayName": "Debug", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets whether debugging is enabled or not. To use debugging then this must be enabled on startup to be installed in the CamelContext." }, "messageHistory": { "index": 8, "kind": "attribute", "displayName": "Message History", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "description": "Sets whether message history is enabled or not." }, - "sourceLocationEnabled": { "index": 9, "kind": "attribute", "displayName": "Source Location Enabled", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "description": "Whether to capture precise source location:line-number for all EIPs in Camel routes. Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this uses JDK StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only impact startup, not the performance of the routes at runtime." }, + "sourceLocationEnabled": { "index": 9, "kind": "attribute", "displayName": "Source Location Enabled", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "description": "Whether to capture precise source location:line-number for all EIPs in Camel routes. Enabling this will impact parsing Java based routes (also Groovy, etc.) on startup as this uses JDK StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only impact startup, not the performance of the routes at runtime." }, "logMask": { "index": 10, "kind": "attribute", "displayName": "Log Mask", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "defaultValue": "false", "description": "Sets whether security mask for Logging is enabled or not." }, "logExhaustedMessageBody": { "index": 11, "kind": "attribute", "displayName": "Log Exhausted Message Body", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets whether to log exhausted message body with message history." }, "streamCache": { "index": 12, "kind": "attribute", "displayName": "Stream Cache", "group": "common", "required": false, "type": "string", "javaType": "java.lang.String", "deprecated": false, "autowired": false, "secret": false, "description": "Sets whether stream caching is enabled or not." }, diff --git a/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java b/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java index 26f460564c43c..4de67c885da3c 100644 --- a/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java +++ b/components/camel-spring-xml/src/main/java/org/apache/camel/spring/xml/CamelContextFactoryBean.java @@ -907,7 +907,7 @@ public String getSourceLocationEnabled() { /** * Whether to capture precise source location:line-number for all EIPs in Camel routes. * - * Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this uses JDK + * Enabling this will impact parsing Java based routes (also Groovy, etc.) on startup as this uses JDK * StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only * impact startup, not the performance of the routes at runtime. */ diff --git a/core/camel-api/src/main/java/org/apache/camel/CamelContext.java b/core/camel-api/src/main/java/org/apache/camel/CamelContext.java index f34b50d5d610b..f728989eba800 100644 --- a/core/camel-api/src/main/java/org/apache/camel/CamelContext.java +++ b/core/camel-api/src/main/java/org/apache/camel/CamelContext.java @@ -1280,7 +1280,7 @@ String addRouteFromTemplate( /** * Whether to capture precise source location:line-number for all EIPs in Camel routes. * - * Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this uses + * Enabling this will impact parsing Java based routes (also Groovy, etc.) on startup as this uses * {@link StackTraceElement} to calculate the location from the Camel route, which comes with a performance cost. * This only impact startup, not the performance of the routes at runtime. */ @@ -1289,7 +1289,7 @@ String addRouteFromTemplate( /** * Whether to capture precise source location:line-number for all EIPs in Camel routes. * - * Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this uses + * Enabling this will impact parsing Java based routes (also Groovy, etc.) on startup as this uses * {@link StackTraceElement} to calculate the location from the Camel route, which comes with a performance cost. * This only impact startup, not the performance of the routes at runtime. */ diff --git a/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc b/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc index 07293db41c2d8..5b0cf4af3d63d 100644 --- a/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc +++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/choice-eip.adoc @@ -141,7 +141,7 @@ from("direct:start") However, the code will still not compile. The reason is we have stretched how far we can take the good old Java language in terms of -xref:manual::dsl.adoc[DSL]. In a more dynamic or modern language such as Kotlin or Groovy +xref:manual::dsl.adoc[DSL]. In a more dynamic or modern language such as Groovy you would be able to let it be stack based, so the `.end()` will pop the last type of the stack, and you would return to the scope of the Choice EIP. diff --git a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json index e169a45d9a565..db3b4711ef21d 100644 --- a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json +++ b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json @@ -110,7 +110,7 @@ { "name": "camel.main.shutdownRoutesInReverseOrder", "description": "Sets whether routes should be shutdown in reverse or the same order as they were started.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": true }, { "name": "camel.main.shutdownSuppressLoggingOnTimeout", "description": "Whether Camel should try to suppress logging during shutdown and timeout was triggered, meaning forced shutdown is happening. And during forced shutdown we want to avoid logging errors\/warnings et all in the logs as a side-effect of the forced timeout. Notice the suppress is a best effort as there may still be some logs coming from 3rd party libraries and whatnot, which Camel cannot control. This option is default false.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.main.shutdownTimeout", "description": "Timeout in seconds to graceful shutdown all the Camel routes.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "int", "defaultValue": 45 }, - { "name": "camel.main.sourceLocationEnabled", "description": "Whether to capture precise source location:line-number for all EIPs in Camel routes. Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this uses JDK StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only impact startup, not the performance of the routes at runtime.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, + { "name": "camel.main.sourceLocationEnabled", "description": "Whether to capture precise source location:line-number for all EIPs in Camel routes. Enabling this will impact parsing Java based routes (also Groovy etc.) on startup as this uses JDK StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only impact startup, not the performance of the routes at runtime.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": "false" }, { "name": "camel.main.startupRecorder", "description": "To use startup recorder for capturing execution time during starting Camel. The recorder can be one of: false (or off), logging, backlog, java-flight-recorder (or jfr).", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "string", "javaType": "java.lang.String", "enum": [ "false", "off", "java-flight-recorder", "jfr", "logging", "backlog" ] }, { "name": "camel.main.startupRecorderDir", "description": "Directory to store the recording. By default the current directory will be used. Use false to turn off saving recording to disk.", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "string", "javaType": "java.lang.String" }, { "name": "camel.main.startupRecorderDuration", "description": "How long time to run the startup recorder. Use 0 (default) to keep the recorder running until the JVM is exited. Use -1 to stop the recorder right after Camel has been started (to only focus on potential Camel startup performance bottlenecks) Use a positive value to keep recording for N seconds. When the recorder is stopped then the recording is auto saved to disk (note: save to disk can be disabled by setting startupRecorderDir to false)", "sourceType": "org.apache.camel.main.DefaultConfigurationProperties", "type": "integer", "javaType": "long" }, diff --git a/core/camel-main/src/main/docs/main.adoc b/core/camel-main/src/main/docs/main.adoc index 1ae7acb68a461..4995d791a5067 100644 --- a/core/camel-main/src/main/docs/main.adoc +++ b/core/camel-main/src/main/docs/main.adoc @@ -113,7 +113,7 @@ The camel.main supports 121 options, which are listed below. | *camel.main.shutdownRoutesIn{zwsp}ReverseOrder* | Sets whether routes should be shutdown in reverse or the same order as they were started. | true | boolean | *camel.main.shutdownSuppress{zwsp}LoggingOnTimeout* | Whether Camel should try to suppress logging during shutdown and timeout was triggered, meaning forced shutdown is happening. And during forced shutdown we want to avoid logging errors/warnings et all in the logs as a side-effect of the forced timeout. Notice the suppress is a best effort as there may still be some logs coming from 3rd party libraries and whatnot, which Camel cannot control. This option is default false. | false | boolean | *camel.main.shutdownTimeout* | Timeout in seconds to graceful shutdown all the Camel routes. | 45 | int -| *camel.main.sourceLocation{zwsp}Enabled* | Whether to capture precise source location:line-number for all EIPs in Camel routes. Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this uses JDK StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only impact startup, not the performance of the routes at runtime. | false | boolean +| *camel.main.sourceLocation{zwsp}Enabled* | Whether to capture precise source location:line-number for all EIPs in Camel routes. Enabling this will impact parsing Java based routes (also Groovy etc.) on startup as this uses JDK StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only impact startup, not the performance of the routes at runtime. | false | boolean | *camel.main.startupRecorder* | To use startup recorder for capturing execution time during starting Camel. The recorder can be one of: false (or off), logging, backlog, java-flight-recorder (or jfr). | | String | *camel.main.startupRecorderDir* | Directory to store the recording. By default the current directory will be used. Use false to turn off saving recording to disk. | | String | *camel.main.startupRecorder{zwsp}Duration* | How long time to run the startup recorder. Use 0 (default) to keep the recorder running until the JVM is exited. Use -1 to stop the recorder right after Camel has been started (to only focus on potential Camel startup performance bottlenecks) Use a positive value to keep recording for N seconds. When the recorder is stopped then the recording is auto saved to disk (note: save to disk can be disabled by setting startupRecorderDir to false) | | long diff --git a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java index fc151aa05849e..93aa72b5b6fd1 100644 --- a/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java +++ b/core/camel-main/src/main/java/org/apache/camel/main/DefaultConfigurationProperties.java @@ -708,7 +708,7 @@ public boolean isSourceLocationEnabled() { /** * Whether to capture precise source location:line-number for all EIPs in Camel routes. * - * Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this uses JDK + * Enabling this will impact parsing Java based routes (also Groovy etc.) on startup as this uses JDK * StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only * impact startup, not the performance of the routes at runtime. */ @@ -2003,7 +2003,7 @@ public T withMessageHistory(boolean messageHistory) { /** * Whether to capture precise source location:line-number for all EIPs in Camel routes. * - * Enabling this will impact parsing Java based routes (also Groovy, Kotlin, etc.) on startup as this uses JDK + * Enabling this will impact parsing Java based routes (also Groovy, etc.) on startup as this uses JDK * StackTraceElement to calculate the location from the Camel route, which comes with a performance cost. This only * impact startup, not the performance of the routes at runtime. */ diff --git a/docs/components/modules/others/nav.adoc b/docs/components/modules/others/nav.adoc index 776e986303ada..0752de318d2a1 100644 --- a/docs/components/modules/others/nav.adoc +++ b/docs/components/modules/others/nav.adoc @@ -18,8 +18,6 @@ *** xref:jsh-dsl.adoc[JavaShell DSL] *** xref:java-xml-jaxb-dsl.adoc[Jaxb XML Dsl] *** xref:kamelet-main.adoc[Kamelet Main] -*** xref:kotlin-api.adoc[Kotlin API] -*** xref:kotlin-dsl.adoc[Kotlin DSL] *** xref:java-xml-io-dsl.adoc[XML Io Dsl] *** xref:yaml-dsl.adoc[YAML DSL] ** xref:elytron.adoc[Elytron] diff --git a/docs/gulpfile.js b/docs/gulpfile.js index c7c18df9a4551..0d835eaa6ab45 100644 --- a/docs/gulpfile.js +++ b/docs/gulpfile.js @@ -160,7 +160,6 @@ const sources = { // +** xref:groovy-dsl.adoc[Groovy Dsl] // +** xref:js-dsl.adoc[JavaScript Dsl] // +** xref:java-xml-jaxb-dsl.adoc[Jaxb XML Dsl] - // +** xref:kotlin-dsl.adoc[Kotlin Dsl] // +** xref:java-xml-io-dsl.adoc[XML Dsl] //These seem to have no content, just a non-xref link to the user manual, // where the dsls are not actually explained. Should the sources be removed? diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_9.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_9.adoc new file mode 100644 index 0000000000000..ad0db528ef80e --- /dev/null +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_9.adoc @@ -0,0 +1,19 @@ += Apache Camel 4.x Upgrade Guide + +This document is for helping you upgrade your Apache Camel application +from Camel 4.x to 4.y. For example, if you are upgrading Camel 4.0 to 4.2, then you should follow the guides +from both 4.0 to 4.1 and 4.1 to 4.2. + +== Upgrading Camel 4.8 to 4.9 + +=== Removed API + +==== Kotlin DSL + +The Kotlin DSL which was deprecated in Camel 4.7.0 has now been removed. The routes must be migrated to another DSL such as Java, Yaml or xml. + +=== Deprecated Components + +The following components that were marked as deprecated: + +* diff --git a/docs/user-manual/modules/ROOT/pages/dsl.adoc b/docs/user-manual/modules/ROOT/pages/dsl.adoc index 15c1bd95ce61e..87c8eeec043ac 100644 --- a/docs/user-manual/modules/ROOT/pages/dsl.adoc +++ b/docs/user-manual/modules/ROOT/pages/dsl.adoc @@ -12,7 +12,6 @@ languages (DSL) as listed below: * xref:rest-dsl.adoc[Rest DSL]: a DSL to define REST services using REST verbs. ** xref:rest-dsl-openapi.adoc[Rest DSL contract first]: rest DSL using _contract-first_ when OpenAPI specs. * xref:components:others:groovy-dsl.adoc[Groovy DSL]: a Groovy-based DSL to create routes leveraging closures and a specific Groovy extension module. -* xref:components:others:kotlin-dsl.adoc[Kotlin DSL]: a Kotlin-based DSL. * xref:bean-integration.adoc[Annotation DSL]: Use annotations in Java beans. == See Also diff --git a/docs/user-manual/modules/ROOT/pages/index.adoc b/docs/user-manual/modules/ROOT/pages/index.adoc index 03dfe4533e7f9..ecee94f6b6799 100644 --- a/docs/user-manual/modules/ROOT/pages/index.adoc +++ b/docs/user-manual/modules/ROOT/pages/index.adoc @@ -5,7 +5,7 @@ known xref:components:eips:enterprise-integration-patterns.adoc[Enterprise Integ Patterns]. Camel empowers you to define routing and mediation rules in a variety of -domain-specific languages (xref:manual::dsl.adoc[DSL], such as Java, XML, Groovy, Kotlin, and YAML). +domain-specific languages (xref:manual::dsl.adoc[DSL], such as Java, XML, Groovy, and YAML). This means you get smart completion of routing rules in your IDE, whether in a Java or XML editor. diff --git a/docs/user-manual/modules/ROOT/pages/route-configuration.adoc b/docs/user-manual/modules/ROOT/pages/route-configuration.adoc index d18bb3d0a8ef9..69ef3b816ae47 100644 --- a/docs/user-manual/modules/ROOT/pages/route-configuration.adoc +++ b/docs/user-manual/modules/ROOT/pages/route-configuration.adoc @@ -8,7 +8,7 @@ to copy the same configuration to a set of routes or rely on global error handli Now you can configure a number of route configurations, and then specify on each route which configuration to use (you can use match by ids, wildcards, and regular expression). -The route configuration is supported by all DSLs, so usable by: Java, XML, Groovy, Kotlin and so forth. +The route configuration is supported by all DSLs, so usable by: Java, XML, Groovy and so forth. In the route configuration, you can set up common strategies for: diff --git a/docs/user-manual/modules/faq/pages/what-is-camel.adoc b/docs/user-manual/modules/faq/pages/what-is-camel.adoc index 8f282fd538b3e..f7b90957ba276 100644 --- a/docs/user-manual/modules/faq/pages/what-is-camel.adoc +++ b/docs/user-manual/modules/faq/pages/what-is-camel.adoc @@ -5,7 +5,7 @@ known xref:components:eips:enterprise-integration-patterns.adoc[Enterprise Integ Patterns]. Camel empowers you to define routing and mediation rules in a variety of -domain-specific languages (xref:manual::dsl.adoc[DSL], such as Java, XML, Groovy, Kotlin, and YAML). +domain-specific languages (xref:manual::dsl.adoc[DSL], such as Java, XML, Groovy and YAML). This means you get smart completion of routing rules in your IDE, whether in a Java or XML editor. diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java index e02ea42536042..c50b50ccf2d4b 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java @@ -414,8 +414,6 @@ protected Set resolveDependencies(File settings, File profile) throws Ex answer.add("mvn:org.apache.camel:camel-js-dsl"); } else if ("jsh".equals(ext)) { answer.add("mvn:org.apache.camel:camel-jsh-dsl"); - } else if ("kts".equals(ext)) { - answer.add("mvn:org.apache.camel:camel-kotlin-dsl"); } else if ("xml".equals(ext)) { answer.add("mvn:org.apache.camel:camel-xml-io-dsl"); } else if ("yaml".equals(ext)) { diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/GistHelper.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/GistHelper.java index f91fcd14bf483..1a63e3c3086a0 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/GistHelper.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/GistHelper.java @@ -104,8 +104,7 @@ private static void resolveGistAsRawFiles( } else if (routes != null) { if ("java".equalsIgnoreCase(ext) || "xml".equalsIgnoreCase(ext) || "yaml".equalsIgnoreCase(ext) - || "groovy".equalsIgnoreCase(ext) || "js".equalsIgnoreCase(ext) || "jsh".equalsIgnoreCase(ext) - || "kts".equalsIgnoreCase(ext)) { + || "groovy".equalsIgnoreCase(ext) || "js".equalsIgnoreCase(ext) || "jsh".equalsIgnoreCase(ext)) { String rawUrl = c.get("raw_url").asText(); String u = asGistSingleUrl(rawUrl); routes.add(u); diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/GitHubHelper.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/GitHubHelper.java index 6da47b67c690d..8a491901a7140 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/GitHubHelper.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/GitHubHelper.java @@ -36,7 +36,6 @@ private GitHubHelper() { public static String asGithubSingleUrl(String url) { // strip https://github.com/ url = url.substring(19); - // https://github.com/apache/camel-k-examples/blob/main/generic-examples/languages/routes.kts // https://raw.githubusercontent.com/apache/camel-kamelets-examples/main/jbang/hello-java/Hey.java // https://github.com/apache/camel-kamelets-examples/blob/main/jbang/hello-java/Hey.java url = url.replaceFirst("/", ":"); @@ -129,8 +128,7 @@ private static void resolveGithubAsRawFiles( } else if (routes != null) { if ("java".equalsIgnoreCase(ext) || "xml".equalsIgnoreCase(ext) || "yaml".equalsIgnoreCase(ext) || "camel.yaml".equalsIgnoreCase(ext) - || "groovy".equalsIgnoreCase(ext) || "js".equalsIgnoreCase(ext) || "jsh".equalsIgnoreCase(ext) - || "kts".equalsIgnoreCase(ext)) { + || "groovy".equalsIgnoreCase(ext) || "js".equalsIgnoreCase(ext) || "jsh".equalsIgnoreCase(ext)) { String htmlUrl = c.get("html_url").asText(); String u = asGithubSingleUrl(htmlUrl); routes.add(u); diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/ProcessHelper.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/ProcessHelper.java index 4265ff8fdbd61..297d4a4d5692a 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/ProcessHelper.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/ProcessHelper.java @@ -27,7 +27,7 @@ public final class ProcessHelper { - private static final String[] DSL_EXT = new String[] { "groovy", "java", "js", "jsh", "kts", "xml", "yaml" }; + private static final String[] DSL_EXT = new String[] { "groovy", "java", "js", "jsh", "xml", "yaml" }; private static final Pattern PATTERN = Pattern.compile("([\\w|\\-.])+"); private ProcessHelper() { diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/SourceHelper.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/SourceHelper.java index 1601dbd8a73d0..9b61af17907f7 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/SourceHelper.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/common/SourceHelper.java @@ -38,7 +38,7 @@ public class SourceHelper { private static final String[] ACCEPTED_FILE_EXT - = new String[] { "java", "groovy", "js", "jsh", "kts", "xml", "yaml" }; + = new String[] { "java", "groovy", "js", "jsh", "xml", "yaml" }; public static Source resolveSource(String source) { List resolved = resolveSources(Collections.singletonList(source)); diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/kts.tmpl b/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/kts.tmpl deleted file mode 100644 index 10d63243ad5f1..0000000000000 --- a/dsl/camel-jbang/camel-jbang-core/src/main/resources/templates/kts.tmpl +++ /dev/null @@ -1,4 +0,0 @@ -from("timer:kotlin?period=1000") - .setBody() - .simple("Hello Camel from \${routeId}") - .log("\${body}") diff --git a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/RunCommandITCase.java b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/RunCommandITCase.java index 4c786e7527c28..adce5aa5e8d16 100644 --- a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/RunCommandITCase.java +++ b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/RunCommandITCase.java @@ -107,7 +107,6 @@ public void runRouteFromGithubUsingWildcardTest() { execute("stop simple"); execute("init https://github.com/apache/camel-kamelets-examples/tree/main/jbang/languages/rou*"); executeBackground("run *"); - checkLogContains("Hello Camel K from kotlin"); checkLogContains("HELLO YAML !!!"); } diff --git a/dsl/camel-jsh-dsl/src/main/java/org/apache/camel/dsl/jsh/JshRoutesBuilderLoader.java b/dsl/camel-jsh-dsl/src/main/java/org/apache/camel/dsl/jsh/JshRoutesBuilderLoader.java index 78d2f7ae4e6cd..c3df4c8276329 100644 --- a/dsl/camel-jsh-dsl/src/main/java/org/apache/camel/dsl/jsh/JshRoutesBuilderLoader.java +++ b/dsl/camel-jsh-dsl/src/main/java/org/apache/camel/dsl/jsh/JshRoutesBuilderLoader.java @@ -85,7 +85,7 @@ private static void eval(Reader reader, EndpointRouteBuilder builder) throws Exc try (JShell jshell = JShell.builder().executionEngine(provider, null).build()) { // // since we can't set a base class for the snippet as we do for other - // languages (groovy, kotlin) we need to introduce a top level variable + // languages (groovy) we need to introduce a top level variable // that users need to use to access the RouteBuilder, like: // // builder.from("timer:tick") diff --git a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderRoutesLoader.java b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderRoutesLoader.java index 950340d01fffa..7bb493dbbe508 100644 --- a/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderRoutesLoader.java +++ b/dsl/camel-kamelet-main/src/main/java/org/apache/camel/main/download/DependencyDownloaderRoutesLoader.java @@ -68,8 +68,6 @@ protected RoutesBuilderLoader resolveService(String extension) { downloadLoader("camel-js-dsl"); } else if ("jsh".equals(extension)) { downloadLoader("camel-jsh-dsl"); - } else if ("kts".equals(extension)) { - downloadLoader("camel-kotlin-dsl"); } else if ("xml".equals(extension) || "camel.xml".equals(extension)) { downloadLoader("camel-xml-io-dsl"); diff --git a/dsl/camel-kotlin-api/pom.xml b/dsl/camel-kotlin-api/pom.xml deleted file mode 100644 index fe80b51037db4..0000000000000 --- a/dsl/camel-kotlin-api/pom.xml +++ /dev/null @@ -1,218 +0,0 @@ - - - - 4.0.0 - - org.apache.camel - dsl - 4.8.0-SNAPSHOT - - - camel-kotlin-api - jar - Camel :: Kotlin API (deprecated) - Camel Kotlin API (deprecated) - - - 4.4.0 - Kotlin API - - Experimental - - false - - - - - org.jetbrains.kotlin - kotlin-stdlib - ${kotlin-version} - - - - org.apache.camel - camel-api - - - org.apache.camel - camel-core-model - - - - - org.apache.camel - camel-catalog - provided - - - - org.jetbrains.kotlin - kotlin-test-junit5 - ${kotlin-version} - test - - - org.apache.camel - camel-test-junit5 - test - - - org.apache.camel - camel-core-engine - test - - - - org.apache.camel - camel-log - test - - - org.apache.camel - camel-direct - test - - - org.apache.camel - camel-jetty - test - - - org.apache.camel - camel-csv - test - - - org.apache.camel - camel-rest - test - - - org.apache.camel - camel-openapi-java - test - - - - org.apache.logging.log4j - log4j-core - test - - - org.apache.logging.log4j - log4j-slf4j2-impl - test - - - org.apache.logging.log4j - log4j-jcl - test - - - - - - - org.apache.camel - camel-package-maven-plugin - - - generate-all-dsl-kotlin - - generate-all-dsl-kotlin - - generate-sources - - - - - org.jetbrains.kotlin - kotlin-maven-plugin - ${kotlin-version} - - ${jdk.version} - - - - compile - compile - - compile - - - ${jdk.version} - - src/main/kotlin - src/generated/kotlin - - true - - - - test-compile - test-compile - - test-compile - - - ${jdk.version} - - src/test/kotlin - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - default-compile - none - - - - default-testCompile - none - - - java-compile - compile - - compile - - - - java-test-compile - test-compile - - testCompile - - - - - - - - \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Activemq6UriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Activemq6UriDsl.kt deleted file mode 100644 index 97b8e3157988e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Activemq6UriDsl.kt +++ /dev/null @@ -1,1543 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send messages to (or consume from) Apache ActiveMQ 6.x. This component extends the Camel JMS - * component. - */ -public fun UriDsl.activemq6(i: Activemq6UriDsl.() -> Unit) { - Activemq6UriDsl(this).apply(i) -} - -@CamelDslMarker -public class Activemq6UriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("activemq6") - } - - private var destinationType: String = "" - - private var destinationName: String = "" - - /** - * The kind of destination to use - */ - public fun destinationType(destinationType: String) { - this.destinationType = destinationType - it.url("$destinationType:$destinationName") - } - - /** - * Name of the queue or topic to use as destination - */ - public fun destinationName(destinationName: String) { - this.destinationName = destinationName - it.url("$destinationType:$destinationName") - } - - /** - * Sets the JMS client ID to use. Note that this value, if specified, must be unique and can only - * be used by a single JMS connection instance. It is typically only required for durable topic - * subscriptions with JMS 1.1. - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * The connection factory to be use. A connection factory must be configured either on the - * component or endpoint. - */ - public fun connectionFactory(connectionFactory: String) { - it.property("connectionFactory", connectionFactory) - } - - /** - * Specifies whether Camel ignores the JMSReplyTo header in messages. If true, Camel does not send - * a reply back to the destination specified in the JMSReplyTo header. You can use this option if you - * want Camel to consume from a route and you do not want Camel to automatically send back a reply - * message because another component in your code handles the reply message. You can also use this - * option if you want to use Camel as a proxy between different message brokers and you want to route - * message from one system to another. - */ - public fun disableReplyTo(disableReplyTo: String) { - it.property("disableReplyTo", disableReplyTo) - } - - /** - * Specifies whether Camel ignores the JMSReplyTo header in messages. If true, Camel does not send - * a reply back to the destination specified in the JMSReplyTo header. You can use this option if you - * want Camel to consume from a route and you do not want Camel to automatically send back a reply - * message because another component in your code handles the reply message. You can also use this - * option if you want to use Camel as a proxy between different message brokers and you want to route - * message from one system to another. - */ - public fun disableReplyTo(disableReplyTo: Boolean) { - it.property("disableReplyTo", disableReplyTo.toString()) - } - - /** - * The durable subscriber name for specifying durable topic subscriptions. The clientId option - * must be configured as well. - */ - public fun durableSubscriptionName(durableSubscriptionName: String) { - it.property("durableSubscriptionName", durableSubscriptionName) - } - - /** - * Allows you to force the use of a specific jakarta.jms.Message implementation for sending JMS - * messages. Possible values are: Bytes, Map, Object, Stream, Text. By default, Camel would determine - * which JMS message type to use from the In body type. This option allows you to specify it. - */ - public fun jmsMessageType(jmsMessageType: String) { - it.property("jmsMessageType", jmsMessageType) - } - - /** - * Provides an explicit ReplyTo destination (overrides any incoming value of - * Message.getJMSReplyTo() in consumer). - */ - public fun replyTo(replyTo: String) { - it.property("replyTo", replyTo) - } - - /** - * Specifies whether to test the connection on startup. This ensures that when Camel starts that - * all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted - * then Camel throws an exception on startup. This ensures that Camel is not started with failed - * connections. The JMS producers is tested as well. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: String) { - it.property("testConnectionOnStartup", testConnectionOnStartup) - } - - /** - * Specifies whether to test the connection on startup. This ensures that when Camel starts that - * all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted - * then Camel throws an exception on startup. This ensures that Camel is not started with failed - * connections. The JMS producers is tested as well. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: Boolean) { - it.property("testConnectionOnStartup", testConnectionOnStartup.toString()) - } - - /** - * The JMS acknowledgement name, which is one of: SESSION_TRANSACTED, CLIENT_ACKNOWLEDGE, - * AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE - */ - public fun acknowledgementModeName(acknowledgementModeName: String) { - it.property("acknowledgementModeName", acknowledgementModeName) - } - - /** - * Consumer priorities allow you to ensure that high priority consumers receive messages while - * they are active. Normally, active consumers connected to a queue receive messages from it in a - * round-robin fashion. When consumer priorities are in use, messages are delivered round-robin if - * multiple active consumers exist with the same high priority. Messages will only going to lower - * priority consumers when the high priority consumers do not have credit available to consume the - * message, or those high priority consumers have declined to accept the message (for instance - * because it does not meet the criteria of any selectors associated with the consumer). - */ - public fun artemisConsumerPriority(artemisConsumerPriority: String) { - it.property("artemisConsumerPriority", artemisConsumerPriority) - } - - /** - * Consumer priorities allow you to ensure that high priority consumers receive messages while - * they are active. Normally, active consumers connected to a queue receive messages from it in a - * round-robin fashion. When consumer priorities are in use, messages are delivered round-robin if - * multiple active consumers exist with the same high priority. Messages will only going to lower - * priority consumers when the high priority consumers do not have credit available to consume the - * message, or those high priority consumers have declined to accept the message (for instance - * because it does not meet the criteria of any selectors associated with the consumer). - */ - public fun artemisConsumerPriority(artemisConsumerPriority: Int) { - it.property("artemisConsumerPriority", artemisConsumerPriority.toString()) - } - - /** - * Whether the JmsConsumer processes the Exchange asynchronously. If enabled then the JmsConsumer - * may pickup the next message from the JMS queue, while the previous message is being processed - * asynchronously (by the Asynchronous Routing Engine). This means that messages may be processed not - * 100% strictly in order. If disabled (as default) then the Exchange is fully processed before the - * JmsConsumer will pickup the next message from the JMS queue. Note if transacted has been enabled, - * then asyncConsumer=true does not run asynchronously, as transaction must be executed synchronously - * (Camel 3.0 may support async transactions). - */ - public fun asyncConsumer(asyncConsumer: String) { - it.property("asyncConsumer", asyncConsumer) - } - - /** - * Whether the JmsConsumer processes the Exchange asynchronously. If enabled then the JmsConsumer - * may pickup the next message from the JMS queue, while the previous message is being processed - * asynchronously (by the Asynchronous Routing Engine). This means that messages may be processed not - * 100% strictly in order. If disabled (as default) then the Exchange is fully processed before the - * JmsConsumer will pickup the next message from the JMS queue. Note if transacted has been enabled, - * then asyncConsumer=true does not run asynchronously, as transaction must be executed synchronously - * (Camel 3.0 may support async transactions). - */ - public fun asyncConsumer(asyncConsumer: Boolean) { - it.property("asyncConsumer", asyncConsumer.toString()) - } - - /** - * Specifies whether the consumer container should auto-startup. - */ - public fun autoStartup(autoStartup: String) { - it.property("autoStartup", autoStartup) - } - - /** - * Specifies whether the consumer container should auto-startup. - */ - public fun autoStartup(autoStartup: Boolean) { - it.property("autoStartup", autoStartup.toString()) - } - - /** - * Sets the cache level by ID for the underlying JMS resources. See cacheLevelName option for more - * details. - */ - public fun cacheLevel(cacheLevel: String) { - it.property("cacheLevel", cacheLevel) - } - - /** - * Sets the cache level by ID for the underlying JMS resources. See cacheLevelName option for more - * details. - */ - public fun cacheLevel(cacheLevel: Int) { - it.property("cacheLevel", cacheLevel.toString()) - } - - /** - * Sets the cache level by name for the underlying JMS resources. Possible values are: CACHE_AUTO, - * CACHE_CONNECTION, CACHE_CONSUMER, CACHE_NONE, and CACHE_SESSION. The default setting is - * CACHE_AUTO. See the Spring documentation and Transactions Cache Levels for more information. - */ - public fun cacheLevelName(cacheLevelName: String) { - it.property("cacheLevelName", cacheLevelName) - } - - /** - * Specifies the default number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToConcurrentConsumers is used - * to control number of concurrent consumers on the reply message listener. - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * Specifies the default number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToConcurrentConsumers is used - * to control number of concurrent consumers on the reply message listener. - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * Specifies the maximum number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToMaxConcurrentConsumers is - * used to control number of concurrent consumers on the reply message listener. - */ - public fun maxConcurrentConsumers(maxConcurrentConsumers: String) { - it.property("maxConcurrentConsumers", maxConcurrentConsumers) - } - - /** - * Specifies the maximum number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToMaxConcurrentConsumers is - * used to control number of concurrent consumers on the reply message listener. - */ - public fun maxConcurrentConsumers(maxConcurrentConsumers: Int) { - it.property("maxConcurrentConsumers", maxConcurrentConsumers.toString()) - } - - /** - * Specifies whether to use persistent delivery by default for replies. - */ - public fun replyToDeliveryPersistent(replyToDeliveryPersistent: String) { - it.property("replyToDeliveryPersistent", replyToDeliveryPersistent) - } - - /** - * Specifies whether to use persistent delivery by default for replies. - */ - public fun replyToDeliveryPersistent(replyToDeliveryPersistent: Boolean) { - it.property("replyToDeliveryPersistent", replyToDeliveryPersistent.toString()) - } - - /** - * Sets the JMS selector to use - */ - public fun selector(selector: String) { - it.property("selector", selector) - } - - /** - * Set whether to make the subscription durable. The durable subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * durable subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Only makes sense when listening to a - * topic (pub-sub domain), therefore this method switches the pubSubDomain flag as well. - */ - public fun subscriptionDurable(subscriptionDurable: String) { - it.property("subscriptionDurable", subscriptionDurable) - } - - /** - * Set whether to make the subscription durable. The durable subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * durable subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Only makes sense when listening to a - * topic (pub-sub domain), therefore this method switches the pubSubDomain flag as well. - */ - public fun subscriptionDurable(subscriptionDurable: Boolean) { - it.property("subscriptionDurable", subscriptionDurable.toString()) - } - - /** - * Set the name of a subscription to create. To be applied in case of a topic (pub-sub domain) - * with a shared or durable subscription. The subscription name needs to be unique within this - * client's JMS client id. Default is the class name of the specified message listener. Note: Only 1 - * concurrent consumer (which is the default of this message listener container) is allowed for each - * subscription, except for a shared subscription (which requires JMS 2.0). - */ - public fun subscriptionName(subscriptionName: String) { - it.property("subscriptionName", subscriptionName) - } - - /** - * Set whether to make the subscription shared. The shared subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * shared subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Note that shared subscriptions may also - * be durable, so this flag can (and often will) be combined with subscriptionDurable as well. Only - * makes sense when listening to a topic (pub-sub domain), therefore this method switches the - * pubSubDomain flag as well. Requires a JMS 2.0 compatible message broker. - */ - public fun subscriptionShared(subscriptionShared: String) { - it.property("subscriptionShared", subscriptionShared) - } - - /** - * Set whether to make the subscription shared. The shared subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * shared subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Note that shared subscriptions may also - * be durable, so this flag can (and often will) be combined with subscriptionDurable as well. Only - * makes sense when listening to a topic (pub-sub domain), therefore this method switches the - * pubSubDomain flag as well. Requires a JMS 2.0 compatible message broker. - */ - public fun subscriptionShared(subscriptionShared: Boolean) { - it.property("subscriptionShared", subscriptionShared.toString()) - } - - /** - * Specifies whether the consumer accept messages while it is stopping. You may consider enabling - * this option, if you start and stop JMS routes at runtime, while there are still messages enqueued - * on the queue. If this option is false, and you stop the JMS route, then messages may be rejected, - * and the JMS broker would have to attempt redeliveries, which yet again may be rejected, and - * eventually the message may be moved at a dead letter queue on the JMS broker. To avoid this its - * recommended to enable this option. - */ - public fun acceptMessagesWhileStopping(acceptMessagesWhileStopping: String) { - it.property("acceptMessagesWhileStopping", acceptMessagesWhileStopping) - } - - /** - * Specifies whether the consumer accept messages while it is stopping. You may consider enabling - * this option, if you start and stop JMS routes at runtime, while there are still messages enqueued - * on the queue. If this option is false, and you stop the JMS route, then messages may be rejected, - * and the JMS broker would have to attempt redeliveries, which yet again may be rejected, and - * eventually the message may be moved at a dead letter queue on the JMS broker. To avoid this its - * recommended to enable this option. - */ - public fun acceptMessagesWhileStopping(acceptMessagesWhileStopping: Boolean) { - it.property("acceptMessagesWhileStopping", acceptMessagesWhileStopping.toString()) - } - - /** - * Whether the DefaultMessageListenerContainer used in the reply managers for request-reply - * messaging allow the DefaultMessageListenerContainer.runningAllowed flag to quick stop in case - * JmsConfiguration#isAcceptMessagesWhileStopping is enabled, and org.apache.camel.CamelContext is - * currently being stopped. This quick stop ability is enabled by default in the regular JMS - * consumers but to enable for reply managers you must enable this flag. - */ - public fun allowReplyManagerQuickStop(allowReplyManagerQuickStop: String) { - it.property("allowReplyManagerQuickStop", allowReplyManagerQuickStop) - } - - /** - * Whether the DefaultMessageListenerContainer used in the reply managers for request-reply - * messaging allow the DefaultMessageListenerContainer.runningAllowed flag to quick stop in case - * JmsConfiguration#isAcceptMessagesWhileStopping is enabled, and org.apache.camel.CamelContext is - * currently being stopped. This quick stop ability is enabled by default in the regular JMS - * consumers but to enable for reply managers you must enable this flag. - */ - public fun allowReplyManagerQuickStop(allowReplyManagerQuickStop: Boolean) { - it.property("allowReplyManagerQuickStop", allowReplyManagerQuickStop.toString()) - } - - /** - * The consumer type to use, which can be one of: Simple, Default, or Custom. The consumer type - * determines which Spring JMS listener to use. Default will use - * org.springframework.jms.listener.DefaultMessageListenerContainer, Simple will use - * org.springframework.jms.listener.SimpleMessageListenerContainer. When Custom is specified, the - * MessageListenerContainerFactory defined by the messageListenerContainerFactory option will - * determine what org.springframework.jms.listener.AbstractMessageListenerContainer to use. - */ - public fun consumerType(consumerType: String) { - it.property("consumerType", consumerType) - } - - /** - * Specifies what default TaskExecutor type to use in the DefaultMessageListenerContainer, for - * both consumer endpoints and the ReplyTo consumer of producer endpoints. Possible values: - * SimpleAsync (uses Spring's SimpleAsyncTaskExecutor) or ThreadPool (uses Spring's - * ThreadPoolTaskExecutor with optimal values - cached thread-pool-like). If not set, it defaults to - * the previous behaviour, which uses a cached thread pool for consumer endpoints and SimpleAsync for - * reply consumers. The use of ThreadPool is recommended to reduce thread trash in elastic - * configurations with dynamically increasing and decreasing concurrent consumers. - */ - public fun defaultTaskExecutorType(defaultTaskExecutorType: String) { - it.property("defaultTaskExecutorType", defaultTaskExecutorType) - } - - /** - * Destination Options are a way to provide extended configuration options to a JMS consumer - * without having to extend the JMS API. The options are encoded using URL query syntax in the - * destination name that the consumer is created on. See more details at - * https://activemq.apache.org/destination-options. - */ - public fun destinationOptions(destinationOptions: String) { - it.property("destinationOptions", destinationOptions) - } - - /** - * Enables eager loading of JMS properties and payload as soon as a message is loaded which - * generally is inefficient as the JMS properties may not be required but sometimes can catch early - * any issues with the underlying JMS provider and the use of JMS properties. See also the option - * eagerPoisonBody. - */ - public fun eagerLoadingOfProperties(eagerLoadingOfProperties: String) { - it.property("eagerLoadingOfProperties", eagerLoadingOfProperties) - } - - /** - * Enables eager loading of JMS properties and payload as soon as a message is loaded which - * generally is inefficient as the JMS properties may not be required but sometimes can catch early - * any issues with the underlying JMS provider and the use of JMS properties. See also the option - * eagerPoisonBody. - */ - public fun eagerLoadingOfProperties(eagerLoadingOfProperties: Boolean) { - it.property("eagerLoadingOfProperties", eagerLoadingOfProperties.toString()) - } - - /** - * If eagerLoadingOfProperties is enabled and the JMS message payload (JMS body or JMS properties) - * is poison (cannot be read/mapped), then set this text as the message body instead so the message - * can be processed (the cause of the poison are already stored as exception on the Exchange). This - * can be turned off by setting eagerPoisonBody=false. See also the option eagerLoadingOfProperties. - */ - public fun eagerPoisonBody(eagerPoisonBody: String) { - it.property("eagerPoisonBody", eagerPoisonBody) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Specifies whether the listener session should be exposed when consuming messages. - */ - public fun exposeListenerSession(exposeListenerSession: String) { - it.property("exposeListenerSession", exposeListenerSession) - } - - /** - * Specifies whether the listener session should be exposed when consuming messages. - */ - public fun exposeListenerSession(exposeListenerSession: Boolean) { - it.property("exposeListenerSession", exposeListenerSession.toString()) - } - - /** - * The consumer type of the reply consumer (when doing request/reply), which can be one of: - * Simple, Default, or Custom. The consumer type determines which Spring JMS listener to use. Default - * will use org.springframework.jms.listener.DefaultMessageListenerContainer, Simple will use - * org.springframework.jms.listener.SimpleMessageListenerContainer. When Custom is specified, the - * MessageListenerContainerFactory defined by the messageListenerContainerFactory option will - * determine what org.springframework.jms.listener.AbstractMessageListenerContainer to use. - */ - public fun replyToConsumerType(replyToConsumerType: String) { - it.property("replyToConsumerType", replyToConsumerType) - } - - /** - * Whether a JMS consumer is allowed to send a reply message to the same destination that the - * consumer is using to consume from. This prevents an endless loop by consuming and sending back the - * same message to itself. - */ - public fun replyToSameDestinationAllowed(replyToSameDestinationAllowed: String) { - it.property("replyToSameDestinationAllowed", replyToSameDestinationAllowed) - } - - /** - * Whether a JMS consumer is allowed to send a reply message to the same destination that the - * consumer is using to consume from. This prevents an endless loop by consuming and sending back the - * same message to itself. - */ - public fun replyToSameDestinationAllowed(replyToSameDestinationAllowed: Boolean) { - it.property("replyToSameDestinationAllowed", replyToSameDestinationAllowed.toString()) - } - - /** - * Allows you to specify a custom task executor for consuming messages. - */ - public fun taskExecutor(taskExecutor: String) { - it.property("taskExecutor", taskExecutor) - } - - /** - * Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant - * broker. - */ - public fun deliveryDelay(deliveryDelay: String) { - it.property("deliveryDelay", deliveryDelay) - } - - /** - * Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant - * broker. - */ - public fun deliveryDelay(deliveryDelay: Int) { - it.property("deliveryDelay", deliveryDelay.toString()) - } - - /** - * Specifies the delivery mode to be used. Possible values are those defined by - * jakarta.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. - */ - public fun deliveryMode(deliveryMode: String) { - it.property("deliveryMode", deliveryMode) - } - - /** - * Specifies the delivery mode to be used. Possible values are those defined by - * jakarta.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. - */ - public fun deliveryMode(deliveryMode: Int) { - it.property("deliveryMode", deliveryMode.toString()) - } - - /** - * Specifies whether persistent delivery is used by default. - */ - public fun deliveryPersistent(deliveryPersistent: String) { - it.property("deliveryPersistent", deliveryPersistent) - } - - /** - * Specifies whether persistent delivery is used by default. - */ - public fun deliveryPersistent(deliveryPersistent: Boolean) { - it.property("deliveryPersistent", deliveryPersistent.toString()) - } - - /** - * Set if the deliveryMode, priority or timeToLive qualities of service should be used when - * sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and - * timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos - * option, which operates at message granularity, reading QoS properties exclusively from the Camel - * In message headers. - */ - public fun explicitQosEnabled(explicitQosEnabled: String) { - it.property("explicitQosEnabled", explicitQosEnabled) - } - - /** - * Set if the deliveryMode, priority or timeToLive qualities of service should be used when - * sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and - * timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos - * option, which operates at message granularity, reading QoS properties exclusively from the Camel - * In message headers. - */ - public fun explicitQosEnabled(explicitQosEnabled: Boolean) { - it.property("explicitQosEnabled", explicitQosEnabled.toString()) - } - - /** - * Sets whether JMS date properties should be formatted according to the ISO 8601 standard. - */ - public fun formatDateHeadersToIso8601(formatDateHeadersToIso8601: String) { - it.property("formatDateHeadersToIso8601", formatDateHeadersToIso8601) - } - - /** - * Sets whether JMS date properties should be formatted according to the ISO 8601 standard. - */ - public fun formatDateHeadersToIso8601(formatDateHeadersToIso8601: Boolean) { - it.property("formatDateHeadersToIso8601", formatDateHeadersToIso8601.toString()) - } - - /** - * Set to true, if you want to send message using the QoS settings specified on the message, - * instead of the QoS settings on the JMS endpoint. The following three headers are considered - * JMSPriority, JMSDeliveryMode, and JMSExpiration. You can provide all or only some of them. If not - * provided, Camel will fall back to use the values from the endpoint instead. So, when using this - * option, the headers override the values from the endpoint. The explicitQosEnabled option, by - * contrast, will only use options set on the endpoint, and not values from the message header. - */ - public fun preserveMessageQos(preserveMessageQos: String) { - it.property("preserveMessageQos", preserveMessageQos) - } - - /** - * Set to true, if you want to send message using the QoS settings specified on the message, - * instead of the QoS settings on the JMS endpoint. The following three headers are considered - * JMSPriority, JMSDeliveryMode, and JMSExpiration. You can provide all or only some of them. If not - * provided, Camel will fall back to use the values from the endpoint instead. So, when using this - * option, the headers override the values from the endpoint. The explicitQosEnabled option, by - * contrast, will only use options set on the endpoint, and not values from the message header. - */ - public fun preserveMessageQos(preserveMessageQos: Boolean) { - it.property("preserveMessageQos", preserveMessageQos.toString()) - } - - /** - * Values greater than 1 specify the message priority when sending (where 1 is the lowest priority - * and 9 is the highest). The explicitQosEnabled option must also be enabled in order for this option - * to have any effect. - */ - public fun priority(priority: String) { - it.property("priority", priority) - } - - /** - * Values greater than 1 specify the message priority when sending (where 1 is the lowest priority - * and 9 is the highest). The explicitQosEnabled option must also be enabled in order for this option - * to have any effect. - */ - public fun priority(priority: Int) { - it.property("priority", priority.toString()) - } - - /** - * Specifies the default number of concurrent consumers when doing request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToConcurrentConsumers(replyToConcurrentConsumers: String) { - it.property("replyToConcurrentConsumers", replyToConcurrentConsumers) - } - - /** - * Specifies the default number of concurrent consumers when doing request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToConcurrentConsumers(replyToConcurrentConsumers: Int) { - it.property("replyToConcurrentConsumers", replyToConcurrentConsumers.toString()) - } - - /** - * Specifies the maximum number of concurrent consumers when using request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToMaxConcurrentConsumers(replyToMaxConcurrentConsumers: String) { - it.property("replyToMaxConcurrentConsumers", replyToMaxConcurrentConsumers) - } - - /** - * Specifies the maximum number of concurrent consumers when using request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToMaxConcurrentConsumers(replyToMaxConcurrentConsumers: Int) { - it.property("replyToMaxConcurrentConsumers", replyToMaxConcurrentConsumers.toString()) - } - - /** - * Specifies the maximum number of concurrent consumers for continue routing when timeout occurred - * when using request/reply over JMS. - */ - public - fun replyToOnTimeoutMaxConcurrentConsumers(replyToOnTimeoutMaxConcurrentConsumers: String) { - it.property("replyToOnTimeoutMaxConcurrentConsumers", replyToOnTimeoutMaxConcurrentConsumers) - } - - /** - * Specifies the maximum number of concurrent consumers for continue routing when timeout occurred - * when using request/reply over JMS. - */ - public fun replyToOnTimeoutMaxConcurrentConsumers(replyToOnTimeoutMaxConcurrentConsumers: Int) { - it.property("replyToOnTimeoutMaxConcurrentConsumers", - replyToOnTimeoutMaxConcurrentConsumers.toString()) - } - - /** - * Provides an explicit ReplyTo destination in the JMS message, which overrides the setting of - * replyTo. It is useful if you want to forward the message to a remote Queue and receive the reply - * message from the ReplyTo destination. - */ - public fun replyToOverride(replyToOverride: String) { - it.property("replyToOverride", replyToOverride) - } - - /** - * Allows for explicitly specifying which kind of strategy to use for replyTo queues when doing - * request/reply over JMS. Possible values are: Temporary, Shared, or Exclusive. By default Camel - * will use temporary queues. However if replyTo has been configured, then Shared is used by default. - * This option allows you to use exclusive queues instead of shared ones. See Camel JMS documentation - * for more details, and especially the notes about the implications if running in a clustered - * environment, and the fact that Shared reply queues has lower performance than its alternatives - * Temporary and Exclusive. - */ - public fun replyToType(replyToType: String) { - it.property("replyToType", replyToType) - } - - /** - * The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds). - * The default is 20 seconds. You can include the header CamelJmsRequestTimeout to override this - * endpoint configured timeout value, and thus have per message individual timeout values. See also - * the requestTimeoutCheckerInterval option. - */ - public fun requestTimeout(requestTimeout: String) { - it.property("requestTimeout", requestTimeout) - } - - /** - * When sending messages, specifies the time-to-live of the message (in milliseconds). - */ - public fun timeToLive(timeToLive: String) { - it.property("timeToLive", timeToLive) - } - - /** - * When sending messages, specifies the time-to-live of the message (in milliseconds). - */ - public fun timeToLive(timeToLive: Int) { - it.property("timeToLive", timeToLive.toString()) - } - - /** - * This option is used to allow additional headers which may have values that are invalid - * according to JMS specification. For example, some message systems, such as WMQ, do this with - * header names using prefix JMS_IBM_MQMD_ containing values with byte array or other invalid types. - * You can specify multiple header names separated by comma, and use as suffix for wildcard matching. - */ - public fun allowAdditionalHeaders(allowAdditionalHeaders: String) { - it.property("allowAdditionalHeaders", allowAdditionalHeaders) - } - - /** - * Whether to allow sending messages with no body. If this option is false and the message body is - * null, then an JMSException is thrown. - */ - public fun allowNullBody(allowNullBody: String) { - it.property("allowNullBody", allowNullBody) - } - - /** - * Whether to allow sending messages with no body. If this option is false and the message body is - * null, then an JMSException is thrown. - */ - public fun allowNullBody(allowNullBody: Boolean) { - it.property("allowNullBody", allowNullBody.toString()) - } - - /** - * If true, Camel will always make a JMS message copy of the message when it is passed to the - * producer for sending. Copying the message is needed in some situations, such as when a - * replyToDestinationSelectorName is set (incidentally, Camel will set the alwaysCopyMessage option - * to true, if a replyToDestinationSelectorName is set) - */ - public fun alwaysCopyMessage(alwaysCopyMessage: String) { - it.property("alwaysCopyMessage", alwaysCopyMessage) - } - - /** - * If true, Camel will always make a JMS message copy of the message when it is passed to the - * producer for sending. Copying the message is needed in some situations, such as when a - * replyToDestinationSelectorName is set (incidentally, Camel will set the alwaysCopyMessage option - * to true, if a replyToDestinationSelectorName is set) - */ - public fun alwaysCopyMessage(alwaysCopyMessage: Boolean) { - it.property("alwaysCopyMessage", alwaysCopyMessage.toString()) - } - - /** - * When using InOut exchange pattern use this JMS property instead of JMSCorrelationID JMS - * property to correlate messages. If set messages will be correlated solely on the value of this - * property JMSCorrelationID property will be ignored and not set by Camel. - */ - public fun correlationProperty(correlationProperty: String) { - it.property("correlationProperty", correlationProperty) - } - - /** - * Use this option to force disabling time to live. For example when you do request/reply over - * JMS, then Camel will by default use the requestTimeout value as time to live on the message being - * sent. The problem is that the sender and receiver systems have to have their clocks synchronized, - * so they are in sync. This is not always so easy to archive. So you can use disableTimeToLive=true - * to not set a time to live value on the sent message. Then the message will not expire on the - * receiver system. See below in section About time to live for more details. - */ - public fun disableTimeToLive(disableTimeToLive: String) { - it.property("disableTimeToLive", disableTimeToLive) - } - - /** - * Use this option to force disabling time to live. For example when you do request/reply over - * JMS, then Camel will by default use the requestTimeout value as time to live on the message being - * sent. The problem is that the sender and receiver systems have to have their clocks synchronized, - * so they are in sync. This is not always so easy to archive. So you can use disableTimeToLive=true - * to not set a time to live value on the sent message. Then the message will not expire on the - * receiver system. See below in section About time to live for more details. - */ - public fun disableTimeToLive(disableTimeToLive: Boolean) { - it.property("disableTimeToLive", disableTimeToLive.toString()) - } - - /** - * When using mapJmsMessage=false Camel will create a new JMS message to send to a new JMS - * destination if you touch the headers (get or set) during the route. Set this option to true to - * force Camel to send the original JMS message that was received. - */ - public fun forceSendOriginalMessage(forceSendOriginalMessage: String) { - it.property("forceSendOriginalMessage", forceSendOriginalMessage) - } - - /** - * When using mapJmsMessage=false Camel will create a new JMS message to send to a new JMS - * destination if you touch the headers (get or set) during the route. Set this option to true to - * force Camel to send the original JMS message that was received. - */ - public fun forceSendOriginalMessage(forceSendOriginalMessage: Boolean) { - it.property("forceSendOriginalMessage", forceSendOriginalMessage.toString()) - } - - /** - * Only applicable when sending to JMS destination using InOnly (eg fire and forget). Enabling - * this option will enrich the Camel Exchange with the actual JMSMessageID that was used by the JMS - * client when the message was sent to the JMS destination. - */ - public fun includeSentJMSMessageID(includeSentJMSMessageID: String) { - it.property("includeSentJMSMessageID", includeSentJMSMessageID) - } - - /** - * Only applicable when sending to JMS destination using InOnly (eg fire and forget). Enabling - * this option will enrich the Camel Exchange with the actual JMSMessageID that was used by the JMS - * client when the message was sent to the JMS destination. - */ - public fun includeSentJMSMessageID(includeSentJMSMessageID: Boolean) { - it.property("includeSentJMSMessageID", includeSentJMSMessageID.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Sets the cache level by name for the reply consumer when doing request/reply over JMS. This - * option only applies when using fixed reply queues (not temporary). Camel will by default use: - * CACHE_CONSUMER for exclusive or shared w/ replyToSelectorName. And CACHE_SESSION for shared - * without replyToSelectorName. Some JMS brokers such as IBM WebSphere may require to set the - * replyToCacheLevelName=CACHE_NONE to work. Note: If using temporary queues then CACHE_NONE is not - * allowed, and you must use a higher value such as CACHE_CONSUMER or CACHE_SESSION. - */ - public fun replyToCacheLevelName(replyToCacheLevelName: String) { - it.property("replyToCacheLevelName", replyToCacheLevelName) - } - - /** - * Sets the JMS Selector using the fixed name to be used so you can filter out your own replies - * from the others when using a shared queue (that is, if you are not using a temporary reply queue). - */ - public fun replyToDestinationSelectorName(replyToDestinationSelectorName: String) { - it.property("replyToDestinationSelectorName", replyToDestinationSelectorName) - } - - /** - * Sets whether StreamMessage type is enabled or not. Message payloads of streaming kind such as - * files, InputStream, etc will either by sent as BytesMessage or StreamMessage. This option controls - * which kind will be used. By default BytesMessage is used which enforces the entire message payload - * to be read into memory. By enabling this option the message payload is read into memory in chunks - * and each chunk is then written to the StreamMessage until no more data. - */ - public fun streamMessageTypeEnabled(streamMessageTypeEnabled: String) { - it.property("streamMessageTypeEnabled", streamMessageTypeEnabled) - } - - /** - * Sets whether StreamMessage type is enabled or not. Message payloads of streaming kind such as - * files, InputStream, etc will either by sent as BytesMessage or StreamMessage. This option controls - * which kind will be used. By default BytesMessage is used which enforces the entire message payload - * to be read into memory. By enabling this option the message payload is read into memory in chunks - * and each chunk is then written to the StreamMessage until no more data. - */ - public fun streamMessageTypeEnabled(streamMessageTypeEnabled: Boolean) { - it.property("streamMessageTypeEnabled", streamMessageTypeEnabled.toString()) - } - - /** - * Controls whether or not to include serialized headers. Applies only when transferExchange is - * true. This requires that the objects are serializable. Camel will exclude any non-serializable - * objects and log it at WARN level. - */ - public fun allowSerializedHeaders(allowSerializedHeaders: String) { - it.property("allowSerializedHeaders", allowSerializedHeaders) - } - - /** - * Controls whether or not to include serialized headers. Applies only when transferExchange is - * true. This requires that the objects are serializable. Camel will exclude any non-serializable - * objects and log it at WARN level. - */ - public fun allowSerializedHeaders(allowSerializedHeaders: Boolean) { - it.property("allowSerializedHeaders", allowSerializedHeaders.toString()) - } - - /** - * Whether optimizing for Apache Artemis streaming mode. This can reduce memory overhead when - * using Artemis with JMS StreamMessage types. This option must only be enabled if Apache Artemis is - * being used. - */ - public fun artemisStreamingEnabled(artemisStreamingEnabled: String) { - it.property("artemisStreamingEnabled", artemisStreamingEnabled) - } - - /** - * Whether optimizing for Apache Artemis streaming mode. This can reduce memory overhead when - * using Artemis with JMS StreamMessage types. This option must only be enabled if Apache Artemis is - * being used. - */ - public fun artemisStreamingEnabled(artemisStreamingEnabled: Boolean) { - it.property("artemisStreamingEnabled", artemisStreamingEnabled.toString()) - } - - /** - * Whether to startup the JmsConsumer message listener asynchronously, when starting a route. For - * example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while - * retrying and/or fail-over. This will cause Camel to block while starting routes. By setting this - * option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker - * using a dedicated thread in asynchronous mode. If this option is used, then beware that if the - * connection could not be established, then an exception is logged at WARN level, and the consumer - * will not be able to receive messages; You can then restart the route to retry. - */ - public fun asyncStartListener(asyncStartListener: String) { - it.property("asyncStartListener", asyncStartListener) - } - - /** - * Whether to startup the JmsConsumer message listener asynchronously, when starting a route. For - * example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while - * retrying and/or fail-over. This will cause Camel to block while starting routes. By setting this - * option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker - * using a dedicated thread in asynchronous mode. If this option is used, then beware that if the - * connection could not be established, then an exception is logged at WARN level, and the consumer - * will not be able to receive messages; You can then restart the route to retry. - */ - public fun asyncStartListener(asyncStartListener: Boolean) { - it.property("asyncStartListener", asyncStartListener.toString()) - } - - /** - * Whether to stop the JmsConsumer message listener asynchronously, when stopping a route. - */ - public fun asyncStopListener(asyncStopListener: String) { - it.property("asyncStopListener", asyncStopListener) - } - - /** - * Whether to stop the JmsConsumer message listener asynchronously, when stopping a route. - */ - public fun asyncStopListener(asyncStopListener: Boolean) { - it.property("asyncStopListener", asyncStopListener.toString()) - } - - /** - * A pluggable org.springframework.jms.support.destination.DestinationResolver that allows you to - * use your own resolver (for example, to lookup the real destination in a JNDI registry). - */ - public fun destinationResolver(destinationResolver: String) { - it.property("destinationResolver", destinationResolver) - } - - /** - * Specifies a org.springframework.util.ErrorHandler to be invoked in case of any uncaught - * exceptions thrown while processing a Message. By default these exceptions will be logged at the - * WARN level, if no errorHandler has been configured. You can configure logging level and whether - * stack traces should be logged using errorHandlerLoggingLevel and errorHandlerLogStackTrace - * options. This makes it much easier to configure, than having to code a custom errorHandler. - */ - public fun errorHandler(errorHandler: String) { - it.property("errorHandler", errorHandler) - } - - /** - * Specifies the JMS Exception Listener that is to be notified of any underlying JMS exceptions. - */ - public fun exceptionListener(exceptionListener: String) { - it.property("exceptionListener", exceptionListener) - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * Specify the limit for the number of consumers that are allowed to be idle at any given time. - */ - public fun idleConsumerLimit(idleConsumerLimit: String) { - it.property("idleConsumerLimit", idleConsumerLimit) - } - - /** - * Specify the limit for the number of consumers that are allowed to be idle at any given time. - */ - public fun idleConsumerLimit(idleConsumerLimit: Int) { - it.property("idleConsumerLimit", idleConsumerLimit.toString()) - } - - /** - * Specifies the limit for idle executions of a receive task, not having received any message - * within its execution. If this limit is reached, the task will shut down and leave receiving to - * other executing tasks (in the case of dynamic scheduling; see the maxConcurrentConsumers setting). - * There is additional doc available from Spring. - */ - public fun idleTaskExecutionLimit(idleTaskExecutionLimit: String) { - it.property("idleTaskExecutionLimit", idleTaskExecutionLimit) - } - - /** - * Specifies the limit for idle executions of a receive task, not having received any message - * within its execution. If this limit is reached, the task will shut down and leave receiving to - * other executing tasks (in the case of dynamic scheduling; see the maxConcurrentConsumers setting). - * There is additional doc available from Spring. - */ - public fun idleTaskExecutionLimit(idleTaskExecutionLimit: Int) { - it.property("idleTaskExecutionLimit", idleTaskExecutionLimit.toString()) - } - - /** - * Whether to include all JMSX prefixed properties when mapping from JMS to Camel Message. Setting - * this to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using - * a custom headerFilterStrategy then this option does not apply. - */ - public fun includeAllJMSXProperties(includeAllJMSXProperties: String) { - it.property("includeAllJMSXProperties", includeAllJMSXProperties) - } - - /** - * Whether to include all JMSX prefixed properties when mapping from JMS to Camel Message. Setting - * this to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using - * a custom headerFilterStrategy then this option does not apply. - */ - public fun includeAllJMSXProperties(includeAllJMSXProperties: Boolean) { - it.property("includeAllJMSXProperties", includeAllJMSXProperties.toString()) - } - - /** - * Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS - * specification. Camel provides two implementations out of the box: default and passthrough. The - * default strategy will safely marshal dots and hyphens (. and -). The passthrough strategy leaves - * the key as is. Can be used for JMS brokers which do not care whether JMS header keys contain - * illegal characters. You can provide your own implementation of the - * org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the # notation. - */ - public fun jmsKeyFormatStrategy(jmsKeyFormatStrategy: String) { - it.property("jmsKeyFormatStrategy", jmsKeyFormatStrategy) - } - - /** - * Specifies whether Camel should auto map the received JMS message to a suited payload type, such - * as jakarta.jms.TextMessage to a String etc. - */ - public fun mapJmsMessage(mapJmsMessage: String) { - it.property("mapJmsMessage", mapJmsMessage) - } - - /** - * Specifies whether Camel should auto map the received JMS message to a suited payload type, such - * as jakarta.jms.TextMessage to a String etc. - */ - public fun mapJmsMessage(mapJmsMessage: Boolean) { - it.property("mapJmsMessage", mapJmsMessage.toString()) - } - - /** - * The number of messages per task. -1 is unlimited. If you use a range for concurrent consumers - * (eg min max), then this option can be used to set a value to eg 100 to control how fast the - * consumers will shrink when less work is required. - */ - public fun maxMessagesPerTask(maxMessagesPerTask: String) { - it.property("maxMessagesPerTask", maxMessagesPerTask) - } - - /** - * The number of messages per task. -1 is unlimited. If you use a range for concurrent consumers - * (eg min max), then this option can be used to set a value to eg 100 to control how fast the - * consumers will shrink when less work is required. - */ - public fun maxMessagesPerTask(maxMessagesPerTask: Int) { - it.property("maxMessagesPerTask", maxMessagesPerTask.toString()) - } - - /** - * To use a custom Spring org.springframework.jms.support.converter.MessageConverter so you can be - * in control how to map to/from a jakarta.jms.Message. - */ - public fun messageConverter(messageConverter: String) { - it.property("messageConverter", messageConverter) - } - - /** - * To use the given MessageCreatedStrategy which are invoked when Camel creates new instances of - * jakarta.jms.Message objects when Camel is sending a JMS message. - */ - public fun messageCreatedStrategy(messageCreatedStrategy: String) { - it.property("messageCreatedStrategy", messageCreatedStrategy) - } - - /** - * When sending, specifies whether message IDs should be added. This is just an hint to the JMS - * broker. If the JMS provider accepts this hint, these messages must have the message ID set to - * null; if the provider ignores the hint, the message ID must be set to its normal unique value. - */ - public fun messageIdEnabled(messageIdEnabled: String) { - it.property("messageIdEnabled", messageIdEnabled) - } - - /** - * When sending, specifies whether message IDs should be added. This is just an hint to the JMS - * broker. If the JMS provider accepts this hint, these messages must have the message ID set to - * null; if the provider ignores the hint, the message ID must be set to its normal unique value. - */ - public fun messageIdEnabled(messageIdEnabled: Boolean) { - it.property("messageIdEnabled", messageIdEnabled.toString()) - } - - /** - * Registry ID of the MessageListenerContainerFactory used to determine what - * org.springframework.jms.listener.AbstractMessageListenerContainer to use to consume messages. - * Setting this will automatically set consumerType to Custom. - */ - public fun messageListenerContainerFactory(messageListenerContainerFactory: String) { - it.property("messageListenerContainerFactory", messageListenerContainerFactory) - } - - /** - * Specifies whether timestamps should be enabled by default on sending messages. This is just an - * hint to the JMS broker. If the JMS provider accepts this hint, these messages must have the - * timestamp set to zero; if the provider ignores the hint the timestamp must be set to its normal - * value. - */ - public fun messageTimestampEnabled(messageTimestampEnabled: String) { - it.property("messageTimestampEnabled", messageTimestampEnabled) - } - - /** - * Specifies whether timestamps should be enabled by default on sending messages. This is just an - * hint to the JMS broker. If the JMS provider accepts this hint, these messages must have the - * timestamp set to zero; if the provider ignores the hint the timestamp must be set to its normal - * value. - */ - public fun messageTimestampEnabled(messageTimestampEnabled: Boolean) { - it.property("messageTimestampEnabled", messageTimestampEnabled.toString()) - } - - /** - * Specifies whether to inhibit the delivery of messages published by its own connection. - */ - public fun pubSubNoLocal(pubSubNoLocal: String) { - it.property("pubSubNoLocal", pubSubNoLocal) - } - - /** - * Specifies whether to inhibit the delivery of messages published by its own connection. - */ - public fun pubSubNoLocal(pubSubNoLocal: Boolean) { - it.property("pubSubNoLocal", pubSubNoLocal.toString()) - } - - /** - * The timeout for receiving messages (in milliseconds). - */ - public fun receiveTimeout(receiveTimeout: String) { - it.property("receiveTimeout", receiveTimeout) - } - - /** - * Specifies the interval between recovery attempts, i.e. when a connection is being refreshed, in - * milliseconds. The default is 5000 ms, that is, 5 seconds. - */ - public fun recoveryInterval(recoveryInterval: String) { - it.property("recoveryInterval", recoveryInterval) - } - - /** - * Configures how often Camel should check for timed out Exchanges when doing request/reply over - * JMS. By default Camel checks once per second. But if you must react faster when a timeout occurs, - * then you can lower this interval, to check more frequently. The timeout is determined by the - * option requestTimeout. - */ - public fun requestTimeoutCheckerInterval(requestTimeoutCheckerInterval: String) { - it.property("requestTimeoutCheckerInterval", requestTimeoutCheckerInterval) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * A pluggable TemporaryQueueResolver that allows you to use your own resolver for creating - * temporary queues (some messaging systems has special requirements for creating temporary queues). - */ - public fun temporaryQueueResolver(temporaryQueueResolver: String) { - it.property("temporaryQueueResolver", temporaryQueueResolver) - } - - /** - * If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the - * consumer side, then the caused Exception will be send back in response as a - * jakarta.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows - * you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable - * robust routing. Notice that if you also have transferExchange enabled, this option takes - * precedence. The caught exception is required to be serializable. The original Exception on the - * consumer side can be wrapped in an outer exception such as org.apache.camel.RuntimeCamelException - * when returned to the producer. Use this with caution as the data is using Java Object - * serialization and requires the received to be able to deserialize the data at Class level, which - * forces a strong coupling between the producers and consumer! - */ - public fun transferException(transferException: String) { - it.property("transferException", transferException) - } - - /** - * If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the - * consumer side, then the caused Exception will be send back in response as a - * jakarta.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows - * you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable - * robust routing. Notice that if you also have transferExchange enabled, this option takes - * precedence. The caught exception is required to be serializable. The original Exception on the - * consumer side can be wrapped in an outer exception such as org.apache.camel.RuntimeCamelException - * when returned to the producer. Use this with caution as the data is using Java Object - * serialization and requires the received to be able to deserialize the data at Class level, which - * forces a strong coupling between the producers and consumer! - */ - public fun transferException(transferException: Boolean) { - it.property("transferException", transferException.toString()) - } - - /** - * You can transfer the exchange over the wire instead of just the body and headers. The following - * fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, - * exchange properties, exchange exception. This requires that the objects are serializable. Camel - * will exclude any non-serializable objects and log it at WARN level. You must enable this option on - * both the producer and consumer side, so Camel knows the payloads is an Exchange and not a regular - * payload. Use this with caution as the data is using Java Object serialization and requires the - * receiver to be able to deserialize the data at Class level, which forces a strong coupling between - * the producers and consumers having to use compatible Camel versions! - */ - public fun transferExchange(transferExchange: String) { - it.property("transferExchange", transferExchange) - } - - /** - * You can transfer the exchange over the wire instead of just the body and headers. The following - * fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, - * exchange properties, exchange exception. This requires that the objects are serializable. Camel - * will exclude any non-serializable objects and log it at WARN level. You must enable this option on - * both the producer and consumer side, so Camel knows the payloads is an Exchange and not a regular - * payload. Use this with caution as the data is using Java Object serialization and requires the - * receiver to be able to deserialize the data at Class level, which forces a strong coupling between - * the producers and consumers having to use compatible Camel versions! - */ - public fun transferExchange(transferExchange: Boolean) { - it.property("transferExchange", transferExchange.toString()) - } - - /** - * Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. - */ - public fun useMessageIDAsCorrelationID(useMessageIDAsCorrelationID: String) { - it.property("useMessageIDAsCorrelationID", useMessageIDAsCorrelationID) - } - - /** - * Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. - */ - public fun useMessageIDAsCorrelationID(useMessageIDAsCorrelationID: Boolean) { - it.property("useMessageIDAsCorrelationID", useMessageIDAsCorrelationID.toString()) - } - - /** - * Number of times to wait for provisional correlation id to be updated to the actual correlation - * id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. - */ - public - fun waitForProvisionCorrelationToBeUpdatedCounter(waitForProvisionCorrelationToBeUpdatedCounter: String) { - it.property("waitForProvisionCorrelationToBeUpdatedCounter", - waitForProvisionCorrelationToBeUpdatedCounter) - } - - /** - * Number of times to wait for provisional correlation id to be updated to the actual correlation - * id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. - */ - public - fun waitForProvisionCorrelationToBeUpdatedCounter(waitForProvisionCorrelationToBeUpdatedCounter: Int) { - it.property("waitForProvisionCorrelationToBeUpdatedCounter", - waitForProvisionCorrelationToBeUpdatedCounter.toString()) - } - - /** - * Interval in millis to sleep each time while waiting for provisional correlation id to be - * updated. - */ - public - fun waitForProvisionCorrelationToBeUpdatedThreadSleepingTime(waitForProvisionCorrelationToBeUpdatedThreadSleepingTime: String) { - it.property("waitForProvisionCorrelationToBeUpdatedThreadSleepingTime", - waitForProvisionCorrelationToBeUpdatedThreadSleepingTime) - } - - /** - * Number of times to wait for temporary replyTo queue to be created and ready when doing - * request/reply over JMS. - */ - public - fun waitForTemporaryReplyToToBeUpdatedCounter(waitForTemporaryReplyToToBeUpdatedCounter: String) { - it.property("waitForTemporaryReplyToToBeUpdatedCounter", - waitForTemporaryReplyToToBeUpdatedCounter) - } - - /** - * Number of times to wait for temporary replyTo queue to be created and ready when doing - * request/reply over JMS. - */ - public - fun waitForTemporaryReplyToToBeUpdatedCounter(waitForTemporaryReplyToToBeUpdatedCounter: Int) { - it.property("waitForTemporaryReplyToToBeUpdatedCounter", - waitForTemporaryReplyToToBeUpdatedCounter.toString()) - } - - /** - * Interval in millis to sleep each time while waiting for temporary replyTo queue to be ready. - */ - public - fun waitForTemporaryReplyToToBeUpdatedThreadSleepingTime(waitForTemporaryReplyToToBeUpdatedThreadSleepingTime: String) { - it.property("waitForTemporaryReplyToToBeUpdatedThreadSleepingTime", - waitForTemporaryReplyToToBeUpdatedThreadSleepingTime) - } - - /** - * Allows to configure the default errorHandler logging level for logging uncaught exceptions. - */ - public fun errorHandlerLoggingLevel(errorHandlerLoggingLevel: String) { - it.property("errorHandlerLoggingLevel", errorHandlerLoggingLevel) - } - - /** - * Allows to control whether stack-traces should be logged or not, by the default errorHandler. - */ - public fun errorHandlerLogStackTrace(errorHandlerLogStackTrace: String) { - it.property("errorHandlerLogStackTrace", errorHandlerLogStackTrace) - } - - /** - * Allows to control whether stack-traces should be logged or not, by the default errorHandler. - */ - public fun errorHandlerLogStackTrace(errorHandlerLogStackTrace: Boolean) { - it.property("errorHandlerLogStackTrace", errorHandlerLogStackTrace.toString()) - } - - /** - * Password to use with the ConnectionFactory. You can also configure username/password directly - * on the ConnectionFactory. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Username to use with the ConnectionFactory. You can also configure username/password directly - * on the ConnectionFactory. - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * Specifies whether to use transacted mode - */ - public fun transacted(transacted: String) { - it.property("transacted", transacted) - } - - /** - * Specifies whether to use transacted mode - */ - public fun transacted(transacted: Boolean) { - it.property("transacted", transacted.toString()) - } - - /** - * Specifies whether InOut operations (request reply) default to using transacted mode If this - * flag is set to true, then Spring JmsTemplate will have sessionTransacted set to true, and the - * acknowledgeMode as transacted on the JmsTemplate used for InOut operations. Note from Spring JMS: - * that within a JTA transaction, the parameters passed to createQueue, createTopic methods are not - * taken into account. Depending on the Java EE transaction context, the container makes its own - * decisions on these values. Analogously, these parameters are not taken into account within a - * locally managed transaction either, since Spring JMS operates on an existing JMS Session in this - * case. Setting this flag to true will use a short local JMS transaction when running outside of a - * managed transaction, and a synchronized local JMS transaction in case of a managed transaction - * (other than an XA transaction) being present. This has the effect of a local JMS transaction being - * managed alongside the main transaction (which might be a native JDBC transaction), with the JMS - * transaction committing right after the main transaction. - */ - public fun transactedInOut(transactedInOut: String) { - it.property("transactedInOut", transactedInOut) - } - - /** - * Specifies whether InOut operations (request reply) default to using transacted mode If this - * flag is set to true, then Spring JmsTemplate will have sessionTransacted set to true, and the - * acknowledgeMode as transacted on the JmsTemplate used for InOut operations. Note from Spring JMS: - * that within a JTA transaction, the parameters passed to createQueue, createTopic methods are not - * taken into account. Depending on the Java EE transaction context, the container makes its own - * decisions on these values. Analogously, these parameters are not taken into account within a - * locally managed transaction either, since Spring JMS operates on an existing JMS Session in this - * case. Setting this flag to true will use a short local JMS transaction when running outside of a - * managed transaction, and a synchronized local JMS transaction in case of a managed transaction - * (other than an XA transaction) being present. This has the effect of a local JMS transaction being - * managed alongside the main transaction (which might be a native JDBC transaction), with the JMS - * transaction committing right after the main transaction. - */ - public fun transactedInOut(transactedInOut: Boolean) { - it.property("transactedInOut", transactedInOut.toString()) - } - - /** - * If true, Camel will create a JmsTransactionManager, if there is no transactionManager injected - * when option transacted=true. - */ - public fun lazyCreateTransactionManager(lazyCreateTransactionManager: String) { - it.property("lazyCreateTransactionManager", lazyCreateTransactionManager) - } - - /** - * If true, Camel will create a JmsTransactionManager, if there is no transactionManager injected - * when option transacted=true. - */ - public fun lazyCreateTransactionManager(lazyCreateTransactionManager: Boolean) { - it.property("lazyCreateTransactionManager", lazyCreateTransactionManager.toString()) - } - - /** - * The Spring transaction manager to use. - */ - public fun transactionManager(transactionManager: String) { - it.property("transactionManager", transactionManager) - } - - /** - * The name of the transaction to use. - */ - public fun transactionName(transactionName: String) { - it.property("transactionName", transactionName) - } - - /** - * The timeout value of the transaction (in seconds), if using transacted mode. - */ - public fun transactionTimeout(transactionTimeout: String) { - it.property("transactionTimeout", transactionTimeout) - } - - /** - * The timeout value of the transaction (in seconds), if using transacted mode. - */ - public fun transactionTimeout(transactionTimeout: Int) { - it.property("transactionTimeout", transactionTimeout.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ActivemqUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ActivemqUriDsl.kt deleted file mode 100644 index 1d8adc97dba85..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ActivemqUriDsl.kt +++ /dev/null @@ -1,1543 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send messages to (or consume from) Apache ActiveMQ 5.x. This component extends the Camel JMS - * component. - */ -public fun UriDsl.activemq(i: ActivemqUriDsl.() -> Unit) { - ActivemqUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ActivemqUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("activemq") - } - - private var destinationType: String = "" - - private var destinationName: String = "" - - /** - * The kind of destination to use - */ - public fun destinationType(destinationType: String) { - this.destinationType = destinationType - it.url("$destinationType:$destinationName") - } - - /** - * Name of the queue or topic to use as destination - */ - public fun destinationName(destinationName: String) { - this.destinationName = destinationName - it.url("$destinationType:$destinationName") - } - - /** - * Sets the JMS client ID to use. Note that this value, if specified, must be unique and can only - * be used by a single JMS connection instance. It is typically only required for durable topic - * subscriptions with JMS 1.1. - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * The connection factory to be use. A connection factory must be configured either on the - * component or endpoint. - */ - public fun connectionFactory(connectionFactory: String) { - it.property("connectionFactory", connectionFactory) - } - - /** - * Specifies whether Camel ignores the JMSReplyTo header in messages. If true, Camel does not send - * a reply back to the destination specified in the JMSReplyTo header. You can use this option if you - * want Camel to consume from a route and you do not want Camel to automatically send back a reply - * message because another component in your code handles the reply message. You can also use this - * option if you want to use Camel as a proxy between different message brokers and you want to route - * message from one system to another. - */ - public fun disableReplyTo(disableReplyTo: String) { - it.property("disableReplyTo", disableReplyTo) - } - - /** - * Specifies whether Camel ignores the JMSReplyTo header in messages. If true, Camel does not send - * a reply back to the destination specified in the JMSReplyTo header. You can use this option if you - * want Camel to consume from a route and you do not want Camel to automatically send back a reply - * message because another component in your code handles the reply message. You can also use this - * option if you want to use Camel as a proxy between different message brokers and you want to route - * message from one system to another. - */ - public fun disableReplyTo(disableReplyTo: Boolean) { - it.property("disableReplyTo", disableReplyTo.toString()) - } - - /** - * The durable subscriber name for specifying durable topic subscriptions. The clientId option - * must be configured as well. - */ - public fun durableSubscriptionName(durableSubscriptionName: String) { - it.property("durableSubscriptionName", durableSubscriptionName) - } - - /** - * Allows you to force the use of a specific jakarta.jms.Message implementation for sending JMS - * messages. Possible values are: Bytes, Map, Object, Stream, Text. By default, Camel would determine - * which JMS message type to use from the In body type. This option allows you to specify it. - */ - public fun jmsMessageType(jmsMessageType: String) { - it.property("jmsMessageType", jmsMessageType) - } - - /** - * Provides an explicit ReplyTo destination (overrides any incoming value of - * Message.getJMSReplyTo() in consumer). - */ - public fun replyTo(replyTo: String) { - it.property("replyTo", replyTo) - } - - /** - * Specifies whether to test the connection on startup. This ensures that when Camel starts that - * all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted - * then Camel throws an exception on startup. This ensures that Camel is not started with failed - * connections. The JMS producers is tested as well. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: String) { - it.property("testConnectionOnStartup", testConnectionOnStartup) - } - - /** - * Specifies whether to test the connection on startup. This ensures that when Camel starts that - * all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted - * then Camel throws an exception on startup. This ensures that Camel is not started with failed - * connections. The JMS producers is tested as well. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: Boolean) { - it.property("testConnectionOnStartup", testConnectionOnStartup.toString()) - } - - /** - * The JMS acknowledgement name, which is one of: SESSION_TRANSACTED, CLIENT_ACKNOWLEDGE, - * AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE - */ - public fun acknowledgementModeName(acknowledgementModeName: String) { - it.property("acknowledgementModeName", acknowledgementModeName) - } - - /** - * Consumer priorities allow you to ensure that high priority consumers receive messages while - * they are active. Normally, active consumers connected to a queue receive messages from it in a - * round-robin fashion. When consumer priorities are in use, messages are delivered round-robin if - * multiple active consumers exist with the same high priority. Messages will only going to lower - * priority consumers when the high priority consumers do not have credit available to consume the - * message, or those high priority consumers have declined to accept the message (for instance - * because it does not meet the criteria of any selectors associated with the consumer). - */ - public fun artemisConsumerPriority(artemisConsumerPriority: String) { - it.property("artemisConsumerPriority", artemisConsumerPriority) - } - - /** - * Consumer priorities allow you to ensure that high priority consumers receive messages while - * they are active. Normally, active consumers connected to a queue receive messages from it in a - * round-robin fashion. When consumer priorities are in use, messages are delivered round-robin if - * multiple active consumers exist with the same high priority. Messages will only going to lower - * priority consumers when the high priority consumers do not have credit available to consume the - * message, or those high priority consumers have declined to accept the message (for instance - * because it does not meet the criteria of any selectors associated with the consumer). - */ - public fun artemisConsumerPriority(artemisConsumerPriority: Int) { - it.property("artemisConsumerPriority", artemisConsumerPriority.toString()) - } - - /** - * Whether the JmsConsumer processes the Exchange asynchronously. If enabled then the JmsConsumer - * may pickup the next message from the JMS queue, while the previous message is being processed - * asynchronously (by the Asynchronous Routing Engine). This means that messages may be processed not - * 100% strictly in order. If disabled (as default) then the Exchange is fully processed before the - * JmsConsumer will pickup the next message from the JMS queue. Note if transacted has been enabled, - * then asyncConsumer=true does not run asynchronously, as transaction must be executed synchronously - * (Camel 3.0 may support async transactions). - */ - public fun asyncConsumer(asyncConsumer: String) { - it.property("asyncConsumer", asyncConsumer) - } - - /** - * Whether the JmsConsumer processes the Exchange asynchronously. If enabled then the JmsConsumer - * may pickup the next message from the JMS queue, while the previous message is being processed - * asynchronously (by the Asynchronous Routing Engine). This means that messages may be processed not - * 100% strictly in order. If disabled (as default) then the Exchange is fully processed before the - * JmsConsumer will pickup the next message from the JMS queue. Note if transacted has been enabled, - * then asyncConsumer=true does not run asynchronously, as transaction must be executed synchronously - * (Camel 3.0 may support async transactions). - */ - public fun asyncConsumer(asyncConsumer: Boolean) { - it.property("asyncConsumer", asyncConsumer.toString()) - } - - /** - * Specifies whether the consumer container should auto-startup. - */ - public fun autoStartup(autoStartup: String) { - it.property("autoStartup", autoStartup) - } - - /** - * Specifies whether the consumer container should auto-startup. - */ - public fun autoStartup(autoStartup: Boolean) { - it.property("autoStartup", autoStartup.toString()) - } - - /** - * Sets the cache level by ID for the underlying JMS resources. See cacheLevelName option for more - * details. - */ - public fun cacheLevel(cacheLevel: String) { - it.property("cacheLevel", cacheLevel) - } - - /** - * Sets the cache level by ID for the underlying JMS resources. See cacheLevelName option for more - * details. - */ - public fun cacheLevel(cacheLevel: Int) { - it.property("cacheLevel", cacheLevel.toString()) - } - - /** - * Sets the cache level by name for the underlying JMS resources. Possible values are: CACHE_AUTO, - * CACHE_CONNECTION, CACHE_CONSUMER, CACHE_NONE, and CACHE_SESSION. The default setting is - * CACHE_AUTO. See the Spring documentation and Transactions Cache Levels for more information. - */ - public fun cacheLevelName(cacheLevelName: String) { - it.property("cacheLevelName", cacheLevelName) - } - - /** - * Specifies the default number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToConcurrentConsumers is used - * to control number of concurrent consumers on the reply message listener. - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * Specifies the default number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToConcurrentConsumers is used - * to control number of concurrent consumers on the reply message listener. - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * Specifies the maximum number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToMaxConcurrentConsumers is - * used to control number of concurrent consumers on the reply message listener. - */ - public fun maxConcurrentConsumers(maxConcurrentConsumers: String) { - it.property("maxConcurrentConsumers", maxConcurrentConsumers) - } - - /** - * Specifies the maximum number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToMaxConcurrentConsumers is - * used to control number of concurrent consumers on the reply message listener. - */ - public fun maxConcurrentConsumers(maxConcurrentConsumers: Int) { - it.property("maxConcurrentConsumers", maxConcurrentConsumers.toString()) - } - - /** - * Specifies whether to use persistent delivery by default for replies. - */ - public fun replyToDeliveryPersistent(replyToDeliveryPersistent: String) { - it.property("replyToDeliveryPersistent", replyToDeliveryPersistent) - } - - /** - * Specifies whether to use persistent delivery by default for replies. - */ - public fun replyToDeliveryPersistent(replyToDeliveryPersistent: Boolean) { - it.property("replyToDeliveryPersistent", replyToDeliveryPersistent.toString()) - } - - /** - * Sets the JMS selector to use - */ - public fun selector(selector: String) { - it.property("selector", selector) - } - - /** - * Set whether to make the subscription durable. The durable subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * durable subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Only makes sense when listening to a - * topic (pub-sub domain), therefore this method switches the pubSubDomain flag as well. - */ - public fun subscriptionDurable(subscriptionDurable: String) { - it.property("subscriptionDurable", subscriptionDurable) - } - - /** - * Set whether to make the subscription durable. The durable subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * durable subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Only makes sense when listening to a - * topic (pub-sub domain), therefore this method switches the pubSubDomain flag as well. - */ - public fun subscriptionDurable(subscriptionDurable: Boolean) { - it.property("subscriptionDurable", subscriptionDurable.toString()) - } - - /** - * Set the name of a subscription to create. To be applied in case of a topic (pub-sub domain) - * with a shared or durable subscription. The subscription name needs to be unique within this - * client's JMS client id. Default is the class name of the specified message listener. Note: Only 1 - * concurrent consumer (which is the default of this message listener container) is allowed for each - * subscription, except for a shared subscription (which requires JMS 2.0). - */ - public fun subscriptionName(subscriptionName: String) { - it.property("subscriptionName", subscriptionName) - } - - /** - * Set whether to make the subscription shared. The shared subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * shared subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Note that shared subscriptions may also - * be durable, so this flag can (and often will) be combined with subscriptionDurable as well. Only - * makes sense when listening to a topic (pub-sub domain), therefore this method switches the - * pubSubDomain flag as well. Requires a JMS 2.0 compatible message broker. - */ - public fun subscriptionShared(subscriptionShared: String) { - it.property("subscriptionShared", subscriptionShared) - } - - /** - * Set whether to make the subscription shared. The shared subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * shared subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Note that shared subscriptions may also - * be durable, so this flag can (and often will) be combined with subscriptionDurable as well. Only - * makes sense when listening to a topic (pub-sub domain), therefore this method switches the - * pubSubDomain flag as well. Requires a JMS 2.0 compatible message broker. - */ - public fun subscriptionShared(subscriptionShared: Boolean) { - it.property("subscriptionShared", subscriptionShared.toString()) - } - - /** - * Specifies whether the consumer accept messages while it is stopping. You may consider enabling - * this option, if you start and stop JMS routes at runtime, while there are still messages enqueued - * on the queue. If this option is false, and you stop the JMS route, then messages may be rejected, - * and the JMS broker would have to attempt redeliveries, which yet again may be rejected, and - * eventually the message may be moved at a dead letter queue on the JMS broker. To avoid this its - * recommended to enable this option. - */ - public fun acceptMessagesWhileStopping(acceptMessagesWhileStopping: String) { - it.property("acceptMessagesWhileStopping", acceptMessagesWhileStopping) - } - - /** - * Specifies whether the consumer accept messages while it is stopping. You may consider enabling - * this option, if you start and stop JMS routes at runtime, while there are still messages enqueued - * on the queue. If this option is false, and you stop the JMS route, then messages may be rejected, - * and the JMS broker would have to attempt redeliveries, which yet again may be rejected, and - * eventually the message may be moved at a dead letter queue on the JMS broker. To avoid this its - * recommended to enable this option. - */ - public fun acceptMessagesWhileStopping(acceptMessagesWhileStopping: Boolean) { - it.property("acceptMessagesWhileStopping", acceptMessagesWhileStopping.toString()) - } - - /** - * Whether the DefaultMessageListenerContainer used in the reply managers for request-reply - * messaging allow the DefaultMessageListenerContainer.runningAllowed flag to quick stop in case - * JmsConfiguration#isAcceptMessagesWhileStopping is enabled, and org.apache.camel.CamelContext is - * currently being stopped. This quick stop ability is enabled by default in the regular JMS - * consumers but to enable for reply managers you must enable this flag. - */ - public fun allowReplyManagerQuickStop(allowReplyManagerQuickStop: String) { - it.property("allowReplyManagerQuickStop", allowReplyManagerQuickStop) - } - - /** - * Whether the DefaultMessageListenerContainer used in the reply managers for request-reply - * messaging allow the DefaultMessageListenerContainer.runningAllowed flag to quick stop in case - * JmsConfiguration#isAcceptMessagesWhileStopping is enabled, and org.apache.camel.CamelContext is - * currently being stopped. This quick stop ability is enabled by default in the regular JMS - * consumers but to enable for reply managers you must enable this flag. - */ - public fun allowReplyManagerQuickStop(allowReplyManagerQuickStop: Boolean) { - it.property("allowReplyManagerQuickStop", allowReplyManagerQuickStop.toString()) - } - - /** - * The consumer type to use, which can be one of: Simple, Default, or Custom. The consumer type - * determines which Spring JMS listener to use. Default will use - * org.springframework.jms.listener.DefaultMessageListenerContainer, Simple will use - * org.springframework.jms.listener.SimpleMessageListenerContainer. When Custom is specified, the - * MessageListenerContainerFactory defined by the messageListenerContainerFactory option will - * determine what org.springframework.jms.listener.AbstractMessageListenerContainer to use. - */ - public fun consumerType(consumerType: String) { - it.property("consumerType", consumerType) - } - - /** - * Specifies what default TaskExecutor type to use in the DefaultMessageListenerContainer, for - * both consumer endpoints and the ReplyTo consumer of producer endpoints. Possible values: - * SimpleAsync (uses Spring's SimpleAsyncTaskExecutor) or ThreadPool (uses Spring's - * ThreadPoolTaskExecutor with optimal values - cached thread-pool-like). If not set, it defaults to - * the previous behaviour, which uses a cached thread pool for consumer endpoints and SimpleAsync for - * reply consumers. The use of ThreadPool is recommended to reduce thread trash in elastic - * configurations with dynamically increasing and decreasing concurrent consumers. - */ - public fun defaultTaskExecutorType(defaultTaskExecutorType: String) { - it.property("defaultTaskExecutorType", defaultTaskExecutorType) - } - - /** - * Destination Options are a way to provide extended configuration options to a JMS consumer - * without having to extend the JMS API. The options are encoded using URL query syntax in the - * destination name that the consumer is created on. See more details at - * https://activemq.apache.org/destination-options. - */ - public fun destinationOptions(destinationOptions: String) { - it.property("destinationOptions", destinationOptions) - } - - /** - * Enables eager loading of JMS properties and payload as soon as a message is loaded which - * generally is inefficient as the JMS properties may not be required but sometimes can catch early - * any issues with the underlying JMS provider and the use of JMS properties. See also the option - * eagerPoisonBody. - */ - public fun eagerLoadingOfProperties(eagerLoadingOfProperties: String) { - it.property("eagerLoadingOfProperties", eagerLoadingOfProperties) - } - - /** - * Enables eager loading of JMS properties and payload as soon as a message is loaded which - * generally is inefficient as the JMS properties may not be required but sometimes can catch early - * any issues with the underlying JMS provider and the use of JMS properties. See also the option - * eagerPoisonBody. - */ - public fun eagerLoadingOfProperties(eagerLoadingOfProperties: Boolean) { - it.property("eagerLoadingOfProperties", eagerLoadingOfProperties.toString()) - } - - /** - * If eagerLoadingOfProperties is enabled and the JMS message payload (JMS body or JMS properties) - * is poison (cannot be read/mapped), then set this text as the message body instead so the message - * can be processed (the cause of the poison are already stored as exception on the Exchange). This - * can be turned off by setting eagerPoisonBody=false. See also the option eagerLoadingOfProperties. - */ - public fun eagerPoisonBody(eagerPoisonBody: String) { - it.property("eagerPoisonBody", eagerPoisonBody) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Specifies whether the listener session should be exposed when consuming messages. - */ - public fun exposeListenerSession(exposeListenerSession: String) { - it.property("exposeListenerSession", exposeListenerSession) - } - - /** - * Specifies whether the listener session should be exposed when consuming messages. - */ - public fun exposeListenerSession(exposeListenerSession: Boolean) { - it.property("exposeListenerSession", exposeListenerSession.toString()) - } - - /** - * The consumer type of the reply consumer (when doing request/reply), which can be one of: - * Simple, Default, or Custom. The consumer type determines which Spring JMS listener to use. Default - * will use org.springframework.jms.listener.DefaultMessageListenerContainer, Simple will use - * org.springframework.jms.listener.SimpleMessageListenerContainer. When Custom is specified, the - * MessageListenerContainerFactory defined by the messageListenerContainerFactory option will - * determine what org.springframework.jms.listener.AbstractMessageListenerContainer to use. - */ - public fun replyToConsumerType(replyToConsumerType: String) { - it.property("replyToConsumerType", replyToConsumerType) - } - - /** - * Whether a JMS consumer is allowed to send a reply message to the same destination that the - * consumer is using to consume from. This prevents an endless loop by consuming and sending back the - * same message to itself. - */ - public fun replyToSameDestinationAllowed(replyToSameDestinationAllowed: String) { - it.property("replyToSameDestinationAllowed", replyToSameDestinationAllowed) - } - - /** - * Whether a JMS consumer is allowed to send a reply message to the same destination that the - * consumer is using to consume from. This prevents an endless loop by consuming and sending back the - * same message to itself. - */ - public fun replyToSameDestinationAllowed(replyToSameDestinationAllowed: Boolean) { - it.property("replyToSameDestinationAllowed", replyToSameDestinationAllowed.toString()) - } - - /** - * Allows you to specify a custom task executor for consuming messages. - */ - public fun taskExecutor(taskExecutor: String) { - it.property("taskExecutor", taskExecutor) - } - - /** - * Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant - * broker. - */ - public fun deliveryDelay(deliveryDelay: String) { - it.property("deliveryDelay", deliveryDelay) - } - - /** - * Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant - * broker. - */ - public fun deliveryDelay(deliveryDelay: Int) { - it.property("deliveryDelay", deliveryDelay.toString()) - } - - /** - * Specifies the delivery mode to be used. Possible values are those defined by - * jakarta.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. - */ - public fun deliveryMode(deliveryMode: String) { - it.property("deliveryMode", deliveryMode) - } - - /** - * Specifies the delivery mode to be used. Possible values are those defined by - * jakarta.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. - */ - public fun deliveryMode(deliveryMode: Int) { - it.property("deliveryMode", deliveryMode.toString()) - } - - /** - * Specifies whether persistent delivery is used by default. - */ - public fun deliveryPersistent(deliveryPersistent: String) { - it.property("deliveryPersistent", deliveryPersistent) - } - - /** - * Specifies whether persistent delivery is used by default. - */ - public fun deliveryPersistent(deliveryPersistent: Boolean) { - it.property("deliveryPersistent", deliveryPersistent.toString()) - } - - /** - * Set if the deliveryMode, priority or timeToLive qualities of service should be used when - * sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and - * timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos - * option, which operates at message granularity, reading QoS properties exclusively from the Camel - * In message headers. - */ - public fun explicitQosEnabled(explicitQosEnabled: String) { - it.property("explicitQosEnabled", explicitQosEnabled) - } - - /** - * Set if the deliveryMode, priority or timeToLive qualities of service should be used when - * sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and - * timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos - * option, which operates at message granularity, reading QoS properties exclusively from the Camel - * In message headers. - */ - public fun explicitQosEnabled(explicitQosEnabled: Boolean) { - it.property("explicitQosEnabled", explicitQosEnabled.toString()) - } - - /** - * Sets whether JMS date properties should be formatted according to the ISO 8601 standard. - */ - public fun formatDateHeadersToIso8601(formatDateHeadersToIso8601: String) { - it.property("formatDateHeadersToIso8601", formatDateHeadersToIso8601) - } - - /** - * Sets whether JMS date properties should be formatted according to the ISO 8601 standard. - */ - public fun formatDateHeadersToIso8601(formatDateHeadersToIso8601: Boolean) { - it.property("formatDateHeadersToIso8601", formatDateHeadersToIso8601.toString()) - } - - /** - * Set to true, if you want to send message using the QoS settings specified on the message, - * instead of the QoS settings on the JMS endpoint. The following three headers are considered - * JMSPriority, JMSDeliveryMode, and JMSExpiration. You can provide all or only some of them. If not - * provided, Camel will fall back to use the values from the endpoint instead. So, when using this - * option, the headers override the values from the endpoint. The explicitQosEnabled option, by - * contrast, will only use options set on the endpoint, and not values from the message header. - */ - public fun preserveMessageQos(preserveMessageQos: String) { - it.property("preserveMessageQos", preserveMessageQos) - } - - /** - * Set to true, if you want to send message using the QoS settings specified on the message, - * instead of the QoS settings on the JMS endpoint. The following three headers are considered - * JMSPriority, JMSDeliveryMode, and JMSExpiration. You can provide all or only some of them. If not - * provided, Camel will fall back to use the values from the endpoint instead. So, when using this - * option, the headers override the values from the endpoint. The explicitQosEnabled option, by - * contrast, will only use options set on the endpoint, and not values from the message header. - */ - public fun preserveMessageQos(preserveMessageQos: Boolean) { - it.property("preserveMessageQos", preserveMessageQos.toString()) - } - - /** - * Values greater than 1 specify the message priority when sending (where 1 is the lowest priority - * and 9 is the highest). The explicitQosEnabled option must also be enabled in order for this option - * to have any effect. - */ - public fun priority(priority: String) { - it.property("priority", priority) - } - - /** - * Values greater than 1 specify the message priority when sending (where 1 is the lowest priority - * and 9 is the highest). The explicitQosEnabled option must also be enabled in order for this option - * to have any effect. - */ - public fun priority(priority: Int) { - it.property("priority", priority.toString()) - } - - /** - * Specifies the default number of concurrent consumers when doing request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToConcurrentConsumers(replyToConcurrentConsumers: String) { - it.property("replyToConcurrentConsumers", replyToConcurrentConsumers) - } - - /** - * Specifies the default number of concurrent consumers when doing request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToConcurrentConsumers(replyToConcurrentConsumers: Int) { - it.property("replyToConcurrentConsumers", replyToConcurrentConsumers.toString()) - } - - /** - * Specifies the maximum number of concurrent consumers when using request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToMaxConcurrentConsumers(replyToMaxConcurrentConsumers: String) { - it.property("replyToMaxConcurrentConsumers", replyToMaxConcurrentConsumers) - } - - /** - * Specifies the maximum number of concurrent consumers when using request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToMaxConcurrentConsumers(replyToMaxConcurrentConsumers: Int) { - it.property("replyToMaxConcurrentConsumers", replyToMaxConcurrentConsumers.toString()) - } - - /** - * Specifies the maximum number of concurrent consumers for continue routing when timeout occurred - * when using request/reply over JMS. - */ - public - fun replyToOnTimeoutMaxConcurrentConsumers(replyToOnTimeoutMaxConcurrentConsumers: String) { - it.property("replyToOnTimeoutMaxConcurrentConsumers", replyToOnTimeoutMaxConcurrentConsumers) - } - - /** - * Specifies the maximum number of concurrent consumers for continue routing when timeout occurred - * when using request/reply over JMS. - */ - public fun replyToOnTimeoutMaxConcurrentConsumers(replyToOnTimeoutMaxConcurrentConsumers: Int) { - it.property("replyToOnTimeoutMaxConcurrentConsumers", - replyToOnTimeoutMaxConcurrentConsumers.toString()) - } - - /** - * Provides an explicit ReplyTo destination in the JMS message, which overrides the setting of - * replyTo. It is useful if you want to forward the message to a remote Queue and receive the reply - * message from the ReplyTo destination. - */ - public fun replyToOverride(replyToOverride: String) { - it.property("replyToOverride", replyToOverride) - } - - /** - * Allows for explicitly specifying which kind of strategy to use for replyTo queues when doing - * request/reply over JMS. Possible values are: Temporary, Shared, or Exclusive. By default Camel - * will use temporary queues. However if replyTo has been configured, then Shared is used by default. - * This option allows you to use exclusive queues instead of shared ones. See Camel JMS documentation - * for more details, and especially the notes about the implications if running in a clustered - * environment, and the fact that Shared reply queues has lower performance than its alternatives - * Temporary and Exclusive. - */ - public fun replyToType(replyToType: String) { - it.property("replyToType", replyToType) - } - - /** - * The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds). - * The default is 20 seconds. You can include the header CamelJmsRequestTimeout to override this - * endpoint configured timeout value, and thus have per message individual timeout values. See also - * the requestTimeoutCheckerInterval option. - */ - public fun requestTimeout(requestTimeout: String) { - it.property("requestTimeout", requestTimeout) - } - - /** - * When sending messages, specifies the time-to-live of the message (in milliseconds). - */ - public fun timeToLive(timeToLive: String) { - it.property("timeToLive", timeToLive) - } - - /** - * When sending messages, specifies the time-to-live of the message (in milliseconds). - */ - public fun timeToLive(timeToLive: Int) { - it.property("timeToLive", timeToLive.toString()) - } - - /** - * This option is used to allow additional headers which may have values that are invalid - * according to JMS specification. For example, some message systems, such as WMQ, do this with - * header names using prefix JMS_IBM_MQMD_ containing values with byte array or other invalid types. - * You can specify multiple header names separated by comma, and use as suffix for wildcard matching. - */ - public fun allowAdditionalHeaders(allowAdditionalHeaders: String) { - it.property("allowAdditionalHeaders", allowAdditionalHeaders) - } - - /** - * Whether to allow sending messages with no body. If this option is false and the message body is - * null, then an JMSException is thrown. - */ - public fun allowNullBody(allowNullBody: String) { - it.property("allowNullBody", allowNullBody) - } - - /** - * Whether to allow sending messages with no body. If this option is false and the message body is - * null, then an JMSException is thrown. - */ - public fun allowNullBody(allowNullBody: Boolean) { - it.property("allowNullBody", allowNullBody.toString()) - } - - /** - * If true, Camel will always make a JMS message copy of the message when it is passed to the - * producer for sending. Copying the message is needed in some situations, such as when a - * replyToDestinationSelectorName is set (incidentally, Camel will set the alwaysCopyMessage option - * to true, if a replyToDestinationSelectorName is set) - */ - public fun alwaysCopyMessage(alwaysCopyMessage: String) { - it.property("alwaysCopyMessage", alwaysCopyMessage) - } - - /** - * If true, Camel will always make a JMS message copy of the message when it is passed to the - * producer for sending. Copying the message is needed in some situations, such as when a - * replyToDestinationSelectorName is set (incidentally, Camel will set the alwaysCopyMessage option - * to true, if a replyToDestinationSelectorName is set) - */ - public fun alwaysCopyMessage(alwaysCopyMessage: Boolean) { - it.property("alwaysCopyMessage", alwaysCopyMessage.toString()) - } - - /** - * When using InOut exchange pattern use this JMS property instead of JMSCorrelationID JMS - * property to correlate messages. If set messages will be correlated solely on the value of this - * property JMSCorrelationID property will be ignored and not set by Camel. - */ - public fun correlationProperty(correlationProperty: String) { - it.property("correlationProperty", correlationProperty) - } - - /** - * Use this option to force disabling time to live. For example when you do request/reply over - * JMS, then Camel will by default use the requestTimeout value as time to live on the message being - * sent. The problem is that the sender and receiver systems have to have their clocks synchronized, - * so they are in sync. This is not always so easy to archive. So you can use disableTimeToLive=true - * to not set a time to live value on the sent message. Then the message will not expire on the - * receiver system. See below in section About time to live for more details. - */ - public fun disableTimeToLive(disableTimeToLive: String) { - it.property("disableTimeToLive", disableTimeToLive) - } - - /** - * Use this option to force disabling time to live. For example when you do request/reply over - * JMS, then Camel will by default use the requestTimeout value as time to live on the message being - * sent. The problem is that the sender and receiver systems have to have their clocks synchronized, - * so they are in sync. This is not always so easy to archive. So you can use disableTimeToLive=true - * to not set a time to live value on the sent message. Then the message will not expire on the - * receiver system. See below in section About time to live for more details. - */ - public fun disableTimeToLive(disableTimeToLive: Boolean) { - it.property("disableTimeToLive", disableTimeToLive.toString()) - } - - /** - * When using mapJmsMessage=false Camel will create a new JMS message to send to a new JMS - * destination if you touch the headers (get or set) during the route. Set this option to true to - * force Camel to send the original JMS message that was received. - */ - public fun forceSendOriginalMessage(forceSendOriginalMessage: String) { - it.property("forceSendOriginalMessage", forceSendOriginalMessage) - } - - /** - * When using mapJmsMessage=false Camel will create a new JMS message to send to a new JMS - * destination if you touch the headers (get or set) during the route. Set this option to true to - * force Camel to send the original JMS message that was received. - */ - public fun forceSendOriginalMessage(forceSendOriginalMessage: Boolean) { - it.property("forceSendOriginalMessage", forceSendOriginalMessage.toString()) - } - - /** - * Only applicable when sending to JMS destination using InOnly (eg fire and forget). Enabling - * this option will enrich the Camel Exchange with the actual JMSMessageID that was used by the JMS - * client when the message was sent to the JMS destination. - */ - public fun includeSentJMSMessageID(includeSentJMSMessageID: String) { - it.property("includeSentJMSMessageID", includeSentJMSMessageID) - } - - /** - * Only applicable when sending to JMS destination using InOnly (eg fire and forget). Enabling - * this option will enrich the Camel Exchange with the actual JMSMessageID that was used by the JMS - * client when the message was sent to the JMS destination. - */ - public fun includeSentJMSMessageID(includeSentJMSMessageID: Boolean) { - it.property("includeSentJMSMessageID", includeSentJMSMessageID.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Sets the cache level by name for the reply consumer when doing request/reply over JMS. This - * option only applies when using fixed reply queues (not temporary). Camel will by default use: - * CACHE_CONSUMER for exclusive or shared w/ replyToSelectorName. And CACHE_SESSION for shared - * without replyToSelectorName. Some JMS brokers such as IBM WebSphere may require to set the - * replyToCacheLevelName=CACHE_NONE to work. Note: If using temporary queues then CACHE_NONE is not - * allowed, and you must use a higher value such as CACHE_CONSUMER or CACHE_SESSION. - */ - public fun replyToCacheLevelName(replyToCacheLevelName: String) { - it.property("replyToCacheLevelName", replyToCacheLevelName) - } - - /** - * Sets the JMS Selector using the fixed name to be used so you can filter out your own replies - * from the others when using a shared queue (that is, if you are not using a temporary reply queue). - */ - public fun replyToDestinationSelectorName(replyToDestinationSelectorName: String) { - it.property("replyToDestinationSelectorName", replyToDestinationSelectorName) - } - - /** - * Sets whether StreamMessage type is enabled or not. Message payloads of streaming kind such as - * files, InputStream, etc will either by sent as BytesMessage or StreamMessage. This option controls - * which kind will be used. By default BytesMessage is used which enforces the entire message payload - * to be read into memory. By enabling this option the message payload is read into memory in chunks - * and each chunk is then written to the StreamMessage until no more data. - */ - public fun streamMessageTypeEnabled(streamMessageTypeEnabled: String) { - it.property("streamMessageTypeEnabled", streamMessageTypeEnabled) - } - - /** - * Sets whether StreamMessage type is enabled or not. Message payloads of streaming kind such as - * files, InputStream, etc will either by sent as BytesMessage or StreamMessage. This option controls - * which kind will be used. By default BytesMessage is used which enforces the entire message payload - * to be read into memory. By enabling this option the message payload is read into memory in chunks - * and each chunk is then written to the StreamMessage until no more data. - */ - public fun streamMessageTypeEnabled(streamMessageTypeEnabled: Boolean) { - it.property("streamMessageTypeEnabled", streamMessageTypeEnabled.toString()) - } - - /** - * Controls whether or not to include serialized headers. Applies only when transferExchange is - * true. This requires that the objects are serializable. Camel will exclude any non-serializable - * objects and log it at WARN level. - */ - public fun allowSerializedHeaders(allowSerializedHeaders: String) { - it.property("allowSerializedHeaders", allowSerializedHeaders) - } - - /** - * Controls whether or not to include serialized headers. Applies only when transferExchange is - * true. This requires that the objects are serializable. Camel will exclude any non-serializable - * objects and log it at WARN level. - */ - public fun allowSerializedHeaders(allowSerializedHeaders: Boolean) { - it.property("allowSerializedHeaders", allowSerializedHeaders.toString()) - } - - /** - * Whether optimizing for Apache Artemis streaming mode. This can reduce memory overhead when - * using Artemis with JMS StreamMessage types. This option must only be enabled if Apache Artemis is - * being used. - */ - public fun artemisStreamingEnabled(artemisStreamingEnabled: String) { - it.property("artemisStreamingEnabled", artemisStreamingEnabled) - } - - /** - * Whether optimizing for Apache Artemis streaming mode. This can reduce memory overhead when - * using Artemis with JMS StreamMessage types. This option must only be enabled if Apache Artemis is - * being used. - */ - public fun artemisStreamingEnabled(artemisStreamingEnabled: Boolean) { - it.property("artemisStreamingEnabled", artemisStreamingEnabled.toString()) - } - - /** - * Whether to startup the JmsConsumer message listener asynchronously, when starting a route. For - * example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while - * retrying and/or fail-over. This will cause Camel to block while starting routes. By setting this - * option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker - * using a dedicated thread in asynchronous mode. If this option is used, then beware that if the - * connection could not be established, then an exception is logged at WARN level, and the consumer - * will not be able to receive messages; You can then restart the route to retry. - */ - public fun asyncStartListener(asyncStartListener: String) { - it.property("asyncStartListener", asyncStartListener) - } - - /** - * Whether to startup the JmsConsumer message listener asynchronously, when starting a route. For - * example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while - * retrying and/or fail-over. This will cause Camel to block while starting routes. By setting this - * option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker - * using a dedicated thread in asynchronous mode. If this option is used, then beware that if the - * connection could not be established, then an exception is logged at WARN level, and the consumer - * will not be able to receive messages; You can then restart the route to retry. - */ - public fun asyncStartListener(asyncStartListener: Boolean) { - it.property("asyncStartListener", asyncStartListener.toString()) - } - - /** - * Whether to stop the JmsConsumer message listener asynchronously, when stopping a route. - */ - public fun asyncStopListener(asyncStopListener: String) { - it.property("asyncStopListener", asyncStopListener) - } - - /** - * Whether to stop the JmsConsumer message listener asynchronously, when stopping a route. - */ - public fun asyncStopListener(asyncStopListener: Boolean) { - it.property("asyncStopListener", asyncStopListener.toString()) - } - - /** - * A pluggable org.springframework.jms.support.destination.DestinationResolver that allows you to - * use your own resolver (for example, to lookup the real destination in a JNDI registry). - */ - public fun destinationResolver(destinationResolver: String) { - it.property("destinationResolver", destinationResolver) - } - - /** - * Specifies a org.springframework.util.ErrorHandler to be invoked in case of any uncaught - * exceptions thrown while processing a Message. By default these exceptions will be logged at the - * WARN level, if no errorHandler has been configured. You can configure logging level and whether - * stack traces should be logged using errorHandlerLoggingLevel and errorHandlerLogStackTrace - * options. This makes it much easier to configure, than having to code a custom errorHandler. - */ - public fun errorHandler(errorHandler: String) { - it.property("errorHandler", errorHandler) - } - - /** - * Specifies the JMS Exception Listener that is to be notified of any underlying JMS exceptions. - */ - public fun exceptionListener(exceptionListener: String) { - it.property("exceptionListener", exceptionListener) - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * Specify the limit for the number of consumers that are allowed to be idle at any given time. - */ - public fun idleConsumerLimit(idleConsumerLimit: String) { - it.property("idleConsumerLimit", idleConsumerLimit) - } - - /** - * Specify the limit for the number of consumers that are allowed to be idle at any given time. - */ - public fun idleConsumerLimit(idleConsumerLimit: Int) { - it.property("idleConsumerLimit", idleConsumerLimit.toString()) - } - - /** - * Specifies the limit for idle executions of a receive task, not having received any message - * within its execution. If this limit is reached, the task will shut down and leave receiving to - * other executing tasks (in the case of dynamic scheduling; see the maxConcurrentConsumers setting). - * There is additional doc available from Spring. - */ - public fun idleTaskExecutionLimit(idleTaskExecutionLimit: String) { - it.property("idleTaskExecutionLimit", idleTaskExecutionLimit) - } - - /** - * Specifies the limit for idle executions of a receive task, not having received any message - * within its execution. If this limit is reached, the task will shut down and leave receiving to - * other executing tasks (in the case of dynamic scheduling; see the maxConcurrentConsumers setting). - * There is additional doc available from Spring. - */ - public fun idleTaskExecutionLimit(idleTaskExecutionLimit: Int) { - it.property("idleTaskExecutionLimit", idleTaskExecutionLimit.toString()) - } - - /** - * Whether to include all JMSX prefixed properties when mapping from JMS to Camel Message. Setting - * this to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using - * a custom headerFilterStrategy then this option does not apply. - */ - public fun includeAllJMSXProperties(includeAllJMSXProperties: String) { - it.property("includeAllJMSXProperties", includeAllJMSXProperties) - } - - /** - * Whether to include all JMSX prefixed properties when mapping from JMS to Camel Message. Setting - * this to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using - * a custom headerFilterStrategy then this option does not apply. - */ - public fun includeAllJMSXProperties(includeAllJMSXProperties: Boolean) { - it.property("includeAllJMSXProperties", includeAllJMSXProperties.toString()) - } - - /** - * Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS - * specification. Camel provides two implementations out of the box: default and passthrough. The - * default strategy will safely marshal dots and hyphens (. and -). The passthrough strategy leaves - * the key as is. Can be used for JMS brokers which do not care whether JMS header keys contain - * illegal characters. You can provide your own implementation of the - * org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the # notation. - */ - public fun jmsKeyFormatStrategy(jmsKeyFormatStrategy: String) { - it.property("jmsKeyFormatStrategy", jmsKeyFormatStrategy) - } - - /** - * Specifies whether Camel should auto map the received JMS message to a suited payload type, such - * as jakarta.jms.TextMessage to a String etc. - */ - public fun mapJmsMessage(mapJmsMessage: String) { - it.property("mapJmsMessage", mapJmsMessage) - } - - /** - * Specifies whether Camel should auto map the received JMS message to a suited payload type, such - * as jakarta.jms.TextMessage to a String etc. - */ - public fun mapJmsMessage(mapJmsMessage: Boolean) { - it.property("mapJmsMessage", mapJmsMessage.toString()) - } - - /** - * The number of messages per task. -1 is unlimited. If you use a range for concurrent consumers - * (eg min max), then this option can be used to set a value to eg 100 to control how fast the - * consumers will shrink when less work is required. - */ - public fun maxMessagesPerTask(maxMessagesPerTask: String) { - it.property("maxMessagesPerTask", maxMessagesPerTask) - } - - /** - * The number of messages per task. -1 is unlimited. If you use a range for concurrent consumers - * (eg min max), then this option can be used to set a value to eg 100 to control how fast the - * consumers will shrink when less work is required. - */ - public fun maxMessagesPerTask(maxMessagesPerTask: Int) { - it.property("maxMessagesPerTask", maxMessagesPerTask.toString()) - } - - /** - * To use a custom Spring org.springframework.jms.support.converter.MessageConverter so you can be - * in control how to map to/from a jakarta.jms.Message. - */ - public fun messageConverter(messageConverter: String) { - it.property("messageConverter", messageConverter) - } - - /** - * To use the given MessageCreatedStrategy which are invoked when Camel creates new instances of - * jakarta.jms.Message objects when Camel is sending a JMS message. - */ - public fun messageCreatedStrategy(messageCreatedStrategy: String) { - it.property("messageCreatedStrategy", messageCreatedStrategy) - } - - /** - * When sending, specifies whether message IDs should be added. This is just an hint to the JMS - * broker. If the JMS provider accepts this hint, these messages must have the message ID set to - * null; if the provider ignores the hint, the message ID must be set to its normal unique value. - */ - public fun messageIdEnabled(messageIdEnabled: String) { - it.property("messageIdEnabled", messageIdEnabled) - } - - /** - * When sending, specifies whether message IDs should be added. This is just an hint to the JMS - * broker. If the JMS provider accepts this hint, these messages must have the message ID set to - * null; if the provider ignores the hint, the message ID must be set to its normal unique value. - */ - public fun messageIdEnabled(messageIdEnabled: Boolean) { - it.property("messageIdEnabled", messageIdEnabled.toString()) - } - - /** - * Registry ID of the MessageListenerContainerFactory used to determine what - * org.springframework.jms.listener.AbstractMessageListenerContainer to use to consume messages. - * Setting this will automatically set consumerType to Custom. - */ - public fun messageListenerContainerFactory(messageListenerContainerFactory: String) { - it.property("messageListenerContainerFactory", messageListenerContainerFactory) - } - - /** - * Specifies whether timestamps should be enabled by default on sending messages. This is just an - * hint to the JMS broker. If the JMS provider accepts this hint, these messages must have the - * timestamp set to zero; if the provider ignores the hint the timestamp must be set to its normal - * value. - */ - public fun messageTimestampEnabled(messageTimestampEnabled: String) { - it.property("messageTimestampEnabled", messageTimestampEnabled) - } - - /** - * Specifies whether timestamps should be enabled by default on sending messages. This is just an - * hint to the JMS broker. If the JMS provider accepts this hint, these messages must have the - * timestamp set to zero; if the provider ignores the hint the timestamp must be set to its normal - * value. - */ - public fun messageTimestampEnabled(messageTimestampEnabled: Boolean) { - it.property("messageTimestampEnabled", messageTimestampEnabled.toString()) - } - - /** - * Specifies whether to inhibit the delivery of messages published by its own connection. - */ - public fun pubSubNoLocal(pubSubNoLocal: String) { - it.property("pubSubNoLocal", pubSubNoLocal) - } - - /** - * Specifies whether to inhibit the delivery of messages published by its own connection. - */ - public fun pubSubNoLocal(pubSubNoLocal: Boolean) { - it.property("pubSubNoLocal", pubSubNoLocal.toString()) - } - - /** - * The timeout for receiving messages (in milliseconds). - */ - public fun receiveTimeout(receiveTimeout: String) { - it.property("receiveTimeout", receiveTimeout) - } - - /** - * Specifies the interval between recovery attempts, i.e. when a connection is being refreshed, in - * milliseconds. The default is 5000 ms, that is, 5 seconds. - */ - public fun recoveryInterval(recoveryInterval: String) { - it.property("recoveryInterval", recoveryInterval) - } - - /** - * Configures how often Camel should check for timed out Exchanges when doing request/reply over - * JMS. By default Camel checks once per second. But if you must react faster when a timeout occurs, - * then you can lower this interval, to check more frequently. The timeout is determined by the - * option requestTimeout. - */ - public fun requestTimeoutCheckerInterval(requestTimeoutCheckerInterval: String) { - it.property("requestTimeoutCheckerInterval", requestTimeoutCheckerInterval) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * A pluggable TemporaryQueueResolver that allows you to use your own resolver for creating - * temporary queues (some messaging systems has special requirements for creating temporary queues). - */ - public fun temporaryQueueResolver(temporaryQueueResolver: String) { - it.property("temporaryQueueResolver", temporaryQueueResolver) - } - - /** - * If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the - * consumer side, then the caused Exception will be send back in response as a - * jakarta.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows - * you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable - * robust routing. Notice that if you also have transferExchange enabled, this option takes - * precedence. The caught exception is required to be serializable. The original Exception on the - * consumer side can be wrapped in an outer exception such as org.apache.camel.RuntimeCamelException - * when returned to the producer. Use this with caution as the data is using Java Object - * serialization and requires the received to be able to deserialize the data at Class level, which - * forces a strong coupling between the producers and consumer! - */ - public fun transferException(transferException: String) { - it.property("transferException", transferException) - } - - /** - * If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the - * consumer side, then the caused Exception will be send back in response as a - * jakarta.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows - * you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable - * robust routing. Notice that if you also have transferExchange enabled, this option takes - * precedence. The caught exception is required to be serializable. The original Exception on the - * consumer side can be wrapped in an outer exception such as org.apache.camel.RuntimeCamelException - * when returned to the producer. Use this with caution as the data is using Java Object - * serialization and requires the received to be able to deserialize the data at Class level, which - * forces a strong coupling between the producers and consumer! - */ - public fun transferException(transferException: Boolean) { - it.property("transferException", transferException.toString()) - } - - /** - * You can transfer the exchange over the wire instead of just the body and headers. The following - * fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, - * exchange properties, exchange exception. This requires that the objects are serializable. Camel - * will exclude any non-serializable objects and log it at WARN level. You must enable this option on - * both the producer and consumer side, so Camel knows the payloads is an Exchange and not a regular - * payload. Use this with caution as the data is using Java Object serialization and requires the - * receiver to be able to deserialize the data at Class level, which forces a strong coupling between - * the producers and consumers having to use compatible Camel versions! - */ - public fun transferExchange(transferExchange: String) { - it.property("transferExchange", transferExchange) - } - - /** - * You can transfer the exchange over the wire instead of just the body and headers. The following - * fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, - * exchange properties, exchange exception. This requires that the objects are serializable. Camel - * will exclude any non-serializable objects and log it at WARN level. You must enable this option on - * both the producer and consumer side, so Camel knows the payloads is an Exchange and not a regular - * payload. Use this with caution as the data is using Java Object serialization and requires the - * receiver to be able to deserialize the data at Class level, which forces a strong coupling between - * the producers and consumers having to use compatible Camel versions! - */ - public fun transferExchange(transferExchange: Boolean) { - it.property("transferExchange", transferExchange.toString()) - } - - /** - * Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. - */ - public fun useMessageIDAsCorrelationID(useMessageIDAsCorrelationID: String) { - it.property("useMessageIDAsCorrelationID", useMessageIDAsCorrelationID) - } - - /** - * Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. - */ - public fun useMessageIDAsCorrelationID(useMessageIDAsCorrelationID: Boolean) { - it.property("useMessageIDAsCorrelationID", useMessageIDAsCorrelationID.toString()) - } - - /** - * Number of times to wait for provisional correlation id to be updated to the actual correlation - * id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. - */ - public - fun waitForProvisionCorrelationToBeUpdatedCounter(waitForProvisionCorrelationToBeUpdatedCounter: String) { - it.property("waitForProvisionCorrelationToBeUpdatedCounter", - waitForProvisionCorrelationToBeUpdatedCounter) - } - - /** - * Number of times to wait for provisional correlation id to be updated to the actual correlation - * id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. - */ - public - fun waitForProvisionCorrelationToBeUpdatedCounter(waitForProvisionCorrelationToBeUpdatedCounter: Int) { - it.property("waitForProvisionCorrelationToBeUpdatedCounter", - waitForProvisionCorrelationToBeUpdatedCounter.toString()) - } - - /** - * Interval in millis to sleep each time while waiting for provisional correlation id to be - * updated. - */ - public - fun waitForProvisionCorrelationToBeUpdatedThreadSleepingTime(waitForProvisionCorrelationToBeUpdatedThreadSleepingTime: String) { - it.property("waitForProvisionCorrelationToBeUpdatedThreadSleepingTime", - waitForProvisionCorrelationToBeUpdatedThreadSleepingTime) - } - - /** - * Number of times to wait for temporary replyTo queue to be created and ready when doing - * request/reply over JMS. - */ - public - fun waitForTemporaryReplyToToBeUpdatedCounter(waitForTemporaryReplyToToBeUpdatedCounter: String) { - it.property("waitForTemporaryReplyToToBeUpdatedCounter", - waitForTemporaryReplyToToBeUpdatedCounter) - } - - /** - * Number of times to wait for temporary replyTo queue to be created and ready when doing - * request/reply over JMS. - */ - public - fun waitForTemporaryReplyToToBeUpdatedCounter(waitForTemporaryReplyToToBeUpdatedCounter: Int) { - it.property("waitForTemporaryReplyToToBeUpdatedCounter", - waitForTemporaryReplyToToBeUpdatedCounter.toString()) - } - - /** - * Interval in millis to sleep each time while waiting for temporary replyTo queue to be ready. - */ - public - fun waitForTemporaryReplyToToBeUpdatedThreadSleepingTime(waitForTemporaryReplyToToBeUpdatedThreadSleepingTime: String) { - it.property("waitForTemporaryReplyToToBeUpdatedThreadSleepingTime", - waitForTemporaryReplyToToBeUpdatedThreadSleepingTime) - } - - /** - * Allows to configure the default errorHandler logging level for logging uncaught exceptions. - */ - public fun errorHandlerLoggingLevel(errorHandlerLoggingLevel: String) { - it.property("errorHandlerLoggingLevel", errorHandlerLoggingLevel) - } - - /** - * Allows to control whether stack-traces should be logged or not, by the default errorHandler. - */ - public fun errorHandlerLogStackTrace(errorHandlerLogStackTrace: String) { - it.property("errorHandlerLogStackTrace", errorHandlerLogStackTrace) - } - - /** - * Allows to control whether stack-traces should be logged or not, by the default errorHandler. - */ - public fun errorHandlerLogStackTrace(errorHandlerLogStackTrace: Boolean) { - it.property("errorHandlerLogStackTrace", errorHandlerLogStackTrace.toString()) - } - - /** - * Password to use with the ConnectionFactory. You can also configure username/password directly - * on the ConnectionFactory. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Username to use with the ConnectionFactory. You can also configure username/password directly - * on the ConnectionFactory. - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * Specifies whether to use transacted mode - */ - public fun transacted(transacted: String) { - it.property("transacted", transacted) - } - - /** - * Specifies whether to use transacted mode - */ - public fun transacted(transacted: Boolean) { - it.property("transacted", transacted.toString()) - } - - /** - * Specifies whether InOut operations (request reply) default to using transacted mode If this - * flag is set to true, then Spring JmsTemplate will have sessionTransacted set to true, and the - * acknowledgeMode as transacted on the JmsTemplate used for InOut operations. Note from Spring JMS: - * that within a JTA transaction, the parameters passed to createQueue, createTopic methods are not - * taken into account. Depending on the Java EE transaction context, the container makes its own - * decisions on these values. Analogously, these parameters are not taken into account within a - * locally managed transaction either, since Spring JMS operates on an existing JMS Session in this - * case. Setting this flag to true will use a short local JMS transaction when running outside of a - * managed transaction, and a synchronized local JMS transaction in case of a managed transaction - * (other than an XA transaction) being present. This has the effect of a local JMS transaction being - * managed alongside the main transaction (which might be a native JDBC transaction), with the JMS - * transaction committing right after the main transaction. - */ - public fun transactedInOut(transactedInOut: String) { - it.property("transactedInOut", transactedInOut) - } - - /** - * Specifies whether InOut operations (request reply) default to using transacted mode If this - * flag is set to true, then Spring JmsTemplate will have sessionTransacted set to true, and the - * acknowledgeMode as transacted on the JmsTemplate used for InOut operations. Note from Spring JMS: - * that within a JTA transaction, the parameters passed to createQueue, createTopic methods are not - * taken into account. Depending on the Java EE transaction context, the container makes its own - * decisions on these values. Analogously, these parameters are not taken into account within a - * locally managed transaction either, since Spring JMS operates on an existing JMS Session in this - * case. Setting this flag to true will use a short local JMS transaction when running outside of a - * managed transaction, and a synchronized local JMS transaction in case of a managed transaction - * (other than an XA transaction) being present. This has the effect of a local JMS transaction being - * managed alongside the main transaction (which might be a native JDBC transaction), with the JMS - * transaction committing right after the main transaction. - */ - public fun transactedInOut(transactedInOut: Boolean) { - it.property("transactedInOut", transactedInOut.toString()) - } - - /** - * If true, Camel will create a JmsTransactionManager, if there is no transactionManager injected - * when option transacted=true. - */ - public fun lazyCreateTransactionManager(lazyCreateTransactionManager: String) { - it.property("lazyCreateTransactionManager", lazyCreateTransactionManager) - } - - /** - * If true, Camel will create a JmsTransactionManager, if there is no transactionManager injected - * when option transacted=true. - */ - public fun lazyCreateTransactionManager(lazyCreateTransactionManager: Boolean) { - it.property("lazyCreateTransactionManager", lazyCreateTransactionManager.toString()) - } - - /** - * The Spring transaction manager to use. - */ - public fun transactionManager(transactionManager: String) { - it.property("transactionManager", transactionManager) - } - - /** - * The name of the transaction to use. - */ - public fun transactionName(transactionName: String) { - it.property("transactionName", transactionName) - } - - /** - * The timeout value of the transaction (in seconds), if using transacted mode. - */ - public fun transactionTimeout(transactionTimeout: String) { - it.property("transactionTimeout", transactionTimeout) - } - - /** - * The timeout value of the transaction (in seconds), if using transacted mode. - */ - public fun transactionTimeout(transactionTimeout: Int) { - it.property("transactionTimeout", transactionTimeout.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AmqpUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AmqpUriDsl.kt deleted file mode 100644 index e46808d2aace5..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AmqpUriDsl.kt +++ /dev/null @@ -1,1532 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Messaging with AMQP protocol using Apache QPid Client. - */ -public fun UriDsl.amqp(i: AmqpUriDsl.() -> Unit) { - AmqpUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AmqpUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("amqp") - } - - private var destinationType: String = "" - - private var destinationName: String = "" - - /** - * The kind of destination to use - */ - public fun destinationType(destinationType: String) { - this.destinationType = destinationType - it.url("$destinationType:$destinationName") - } - - /** - * Name of the queue or topic to use as destination - */ - public fun destinationName(destinationName: String) { - this.destinationName = destinationName - it.url("$destinationType:$destinationName") - } - - /** - * Sets the JMS client ID to use. Note that this value, if specified, must be unique and can only - * be used by a single JMS connection instance. It is typically only required for durable topic - * subscriptions with JMS 1.1. - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * The connection factory to be use. A connection factory must be configured either on the - * component or endpoint. - */ - public fun connectionFactory(connectionFactory: String) { - it.property("connectionFactory", connectionFactory) - } - - /** - * Specifies whether Camel ignores the JMSReplyTo header in messages. If true, Camel does not send - * a reply back to the destination specified in the JMSReplyTo header. You can use this option if you - * want Camel to consume from a route and you do not want Camel to automatically send back a reply - * message because another component in your code handles the reply message. You can also use this - * option if you want to use Camel as a proxy between different message brokers and you want to route - * message from one system to another. - */ - public fun disableReplyTo(disableReplyTo: String) { - it.property("disableReplyTo", disableReplyTo) - } - - /** - * Specifies whether Camel ignores the JMSReplyTo header in messages. If true, Camel does not send - * a reply back to the destination specified in the JMSReplyTo header. You can use this option if you - * want Camel to consume from a route and you do not want Camel to automatically send back a reply - * message because another component in your code handles the reply message. You can also use this - * option if you want to use Camel as a proxy between different message brokers and you want to route - * message from one system to another. - */ - public fun disableReplyTo(disableReplyTo: Boolean) { - it.property("disableReplyTo", disableReplyTo.toString()) - } - - /** - * The durable subscriber name for specifying durable topic subscriptions. The clientId option - * must be configured as well. - */ - public fun durableSubscriptionName(durableSubscriptionName: String) { - it.property("durableSubscriptionName", durableSubscriptionName) - } - - /** - * Allows you to force the use of a specific jakarta.jms.Message implementation for sending JMS - * messages. Possible values are: Bytes, Map, Object, Stream, Text. By default, Camel would determine - * which JMS message type to use from the In body type. This option allows you to specify it. - */ - public fun jmsMessageType(jmsMessageType: String) { - it.property("jmsMessageType", jmsMessageType) - } - - /** - * Provides an explicit ReplyTo destination (overrides any incoming value of - * Message.getJMSReplyTo() in consumer). - */ - public fun replyTo(replyTo: String) { - it.property("replyTo", replyTo) - } - - /** - * Specifies whether to test the connection on startup. This ensures that when Camel starts that - * all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted - * then Camel throws an exception on startup. This ensures that Camel is not started with failed - * connections. The JMS producers is tested as well. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: String) { - it.property("testConnectionOnStartup", testConnectionOnStartup) - } - - /** - * Specifies whether to test the connection on startup. This ensures that when Camel starts that - * all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted - * then Camel throws an exception on startup. This ensures that Camel is not started with failed - * connections. The JMS producers is tested as well. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: Boolean) { - it.property("testConnectionOnStartup", testConnectionOnStartup.toString()) - } - - /** - * The JMS acknowledgement name, which is one of: SESSION_TRANSACTED, CLIENT_ACKNOWLEDGE, - * AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE - */ - public fun acknowledgementModeName(acknowledgementModeName: String) { - it.property("acknowledgementModeName", acknowledgementModeName) - } - - /** - * Consumer priorities allow you to ensure that high priority consumers receive messages while - * they are active. Normally, active consumers connected to a queue receive messages from it in a - * round-robin fashion. When consumer priorities are in use, messages are delivered round-robin if - * multiple active consumers exist with the same high priority. Messages will only going to lower - * priority consumers when the high priority consumers do not have credit available to consume the - * message, or those high priority consumers have declined to accept the message (for instance - * because it does not meet the criteria of any selectors associated with the consumer). - */ - public fun artemisConsumerPriority(artemisConsumerPriority: String) { - it.property("artemisConsumerPriority", artemisConsumerPriority) - } - - /** - * Consumer priorities allow you to ensure that high priority consumers receive messages while - * they are active. Normally, active consumers connected to a queue receive messages from it in a - * round-robin fashion. When consumer priorities are in use, messages are delivered round-robin if - * multiple active consumers exist with the same high priority. Messages will only going to lower - * priority consumers when the high priority consumers do not have credit available to consume the - * message, or those high priority consumers have declined to accept the message (for instance - * because it does not meet the criteria of any selectors associated with the consumer). - */ - public fun artemisConsumerPriority(artemisConsumerPriority: Int) { - it.property("artemisConsumerPriority", artemisConsumerPriority.toString()) - } - - /** - * Whether the JmsConsumer processes the Exchange asynchronously. If enabled then the JmsConsumer - * may pickup the next message from the JMS queue, while the previous message is being processed - * asynchronously (by the Asynchronous Routing Engine). This means that messages may be processed not - * 100% strictly in order. If disabled (as default) then the Exchange is fully processed before the - * JmsConsumer will pickup the next message from the JMS queue. Note if transacted has been enabled, - * then asyncConsumer=true does not run asynchronously, as transaction must be executed synchronously - * (Camel 3.0 may support async transactions). - */ - public fun asyncConsumer(asyncConsumer: String) { - it.property("asyncConsumer", asyncConsumer) - } - - /** - * Whether the JmsConsumer processes the Exchange asynchronously. If enabled then the JmsConsumer - * may pickup the next message from the JMS queue, while the previous message is being processed - * asynchronously (by the Asynchronous Routing Engine). This means that messages may be processed not - * 100% strictly in order. If disabled (as default) then the Exchange is fully processed before the - * JmsConsumer will pickup the next message from the JMS queue. Note if transacted has been enabled, - * then asyncConsumer=true does not run asynchronously, as transaction must be executed synchronously - * (Camel 3.0 may support async transactions). - */ - public fun asyncConsumer(asyncConsumer: Boolean) { - it.property("asyncConsumer", asyncConsumer.toString()) - } - - /** - * Specifies whether the consumer container should auto-startup. - */ - public fun autoStartup(autoStartup: String) { - it.property("autoStartup", autoStartup) - } - - /** - * Specifies whether the consumer container should auto-startup. - */ - public fun autoStartup(autoStartup: Boolean) { - it.property("autoStartup", autoStartup.toString()) - } - - /** - * Sets the cache level by ID for the underlying JMS resources. See cacheLevelName option for more - * details. - */ - public fun cacheLevel(cacheLevel: String) { - it.property("cacheLevel", cacheLevel) - } - - /** - * Sets the cache level by ID for the underlying JMS resources. See cacheLevelName option for more - * details. - */ - public fun cacheLevel(cacheLevel: Int) { - it.property("cacheLevel", cacheLevel.toString()) - } - - /** - * Sets the cache level by name for the underlying JMS resources. Possible values are: CACHE_AUTO, - * CACHE_CONNECTION, CACHE_CONSUMER, CACHE_NONE, and CACHE_SESSION. The default setting is - * CACHE_AUTO. See the Spring documentation and Transactions Cache Levels for more information. - */ - public fun cacheLevelName(cacheLevelName: String) { - it.property("cacheLevelName", cacheLevelName) - } - - /** - * Specifies the default number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToConcurrentConsumers is used - * to control number of concurrent consumers on the reply message listener. - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * Specifies the default number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToConcurrentConsumers is used - * to control number of concurrent consumers on the reply message listener. - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * Specifies the maximum number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToMaxConcurrentConsumers is - * used to control number of concurrent consumers on the reply message listener. - */ - public fun maxConcurrentConsumers(maxConcurrentConsumers: String) { - it.property("maxConcurrentConsumers", maxConcurrentConsumers) - } - - /** - * Specifies the maximum number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToMaxConcurrentConsumers is - * used to control number of concurrent consumers on the reply message listener. - */ - public fun maxConcurrentConsumers(maxConcurrentConsumers: Int) { - it.property("maxConcurrentConsumers", maxConcurrentConsumers.toString()) - } - - /** - * Specifies whether to use persistent delivery by default for replies. - */ - public fun replyToDeliveryPersistent(replyToDeliveryPersistent: String) { - it.property("replyToDeliveryPersistent", replyToDeliveryPersistent) - } - - /** - * Specifies whether to use persistent delivery by default for replies. - */ - public fun replyToDeliveryPersistent(replyToDeliveryPersistent: Boolean) { - it.property("replyToDeliveryPersistent", replyToDeliveryPersistent.toString()) - } - - /** - * Sets the JMS selector to use - */ - public fun selector(selector: String) { - it.property("selector", selector) - } - - /** - * Set whether to make the subscription durable. The durable subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * durable subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Only makes sense when listening to a - * topic (pub-sub domain), therefore this method switches the pubSubDomain flag as well. - */ - public fun subscriptionDurable(subscriptionDurable: String) { - it.property("subscriptionDurable", subscriptionDurable) - } - - /** - * Set whether to make the subscription durable. The durable subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * durable subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Only makes sense when listening to a - * topic (pub-sub domain), therefore this method switches the pubSubDomain flag as well. - */ - public fun subscriptionDurable(subscriptionDurable: Boolean) { - it.property("subscriptionDurable", subscriptionDurable.toString()) - } - - /** - * Set the name of a subscription to create. To be applied in case of a topic (pub-sub domain) - * with a shared or durable subscription. The subscription name needs to be unique within this - * client's JMS client id. Default is the class name of the specified message listener. Note: Only 1 - * concurrent consumer (which is the default of this message listener container) is allowed for each - * subscription, except for a shared subscription (which requires JMS 2.0). - */ - public fun subscriptionName(subscriptionName: String) { - it.property("subscriptionName", subscriptionName) - } - - /** - * Set whether to make the subscription shared. The shared subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * shared subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Note that shared subscriptions may also - * be durable, so this flag can (and often will) be combined with subscriptionDurable as well. Only - * makes sense when listening to a topic (pub-sub domain), therefore this method switches the - * pubSubDomain flag as well. Requires a JMS 2.0 compatible message broker. - */ - public fun subscriptionShared(subscriptionShared: String) { - it.property("subscriptionShared", subscriptionShared) - } - - /** - * Set whether to make the subscription shared. The shared subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * shared subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Note that shared subscriptions may also - * be durable, so this flag can (and often will) be combined with subscriptionDurable as well. Only - * makes sense when listening to a topic (pub-sub domain), therefore this method switches the - * pubSubDomain flag as well. Requires a JMS 2.0 compatible message broker. - */ - public fun subscriptionShared(subscriptionShared: Boolean) { - it.property("subscriptionShared", subscriptionShared.toString()) - } - - /** - * Specifies whether the consumer accept messages while it is stopping. You may consider enabling - * this option, if you start and stop JMS routes at runtime, while there are still messages enqueued - * on the queue. If this option is false, and you stop the JMS route, then messages may be rejected, - * and the JMS broker would have to attempt redeliveries, which yet again may be rejected, and - * eventually the message may be moved at a dead letter queue on the JMS broker. To avoid this its - * recommended to enable this option. - */ - public fun acceptMessagesWhileStopping(acceptMessagesWhileStopping: String) { - it.property("acceptMessagesWhileStopping", acceptMessagesWhileStopping) - } - - /** - * Specifies whether the consumer accept messages while it is stopping. You may consider enabling - * this option, if you start and stop JMS routes at runtime, while there are still messages enqueued - * on the queue. If this option is false, and you stop the JMS route, then messages may be rejected, - * and the JMS broker would have to attempt redeliveries, which yet again may be rejected, and - * eventually the message may be moved at a dead letter queue on the JMS broker. To avoid this its - * recommended to enable this option. - */ - public fun acceptMessagesWhileStopping(acceptMessagesWhileStopping: Boolean) { - it.property("acceptMessagesWhileStopping", acceptMessagesWhileStopping.toString()) - } - - /** - * Whether the DefaultMessageListenerContainer used in the reply managers for request-reply - * messaging allow the DefaultMessageListenerContainer.runningAllowed flag to quick stop in case - * JmsConfiguration#isAcceptMessagesWhileStopping is enabled, and org.apache.camel.CamelContext is - * currently being stopped. This quick stop ability is enabled by default in the regular JMS - * consumers but to enable for reply managers you must enable this flag. - */ - public fun allowReplyManagerQuickStop(allowReplyManagerQuickStop: String) { - it.property("allowReplyManagerQuickStop", allowReplyManagerQuickStop) - } - - /** - * Whether the DefaultMessageListenerContainer used in the reply managers for request-reply - * messaging allow the DefaultMessageListenerContainer.runningAllowed flag to quick stop in case - * JmsConfiguration#isAcceptMessagesWhileStopping is enabled, and org.apache.camel.CamelContext is - * currently being stopped. This quick stop ability is enabled by default in the regular JMS - * consumers but to enable for reply managers you must enable this flag. - */ - public fun allowReplyManagerQuickStop(allowReplyManagerQuickStop: Boolean) { - it.property("allowReplyManagerQuickStop", allowReplyManagerQuickStop.toString()) - } - - /** - * The consumer type to use, which can be one of: Simple, Default, or Custom. The consumer type - * determines which Spring JMS listener to use. Default will use - * org.springframework.jms.listener.DefaultMessageListenerContainer, Simple will use - * org.springframework.jms.listener.SimpleMessageListenerContainer. When Custom is specified, the - * MessageListenerContainerFactory defined by the messageListenerContainerFactory option will - * determine what org.springframework.jms.listener.AbstractMessageListenerContainer to use. - */ - public fun consumerType(consumerType: String) { - it.property("consumerType", consumerType) - } - - /** - * Specifies what default TaskExecutor type to use in the DefaultMessageListenerContainer, for - * both consumer endpoints and the ReplyTo consumer of producer endpoints. Possible values: - * SimpleAsync (uses Spring's SimpleAsyncTaskExecutor) or ThreadPool (uses Spring's - * ThreadPoolTaskExecutor with optimal values - cached thread-pool-like). If not set, it defaults to - * the previous behaviour, which uses a cached thread pool for consumer endpoints and SimpleAsync for - * reply consumers. The use of ThreadPool is recommended to reduce thread trash in elastic - * configurations with dynamically increasing and decreasing concurrent consumers. - */ - public fun defaultTaskExecutorType(defaultTaskExecutorType: String) { - it.property("defaultTaskExecutorType", defaultTaskExecutorType) - } - - /** - * Enables eager loading of JMS properties and payload as soon as a message is loaded which - * generally is inefficient as the JMS properties may not be required but sometimes can catch early - * any issues with the underlying JMS provider and the use of JMS properties. See also the option - * eagerPoisonBody. - */ - public fun eagerLoadingOfProperties(eagerLoadingOfProperties: String) { - it.property("eagerLoadingOfProperties", eagerLoadingOfProperties) - } - - /** - * Enables eager loading of JMS properties and payload as soon as a message is loaded which - * generally is inefficient as the JMS properties may not be required but sometimes can catch early - * any issues with the underlying JMS provider and the use of JMS properties. See also the option - * eagerPoisonBody. - */ - public fun eagerLoadingOfProperties(eagerLoadingOfProperties: Boolean) { - it.property("eagerLoadingOfProperties", eagerLoadingOfProperties.toString()) - } - - /** - * If eagerLoadingOfProperties is enabled and the JMS message payload (JMS body or JMS properties) - * is poison (cannot be read/mapped), then set this text as the message body instead so the message - * can be processed (the cause of the poison are already stored as exception on the Exchange). This - * can be turned off by setting eagerPoisonBody=false. See also the option eagerLoadingOfProperties. - */ - public fun eagerPoisonBody(eagerPoisonBody: String) { - it.property("eagerPoisonBody", eagerPoisonBody) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Specifies whether the listener session should be exposed when consuming messages. - */ - public fun exposeListenerSession(exposeListenerSession: String) { - it.property("exposeListenerSession", exposeListenerSession) - } - - /** - * Specifies whether the listener session should be exposed when consuming messages. - */ - public fun exposeListenerSession(exposeListenerSession: Boolean) { - it.property("exposeListenerSession", exposeListenerSession.toString()) - } - - /** - * The consumer type of the reply consumer (when doing request/reply), which can be one of: - * Simple, Default, or Custom. The consumer type determines which Spring JMS listener to use. Default - * will use org.springframework.jms.listener.DefaultMessageListenerContainer, Simple will use - * org.springframework.jms.listener.SimpleMessageListenerContainer. When Custom is specified, the - * MessageListenerContainerFactory defined by the messageListenerContainerFactory option will - * determine what org.springframework.jms.listener.AbstractMessageListenerContainer to use. - */ - public fun replyToConsumerType(replyToConsumerType: String) { - it.property("replyToConsumerType", replyToConsumerType) - } - - /** - * Whether a JMS consumer is allowed to send a reply message to the same destination that the - * consumer is using to consume from. This prevents an endless loop by consuming and sending back the - * same message to itself. - */ - public fun replyToSameDestinationAllowed(replyToSameDestinationAllowed: String) { - it.property("replyToSameDestinationAllowed", replyToSameDestinationAllowed) - } - - /** - * Whether a JMS consumer is allowed to send a reply message to the same destination that the - * consumer is using to consume from. This prevents an endless loop by consuming and sending back the - * same message to itself. - */ - public fun replyToSameDestinationAllowed(replyToSameDestinationAllowed: Boolean) { - it.property("replyToSameDestinationAllowed", replyToSameDestinationAllowed.toString()) - } - - /** - * Allows you to specify a custom task executor for consuming messages. - */ - public fun taskExecutor(taskExecutor: String) { - it.property("taskExecutor", taskExecutor) - } - - /** - * Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant - * broker. - */ - public fun deliveryDelay(deliveryDelay: String) { - it.property("deliveryDelay", deliveryDelay) - } - - /** - * Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant - * broker. - */ - public fun deliveryDelay(deliveryDelay: Int) { - it.property("deliveryDelay", deliveryDelay.toString()) - } - - /** - * Specifies the delivery mode to be used. Possible values are those defined by - * jakarta.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. - */ - public fun deliveryMode(deliveryMode: String) { - it.property("deliveryMode", deliveryMode) - } - - /** - * Specifies the delivery mode to be used. Possible values are those defined by - * jakarta.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. - */ - public fun deliveryMode(deliveryMode: Int) { - it.property("deliveryMode", deliveryMode.toString()) - } - - /** - * Specifies whether persistent delivery is used by default. - */ - public fun deliveryPersistent(deliveryPersistent: String) { - it.property("deliveryPersistent", deliveryPersistent) - } - - /** - * Specifies whether persistent delivery is used by default. - */ - public fun deliveryPersistent(deliveryPersistent: Boolean) { - it.property("deliveryPersistent", deliveryPersistent.toString()) - } - - /** - * Set if the deliveryMode, priority or timeToLive qualities of service should be used when - * sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and - * timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos - * option, which operates at message granularity, reading QoS properties exclusively from the Camel - * In message headers. - */ - public fun explicitQosEnabled(explicitQosEnabled: String) { - it.property("explicitQosEnabled", explicitQosEnabled) - } - - /** - * Set if the deliveryMode, priority or timeToLive qualities of service should be used when - * sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and - * timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos - * option, which operates at message granularity, reading QoS properties exclusively from the Camel - * In message headers. - */ - public fun explicitQosEnabled(explicitQosEnabled: Boolean) { - it.property("explicitQosEnabled", explicitQosEnabled.toString()) - } - - /** - * Sets whether JMS date properties should be formatted according to the ISO 8601 standard. - */ - public fun formatDateHeadersToIso8601(formatDateHeadersToIso8601: String) { - it.property("formatDateHeadersToIso8601", formatDateHeadersToIso8601) - } - - /** - * Sets whether JMS date properties should be formatted according to the ISO 8601 standard. - */ - public fun formatDateHeadersToIso8601(formatDateHeadersToIso8601: Boolean) { - it.property("formatDateHeadersToIso8601", formatDateHeadersToIso8601.toString()) - } - - /** - * Set to true, if you want to send message using the QoS settings specified on the message, - * instead of the QoS settings on the JMS endpoint. The following three headers are considered - * JMSPriority, JMSDeliveryMode, and JMSExpiration. You can provide all or only some of them. If not - * provided, Camel will fall back to use the values from the endpoint instead. So, when using this - * option, the headers override the values from the endpoint. The explicitQosEnabled option, by - * contrast, will only use options set on the endpoint, and not values from the message header. - */ - public fun preserveMessageQos(preserveMessageQos: String) { - it.property("preserveMessageQos", preserveMessageQos) - } - - /** - * Set to true, if you want to send message using the QoS settings specified on the message, - * instead of the QoS settings on the JMS endpoint. The following three headers are considered - * JMSPriority, JMSDeliveryMode, and JMSExpiration. You can provide all or only some of them. If not - * provided, Camel will fall back to use the values from the endpoint instead. So, when using this - * option, the headers override the values from the endpoint. The explicitQosEnabled option, by - * contrast, will only use options set on the endpoint, and not values from the message header. - */ - public fun preserveMessageQos(preserveMessageQos: Boolean) { - it.property("preserveMessageQos", preserveMessageQos.toString()) - } - - /** - * Values greater than 1 specify the message priority when sending (where 1 is the lowest priority - * and 9 is the highest). The explicitQosEnabled option must also be enabled in order for this option - * to have any effect. - */ - public fun priority(priority: String) { - it.property("priority", priority) - } - - /** - * Values greater than 1 specify the message priority when sending (where 1 is the lowest priority - * and 9 is the highest). The explicitQosEnabled option must also be enabled in order for this option - * to have any effect. - */ - public fun priority(priority: Int) { - it.property("priority", priority.toString()) - } - - /** - * Specifies the default number of concurrent consumers when doing request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToConcurrentConsumers(replyToConcurrentConsumers: String) { - it.property("replyToConcurrentConsumers", replyToConcurrentConsumers) - } - - /** - * Specifies the default number of concurrent consumers when doing request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToConcurrentConsumers(replyToConcurrentConsumers: Int) { - it.property("replyToConcurrentConsumers", replyToConcurrentConsumers.toString()) - } - - /** - * Specifies the maximum number of concurrent consumers when using request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToMaxConcurrentConsumers(replyToMaxConcurrentConsumers: String) { - it.property("replyToMaxConcurrentConsumers", replyToMaxConcurrentConsumers) - } - - /** - * Specifies the maximum number of concurrent consumers when using request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToMaxConcurrentConsumers(replyToMaxConcurrentConsumers: Int) { - it.property("replyToMaxConcurrentConsumers", replyToMaxConcurrentConsumers.toString()) - } - - /** - * Specifies the maximum number of concurrent consumers for continue routing when timeout occurred - * when using request/reply over JMS. - */ - public - fun replyToOnTimeoutMaxConcurrentConsumers(replyToOnTimeoutMaxConcurrentConsumers: String) { - it.property("replyToOnTimeoutMaxConcurrentConsumers", replyToOnTimeoutMaxConcurrentConsumers) - } - - /** - * Specifies the maximum number of concurrent consumers for continue routing when timeout occurred - * when using request/reply over JMS. - */ - public fun replyToOnTimeoutMaxConcurrentConsumers(replyToOnTimeoutMaxConcurrentConsumers: Int) { - it.property("replyToOnTimeoutMaxConcurrentConsumers", - replyToOnTimeoutMaxConcurrentConsumers.toString()) - } - - /** - * Provides an explicit ReplyTo destination in the JMS message, which overrides the setting of - * replyTo. It is useful if you want to forward the message to a remote Queue and receive the reply - * message from the ReplyTo destination. - */ - public fun replyToOverride(replyToOverride: String) { - it.property("replyToOverride", replyToOverride) - } - - /** - * Allows for explicitly specifying which kind of strategy to use for replyTo queues when doing - * request/reply over JMS. Possible values are: Temporary, Shared, or Exclusive. By default Camel - * will use temporary queues. However if replyTo has been configured, then Shared is used by default. - * This option allows you to use exclusive queues instead of shared ones. See Camel JMS documentation - * for more details, and especially the notes about the implications if running in a clustered - * environment, and the fact that Shared reply queues has lower performance than its alternatives - * Temporary and Exclusive. - */ - public fun replyToType(replyToType: String) { - it.property("replyToType", replyToType) - } - - /** - * The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds). - * The default is 20 seconds. You can include the header CamelJmsRequestTimeout to override this - * endpoint configured timeout value, and thus have per message individual timeout values. See also - * the requestTimeoutCheckerInterval option. - */ - public fun requestTimeout(requestTimeout: String) { - it.property("requestTimeout", requestTimeout) - } - - /** - * When sending messages, specifies the time-to-live of the message (in milliseconds). - */ - public fun timeToLive(timeToLive: String) { - it.property("timeToLive", timeToLive) - } - - /** - * When sending messages, specifies the time-to-live of the message (in milliseconds). - */ - public fun timeToLive(timeToLive: Int) { - it.property("timeToLive", timeToLive.toString()) - } - - /** - * This option is used to allow additional headers which may have values that are invalid - * according to JMS specification. For example, some message systems, such as WMQ, do this with - * header names using prefix JMS_IBM_MQMD_ containing values with byte array or other invalid types. - * You can specify multiple header names separated by comma, and use as suffix for wildcard matching. - */ - public fun allowAdditionalHeaders(allowAdditionalHeaders: String) { - it.property("allowAdditionalHeaders", allowAdditionalHeaders) - } - - /** - * Whether to allow sending messages with no body. If this option is false and the message body is - * null, then an JMSException is thrown. - */ - public fun allowNullBody(allowNullBody: String) { - it.property("allowNullBody", allowNullBody) - } - - /** - * Whether to allow sending messages with no body. If this option is false and the message body is - * null, then an JMSException is thrown. - */ - public fun allowNullBody(allowNullBody: Boolean) { - it.property("allowNullBody", allowNullBody.toString()) - } - - /** - * If true, Camel will always make a JMS message copy of the message when it is passed to the - * producer for sending. Copying the message is needed in some situations, such as when a - * replyToDestinationSelectorName is set (incidentally, Camel will set the alwaysCopyMessage option - * to true, if a replyToDestinationSelectorName is set) - */ - public fun alwaysCopyMessage(alwaysCopyMessage: String) { - it.property("alwaysCopyMessage", alwaysCopyMessage) - } - - /** - * If true, Camel will always make a JMS message copy of the message when it is passed to the - * producer for sending. Copying the message is needed in some situations, such as when a - * replyToDestinationSelectorName is set (incidentally, Camel will set the alwaysCopyMessage option - * to true, if a replyToDestinationSelectorName is set) - */ - public fun alwaysCopyMessage(alwaysCopyMessage: Boolean) { - it.property("alwaysCopyMessage", alwaysCopyMessage.toString()) - } - - /** - * When using InOut exchange pattern use this JMS property instead of JMSCorrelationID JMS - * property to correlate messages. If set messages will be correlated solely on the value of this - * property JMSCorrelationID property will be ignored and not set by Camel. - */ - public fun correlationProperty(correlationProperty: String) { - it.property("correlationProperty", correlationProperty) - } - - /** - * Use this option to force disabling time to live. For example when you do request/reply over - * JMS, then Camel will by default use the requestTimeout value as time to live on the message being - * sent. The problem is that the sender and receiver systems have to have their clocks synchronized, - * so they are in sync. This is not always so easy to archive. So you can use disableTimeToLive=true - * to not set a time to live value on the sent message. Then the message will not expire on the - * receiver system. See below in section About time to live for more details. - */ - public fun disableTimeToLive(disableTimeToLive: String) { - it.property("disableTimeToLive", disableTimeToLive) - } - - /** - * Use this option to force disabling time to live. For example when you do request/reply over - * JMS, then Camel will by default use the requestTimeout value as time to live on the message being - * sent. The problem is that the sender and receiver systems have to have their clocks synchronized, - * so they are in sync. This is not always so easy to archive. So you can use disableTimeToLive=true - * to not set a time to live value on the sent message. Then the message will not expire on the - * receiver system. See below in section About time to live for more details. - */ - public fun disableTimeToLive(disableTimeToLive: Boolean) { - it.property("disableTimeToLive", disableTimeToLive.toString()) - } - - /** - * When using mapJmsMessage=false Camel will create a new JMS message to send to a new JMS - * destination if you touch the headers (get or set) during the route. Set this option to true to - * force Camel to send the original JMS message that was received. - */ - public fun forceSendOriginalMessage(forceSendOriginalMessage: String) { - it.property("forceSendOriginalMessage", forceSendOriginalMessage) - } - - /** - * When using mapJmsMessage=false Camel will create a new JMS message to send to a new JMS - * destination if you touch the headers (get or set) during the route. Set this option to true to - * force Camel to send the original JMS message that was received. - */ - public fun forceSendOriginalMessage(forceSendOriginalMessage: Boolean) { - it.property("forceSendOriginalMessage", forceSendOriginalMessage.toString()) - } - - /** - * Only applicable when sending to JMS destination using InOnly (eg fire and forget). Enabling - * this option will enrich the Camel Exchange with the actual JMSMessageID that was used by the JMS - * client when the message was sent to the JMS destination. - */ - public fun includeSentJMSMessageID(includeSentJMSMessageID: String) { - it.property("includeSentJMSMessageID", includeSentJMSMessageID) - } - - /** - * Only applicable when sending to JMS destination using InOnly (eg fire and forget). Enabling - * this option will enrich the Camel Exchange with the actual JMSMessageID that was used by the JMS - * client when the message was sent to the JMS destination. - */ - public fun includeSentJMSMessageID(includeSentJMSMessageID: Boolean) { - it.property("includeSentJMSMessageID", includeSentJMSMessageID.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Sets the cache level by name for the reply consumer when doing request/reply over JMS. This - * option only applies when using fixed reply queues (not temporary). Camel will by default use: - * CACHE_CONSUMER for exclusive or shared w/ replyToSelectorName. And CACHE_SESSION for shared - * without replyToSelectorName. Some JMS brokers such as IBM WebSphere may require to set the - * replyToCacheLevelName=CACHE_NONE to work. Note: If using temporary queues then CACHE_NONE is not - * allowed, and you must use a higher value such as CACHE_CONSUMER or CACHE_SESSION. - */ - public fun replyToCacheLevelName(replyToCacheLevelName: String) { - it.property("replyToCacheLevelName", replyToCacheLevelName) - } - - /** - * Sets the JMS Selector using the fixed name to be used so you can filter out your own replies - * from the others when using a shared queue (that is, if you are not using a temporary reply queue). - */ - public fun replyToDestinationSelectorName(replyToDestinationSelectorName: String) { - it.property("replyToDestinationSelectorName", replyToDestinationSelectorName) - } - - /** - * Sets whether StreamMessage type is enabled or not. Message payloads of streaming kind such as - * files, InputStream, etc will either by sent as BytesMessage or StreamMessage. This option controls - * which kind will be used. By default BytesMessage is used which enforces the entire message payload - * to be read into memory. By enabling this option the message payload is read into memory in chunks - * and each chunk is then written to the StreamMessage until no more data. - */ - public fun streamMessageTypeEnabled(streamMessageTypeEnabled: String) { - it.property("streamMessageTypeEnabled", streamMessageTypeEnabled) - } - - /** - * Sets whether StreamMessage type is enabled or not. Message payloads of streaming kind such as - * files, InputStream, etc will either by sent as BytesMessage or StreamMessage. This option controls - * which kind will be used. By default BytesMessage is used which enforces the entire message payload - * to be read into memory. By enabling this option the message payload is read into memory in chunks - * and each chunk is then written to the StreamMessage until no more data. - */ - public fun streamMessageTypeEnabled(streamMessageTypeEnabled: Boolean) { - it.property("streamMessageTypeEnabled", streamMessageTypeEnabled.toString()) - } - - /** - * Controls whether or not to include serialized headers. Applies only when transferExchange is - * true. This requires that the objects are serializable. Camel will exclude any non-serializable - * objects and log it at WARN level. - */ - public fun allowSerializedHeaders(allowSerializedHeaders: String) { - it.property("allowSerializedHeaders", allowSerializedHeaders) - } - - /** - * Controls whether or not to include serialized headers. Applies only when transferExchange is - * true. This requires that the objects are serializable. Camel will exclude any non-serializable - * objects and log it at WARN level. - */ - public fun allowSerializedHeaders(allowSerializedHeaders: Boolean) { - it.property("allowSerializedHeaders", allowSerializedHeaders.toString()) - } - - /** - * Whether optimizing for Apache Artemis streaming mode. This can reduce memory overhead when - * using Artemis with JMS StreamMessage types. This option must only be enabled if Apache Artemis is - * being used. - */ - public fun artemisStreamingEnabled(artemisStreamingEnabled: String) { - it.property("artemisStreamingEnabled", artemisStreamingEnabled) - } - - /** - * Whether optimizing for Apache Artemis streaming mode. This can reduce memory overhead when - * using Artemis with JMS StreamMessage types. This option must only be enabled if Apache Artemis is - * being used. - */ - public fun artemisStreamingEnabled(artemisStreamingEnabled: Boolean) { - it.property("artemisStreamingEnabled", artemisStreamingEnabled.toString()) - } - - /** - * Whether to startup the JmsConsumer message listener asynchronously, when starting a route. For - * example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while - * retrying and/or fail-over. This will cause Camel to block while starting routes. By setting this - * option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker - * using a dedicated thread in asynchronous mode. If this option is used, then beware that if the - * connection could not be established, then an exception is logged at WARN level, and the consumer - * will not be able to receive messages; You can then restart the route to retry. - */ - public fun asyncStartListener(asyncStartListener: String) { - it.property("asyncStartListener", asyncStartListener) - } - - /** - * Whether to startup the JmsConsumer message listener asynchronously, when starting a route. For - * example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while - * retrying and/or fail-over. This will cause Camel to block while starting routes. By setting this - * option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker - * using a dedicated thread in asynchronous mode. If this option is used, then beware that if the - * connection could not be established, then an exception is logged at WARN level, and the consumer - * will not be able to receive messages; You can then restart the route to retry. - */ - public fun asyncStartListener(asyncStartListener: Boolean) { - it.property("asyncStartListener", asyncStartListener.toString()) - } - - /** - * Whether to stop the JmsConsumer message listener asynchronously, when stopping a route. - */ - public fun asyncStopListener(asyncStopListener: String) { - it.property("asyncStopListener", asyncStopListener) - } - - /** - * Whether to stop the JmsConsumer message listener asynchronously, when stopping a route. - */ - public fun asyncStopListener(asyncStopListener: Boolean) { - it.property("asyncStopListener", asyncStopListener.toString()) - } - - /** - * A pluggable org.springframework.jms.support.destination.DestinationResolver that allows you to - * use your own resolver (for example, to lookup the real destination in a JNDI registry). - */ - public fun destinationResolver(destinationResolver: String) { - it.property("destinationResolver", destinationResolver) - } - - /** - * Specifies a org.springframework.util.ErrorHandler to be invoked in case of any uncaught - * exceptions thrown while processing a Message. By default these exceptions will be logged at the - * WARN level, if no errorHandler has been configured. You can configure logging level and whether - * stack traces should be logged using errorHandlerLoggingLevel and errorHandlerLogStackTrace - * options. This makes it much easier to configure, than having to code a custom errorHandler. - */ - public fun errorHandler(errorHandler: String) { - it.property("errorHandler", errorHandler) - } - - /** - * Specifies the JMS Exception Listener that is to be notified of any underlying JMS exceptions. - */ - public fun exceptionListener(exceptionListener: String) { - it.property("exceptionListener", exceptionListener) - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * Specify the limit for the number of consumers that are allowed to be idle at any given time. - */ - public fun idleConsumerLimit(idleConsumerLimit: String) { - it.property("idleConsumerLimit", idleConsumerLimit) - } - - /** - * Specify the limit for the number of consumers that are allowed to be idle at any given time. - */ - public fun idleConsumerLimit(idleConsumerLimit: Int) { - it.property("idleConsumerLimit", idleConsumerLimit.toString()) - } - - /** - * Specifies the limit for idle executions of a receive task, not having received any message - * within its execution. If this limit is reached, the task will shut down and leave receiving to - * other executing tasks (in the case of dynamic scheduling; see the maxConcurrentConsumers setting). - * There is additional doc available from Spring. - */ - public fun idleTaskExecutionLimit(idleTaskExecutionLimit: String) { - it.property("idleTaskExecutionLimit", idleTaskExecutionLimit) - } - - /** - * Specifies the limit for idle executions of a receive task, not having received any message - * within its execution. If this limit is reached, the task will shut down and leave receiving to - * other executing tasks (in the case of dynamic scheduling; see the maxConcurrentConsumers setting). - * There is additional doc available from Spring. - */ - public fun idleTaskExecutionLimit(idleTaskExecutionLimit: Int) { - it.property("idleTaskExecutionLimit", idleTaskExecutionLimit.toString()) - } - - /** - * Whether to include all JMSX prefixed properties when mapping from JMS to Camel Message. Setting - * this to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using - * a custom headerFilterStrategy then this option does not apply. - */ - public fun includeAllJMSXProperties(includeAllJMSXProperties: String) { - it.property("includeAllJMSXProperties", includeAllJMSXProperties) - } - - /** - * Whether to include all JMSX prefixed properties when mapping from JMS to Camel Message. Setting - * this to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using - * a custom headerFilterStrategy then this option does not apply. - */ - public fun includeAllJMSXProperties(includeAllJMSXProperties: Boolean) { - it.property("includeAllJMSXProperties", includeAllJMSXProperties.toString()) - } - - /** - * Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS - * specification. Camel provides two implementations out of the box: default and passthrough. The - * default strategy will safely marshal dots and hyphens (. and -). The passthrough strategy leaves - * the key as is. Can be used for JMS brokers which do not care whether JMS header keys contain - * illegal characters. You can provide your own implementation of the - * org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the # notation. - */ - public fun jmsKeyFormatStrategy(jmsKeyFormatStrategy: String) { - it.property("jmsKeyFormatStrategy", jmsKeyFormatStrategy) - } - - /** - * Specifies whether Camel should auto map the received JMS message to a suited payload type, such - * as jakarta.jms.TextMessage to a String etc. - */ - public fun mapJmsMessage(mapJmsMessage: String) { - it.property("mapJmsMessage", mapJmsMessage) - } - - /** - * Specifies whether Camel should auto map the received JMS message to a suited payload type, such - * as jakarta.jms.TextMessage to a String etc. - */ - public fun mapJmsMessage(mapJmsMessage: Boolean) { - it.property("mapJmsMessage", mapJmsMessage.toString()) - } - - /** - * The number of messages per task. -1 is unlimited. If you use a range for concurrent consumers - * (eg min max), then this option can be used to set a value to eg 100 to control how fast the - * consumers will shrink when less work is required. - */ - public fun maxMessagesPerTask(maxMessagesPerTask: String) { - it.property("maxMessagesPerTask", maxMessagesPerTask) - } - - /** - * The number of messages per task. -1 is unlimited. If you use a range for concurrent consumers - * (eg min max), then this option can be used to set a value to eg 100 to control how fast the - * consumers will shrink when less work is required. - */ - public fun maxMessagesPerTask(maxMessagesPerTask: Int) { - it.property("maxMessagesPerTask", maxMessagesPerTask.toString()) - } - - /** - * To use a custom Spring org.springframework.jms.support.converter.MessageConverter so you can be - * in control how to map to/from a jakarta.jms.Message. - */ - public fun messageConverter(messageConverter: String) { - it.property("messageConverter", messageConverter) - } - - /** - * To use the given MessageCreatedStrategy which are invoked when Camel creates new instances of - * jakarta.jms.Message objects when Camel is sending a JMS message. - */ - public fun messageCreatedStrategy(messageCreatedStrategy: String) { - it.property("messageCreatedStrategy", messageCreatedStrategy) - } - - /** - * When sending, specifies whether message IDs should be added. This is just an hint to the JMS - * broker. If the JMS provider accepts this hint, these messages must have the message ID set to - * null; if the provider ignores the hint, the message ID must be set to its normal unique value. - */ - public fun messageIdEnabled(messageIdEnabled: String) { - it.property("messageIdEnabled", messageIdEnabled) - } - - /** - * When sending, specifies whether message IDs should be added. This is just an hint to the JMS - * broker. If the JMS provider accepts this hint, these messages must have the message ID set to - * null; if the provider ignores the hint, the message ID must be set to its normal unique value. - */ - public fun messageIdEnabled(messageIdEnabled: Boolean) { - it.property("messageIdEnabled", messageIdEnabled.toString()) - } - - /** - * Registry ID of the MessageListenerContainerFactory used to determine what - * org.springframework.jms.listener.AbstractMessageListenerContainer to use to consume messages. - * Setting this will automatically set consumerType to Custom. - */ - public fun messageListenerContainerFactory(messageListenerContainerFactory: String) { - it.property("messageListenerContainerFactory", messageListenerContainerFactory) - } - - /** - * Specifies whether timestamps should be enabled by default on sending messages. This is just an - * hint to the JMS broker. If the JMS provider accepts this hint, these messages must have the - * timestamp set to zero; if the provider ignores the hint the timestamp must be set to its normal - * value. - */ - public fun messageTimestampEnabled(messageTimestampEnabled: String) { - it.property("messageTimestampEnabled", messageTimestampEnabled) - } - - /** - * Specifies whether timestamps should be enabled by default on sending messages. This is just an - * hint to the JMS broker. If the JMS provider accepts this hint, these messages must have the - * timestamp set to zero; if the provider ignores the hint the timestamp must be set to its normal - * value. - */ - public fun messageTimestampEnabled(messageTimestampEnabled: Boolean) { - it.property("messageTimestampEnabled", messageTimestampEnabled.toString()) - } - - /** - * Specifies whether to inhibit the delivery of messages published by its own connection. - */ - public fun pubSubNoLocal(pubSubNoLocal: String) { - it.property("pubSubNoLocal", pubSubNoLocal) - } - - /** - * Specifies whether to inhibit the delivery of messages published by its own connection. - */ - public fun pubSubNoLocal(pubSubNoLocal: Boolean) { - it.property("pubSubNoLocal", pubSubNoLocal.toString()) - } - - /** - * The timeout for receiving messages (in milliseconds). - */ - public fun receiveTimeout(receiveTimeout: String) { - it.property("receiveTimeout", receiveTimeout) - } - - /** - * Specifies the interval between recovery attempts, i.e. when a connection is being refreshed, in - * milliseconds. The default is 5000 ms, that is, 5 seconds. - */ - public fun recoveryInterval(recoveryInterval: String) { - it.property("recoveryInterval", recoveryInterval) - } - - /** - * Configures how often Camel should check for timed out Exchanges when doing request/reply over - * JMS. By default Camel checks once per second. But if you must react faster when a timeout occurs, - * then you can lower this interval, to check more frequently. The timeout is determined by the - * option requestTimeout. - */ - public fun requestTimeoutCheckerInterval(requestTimeoutCheckerInterval: String) { - it.property("requestTimeoutCheckerInterval", requestTimeoutCheckerInterval) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * A pluggable TemporaryQueueResolver that allows you to use your own resolver for creating - * temporary queues (some messaging systems has special requirements for creating temporary queues). - */ - public fun temporaryQueueResolver(temporaryQueueResolver: String) { - it.property("temporaryQueueResolver", temporaryQueueResolver) - } - - /** - * If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the - * consumer side, then the caused Exception will be send back in response as a - * jakarta.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows - * you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable - * robust routing. Notice that if you also have transferExchange enabled, this option takes - * precedence. The caught exception is required to be serializable. The original Exception on the - * consumer side can be wrapped in an outer exception such as org.apache.camel.RuntimeCamelException - * when returned to the producer. Use this with caution as the data is using Java Object - * serialization and requires the received to be able to deserialize the data at Class level, which - * forces a strong coupling between the producers and consumer! - */ - public fun transferException(transferException: String) { - it.property("transferException", transferException) - } - - /** - * If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the - * consumer side, then the caused Exception will be send back in response as a - * jakarta.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows - * you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable - * robust routing. Notice that if you also have transferExchange enabled, this option takes - * precedence. The caught exception is required to be serializable. The original Exception on the - * consumer side can be wrapped in an outer exception such as org.apache.camel.RuntimeCamelException - * when returned to the producer. Use this with caution as the data is using Java Object - * serialization and requires the received to be able to deserialize the data at Class level, which - * forces a strong coupling between the producers and consumer! - */ - public fun transferException(transferException: Boolean) { - it.property("transferException", transferException.toString()) - } - - /** - * You can transfer the exchange over the wire instead of just the body and headers. The following - * fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, - * exchange properties, exchange exception. This requires that the objects are serializable. Camel - * will exclude any non-serializable objects and log it at WARN level. You must enable this option on - * both the producer and consumer side, so Camel knows the payloads is an Exchange and not a regular - * payload. Use this with caution as the data is using Java Object serialization and requires the - * receiver to be able to deserialize the data at Class level, which forces a strong coupling between - * the producers and consumers having to use compatible Camel versions! - */ - public fun transferExchange(transferExchange: String) { - it.property("transferExchange", transferExchange) - } - - /** - * You can transfer the exchange over the wire instead of just the body and headers. The following - * fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, - * exchange properties, exchange exception. This requires that the objects are serializable. Camel - * will exclude any non-serializable objects and log it at WARN level. You must enable this option on - * both the producer and consumer side, so Camel knows the payloads is an Exchange and not a regular - * payload. Use this with caution as the data is using Java Object serialization and requires the - * receiver to be able to deserialize the data at Class level, which forces a strong coupling between - * the producers and consumers having to use compatible Camel versions! - */ - public fun transferExchange(transferExchange: Boolean) { - it.property("transferExchange", transferExchange.toString()) - } - - /** - * Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. - */ - public fun useMessageIDAsCorrelationID(useMessageIDAsCorrelationID: String) { - it.property("useMessageIDAsCorrelationID", useMessageIDAsCorrelationID) - } - - /** - * Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. - */ - public fun useMessageIDAsCorrelationID(useMessageIDAsCorrelationID: Boolean) { - it.property("useMessageIDAsCorrelationID", useMessageIDAsCorrelationID.toString()) - } - - /** - * Number of times to wait for provisional correlation id to be updated to the actual correlation - * id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. - */ - public - fun waitForProvisionCorrelationToBeUpdatedCounter(waitForProvisionCorrelationToBeUpdatedCounter: String) { - it.property("waitForProvisionCorrelationToBeUpdatedCounter", - waitForProvisionCorrelationToBeUpdatedCounter) - } - - /** - * Number of times to wait for provisional correlation id to be updated to the actual correlation - * id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. - */ - public - fun waitForProvisionCorrelationToBeUpdatedCounter(waitForProvisionCorrelationToBeUpdatedCounter: Int) { - it.property("waitForProvisionCorrelationToBeUpdatedCounter", - waitForProvisionCorrelationToBeUpdatedCounter.toString()) - } - - /** - * Interval in millis to sleep each time while waiting for provisional correlation id to be - * updated. - */ - public - fun waitForProvisionCorrelationToBeUpdatedThreadSleepingTime(waitForProvisionCorrelationToBeUpdatedThreadSleepingTime: String) { - it.property("waitForProvisionCorrelationToBeUpdatedThreadSleepingTime", - waitForProvisionCorrelationToBeUpdatedThreadSleepingTime) - } - - /** - * Number of times to wait for temporary replyTo queue to be created and ready when doing - * request/reply over JMS. - */ - public - fun waitForTemporaryReplyToToBeUpdatedCounter(waitForTemporaryReplyToToBeUpdatedCounter: String) { - it.property("waitForTemporaryReplyToToBeUpdatedCounter", - waitForTemporaryReplyToToBeUpdatedCounter) - } - - /** - * Number of times to wait for temporary replyTo queue to be created and ready when doing - * request/reply over JMS. - */ - public - fun waitForTemporaryReplyToToBeUpdatedCounter(waitForTemporaryReplyToToBeUpdatedCounter: Int) { - it.property("waitForTemporaryReplyToToBeUpdatedCounter", - waitForTemporaryReplyToToBeUpdatedCounter.toString()) - } - - /** - * Interval in millis to sleep each time while waiting for temporary replyTo queue to be ready. - */ - public - fun waitForTemporaryReplyToToBeUpdatedThreadSleepingTime(waitForTemporaryReplyToToBeUpdatedThreadSleepingTime: String) { - it.property("waitForTemporaryReplyToToBeUpdatedThreadSleepingTime", - waitForTemporaryReplyToToBeUpdatedThreadSleepingTime) - } - - /** - * Allows to configure the default errorHandler logging level for logging uncaught exceptions. - */ - public fun errorHandlerLoggingLevel(errorHandlerLoggingLevel: String) { - it.property("errorHandlerLoggingLevel", errorHandlerLoggingLevel) - } - - /** - * Allows to control whether stack-traces should be logged or not, by the default errorHandler. - */ - public fun errorHandlerLogStackTrace(errorHandlerLogStackTrace: String) { - it.property("errorHandlerLogStackTrace", errorHandlerLogStackTrace) - } - - /** - * Allows to control whether stack-traces should be logged or not, by the default errorHandler. - */ - public fun errorHandlerLogStackTrace(errorHandlerLogStackTrace: Boolean) { - it.property("errorHandlerLogStackTrace", errorHandlerLogStackTrace.toString()) - } - - /** - * Password to use with the ConnectionFactory. You can also configure username/password directly - * on the ConnectionFactory. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Username to use with the ConnectionFactory. You can also configure username/password directly - * on the ConnectionFactory. - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * Specifies whether to use transacted mode - */ - public fun transacted(transacted: String) { - it.property("transacted", transacted) - } - - /** - * Specifies whether to use transacted mode - */ - public fun transacted(transacted: Boolean) { - it.property("transacted", transacted.toString()) - } - - /** - * Specifies whether InOut operations (request reply) default to using transacted mode If this - * flag is set to true, then Spring JmsTemplate will have sessionTransacted set to true, and the - * acknowledgeMode as transacted on the JmsTemplate used for InOut operations. Note from Spring JMS: - * that within a JTA transaction, the parameters passed to createQueue, createTopic methods are not - * taken into account. Depending on the Java EE transaction context, the container makes its own - * decisions on these values. Analogously, these parameters are not taken into account within a - * locally managed transaction either, since Spring JMS operates on an existing JMS Session in this - * case. Setting this flag to true will use a short local JMS transaction when running outside of a - * managed transaction, and a synchronized local JMS transaction in case of a managed transaction - * (other than an XA transaction) being present. This has the effect of a local JMS transaction being - * managed alongside the main transaction (which might be a native JDBC transaction), with the JMS - * transaction committing right after the main transaction. - */ - public fun transactedInOut(transactedInOut: String) { - it.property("transactedInOut", transactedInOut) - } - - /** - * Specifies whether InOut operations (request reply) default to using transacted mode If this - * flag is set to true, then Spring JmsTemplate will have sessionTransacted set to true, and the - * acknowledgeMode as transacted on the JmsTemplate used for InOut operations. Note from Spring JMS: - * that within a JTA transaction, the parameters passed to createQueue, createTopic methods are not - * taken into account. Depending on the Java EE transaction context, the container makes its own - * decisions on these values. Analogously, these parameters are not taken into account within a - * locally managed transaction either, since Spring JMS operates on an existing JMS Session in this - * case. Setting this flag to true will use a short local JMS transaction when running outside of a - * managed transaction, and a synchronized local JMS transaction in case of a managed transaction - * (other than an XA transaction) being present. This has the effect of a local JMS transaction being - * managed alongside the main transaction (which might be a native JDBC transaction), with the JMS - * transaction committing right after the main transaction. - */ - public fun transactedInOut(transactedInOut: Boolean) { - it.property("transactedInOut", transactedInOut.toString()) - } - - /** - * If true, Camel will create a JmsTransactionManager, if there is no transactionManager injected - * when option transacted=true. - */ - public fun lazyCreateTransactionManager(lazyCreateTransactionManager: String) { - it.property("lazyCreateTransactionManager", lazyCreateTransactionManager) - } - - /** - * If true, Camel will create a JmsTransactionManager, if there is no transactionManager injected - * when option transacted=true. - */ - public fun lazyCreateTransactionManager(lazyCreateTransactionManager: Boolean) { - it.property("lazyCreateTransactionManager", lazyCreateTransactionManager.toString()) - } - - /** - * The Spring transaction manager to use. - */ - public fun transactionManager(transactionManager: String) { - it.property("transactionManager", transactionManager) - } - - /** - * The name of the transaction to use. - */ - public fun transactionName(transactionName: String) { - it.property("transactionName", transactionName) - } - - /** - * The timeout value of the transaction (in seconds), if using transacted mode. - */ - public fun transactionTimeout(transactionTimeout: String) { - it.property("transactionTimeout", transactionTimeout) - } - - /** - * The timeout value of the transaction (in seconds), if using transacted mode. - */ - public fun transactionTimeout(transactionTimeout: Int) { - it.property("transactionTimeout", transactionTimeout.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ArangodbUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ArangodbUriDsl.kt deleted file mode 100644 index 4d0be86a9a062..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ArangodbUriDsl.kt +++ /dev/null @@ -1,169 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on ArangoDb when used as a Document Database, or as a Graph Database - */ -public fun UriDsl.arangodb(i: ArangodbUriDsl.() -> Unit) { - ArangodbUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ArangodbUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("arangodb") - } - - private var database: String = "" - - /** - * database name - */ - public fun database(database: String) { - this.database = database - it.url("$database") - } - - /** - * Collection name, when using ArangoDb as a Document Database. Set the documentCollection name - * when using the CRUD operation on the document database collections (SAVE_DOCUMENT , - * FIND_DOCUMENT_BY_KEY, UPDATE_DOCUMENT, DELETE_DOCUMENT). - */ - public fun documentCollection(documentCollection: String) { - it.property("documentCollection", documentCollection) - } - - /** - * Collection name of vertices, when using ArangoDb as a Graph Database. Set the edgeCollection - * name to perform CRUD operation on edges using these operations : SAVE_VERTEX, FIND_VERTEX_BY_KEY, - * UPDATE_VERTEX, DELETE_VERTEX. The graph attribute is mandatory. - */ - public fun edgeCollection(edgeCollection: String) { - it.property("edgeCollection", edgeCollection) - } - - /** - * Graph name, when using ArangoDb as a Graph Database. Combine this attribute with one of the two - * attributes vertexCollection and edgeCollection. - */ - public fun graph(graph: String) { - it.property("graph", graph) - } - - /** - * ArangoDB host. If host and port are default, this field is Optional. - */ - public fun host(host: String) { - it.property("host", host) - } - - /** - * Operations to perform on ArangoDb. For the operation AQL_QUERY, no need to specify a collection - * or graph. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * ArangoDB exposed port. If host and port are default, this field is Optional. - */ - public fun port(port: String) { - it.property("port", port) - } - - /** - * ArangoDB exposed port. If host and port are default, this field is Optional. - */ - public fun port(port: Int) { - it.property("port", port.toString()) - } - - /** - * Collection name of vertices, when using ArangoDb as a Graph Database. Set the vertexCollection - * name to perform CRUD operation on vertices using these operations : SAVE_EDGE, FIND_EDGE_BY_KEY, - * UPDATE_EDGE, DELETE_EDGE. The graph attribute is mandatory. - */ - public fun vertexCollection(vertexCollection: String) { - it.property("vertexCollection", vertexCollection) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing ArangDB client. - */ - public fun arangoDB(arangoDB: String) { - it.property("arangoDB", arangoDB) - } - - /** - * To use an existing Vertx instance in the ArangoDB client. - */ - public fun vertx(vertx: String) { - it.property("vertx", vertx) - } - - /** - * ArangoDB password. If user and password are default, this field is Optional. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * ArangoDB user. If user and password are default, this field is Optional. - */ - public fun user(user: String) { - it.property("user", user) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/As2UriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/As2UriDsl.kt deleted file mode 100644 index 178d1a70f553d..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/As2UriDsl.kt +++ /dev/null @@ -1,398 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Transfer data securely and reliably using the AS2 protocol (RFC4130). - */ -public fun UriDsl.as2(i: As2UriDsl.() -> Unit) { - As2UriDsl(this).apply(i) -} - -@CamelDslMarker -public class As2UriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("as2") - } - - private var apiName: String = "" - - private var methodName: String = "" - - /** - * What kind of operation to perform - */ - public fun apiName(apiName: String) { - this.apiName = apiName - it.url("$apiName/$methodName") - } - - /** - * What sub operation to use for the selected operation - */ - public fun methodName(methodName: String) { - this.methodName = methodName - it.url("$apiName/$methodName") - } - - /** - * The value of the AS2From header of AS2 message. - */ - public fun as2From(as2From: String) { - it.property("as2From", as2From) - } - - /** - * The structure of AS2 Message. One of: PLAIN - No encryption, no signature, SIGNED - No - * encryption, signature, ENCRYPTED - Encryption, no signature, ENCRYPTED_SIGNED - Encryption, - * signature - */ - public fun as2MessageStructure(as2MessageStructure: String) { - it.property("as2MessageStructure", as2MessageStructure) - } - - /** - * The value of the AS2To header of AS2 message. - */ - public fun as2To(as2To: String) { - it.property("as2To", as2To) - } - - /** - * The version of the AS2 protocol. - */ - public fun as2Version(as2Version: String) { - it.property("as2Version", as2Version) - } - - /** - * The port number of asynchronous MDN server. - */ - public fun asyncMdnPortNumber(asyncMdnPortNumber: String) { - it.property("asyncMdnPortNumber", asyncMdnPortNumber) - } - - /** - * The port number of asynchronous MDN server. - */ - public fun asyncMdnPortNumber(asyncMdnPortNumber: Int) { - it.property("asyncMdnPortNumber", asyncMdnPortNumber.toString()) - } - - /** - * The name of the attached file - */ - public fun attachedFileName(attachedFileName: String) { - it.property("attachedFileName", attachedFileName) - } - - /** - * The Client Fully Qualified Domain Name (FQDN). Used in message ids sent by endpoint. - */ - public fun clientFqdn(clientFqdn: String) { - it.property("clientFqdn", clientFqdn) - } - - /** - * The algorithm used to compress EDI message. - */ - public fun compressionAlgorithm(compressionAlgorithm: String) { - it.property("compressionAlgorithm", compressionAlgorithm) - } - - /** - * The value of the Disposition-Notification-To header. Assigning a value to this parameter - * requests a message disposition notification (MDN) for the AS2 message. - */ - public fun dispositionNotificationTo(dispositionNotificationTo: String) { - it.property("dispositionNotificationTo", dispositionNotificationTo) - } - - /** - * The transfer encoding of EDI message. - */ - public fun ediMessageTransferEncoding(ediMessageTransferEncoding: String) { - it.property("ediMessageTransferEncoding", ediMessageTransferEncoding) - } - - /** - * The content type of EDI message. One of application/edifact, application/edi-x12, - * application/edi-consent, application/xml - */ - public fun ediMessageType(ediMessageType: String) { - it.property("ediMessageType", ediMessageType) - } - - /** - * The value of the From header of AS2 message. - */ - public fun from(from: String) { - it.property("from", from) - } - - /** - * Set hostname verifier for SSL session. - */ - public fun hostnameVerifier(hostnameVerifier: String) { - it.property("hostnameVerifier", hostnameVerifier) - } - - /** - * The maximum size of the connection pool for http connections (client only) - */ - public fun httpConnectionPoolSize(httpConnectionPoolSize: String) { - it.property("httpConnectionPoolSize", httpConnectionPoolSize) - } - - /** - * The maximum size of the connection pool for http connections (client only) - */ - public fun httpConnectionPoolSize(httpConnectionPoolSize: Int) { - it.property("httpConnectionPoolSize", httpConnectionPoolSize.toString()) - } - - /** - * The time to live for connections in the connection pool (client only) - */ - public fun httpConnectionPoolTtl(httpConnectionPoolTtl: String) { - it.property("httpConnectionPoolTtl", httpConnectionPoolTtl) - } - - /** - * The timeout of the http connection (client only) - */ - public fun httpConnectionTimeout(httpConnectionTimeout: String) { - it.property("httpConnectionTimeout", httpConnectionTimeout) - } - - /** - * The timeout of the underlying http socket (client only) - */ - public fun httpSocketTimeout(httpSocketTimeout: String) { - it.property("httpSocketTimeout", httpSocketTimeout) - } - - /** - * Sets the name of a parameter to be passed in the exchange In Body - */ - public fun inBody(inBody: String) { - it.property("inBody", inBody) - } - - /** - * The template used to format MDN message - */ - public fun mdnMessageTemplate(mdnMessageTemplate: String) { - it.property("mdnMessageTemplate", mdnMessageTemplate) - } - - /** - * The return URL that the message receiver should send an asynchronous MDN to. If not present the - * receipt is synchronous. (Client only) - */ - public fun receiptDeliveryOption(receiptDeliveryOption: String) { - it.property("receiptDeliveryOption", receiptDeliveryOption) - } - - /** - * The request URI of EDI message. - */ - public fun requestUri(requestUri: String) { - it.property("requestUri", requestUri) - } - - /** - * The value included in the Server message header identifying the AS2 Server. - */ - public fun server(server: String) { - it.property("server", server) - } - - /** - * The Server Fully Qualified Domain Name (FQDN). Used in message ids sent by endpoint. - */ - public fun serverFqdn(serverFqdn: String) { - it.property("serverFqdn", serverFqdn) - } - - /** - * The port number of server. - */ - public fun serverPortNumber(serverPortNumber: String) { - it.property("serverPortNumber", serverPortNumber) - } - - /** - * The port number of server. - */ - public fun serverPortNumber(serverPortNumber: Int) { - it.property("serverPortNumber", serverPortNumber.toString()) - } - - /** - * Set SSL context for connection to remote server. - */ - public fun sslContext(sslContext: String) { - it.property("sslContext", sslContext) - } - - /** - * The value of Subject header of AS2 message. - */ - public fun subject(subject: String) { - it.property("subject", subject) - } - - /** - * The host name (IP or DNS name) of target host. - */ - public fun targetHostname(targetHostname: String) { - it.property("targetHostname", targetHostname) - } - - /** - * The port number of target host. -1 indicates the scheme default port. - */ - public fun targetPortNumber(targetPortNumber: String) { - it.property("targetPortNumber", targetPortNumber) - } - - /** - * The port number of target host. -1 indicates the scheme default port. - */ - public fun targetPortNumber(targetPortNumber: Int) { - it.property("targetPortNumber", targetPortNumber.toString()) - } - - /** - * The value included in the User-Agent message header identifying the AS2 user agent. - */ - public fun userAgent(userAgent: String) { - it.property("userAgent", userAgent) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The key used to encrypt the EDI message. - */ - public fun decryptingPrivateKey(decryptingPrivateKey: String) { - it.property("decryptingPrivateKey", decryptingPrivateKey) - } - - /** - * The algorithm used to encrypt EDI message. - */ - public fun encryptingAlgorithm(encryptingAlgorithm: String) { - it.property("encryptingAlgorithm", encryptingAlgorithm) - } - - /** - * The chain of certificates used to encrypt EDI message. - */ - public fun encryptingCertificateChain(encryptingCertificateChain: String) { - it.property("encryptingCertificateChain", encryptingCertificateChain) - } - - /** - * The list of algorithms, in order of preference, requested to generate a message integrity check - * (MIC) returned in message dispostion notification (MDN) - */ - public fun signedReceiptMicAlgorithms(signedReceiptMicAlgorithms: String) { - it.property("signedReceiptMicAlgorithms", signedReceiptMicAlgorithms) - } - - /** - * The algorithm used to sign EDI message. - */ - public fun signingAlgorithm(signingAlgorithm: String) { - it.property("signingAlgorithm", signingAlgorithm) - } - - /** - * The chain of certificates used to sign EDI message. - */ - public fun signingCertificateChain(signingCertificateChain: String) { - it.property("signingCertificateChain", signingCertificateChain) - } - - /** - * The key used to sign the EDI message. - */ - public fun signingPrivateKey(signingPrivateKey: String) { - it.property("signingPrivateKey", signingPrivateKey) - } - - /** - * Certificates to validate the message's signature against. If not supplied, validation will not - * take place. Server: validates the received message. Client: not yet implemented, should validate - * the MDN - */ - public fun validateSigningCertificateChain(validateSigningCertificateChain: String) { - it.property("validateSigningCertificateChain", validateSigningCertificateChain) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AsteriskUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AsteriskUriDsl.kt deleted file mode 100644 index 290a9f0e64e37..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AsteriskUriDsl.kt +++ /dev/null @@ -1,150 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Interact with Asterisk PBX Server (VoIP). - */ -public fun UriDsl.asterisk(i: AsteriskUriDsl.() -> Unit) { - AsteriskUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AsteriskUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("asterisk") - } - - private var name: String = "" - - /** - * Name of component - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * The hostname of the asterisk server - */ - public fun hostname(hostname: String) { - it.property("hostname", hostname) - } - - /** - * Login password - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Login username - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * What action to perform such as getting queue status, sip peers or extension state. - */ - public fun action(action: String) { - it.property("action", action) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AtmosphereWebsocketUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AtmosphereWebsocketUriDsl.kt deleted file mode 100644 index 9ca141856782e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AtmosphereWebsocketUriDsl.kt +++ /dev/null @@ -1,472 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Expose WebSocket endpoints using the Atmosphere framework. - */ -public fun UriDsl.`atmosphere-websocket`(i: AtmosphereWebsocketUriDsl.() -> Unit) { - AtmosphereWebsocketUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AtmosphereWebsocketUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("atmosphere-websocket") - } - - private var servicePath: String = "" - - /** - * Name of websocket endpoint - */ - public fun servicePath(servicePath: String) { - this.servicePath = servicePath - it.url("$servicePath") - } - - /** - * If this option is false the Servlet will disable the HTTP streaming and set the content-length - * header on the response - */ - public fun chunked(chunked: String) { - it.property("chunked", chunked) - } - - /** - * If this option is false the Servlet will disable the HTTP streaming and set the content-length - * header on the response - */ - public fun chunked(chunked: Boolean) { - it.property("chunked", chunked.toString()) - } - - /** - * Determines whether or not the raw input stream is cached or not. The Camel consumer - * (camel-servlet, camel-jetty etc.) will by default cache the input stream to support reading it - * multiple times to ensure it Camel can retrieve all data from the stream. However you can set this - * option to true when you for example need to access the raw stream, such as streaming it directly - * to a file or other persistent store. DefaultHttpBinding will copy the request input stream into a - * stream cache and put it into message body if this option is false to support reading the stream - * multiple times. If you use Servlet to bridge/proxy an endpoint then consider enabling this option - * to improve performance, in case you do not need to read the message payload multiple times. The - * producer (camel-http) will by default cache the response body stream. If setting this option to - * true, then the producers will not cache the response body stream but use the response stream as-is - * (the stream can only be read once) as the message body. - */ - public fun disableStreamCache(disableStreamCache: String) { - it.property("disableStreamCache", disableStreamCache) - } - - /** - * Determines whether or not the raw input stream is cached or not. The Camel consumer - * (camel-servlet, camel-jetty etc.) will by default cache the input stream to support reading it - * multiple times to ensure it Camel can retrieve all data from the stream. However you can set this - * option to true when you for example need to access the raw stream, such as streaming it directly - * to a file or other persistent store. DefaultHttpBinding will copy the request input stream into a - * stream cache and put it into message body if this option is false to support reading the stream - * multiple times. If you use Servlet to bridge/proxy an endpoint then consider enabling this option - * to improve performance, in case you do not need to read the message payload multiple times. The - * producer (camel-http) will by default cache the response body stream. If setting this option to - * true, then the producers will not cache the response body stream but use the response stream as-is - * (the stream can only be read once) as the message body. - */ - public fun disableStreamCache(disableStreamCache: Boolean) { - it.property("disableStreamCache", disableStreamCache.toString()) - } - - /** - * Whether to send to all (broadcast) or send to a single receiver. - */ - public fun sendToAll(sendToAll: String) { - it.property("sendToAll", sendToAll) - } - - /** - * Whether to send to all (broadcast) or send to a single receiver. - */ - public fun sendToAll(sendToAll: Boolean) { - it.property("sendToAll", sendToAll.toString()) - } - - /** - * If enabled and an Exchange failed processing on the consumer side, and if the caused Exception - * was send back serialized in the response as a application/x-java-serialized-object content type. - * On the producer side the exception will be deserialized and thrown as is, instead of the - * HttpOperationFailedException. The caused exception is required to be serialized. This is by - * default turned off. If you enable this then be aware that Java will deserialize the incoming data - * from the request to Java and that can be a potential security risk. - */ - public fun transferException(transferException: String) { - it.property("transferException", transferException) - } - - /** - * If enabled and an Exchange failed processing on the consumer side, and if the caused Exception - * was send back serialized in the response as a application/x-java-serialized-object content type. - * On the producer side the exception will be deserialized and thrown as is, instead of the - * HttpOperationFailedException. The caused exception is required to be serialized. This is by - * default turned off. If you enable this then be aware that Java will deserialize the incoming data - * from the request to Java and that can be a potential security risk. - */ - public fun transferException(transferException: Boolean) { - it.property("transferException", transferException.toString()) - } - - /** - * To enable streaming to send data as multiple text fragments. - */ - public fun useStreaming(useStreaming: String) { - it.property("useStreaming", useStreaming) - } - - /** - * To enable streaming to send data as multiple text fragments. - */ - public fun useStreaming(useStreaming: Boolean) { - it.property("useStreaming", useStreaming.toString()) - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * To use a custom HttpBinding to control the mapping between Camel message and HttpClient. - */ - public fun httpBinding(httpBinding: String) { - it.property("httpBinding", httpBinding) - } - - /** - * Configure the consumer to work in async mode - */ - public fun async(async: String) { - it.property("async", async) - } - - /** - * Configure the consumer to work in async mode - */ - public fun async(async: Boolean) { - it.property("async", async.toString()) - } - - /** - * Used to only allow consuming if the HttpMethod matches, such as GET/POST/PUT etc. Multiple - * methods can be specified separated by comma. - */ - public fun httpMethodRestrict(httpMethodRestrict: String) { - it.property("httpMethodRestrict", httpMethodRestrict) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the exception's stack trace - * will be logged when the exception stack trace is not sent in the response's body. - */ - public fun logException(logException: String) { - it.property("logException", logException) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the exception's stack trace - * will be logged when the exception stack trace is not sent in the response's body. - */ - public fun logException(logException: Boolean) { - it.property("logException", logException.toString()) - } - - /** - * Whether or not the consumer should try to find a target consumer by matching the URI prefix if - * no exact match is found. - */ - public fun matchOnUriPrefix(matchOnUriPrefix: String) { - it.property("matchOnUriPrefix", matchOnUriPrefix) - } - - /** - * Whether or not the consumer should try to find a target consumer by matching the URI prefix if - * no exact match is found. - */ - public fun matchOnUriPrefix(matchOnUriPrefix: Boolean) { - it.property("matchOnUriPrefix", matchOnUriPrefix.toString()) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the response's body won't - * contain the exception's stack trace. - */ - public fun muteException(muteException: String) { - it.property("muteException", muteException) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the response's body won't - * contain the exception's stack trace. - */ - public fun muteException(muteException: Boolean) { - it.property("muteException", muteException.toString()) - } - - /** - * To use a custom buffer size on the jakarta.servlet.ServletResponse. - */ - public fun responseBufferSize(responseBufferSize: String) { - it.property("responseBufferSize", responseBufferSize) - } - - /** - * To use a custom buffer size on the jakarta.servlet.ServletResponse. - */ - public fun responseBufferSize(responseBufferSize: Int) { - it.property("responseBufferSize", responseBufferSize.toString()) - } - - /** - * Name of the servlet to use - */ - public fun servletName(servletName: String) { - it.property("servletName", servletName) - } - - /** - * Whether to automatic bind multipart/form-data as attachments on the Camel Exchange. The options - * attachmentMultipartBinding=true and disableStreamCache=false cannot work together. Remove - * disableStreamCache to use AttachmentMultipartBinding. This is turn off by default as this may - * require servlet specific configuration to enable this when using Servlet's. - */ - public fun attachmentMultipartBinding(attachmentMultipartBinding: String) { - it.property("attachmentMultipartBinding", attachmentMultipartBinding) - } - - /** - * Whether to automatic bind multipart/form-data as attachments on the Camel Exchange. The options - * attachmentMultipartBinding=true and disableStreamCache=false cannot work together. Remove - * disableStreamCache to use AttachmentMultipartBinding. This is turn off by default as this may - * require servlet specific configuration to enable this when using Servlet's. - */ - public fun attachmentMultipartBinding(attachmentMultipartBinding: Boolean) { - it.property("attachmentMultipartBinding", attachmentMultipartBinding.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Whether to eager check whether the HTTP requests has content if the content-length header is 0 - * or not present. This can be turned on in case HTTP clients do not send streamed data. - */ - public fun eagerCheckContentAvailable(eagerCheckContentAvailable: String) { - it.property("eagerCheckContentAvailable", eagerCheckContentAvailable) - } - - /** - * Whether to eager check whether the HTTP requests has content if the content-length header is 0 - * or not present. This can be turned on in case HTTP clients do not send streamed data. - */ - public fun eagerCheckContentAvailable(eagerCheckContentAvailable: Boolean) { - it.property("eagerCheckContentAvailable", eagerCheckContentAvailable.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Whitelist of accepted filename extensions for accepting uploaded files. Multiple extensions can - * be separated by comma, such as txt,xml. - */ - public fun fileNameExtWhitelist(fileNameExtWhitelist: String) { - it.property("fileNameExtWhitelist", fileNameExtWhitelist) - } - - /** - * If this option is true then IN exchange Body of the exchange will be mapped to HTTP body. - * Setting this to false will avoid the HTTP mapping. - */ - public fun mapHttpMessageBody(mapHttpMessageBody: String) { - it.property("mapHttpMessageBody", mapHttpMessageBody) - } - - /** - * If this option is true then IN exchange Body of the exchange will be mapped to HTTP body. - * Setting this to false will avoid the HTTP mapping. - */ - public fun mapHttpMessageBody(mapHttpMessageBody: Boolean) { - it.property("mapHttpMessageBody", mapHttpMessageBody.toString()) - } - - /** - * If this option is true then IN exchange Form Encoded body of the exchange will be mapped to - * HTTP. Setting this to false will avoid the HTTP Form Encoded body mapping. - */ - public fun mapHttpMessageFormUrlEncodedBody(mapHttpMessageFormUrlEncodedBody: String) { - it.property("mapHttpMessageFormUrlEncodedBody", mapHttpMessageFormUrlEncodedBody) - } - - /** - * If this option is true then IN exchange Form Encoded body of the exchange will be mapped to - * HTTP. Setting this to false will avoid the HTTP Form Encoded body mapping. - */ - public fun mapHttpMessageFormUrlEncodedBody(mapHttpMessageFormUrlEncodedBody: Boolean) { - it.property("mapHttpMessageFormUrlEncodedBody", mapHttpMessageFormUrlEncodedBody.toString()) - } - - /** - * If this option is true then IN exchange Headers of the exchange will be mapped to HTTP headers. - * Setting this to false will avoid the HTTP Headers mapping. - */ - public fun mapHttpMessageHeaders(mapHttpMessageHeaders: String) { - it.property("mapHttpMessageHeaders", mapHttpMessageHeaders) - } - - /** - * If this option is true then IN exchange Headers of the exchange will be mapped to HTTP headers. - * Setting this to false will avoid the HTTP Headers mapping. - */ - public fun mapHttpMessageHeaders(mapHttpMessageHeaders: Boolean) { - it.property("mapHttpMessageHeaders", mapHttpMessageHeaders.toString()) - } - - /** - * Specifies whether to enable HTTP OPTIONS for this Servlet consumer. By default OPTIONS is - * turned off. - */ - public fun optionsEnabled(optionsEnabled: String) { - it.property("optionsEnabled", optionsEnabled) - } - - /** - * Specifies whether to enable HTTP OPTIONS for this Servlet consumer. By default OPTIONS is - * turned off. - */ - public fun optionsEnabled(optionsEnabled: Boolean) { - it.property("optionsEnabled", optionsEnabled.toString()) - } - - /** - * Specifies whether to enable HTTP TRACE for this Servlet consumer. By default TRACE is turned - * off. - */ - public fun traceEnabled(traceEnabled: String) { - it.property("traceEnabled", traceEnabled) - } - - /** - * Specifies whether to enable HTTP TRACE for this Servlet consumer. By default TRACE is turned - * off. - */ - public fun traceEnabled(traceEnabled: Boolean) { - it.property("traceEnabled", traceEnabled.toString()) - } - - /** - * If the option is true, HttpProducer will ignore the Exchange.HTTP_URI header, and use the - * endpoint's URI for request. You may also set the option throwExceptionOnFailure to be false to let - * the HttpProducer send all the fault response back. - */ - public fun bridgeEndpoint(bridgeEndpoint: String) { - it.property("bridgeEndpoint", bridgeEndpoint) - } - - /** - * If the option is true, HttpProducer will ignore the Exchange.HTTP_URI header, and use the - * endpoint's URI for request. You may also set the option throwExceptionOnFailure to be false to let - * the HttpProducer send all the fault response back. - */ - public fun bridgeEndpoint(bridgeEndpoint: Boolean) { - it.property("bridgeEndpoint", bridgeEndpoint.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AtomUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AtomUriDsl.kt deleted file mode 100644 index fc3823958b9e6..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AtomUriDsl.kt +++ /dev/null @@ -1,365 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Poll Atom RSS feeds. - */ -public fun UriDsl.atom(i: AtomUriDsl.() -> Unit) { - AtomUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AtomUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("atom") - } - - private var feedUri: String = "" - - /** - * The URI to the feed to poll. - */ - public fun feedUri(feedUri: String) { - this.feedUri = feedUri - it.url("$feedUri") - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Sets whether to sort entries by published date. Only works when splitEntries = true. - */ - public fun sortEntries(sortEntries: String) { - it.property("sortEntries", sortEntries) - } - - /** - * Sets whether to sort entries by published date. Only works when splitEntries = true. - */ - public fun sortEntries(sortEntries: Boolean) { - it.property("sortEntries", sortEntries.toString()) - } - - /** - * Sets whether or not entries should be sent individually or whether the entire feed should be - * sent as a single message - */ - public fun splitEntries(splitEntries: String) { - it.property("splitEntries", splitEntries) - } - - /** - * Sets whether or not entries should be sent individually or whether the entire feed should be - * sent as a single message - */ - public fun splitEntries(splitEntries: Boolean) { - it.property("splitEntries", splitEntries.toString()) - } - - /** - * Sets whether all entries identified in a single feed poll should be delivered immediately. If - * true, only one entry is processed per delay. Only applicable when splitEntries = true. - */ - public fun throttleEntries(throttleEntries: String) { - it.property("throttleEntries", throttleEntries) - } - - /** - * Sets whether all entries identified in a single feed poll should be delivered immediately. If - * true, only one entry is processed per delay. Only applicable when splitEntries = true. - */ - public fun throttleEntries(throttleEntries: Boolean) { - it.property("throttleEntries", throttleEntries.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Sets whether to add the feed object as a header. - */ - public fun feedHeader(feedHeader: String) { - it.property("feedHeader", feedHeader) - } - - /** - * Sets whether to add the feed object as a header. - */ - public fun feedHeader(feedHeader: Boolean) { - it.property("feedHeader", feedHeader.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AvroUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AvroUriDsl.kt deleted file mode 100644 index 17454b408884b..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AvroUriDsl.kt +++ /dev/null @@ -1,221 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Produce or consume Apache Avro RPC services. - */ -public fun UriDsl.avro(i: AvroUriDsl.() -> Unit) { - AvroUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AvroUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("avro") - } - - private var transport: String = "" - - private var port: String = "" - - private var host: String = "" - - private var messageName: String = "" - - /** - * Transport to use, can be either http or netty - */ - public fun transport(transport: String) { - this.transport = transport - it.url("$transport:$host:$port/$messageName") - } - - /** - * Port number to use - */ - public fun port(port: String) { - this.port = port - it.url("$transport:$host:$port/$messageName") - } - - /** - * Port number to use - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$transport:$host:$port/$messageName") - } - - /** - * Hostname to use - */ - public fun host(host: String) { - this.host = host - it.url("$transport:$host:$port/$messageName") - } - - /** - * The name of the message to send. - */ - public fun messageName(messageName: String) { - this.messageName = messageName - it.url("$transport:$host:$port/$messageName") - } - - /** - * Avro protocol to use - */ - public fun protocol(protocol: String) { - it.property("protocol", protocol) - } - - /** - * Avro protocol to use defined by the FQN class name - */ - public fun protocolClassName(protocolClassName: String) { - it.property("protocolClassName", protocolClassName) - } - - /** - * Avro protocol location - */ - public fun protocolLocation(protocolLocation: String) { - it.property("protocolLocation", protocolLocation) - } - - /** - * If the protocol object provided is reflection protocol. Should be used only with protocol - * parameter because for protocolClassName protocol type will be auto-detected - */ - public fun reflectionProtocol(reflectionProtocol: String) { - it.property("reflectionProtocol", reflectionProtocol) - } - - /** - * If the protocol object provided is reflection protocol. Should be used only with protocol - * parameter because for protocolClassName protocol type will be auto-detected - */ - public fun reflectionProtocol(reflectionProtocol: Boolean) { - it.property("reflectionProtocol", reflectionProtocol.toString()) - } - - /** - * If true, consumer parameter won't be wrapped into an array. Will fail if protocol specifies - * more than one parameter for the message - */ - public fun singleParameter(singleParameter: String) { - it.property("singleParameter", singleParameter) - } - - /** - * If true, consumer parameter won't be wrapped into an array. Will fail if protocol specifies - * more than one parameter for the message - */ - public fun singleParameter(singleParameter: Boolean) { - it.property("singleParameter", singleParameter.toString()) - } - - /** - * Authority to use (username and password) - */ - public fun uriAuthority(uriAuthority: String) { - it.property("uriAuthority", uriAuthority) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2AthenaUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2AthenaUriDsl.kt deleted file mode 100644 index 2634f7562ac0f..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2AthenaUriDsl.kt +++ /dev/null @@ -1,407 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Access AWS Athena. - */ -public fun UriDsl.`aws2-athena`(i: Aws2AthenaUriDsl.() -> Unit) { - Aws2AthenaUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2AthenaUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-athena") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * The Athena database to use. - */ - public fun database(database: String) { - it.property("database", database) - } - - /** - * Milliseconds before the next poll for query execution status. See the section Waiting for Query - * Completion and Retrying Failed Queries to learn more. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll for query execution status. See the section Waiting for Query - * Completion and Retrying Failed Queries to learn more. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * Milliseconds before the first poll for query execution status. See the section Waiting for - * Query Completion and Retrying Failed Queries to learn more. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll for query execution status. See the section Waiting for - * Query Completion and Retrying Failed Queries to learn more. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Maximum number of times to attempt a query. Set to 1 to disable retries. See the section - * Waiting for Query Completion and Retrying Failed Queries to learn more. - */ - public fun maxAttempts(maxAttempts: String) { - it.property("maxAttempts", maxAttempts) - } - - /** - * Maximum number of times to attempt a query. Set to 1 to disable retries. See the section - * Waiting for Query Completion and Retrying Failed Queries to learn more. - */ - public fun maxAttempts(maxAttempts: Int) { - it.property("maxAttempts", maxAttempts.toString()) - } - - /** - * Max number of results to return for the given operation (if supported by the Athena API - * endpoint). If not set, will use the Athena API default for the given operation. - */ - public fun maxResults(maxResults: String) { - it.property("maxResults", maxResults) - } - - /** - * Max number of results to return for the given operation (if supported by the Athena API - * endpoint). If not set, will use the Athena API default for the given operation. - */ - public fun maxResults(maxResults: Int) { - it.property("maxResults", maxResults.toString()) - } - - /** - * Pagination token to use in the case where the response from the previous request was truncated. - */ - public fun nextToken(nextToken: String) { - it.property("nextToken", nextToken) - } - - /** - * The Athena API function to call. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * The location in Amazon S3 where query results are stored, such as s3://path/to/query/bucket/. - * Ensure this value ends with a forward slash. - */ - public fun outputLocation(outputLocation: String) { - it.property("outputLocation", outputLocation) - } - - /** - * How query results should be returned. One of StreamList (default - return a - * GetQueryResultsIterable that can page through all results), SelectList (returns at most 1000 rows - * at a time, plus a NextToken value as a header than can be used for manual pagination of results), - * S3Pointer (return an S3 path pointing to the results). - */ - public fun outputType(outputType: String) { - it.property("outputType", outputType) - } - - /** - * The unique ID identifying the query execution. - */ - public fun queryExecutionId(queryExecutionId: String) { - it.property("queryExecutionId", queryExecutionId) - } - - /** - * The SQL query to run. Except for simple queries, prefer setting this as the body of the - * Exchange or as a header using Athena2Constants.QUERY_STRING to avoid having to deal with URL - * encoding issues. - */ - public fun queryString(queryString: String) { - it.property("queryString", queryString) - } - - /** - * The region in which Athena client needs to work. When using this parameter, the configuration - * will expect the lowercase name of the region (for example ap-east-1). - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Reset the waitTimeout countdown in the event of a query retry. If set to true, potential max - * time spent waiting for queries is equal to waitTimeout x maxAttempts. See the section Waiting for - * Query Completion and Retrying Failed Queries to learn more. - */ - public fun resetWaitTimeoutOnRetry(resetWaitTimeoutOnRetry: String) { - it.property("resetWaitTimeoutOnRetry", resetWaitTimeoutOnRetry) - } - - /** - * Reset the waitTimeout countdown in the event of a query retry. If set to true, potential max - * time spent waiting for queries is equal to waitTimeout x maxAttempts. See the section Waiting for - * Query Completion and Retrying Failed Queries to learn more. - */ - public fun resetWaitTimeoutOnRetry(resetWaitTimeoutOnRetry: Boolean) { - it.property("resetWaitTimeoutOnRetry", resetWaitTimeoutOnRetry.toString()) - } - - /** - * Optional comma separated list of error types to retry the query for. Use: 'retryable' to retry - * all retryable failure conditions (e.g. generic errors and resources exhausted), 'generic' to retry - * 'GENERIC_INTERNAL_ERROR' failures, 'exhausted' to retry queries that have exhausted resource - * limits, 'always' to always retry regardless of failure condition, or 'never' or null to never - * retry (default). See the section Waiting for Query Completion and Retrying Failed Queries to learn - * more. - */ - public fun retry(retry: String) { - it.property("retry", retry) - } - - /** - * Optional max wait time in millis to wait for a successful query completion. See the section - * Waiting for Query Completion and Retrying Failed Queries to learn more. - */ - public fun waitTimeout(waitTimeout: String) { - it.property("waitTimeout", waitTimeout) - } - - /** - * Optional max wait time in millis to wait for a successful query completion. See the section - * Waiting for Query Completion and Retrying Failed Queries to learn more. - */ - public fun waitTimeout(waitTimeout: Int) { - it.property("waitTimeout", waitTimeout.toString()) - } - - /** - * The workgroup to use for running the query. - */ - public fun workGroup(workGroup: String) { - it.property("workGroup", workGroup) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The AmazonAthena instance to use as the client. - */ - public fun amazonAthenaClient(amazonAthenaClient: String) { - it.property("amazonAthenaClient", amazonAthenaClient) - } - - /** - * A unique string to ensure issues queries are idempotent. It is unlikely you will need to set - * this. - */ - public fun clientRequestToken(clientRequestToken: String) { - it.property("clientRequestToken", clientRequestToken) - } - - /** - * Include useful trace information at the beginning of queries as an SQL comment (prefixed - * with --). - */ - public fun includeTrace(includeTrace: String) { - it.property("includeTrace", includeTrace) - } - - /** - * Include useful trace information at the beginning of queries as an SQL comment (prefixed - * with --). - */ - public fun includeTrace(includeTrace: Boolean) { - it.property("includeTrace", includeTrace.toString()) - } - - /** - * To define a proxy host when instantiating the Athena client. - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the Athena client. - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the Athena client. - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the Athena client. - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key. - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * The encryption type to use when storing query results in S3. One of SSE_S3, SSE_KMS, or - * CSE_KMS. - */ - public fun encryptionOption(encryptionOption: String) { - it.property("encryptionOption", encryptionOption) - } - - /** - * For SSE-KMS and CSE-KMS, this is the KMS key ARN or ID. - */ - public fun kmsKey(kmsKey: String) { - it.property("kmsKey", kmsKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key. - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * Set whether the Athena client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the Athena client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the Athena client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the Athena client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the Athena client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in Athena. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the Athena client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in Athena. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2CwUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2CwUriDsl.kt deleted file mode 100644 index bf94e44e43425..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2CwUriDsl.kt +++ /dev/null @@ -1,271 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Double -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Sending metrics to AWS CloudWatch. - */ -public fun UriDsl.`aws2-cw`(i: Aws2CwUriDsl.() -> Unit) { - Aws2CwUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2CwUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-cw") - } - - private var namespace: String = "" - - /** - * The metric namespace - */ - public fun namespace(namespace: String) { - this.namespace = namespace - it.url("$namespace") - } - - /** - * The metric name - */ - public fun name(name: String) { - it.property("name", name) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * The region in which CW client needs to work. When using this parameter, the configuration will - * expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * The metric timestamp - */ - public fun timestamp(timestamp: String) { - it.property("timestamp", timestamp) - } - - /** - * The metric unit - */ - public fun unit(unit: String) { - it.property("unit", unit) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * The metric value - */ - public fun `value`(`value`: String) { - it.property("value", value) - } - - /** - * The metric value - */ - public fun `value`(`value`: Double) { - it.property("value", value.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use the AmazonCloudWatch as the client - */ - public fun amazonCwClient(amazonCwClient: String) { - it.property("amazonCwClient", amazonCwClient) - } - - /** - * To define a proxy host when instantiating the CW client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the CW client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the CW client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the CW client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the S3 client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the S3 client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the Cloudwatch client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the Cloudwatch client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the CloudWatch client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in CloudWatch. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the CloudWatch client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in CloudWatch. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2DdbUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2DdbUriDsl.kt deleted file mode 100644 index 1194fb7ea08ad..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2DdbUriDsl.kt +++ /dev/null @@ -1,321 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Store and retrieve data from AWS DynamoDB. - */ -public fun UriDsl.`aws2-ddb`(i: Aws2DdbUriDsl.() -> Unit) { - Aws2DdbUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2DdbUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-ddb") - } - - private var tableName: String = "" - - /** - * The name of the table currently worked with. - */ - public fun tableName(tableName: String) { - this.tableName = tableName - it.url("$tableName") - } - - /** - * Determines whether strong consistency should be enforced when data is read. - */ - public fun consistentRead(consistentRead: String) { - it.property("consistentRead", consistentRead) - } - - /** - * Determines whether strong consistency should be enforced when data is read. - */ - public fun consistentRead(consistentRead: Boolean) { - it.property("consistentRead", consistentRead.toString()) - } - - /** - * Set whether the initial Describe table operation in the DDB Endpoint must be done, or not. - */ - public fun enabledInitialDescribeTable(enabledInitialDescribeTable: String) { - it.property("enabledInitialDescribeTable", enabledInitialDescribeTable) - } - - /** - * Set whether the initial Describe table operation in the DDB Endpoint must be done, or not. - */ - public fun enabledInitialDescribeTable(enabledInitialDescribeTable: Boolean) { - it.property("enabledInitialDescribeTable", enabledInitialDescribeTable.toString()) - } - - /** - * Attribute name when creating table - */ - public fun keyAttributeName(keyAttributeName: String) { - it.property("keyAttributeName", keyAttributeName) - } - - /** - * Attribute type when creating table - */ - public fun keyAttributeType(keyAttributeType: String) { - it.property("keyAttributeType", keyAttributeType) - } - - /** - * The key scalar type, it can be S (String), N (Number) and B (Bytes) - */ - public fun keyScalarType(keyScalarType: String) { - it.property("keyScalarType", keyScalarType) - } - - /** - * What operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * The provisioned throughput to reserve for reading resources from your table - */ - public fun readCapacity(readCapacity: String) { - it.property("readCapacity", readCapacity) - } - - /** - * The provisioned throughput to reserve for reading resources from your table - */ - public fun readCapacity(readCapacity: Int) { - it.property("readCapacity", readCapacity.toString()) - } - - /** - * The region in which DDB client needs to work - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * The provisioned throughput to reserved for writing resources to your table - */ - public fun writeCapacity(writeCapacity: String) { - it.property("writeCapacity", writeCapacity) - } - - /** - * The provisioned throughput to reserved for writing resources to your table - */ - public fun writeCapacity(writeCapacity: Int) { - it.property("writeCapacity", writeCapacity.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use the AmazonDynamoDB as the client - */ - public fun amazonDDBClient(amazonDDBClient: String) { - it.property("amazonDDBClient", amazonDDBClient) - } - - /** - * To define a proxy host when instantiating the DDB client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * The region in which DynamoDB client needs to work. When using this parameter, the configuration - * will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * The region in which DynamoDB client needs to work. When using this parameter, the configuration - * will expect the lowercase name of the region (for example ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the DDB client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume a IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the S3 client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the S3 client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the DDB client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the DDB client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the DDB client should expect to use Session Credentials. This is useful in - * situation in which the user needs to assume a IAM role for doing operations in DDB. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the DDB client should expect to use Session Credentials. This is useful in - * situation in which the user needs to assume a IAM role for doing operations in DDB. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2DdbstreamUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2DdbstreamUriDsl.kt deleted file mode 100644 index ba7eb20d5809e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2DdbstreamUriDsl.kt +++ /dev/null @@ -1,483 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Receive messages from AWS DynamoDB Stream. - */ -public fun UriDsl.`aws2-ddbstream`(i: Aws2DdbstreamUriDsl.() -> Unit) { - Aws2DdbstreamUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2DdbstreamUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-ddbstream") - } - - private var tableName: String = "" - - /** - * Name of the dynamodb table - */ - public fun tableName(tableName: String) { - this.tableName = tableName - it.url("$tableName") - } - - /** - * Maximum number of records that will be fetched in each poll - */ - public fun maxResultsPerRequest(maxResultsPerRequest: String) { - it.property("maxResultsPerRequest", maxResultsPerRequest) - } - - /** - * Maximum number of records that will be fetched in each poll - */ - public fun maxResultsPerRequest(maxResultsPerRequest: Int) { - it.property("maxResultsPerRequest", maxResultsPerRequest.toString()) - } - - /** - * Set the need for overidding the endpoint. This option needs to be used in combination with - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overidding the endpoint. This option needs to be used in combination with - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * The region in which DDBStreams client needs to work - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Defines where in the DynamoDB stream to start getting records. Note that using FROM_START can - * cause a significant delay before the stream has caught up to real-time. - */ - public fun streamIteratorType(streamIteratorType: String) { - it.property("streamIteratorType", streamIteratorType) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * Amazon DynamoDB client to use for all requests for this endpoint - */ - public fun amazonDynamoDbStreamsClient(amazonDynamoDbStreamsClient: String) { - it.property("amazonDynamoDbStreamsClient", amazonDynamoDbStreamsClient) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * To define a proxy host when instantiating the DDBStreams client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the DDBStreams client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the DDBStreams client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the DDBStreams client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider this parameter will set the profile name. - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume a IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the DynamoDB Streams client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the DynamoDB Streams client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the Cloudtrail client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the Cloudtrail client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the DDB Streams client should expect to use Session Credentials. This is useful in - * situation in which the user needs to assume a IAM role for doing operations in DDB. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the DDB Streams client should expect to use Session Credentials. This is useful in - * situation in which the user needs to assume a IAM role for doing operations in DDB. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2Ec2UriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2Ec2UriDsl.kt deleted file mode 100644 index 4d4f9ff41147a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2Ec2UriDsl.kt +++ /dev/null @@ -1,258 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage AWS EC2 instances. - */ -public fun UriDsl.`aws2-ec2`(i: Aws2Ec2UriDsl.() -> Unit) { - Aws2Ec2UriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2Ec2UriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-ec2") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * To use an existing configured AmazonEC2Client client - */ - public fun amazonEc2Client(amazonEc2Client: String) { - it.property("amazonEc2Client", amazonEc2Client) - } - - /** - * The operation to perform. It can be createAndRunInstances, startInstances, stopInstances, - * terminateInstances, describeInstances, describeInstancesStatus, rebootInstances, monitorInstances, - * unmonitorInstances, createTags or deleteTags - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * The region in which EC2 client needs to work. When using this parameter, the configuration will - * expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To define a proxy host when instantiating the EC2 client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the EC2 client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the EC2 client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the EC2 client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the EC2 client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the EC2 client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the EC2 client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the EC2 client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the EC2 client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in EC2. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the EC2 client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in EC2. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2EcsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2EcsUriDsl.kt deleted file mode 100644 index 91c348ae6d43f..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2EcsUriDsl.kt +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage AWS ECS cluster instances. - */ -public fun UriDsl.`aws2-ecs`(i: Aws2EcsUriDsl.() -> Unit) { - Aws2EcsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2EcsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-ecs") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * The operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * The region in which the ECS client needs to work. When using this parameter, the configuration - * will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing configured AWS ECS client - */ - public fun ecsClient(ecsClient: String) { - it.property("ecsClient", ecsClient) - } - - /** - * To define a proxy host when instantiating the ECS client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the ECS client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the ECS client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the ECS client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the ECS client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the ECS client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the ECS client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the ECS client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the ECS client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in ECS. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the ECS client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in ECS. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2EksUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2EksUriDsl.kt deleted file mode 100644 index d89175bd4a086..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2EksUriDsl.kt +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage AWS EKS cluster instances. - */ -public fun UriDsl.`aws2-eks`(i: Aws2EksUriDsl.() -> Unit) { - Aws2EksUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2EksUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-eks") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * The operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * The region in which EKS client needs to work. When using this parameter, the configuration will - * expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * Set whether the EKS client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the EKS client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the EKS client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the EKS client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing configured AWS EKS client - */ - public fun eksClient(eksClient: String) { - it.property("eksClient", eksClient) - } - - /** - * To define a proxy host when instantiating the EKS client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the EKS client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the EKS client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the EKS client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the EKS client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in EKS. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the EKS client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in EKS. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2EventbridgeUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2EventbridgeUriDsl.kt deleted file mode 100644 index 20c1fc1d4e844..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2EventbridgeUriDsl.kt +++ /dev/null @@ -1,263 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send events to AWS Eventbridge cluster instances. - */ -public fun UriDsl.`aws2-eventbridge`(i: Aws2EventbridgeUriDsl.() -> Unit) { - Aws2EventbridgeUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2EventbridgeUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-eventbridge") - } - - private var eventbusNameOrArn: String = "" - - /** - * Event bus name or ARN - */ - public fun eventbusNameOrArn(eventbusNameOrArn: String) { - this.eventbusNameOrArn = eventbusNameOrArn - it.url("//$eventbusNameOrArn") - } - - /** - * EventPattern File - */ - public fun eventPatternFile(eventPatternFile: String) { - it.property("eventPatternFile", eventPatternFile) - } - - /** - * The operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * The region in which the Eventbridge client needs to work. When using this parameter, the - * configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to - * use the name Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing configured AWS Eventbridge client - */ - public fun eventbridgeClient(eventbridgeClient: String) { - it.property("eventbridgeClient", eventbridgeClient) - } - - /** - * To define a proxy host when instantiating the Eventbridge client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the Eventbridge client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the Eventbridge client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the Eventbridge client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the Eventbridge client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the Eventbridge client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the Eventbridge client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the Eventbridge client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the Eventbridge client should expect to use Session Credentials. This is useful in - * a situation in which the user needs to assume an IAM role for doing operations in Eventbridge. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the Eventbridge client should expect to use Session Credentials. This is useful in - * a situation in which the user needs to assume an IAM role for doing operations in Eventbridge. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2IamUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2IamUriDsl.kt deleted file mode 100644 index 2ae572fdf8702..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2IamUriDsl.kt +++ /dev/null @@ -1,257 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage AWS IAM instances. - */ -public fun UriDsl.`aws2-iam`(i: Aws2IamUriDsl.() -> Unit) { - Aws2IamUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2IamUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-iam") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * To use an existing configured AWS IAM client - */ - public fun iamClient(iamClient: String) { - it.property("iamClient", iamClient) - } - - /** - * The operation to perform. You can configure a default operation on the component level, or the - * operation as part of the endpoint, or via a message header with the key CamelAwsIAMOperation. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * The region in which IAM client needs to work. When using this parameter, the configuration will - * expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To define a proxy host when instantiating the IAM client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the IAM client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the IAM client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the IAM client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the IAM client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the IAM client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the IAM client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the IAM client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the IAM client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume a IAM role for doing operations in IAM. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the IAM client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume a IAM role for doing operations in IAM. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2KinesisFirehoseUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2KinesisFirehoseUriDsl.kt deleted file mode 100644 index 29473836a2d5c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2KinesisFirehoseUriDsl.kt +++ /dev/null @@ -1,258 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Produce data to AWS Kinesis Firehose streams. - */ -public fun UriDsl.`aws2-kinesis-firehose`(i: Aws2KinesisFirehoseUriDsl.() -> Unit) { - Aws2KinesisFirehoseUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2KinesisFirehoseUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-kinesis-firehose") - } - - private var streamName: String = "" - - /** - * Name of the stream - */ - public fun streamName(streamName: String) { - this.streamName = streamName - it.url("$streamName") - } - - /** - * This option will set the CBOR_ENABLED property during the execution - */ - public fun cborEnabled(cborEnabled: String) { - it.property("cborEnabled", cborEnabled) - } - - /** - * This option will set the CBOR_ENABLED property during the execution - */ - public fun cborEnabled(cborEnabled: Boolean) { - it.property("cborEnabled", cborEnabled.toString()) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * The operation to do in case the user don't want to send only a record - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * The region in which Kinesis Firehose client needs to work. When using this parameter, the - * configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to - * use the name Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set whether the Kinesis Firehose client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the Kinesis Firehose client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Amazon Kinesis Firehose client to use for all requests for this endpoint - */ - public fun amazonKinesisFirehoseClient(amazonKinesisFirehoseClient: String) { - it.property("amazonKinesisFirehoseClient", amazonKinesisFirehoseClient) - } - - /** - * To define a proxy host when instantiating the Kinesis Firehose client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the Kinesis Firehose client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the Kinesis Firehose client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the Kinesis Firehose client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider this parameter will set the profile name. - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume a IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the Kinesis Firehose client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the Kinesis Firehose client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the Kinesis Firehose client should expect to use Session Credentials. This is - * useful in situation in which the user needs to assume a IAM role for doing operations in Kinesis - * Firehose. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the Kinesis Firehose client should expect to use Session Credentials. This is - * useful in situation in which the user needs to assume a IAM role for doing operations in Kinesis - * Firehose. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2KinesisUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2KinesisUriDsl.kt deleted file mode 100644 index 2a221fc441cba..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2KinesisUriDsl.kt +++ /dev/null @@ -1,603 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Consume and produce records from and to AWS Kinesis Streams. - */ -public fun UriDsl.`aws2-kinesis`(i: Aws2KinesisUriDsl.() -> Unit) { - Aws2KinesisUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2KinesisUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-kinesis") - } - - private var streamName: String = "" - - /** - * Name of the stream - */ - public fun streamName(streamName: String) { - this.streamName = streamName - it.url("$streamName") - } - - /** - * This option will set the CBOR_ENABLED property during the execution - */ - public fun cborEnabled(cborEnabled: String) { - it.property("cborEnabled", cborEnabled) - } - - /** - * This option will set the CBOR_ENABLED property during the execution - */ - public fun cborEnabled(cborEnabled: Boolean) { - it.property("cborEnabled", cborEnabled.toString()) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * The region in which Kinesis Firehose client needs to work. When using this parameter, the - * configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to - * use the name Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * Defines where in the Kinesis stream to start getting records - */ - public fun iteratorType(iteratorType: String) { - it.property("iteratorType", iteratorType) - } - - /** - * Maximum number of records that will be fetched in each poll - */ - public fun maxResultsPerRequest(maxResultsPerRequest: String) { - it.property("maxResultsPerRequest", maxResultsPerRequest) - } - - /** - * Maximum number of records that will be fetched in each poll - */ - public fun maxResultsPerRequest(maxResultsPerRequest: Int) { - it.property("maxResultsPerRequest", maxResultsPerRequest.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * The sequence number to start polling from. Required if iteratorType is set to - * AFTER_SEQUENCE_NUMBER or AT_SEQUENCE_NUMBER - */ - public fun sequenceNumber(sequenceNumber: String) { - it.property("sequenceNumber", sequenceNumber) - } - - /** - * Define what will be the behavior in case of shard closed. Possible value are ignore, silent and - * fail. In case of ignore a WARN message will be logged once and the consumer will not process new - * messages until restarted,in case of silent there will be no logging and the consumer will not - * process new messages until restarted,in case of fail a ReachedClosedStateException will be thrown - */ - public fun shardClosed(shardClosed: String) { - it.property("shardClosed", shardClosed) - } - - /** - * Defines which shardId in the Kinesis stream to get records from - */ - public fun shardId(shardId: String) { - it.property("shardId", shardId) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * The interval in milliseconds to wait between shard polling - */ - public fun shardMonitorInterval(shardMonitorInterval: String) { - it.property("shardMonitorInterval", shardMonitorInterval) - } - - /** - * The interval in milliseconds to wait between shard polling - */ - public fun shardMonitorInterval(shardMonitorInterval: Int) { - it.property("shardMonitorInterval", shardMonitorInterval.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Amazon Kinesis client to use for all requests for this endpoint - */ - public fun amazonKinesisClient(amazonKinesisClient: String) { - it.property("amazonKinesisClient", amazonKinesisClient) - } - - /** - * If we want to a KinesisAsyncClient instance set it to true - */ - public fun asyncClient(asyncClient: String) { - it.property("asyncClient", asyncClient) - } - - /** - * If we want to a KinesisAsyncClient instance set it to true - */ - public fun asyncClient(asyncClient: Boolean) { - it.property("asyncClient", asyncClient.toString()) - } - - /** - * If we want to a KCL Consumer, we can pass an instance of CloudWatchAsyncClient - */ - public fun cloudWatchAsyncClient(cloudWatchAsyncClient: String) { - it.property("cloudWatchAsyncClient", cloudWatchAsyncClient) - } - - /** - * If we want to a KCL Consumer, we can pass an instance of DynamoDbAsyncClient - */ - public fun dynamoDbAsyncClient(dynamoDbAsyncClient: String) { - it.property("dynamoDbAsyncClient", dynamoDbAsyncClient) - } - - /** - * If we want to a KCL Consumer set it to true - */ - public fun useKclConsumers(useKclConsumers: String) { - it.property("useKclConsumers", useKclConsumers) - } - - /** - * If we want to a KCL Consumer set it to true - */ - public fun useKclConsumers(useKclConsumers: Boolean) { - it.property("useKclConsumers", useKclConsumers.toString()) - } - - /** - * To define a proxy host when instantiating the Kinesis client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the Kinesis client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the Kinesis client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the Kinesis client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider this parameter will set the profile name. - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume a IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the Kinesis client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the Kinesis client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the Kinesis client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the Kinesis client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the Kinesis client should expect to use Session Credentials. This is useful in - * situation in which the user needs to assume a IAM role for doing operations in Kinesis. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the Kinesis client should expect to use Session Credentials. This is useful in - * situation in which the user needs to assume a IAM role for doing operations in Kinesis. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2KmsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2KmsUriDsl.kt deleted file mode 100644 index faabd166453cb..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2KmsUriDsl.kt +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage keys stored in AWS KMS instances. - */ -public fun UriDsl.`aws2-kms`(i: Aws2KmsUriDsl.() -> Unit) { - Aws2KmsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2KmsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-kms") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * The operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * The region in which EKS client needs to work. When using this parameter, the configuration will - * expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing configured AWS KMS client - */ - public fun kmsClient(kmsClient: String) { - it.property("kmsClient", kmsClient) - } - - /** - * To define a proxy host when instantiating the KMS client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the KMS client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the KMS client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the KMS client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the KMS client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the KMS client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the KMS client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the KMS client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the KMS client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume a IAM role for doing operations in KMS. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the KMS client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume a IAM role for doing operations in KMS. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2LambdaUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2LambdaUriDsl.kt deleted file mode 100644 index bceb1f728a288..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2LambdaUriDsl.kt +++ /dev/null @@ -1,257 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage and invoke AWS Lambda functions. - */ -public fun UriDsl.`aws2-lambda`(i: Aws2LambdaUriDsl.() -> Unit) { - Aws2LambdaUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2LambdaUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-lambda") - } - - private var function: String = "" - - /** - * Name of the Lambda function. - */ - public fun function(function: String) { - this.function = function - it.url("$function") - } - - /** - * The operation to perform. It can be listFunctions, getFunction, createFunction, deleteFunction - * or invokeFunction - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * The region in which the Lambda client needs to work. When using this parameter, the - * configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to - * use the name Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing configured AwsLambdaClient client - */ - public fun awsLambdaClient(awsLambdaClient: String) { - it.property("awsLambdaClient", awsLambdaClient) - } - - /** - * To define a proxy host when instantiating the Lambda client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the Lambda client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the Lambda client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the Lambda client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the Lambda client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the Lambda client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the Lambda client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the Lambda client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the Lambda client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in Lambda. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the Lambda client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in Lambda. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2MqUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2MqUriDsl.kt deleted file mode 100644 index 616689a745258..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2MqUriDsl.kt +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send messages to AWS MQ. - */ -public fun UriDsl.`aws2-mq`(i: Aws2MqUriDsl.() -> Unit) { - Aws2MqUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2MqUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-mq") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * The operation to perform. It can be listBrokers, createBroker, deleteBroker - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * The region in which MQ client needs to work. When using this parameter, the configuration will - * expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use a existing configured AmazonMQClient client - */ - public fun amazonMqClient(amazonMqClient: String) { - it.property("amazonMqClient", amazonMqClient) - } - - /** - * To define a proxy host when instantiating the MQ client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the MQ client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the MQ client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the MQ client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the MQ client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the MQ client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the MQ client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the MQ client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the MQ client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in MQ. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the MQ client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in MQ. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2MskUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2MskUriDsl.kt deleted file mode 100644 index ce7d10889a53c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2MskUriDsl.kt +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage AWS MSK instances. - */ -public fun UriDsl.`aws2-msk`(i: Aws2MskUriDsl.() -> Unit) { - Aws2MskUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2MskUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-msk") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * The operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * The region in which the MSK client needs to work. When using this parameter, the configuration - * will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing configured AWS MSK client - */ - public fun mskClient(mskClient: String) { - it.property("mskClient", mskClient) - } - - /** - * To define a proxy host when instantiating the MSK client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the MSK client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the MSK client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the MSK client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the Kafka client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the Kafka client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the MSK client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the MSK client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the MSK client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in MSK. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the MSK client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in MSK. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2RedshiftDataUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2RedshiftDataUriDsl.kt deleted file mode 100644 index 6272b372af389..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2RedshiftDataUriDsl.kt +++ /dev/null @@ -1,258 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on AWS Redshift using Redshift Data API. - */ -public fun UriDsl.`aws2-redshift-data`(i: Aws2RedshiftDataUriDsl.() -> Unit) { - Aws2RedshiftDataUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2RedshiftDataUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-redshift-data") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * The operation to perform. It can be batchExecuteStatement, cancelStatement, describeStatement, - * describeTable, executeStatement, getStatementResult, listDatabases, listSchemas, listStatements or - * listTables - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * The region in which RedshiftData client needs to work. When using this parameter, the - * configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to - * use the name Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * Set whether the RedshiftData client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the RedshiftData client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the RedshiftData client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the RedshiftData client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing configured AwsRedshiftDataClient client - */ - public fun awsRedshiftDataClient(awsRedshiftDataClient: String) { - it.property("awsRedshiftDataClient", awsRedshiftDataClient) - } - - /** - * To define a proxy host when instantiating the RedshiftData client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the RedshiftData client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the RedshiftData client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the RedshiftData client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * Set whether the Redshift client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in Redshift. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the Redshift client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in Redshift. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2S3UriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2S3UriDsl.kt deleted file mode 100644 index 1dfdde0cbf977..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2S3UriDsl.kt +++ /dev/null @@ -1,989 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Store and retrieve objects from AWS S3 Storage Service. - */ -public fun UriDsl.`aws2-s3`(i: Aws2S3UriDsl.() -> Unit) { - Aws2S3UriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2S3UriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-s3") - } - - private var bucketNameOrArn: String = "" - - /** - * Bucket name or ARN - */ - public fun bucketNameOrArn(bucketNameOrArn: String) { - this.bucketNameOrArn = bucketNameOrArn - it.url("//$bucketNameOrArn") - } - - /** - * Setting the autocreation of the S3 bucket bucketName. This will apply also in case of - * moveAfterRead option enabled, and it will create the destinationBucket if it doesn't exist - * already. - */ - public fun autoCreateBucket(autoCreateBucket: String) { - it.property("autoCreateBucket", autoCreateBucket) - } - - /** - * Setting the autocreation of the S3 bucket bucketName. This will apply also in case of - * moveAfterRead option enabled, and it will create the destinationBucket if it doesn't exist - * already. - */ - public fun autoCreateBucket(autoCreateBucket: Boolean) { - it.property("autoCreateBucket", autoCreateBucket.toString()) - } - - /** - * The delimiter which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only - * consume objects we are interested in. - */ - public fun delimiter(delimiter: String) { - it.property("delimiter", delimiter) - } - - /** - * Set whether the S3 client should use path-style URL instead of virtual-hosted-style - */ - public fun forcePathStyle(forcePathStyle: String) { - it.property("forcePathStyle", forcePathStyle) - } - - /** - * Set whether the S3 client should use path-style URL instead of virtual-hosted-style - */ - public fun forcePathStyle(forcePathStyle: Boolean) { - it.property("forcePathStyle", forcePathStyle.toString()) - } - - /** - * If it is true, the S3 Object Body will be ignored completely if it is set to false, the S3 - * Object will be put in the body. Setting this to true will override any behavior defined by - * includeBody option. - */ - public fun ignoreBody(ignoreBody: String) { - it.property("ignoreBody", ignoreBody) - } - - /** - * If it is true, the S3 Object Body will be ignored completely if it is set to false, the S3 - * Object will be put in the body. Setting this to true will override any behavior defined by - * includeBody option. - */ - public fun ignoreBody(ignoreBody: Boolean) { - it.property("ignoreBody", ignoreBody.toString()) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * The policy for this queue to set in the com.amazonaws.services.s3.AmazonS3#setBucketPolicy() - * method. - */ - public fun policy(policy: String) { - it.property("policy", policy) - } - - /** - * The prefix which is used in the com.amazonaws.services.s3.model.ListObjectsRequest to only - * consume objects we are interested in. - */ - public fun prefix(prefix: String) { - it.property("prefix", prefix) - } - - /** - * The region in which the S3 client needs to work. When using this parameter, the configuration - * will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * Define the customer algorithm to use in case CustomerKey is enabled - */ - public fun customerAlgorithm(customerAlgorithm: String) { - it.property("customerAlgorithm", customerAlgorithm) - } - - /** - * Define the id of the Customer key to use in case CustomerKey is enabled - */ - public fun customerKeyId(customerKeyId: String) { - it.property("customerKeyId", customerKeyId) - } - - /** - * Define the MD5 of Customer key to use in case CustomerKey is enabled - */ - public fun customerKeyMD5(customerKeyMD5: String) { - it.property("customerKeyMD5", customerKeyMD5) - } - - /** - * Delete objects from S3 after they have been retrieved. The deleting is only performed if the - * Exchange is committed. If a rollback occurs, the object is not deleted. If this option is false, - * then the same objects will be retrieved over and over again in the polls. Therefore, you need to - * use the Idempotent Consumer EIP in the route to filter out duplicates. You can filter using the - * AWS2S3Constants#BUCKET_NAME and AWS2S3Constants#KEY headers, or only the AWS2S3Constants#KEY - * header. - */ - public fun deleteAfterRead(deleteAfterRead: String) { - it.property("deleteAfterRead", deleteAfterRead) - } - - /** - * Delete objects from S3 after they have been retrieved. The deleting is only performed if the - * Exchange is committed. If a rollback occurs, the object is not deleted. If this option is false, - * then the same objects will be retrieved over and over again in the polls. Therefore, you need to - * use the Idempotent Consumer EIP in the route to filter out duplicates. You can filter using the - * AWS2S3Constants#BUCKET_NAME and AWS2S3Constants#KEY headers, or only the AWS2S3Constants#KEY - * header. - */ - public fun deleteAfterRead(deleteAfterRead: Boolean) { - it.property("deleteAfterRead", deleteAfterRead.toString()) - } - - /** - * Define the destination bucket where an object must be moved when moveAfterRead is set to true. - */ - public fun destinationBucket(destinationBucket: String) { - it.property("destinationBucket", destinationBucket) - } - - /** - * Define the destination bucket prefix to use when an object must be moved, and moveAfterRead is - * set to true. - */ - public fun destinationBucketPrefix(destinationBucketPrefix: String) { - it.property("destinationBucketPrefix", destinationBucketPrefix) - } - - /** - * Define the destination bucket suffix to use when an object must be moved, and moveAfterRead is - * set to true. - */ - public fun destinationBucketSuffix(destinationBucketSuffix: String) { - it.property("destinationBucketSuffix", destinationBucketSuffix) - } - - /** - * If provided, Camel will only consume files if a done file exists. - */ - public fun doneFileName(doneFileName: String) { - it.property("doneFileName", doneFileName) - } - - /** - * To get the object from the bucket with the given file name - */ - public fun fileName(fileName: String) { - it.property("fileName", fileName) - } - - /** - * If it is true, the S3Object exchange will be consumed and put into the body and closed. If - * false, the S3Object stream will be put raw into the body and the headers will be set with the S3 - * object metadata. This option is strongly related to the autocloseBody option. In case of setting - * includeBody to true because the S3Object stream will be consumed then it will also be closed, - * while in case of includeBody false then it will be up to the caller to close the S3Object stream. - * However, setting autocloseBody to true when includeBody is false it will schedule to close the - * S3Object stream automatically on exchange completion. - */ - public fun includeBody(includeBody: String) { - it.property("includeBody", includeBody) - } - - /** - * If it is true, the S3Object exchange will be consumed and put into the body and closed. If - * false, the S3Object stream will be put raw into the body and the headers will be set with the S3 - * object metadata. This option is strongly related to the autocloseBody option. In case of setting - * includeBody to true because the S3Object stream will be consumed then it will also be closed, - * while in case of includeBody false then it will be up to the caller to close the S3Object stream. - * However, setting autocloseBody to true when includeBody is false it will schedule to close the - * S3Object stream automatically on exchange completion. - */ - public fun includeBody(includeBody: Boolean) { - it.property("includeBody", includeBody.toString()) - } - - /** - * If it is true, the folders/directories will be consumed. If it is false, they will be ignored, - * and Exchanges will not be created for those - */ - public fun includeFolders(includeFolders: String) { - it.property("includeFolders", includeFolders) - } - - /** - * If it is true, the folders/directories will be consumed. If it is false, they will be ignored, - * and Exchanges will not be created for those - */ - public fun includeFolders(includeFolders: Boolean) { - it.property("includeFolders", includeFolders.toString()) - } - - /** - * Set the maxConnections parameter in the S3 client configuration - */ - public fun maxConnections(maxConnections: String) { - it.property("maxConnections", maxConnections) - } - - /** - * Set the maxConnections parameter in the S3 client configuration - */ - public fun maxConnections(maxConnections: Int) { - it.property("maxConnections", maxConnections.toString()) - } - - /** - * Gets the maximum number of messages as a limit to poll at each polling. Gets the maximum number - * of messages as a limit to poll at each polling. The default value is 10. Use 0 or a negative - * number to set it as unlimited. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * Gets the maximum number of messages as a limit to poll at each polling. Gets the maximum number - * of messages as a limit to poll at each polling. The default value is 10. Use 0 or a negative - * number to set it as unlimited. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * Move objects from S3 bucket to a different bucket after they have been retrieved. To accomplish - * the operation, the destinationBucket option must be set. The copy bucket operation is only - * performed if the Exchange is committed. If a rollback occurs, the object is not moved. - */ - public fun moveAfterRead(moveAfterRead: String) { - it.property("moveAfterRead", moveAfterRead) - } - - /** - * Move objects from S3 bucket to a different bucket after they have been retrieved. To accomplish - * the operation, the destinationBucket option must be set. The copy bucket operation is only - * performed if the Exchange is committed. If a rollback occurs, the object is not moved. - */ - public fun moveAfterRead(moveAfterRead: Boolean) { - it.property("moveAfterRead", moveAfterRead.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * If this option is true and includeBody is false, then the S3Object.close() method will be - * called on exchange completion. This option is strongly related to includeBody option. In case of - * setting includeBody to false and autocloseBody to false, it will be up to the caller to close the - * S3Object stream. Setting autocloseBody to true, will close the S3Object stream automatically. - */ - public fun autocloseBody(autocloseBody: String) { - it.property("autocloseBody", autocloseBody) - } - - /** - * If this option is true and includeBody is false, then the S3Object.close() method will be - * called on exchange completion. This option is strongly related to includeBody option. In case of - * setting includeBody to false and autocloseBody to false, it will be up to the caller to close the - * S3Object stream. Setting autocloseBody to true, will close the S3Object stream automatically. - */ - public fun autocloseBody(autocloseBody: Boolean) { - it.property("autocloseBody", autocloseBody.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable in-progress repository org.apache.camel.spi.IdempotentRepository. The in-progress - * repository is used to account the current in progress files being consumed. By default a memory - * based repository is used. - */ - public fun inProgressRepository(inProgressRepository: String) { - it.property("inProgressRepository", inProgressRepository) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * The number of messages composing a batch in streaming upload mode - */ - public fun batchMessageNumber(batchMessageNumber: String) { - it.property("batchMessageNumber", batchMessageNumber) - } - - /** - * The number of messages composing a batch in streaming upload mode - */ - public fun batchMessageNumber(batchMessageNumber: Int) { - it.property("batchMessageNumber", batchMessageNumber.toString()) - } - - /** - * The batch size (in bytes) in streaming upload mode - */ - public fun batchSize(batchSize: String) { - it.property("batchSize", batchSize) - } - - /** - * The batch size (in bytes) in streaming upload mode - */ - public fun batchSize(batchSize: Int) { - it.property("batchSize", batchSize.toString()) - } - - /** - * The buffer size (in bytes) in streaming upload mode - */ - public fun bufferSize(bufferSize: String) { - it.property("bufferSize", bufferSize) - } - - /** - * The buffer size (in bytes) in streaming upload mode - */ - public fun bufferSize(bufferSize: Int) { - it.property("bufferSize", bufferSize.toString()) - } - - /** - * Delete file object after the S3 file has been uploaded - */ - public fun deleteAfterWrite(deleteAfterWrite: String) { - it.property("deleteAfterWrite", deleteAfterWrite) - } - - /** - * Delete file object after the S3 file has been uploaded - */ - public fun deleteAfterWrite(deleteAfterWrite: Boolean) { - it.property("deleteAfterWrite", deleteAfterWrite.toString()) - } - - /** - * Setting the key name for an element in the bucket through endpoint parameter - */ - public fun keyName(keyName: String) { - it.property("keyName", keyName) - } - - /** - * If it is true, camel will upload the file with multipart format. The part size is decided by - * the partSize option. Camel will only do multipart uploads for files that are larger than the - * part-size thresholds. Files that are smaller will be uploaded in a single operation. - */ - public fun multiPartUpload(multiPartUpload: String) { - it.property("multiPartUpload", multiPartUpload) - } - - /** - * If it is true, camel will upload the file with multipart format. The part size is decided by - * the partSize option. Camel will only do multipart uploads for files that are larger than the - * part-size thresholds. Files that are smaller will be uploaded in a single operation. - */ - public fun multiPartUpload(multiPartUpload: Boolean) { - it.property("multiPartUpload", multiPartUpload.toString()) - } - - /** - * The naming strategy to use in streaming upload mode - */ - public fun namingStrategy(namingStrategy: String) { - it.property("namingStrategy", namingStrategy) - } - - /** - * The operation to do in case the user don't want to do only an upload - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set up the partSize which is used in multipart upload, the default size is 25M. Camel will only - * do multipart uploads for files that are larger than the part-size thresholds. Files that are - * smaller will be uploaded in a single operation. - */ - public fun partSize(partSize: String) { - it.property("partSize", partSize) - } - - /** - * Set up the partSize which is used in multipart upload, the default size is 25M. Camel will only - * do multipart uploads for files that are larger than the part-size thresholds. Files that are - * smaller will be uploaded in a single operation. - */ - public fun partSize(partSize: Int) { - it.property("partSize", partSize.toString()) - } - - /** - * The restarting policy to use in streaming upload mode - */ - public fun restartingPolicy(restartingPolicy: String) { - it.property("restartingPolicy", restartingPolicy) - } - - /** - * The storage class to set in the com.amazonaws.services.s3.model.PutObjectRequest request. - */ - public fun storageClass(storageClass: String) { - it.property("storageClass", storageClass) - } - - /** - * When stream mode is true, the upload to bucket will be done in streaming - */ - public fun streamingUploadMode(streamingUploadMode: String) { - it.property("streamingUploadMode", streamingUploadMode) - } - - /** - * When stream mode is true, the upload to bucket will be done in streaming - */ - public fun streamingUploadMode(streamingUploadMode: Boolean) { - it.property("streamingUploadMode", streamingUploadMode.toString()) - } - - /** - * While streaming upload mode is true, this option set the timeout to complete upload - */ - public fun streamingUploadTimeout(streamingUploadTimeout: String) { - it.property("streamingUploadTimeout", streamingUploadTimeout) - } - - /** - * While streaming upload mode is true, this option set the timeout to complete upload - */ - public fun streamingUploadTimeout(streamingUploadTimeout: Int) { - it.property("streamingUploadTimeout", streamingUploadTimeout.toString()) - } - - /** - * Define the id of KMS key to use in case KMS is enabled - */ - public fun awsKMSKeyId(awsKMSKeyId: String) { - it.property("awsKMSKeyId", awsKMSKeyId) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Define if KMS must be used or not - */ - public fun useAwsKMS(useAwsKMS: String) { - it.property("useAwsKMS", useAwsKMS) - } - - /** - * Define if KMS must be used or not - */ - public fun useAwsKMS(useAwsKMS: Boolean) { - it.property("useAwsKMS", useAwsKMS.toString()) - } - - /** - * Define if Customer Key must be used or not - */ - public fun useCustomerKey(useCustomerKey: String) { - it.property("useCustomerKey", useCustomerKey) - } - - /** - * Define if Customer Key must be used or not - */ - public fun useCustomerKey(useCustomerKey: Boolean) { - it.property("useCustomerKey", useCustomerKey.toString()) - } - - /** - * Define if SSE S3 must be used or not - */ - public fun useSSES3(useSSES3: String) { - it.property("useSSES3", useSSES3) - } - - /** - * Define if SSE S3 must be used or not - */ - public fun useSSES3(useSSES3: Boolean) { - it.property("useSSES3", useSSES3.toString()) - } - - /** - * Reference to a com.amazonaws.services.s3.AmazonS3 in the registry. - */ - public fun amazonS3Client(amazonS3Client: String) { - it.property("amazonS3Client", amazonS3Client) - } - - /** - * An S3 Presigner for Request, used mainly in createDownloadLink operation - */ - public fun amazonS3Presigner(amazonS3Presigner: String) { - it.property("amazonS3Presigner", amazonS3Presigner) - } - - /** - * To define a proxy host when instantiating the SQS client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * Specify a proxy port to be used inside the client definition. - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * Specify a proxy port to be used inside the client definition. - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the S3 client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the S3 client should expect to load credentials through a default credentials - * provider. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the S3 client should expect to load credentials through a default credentials - * provider. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the S3 client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the S3 client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the S3 client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in S3. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the S3 client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in S3. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2SesUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2SesUriDsl.kt deleted file mode 100644 index 602ee7c065dd3..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2SesUriDsl.kt +++ /dev/null @@ -1,290 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send e-mails through AWS SES service. - */ -public fun UriDsl.`aws2-ses`(i: Aws2SesUriDsl.() -> Unit) { - Aws2SesUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2SesUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-ses") - } - - private var from: String = "" - - /** - * The sender's email address. - */ - public fun from(from: String) { - this.from = from - it.url("$from") - } - - /** - * List of comma-separated destination blind carbon copy (bcc) email address. Can be overridden - * with 'CamelAwsSesBcc' header. - */ - public fun bcc(bcc: String) { - it.property("bcc", bcc) - } - - /** - * List of comma-separated destination carbon copy (cc) email address. Can be overridden with - * 'CamelAwsSesCc' header. - */ - public fun cc(cc: String) { - it.property("cc", cc) - } - - /** - * Set the configuration set to send with every request. Override it with - * 'CamelAwsSesConfigurationSet' header. - */ - public fun configurationSet(configurationSet: String) { - it.property("configurationSet", configurationSet) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * The region in which SES client needs to work. When using this parameter, the configuration will - * expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * List of comma separated reply-to email address(es) for the message, override it using - * 'CamelAwsSesReplyToAddresses' header. - */ - public fun replyToAddresses(replyToAddresses: String) { - it.property("replyToAddresses", replyToAddresses) - } - - /** - * The email address to which bounce notifications are to be forwarded, override it using - * 'CamelAwsSesReturnPath' header. - */ - public fun returnPath(returnPath: String) { - it.property("returnPath", returnPath) - } - - /** - * The subject which is used if the message header 'CamelAwsSesSubject' is not present. - */ - public fun subject(subject: String) { - it.property("subject", subject) - } - - /** - * List of comma separated destination email address. Can be overridden with 'CamelAwsSesTo' - * header. - */ - public fun to(to: String) { - it.property("to", to) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use the AmazonSimpleEmailService as the client - */ - public fun amazonSESClient(amazonSESClient: String) { - it.property("amazonSESClient", amazonSESClient) - } - - /** - * To define a proxy host when instantiating the SES client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the SES client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the SES client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the SES client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the Ses client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the Ses client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the SES client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the SES client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the SES client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in SES. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the SES client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in SES. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2SnsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2SnsUriDsl.kt deleted file mode 100644 index 1e5f404b581a3..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2SnsUriDsl.kt +++ /dev/null @@ -1,338 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send messages to AWS Simple Notification Topic. - */ -public fun UriDsl.`aws2-sns`(i: Aws2SnsUriDsl.() -> Unit) { - Aws2SnsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2SnsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-sns") - } - - private var topicNameOrArn: String = "" - - /** - * Topic name or ARN - */ - public fun topicNameOrArn(topicNameOrArn: String) { - this.topicNameOrArn = topicNameOrArn - it.url("$topicNameOrArn") - } - - /** - * Setting the auto-creation of the topic - */ - public fun autoCreateTopic(autoCreateTopic: String) { - it.property("autoCreateTopic", autoCreateTopic) - } - - /** - * Setting the auto-creation of the topic - */ - public fun autoCreateTopic(autoCreateTopic: Boolean) { - it.property("autoCreateTopic", autoCreateTopic.toString()) - } - - /** - * To use a custom HeaderFilterStrategy to map headers to/from Camel. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * The ID of an AWS-managed customer master key (CMK) for Amazon SNS or a custom CMK. - */ - public fun kmsMasterKeyId(kmsMasterKeyId: String) { - it.property("kmsMasterKeyId", kmsMasterKeyId) - } - - /** - * Only for FIFO Topic. Strategy for setting the messageDeduplicationId on the message. It can be - * one of the following options: useExchangeId, useContentBasedDeduplication. For the - * useContentBasedDeduplication option, no messageDeduplicationId will be set on the message. - */ - public fun messageDeduplicationIdStrategy(messageDeduplicationIdStrategy: String) { - it.property("messageDeduplicationIdStrategy", messageDeduplicationIdStrategy) - } - - /** - * Only for FIFO Topic. Strategy for setting the messageGroupId on the message. It can be one of - * the following options: useConstant, useExchangeId, usePropertyValue. For the usePropertyValue - * option, the value of property CamelAwsSnsMessageGroupId will be used. - */ - public fun messageGroupIdStrategy(messageGroupIdStrategy: String) { - it.property("messageGroupIdStrategy", messageGroupIdStrategy) - } - - /** - * The message structure to use such as json - */ - public fun messageStructure(messageStructure: String) { - it.property("messageStructure", messageStructure) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * The policy for this topic. Is loaded by default from classpath, but you can prefix with - * classpath:, file:, or http: to load the resource from different systems. - */ - public fun policy(policy: String) { - it.property("policy", policy) - } - - /** - * The ARN endpoint to subscribe to - */ - public fun queueArn(queueArn: String) { - it.property("queueArn", queueArn) - } - - /** - * The region in which the SNS client needs to work. When using this parameter, the configuration - * will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Define if Server Side Encryption is enabled or not on the topic - */ - public fun serverSideEncryptionEnabled(serverSideEncryptionEnabled: String) { - it.property("serverSideEncryptionEnabled", serverSideEncryptionEnabled) - } - - /** - * Define if Server Side Encryption is enabled or not on the topic - */ - public fun serverSideEncryptionEnabled(serverSideEncryptionEnabled: Boolean) { - it.property("serverSideEncryptionEnabled", serverSideEncryptionEnabled.toString()) - } - - /** - * The subject which is used if the message header 'CamelAwsSnsSubject' is not present. - */ - public fun subject(subject: String) { - it.property("subject", subject) - } - - /** - * Define if the subscription between SNS Topic and SQS must be done or not - */ - public fun subscribeSNStoSQS(subscribeSNStoSQS: String) { - it.property("subscribeSNStoSQS", subscribeSNStoSQS) - } - - /** - * Define if the subscription between SNS Topic and SQS must be done or not - */ - public fun subscribeSNStoSQS(subscribeSNStoSQS: Boolean) { - it.property("subscribeSNStoSQS", subscribeSNStoSQS.toString()) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use the AmazonSNS as the client - */ - public fun amazonSNSClient(amazonSNSClient: String) { - it.property("amazonSNSClient", amazonSNSClient) - } - - /** - * To define a proxy host when instantiating the SNS client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the SNS client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the SNS client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the SNS client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the SNS client should expect to load credentials on an AWS infra instance or to - * expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the SNS client should expect to load credentials on an AWS infra instance or to - * expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the SNS client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the SNS client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the SNS client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in SNS. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the SNS client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in SNS. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2SqsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2SqsUriDsl.kt deleted file mode 100644 index d905491328e16..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2SqsUriDsl.kt +++ /dev/null @@ -1,878 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from AWS SQS. - */ -public fun UriDsl.`aws2-sqs`(i: Aws2SqsUriDsl.() -> Unit) { - Aws2SqsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2SqsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-sqs") - } - - private var queueNameOrArn: String = "" - - /** - * Queue name or ARN - */ - public fun queueNameOrArn(queueNameOrArn: String) { - this.queueNameOrArn = queueNameOrArn - it.url("$queueNameOrArn") - } - - /** - * The hostname of the Amazon AWS cloud. - */ - public fun amazonAWSHost(amazonAWSHost: String) { - it.property("amazonAWSHost", amazonAWSHost) - } - - /** - * Setting the auto-creation of the queue - */ - public fun autoCreateQueue(autoCreateQueue: String) { - it.property("autoCreateQueue", autoCreateQueue) - } - - /** - * Setting the auto-creation of the queue - */ - public fun autoCreateQueue(autoCreateQueue: Boolean) { - it.property("autoCreateQueue", autoCreateQueue.toString()) - } - - /** - * To use a custom HeaderFilterStrategy to map headers to/from Camel. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * The underlying protocol used to communicate with SQS - */ - public fun protocol(protocol: String) { - it.property("protocol", protocol) - } - - /** - * Specify the queue owner aws account id when you need to connect the queue with a different - * account owner. - */ - public fun queueOwnerAWSAccountId(queueOwnerAWSAccountId: String) { - it.property("queueOwnerAWSAccountId", queueOwnerAWSAccountId) - } - - /** - * The region in which SQS client needs to work. When using this parameter, the configuration will - * expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * A list of attribute names to receive when consuming. Multiple names can be separated by comma. - */ - public fun attributeNames(attributeNames: String) { - it.property("attributeNames", attributeNames) - } - - /** - * Allows you to use multiple threads to poll the sqs queue to increase throughput - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * Allows you to use multiple threads to poll the sqs queue to increase throughput - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * The maximum number of concurrent receive request send to AWS in single consumer polling. - */ - public fun concurrentRequestLimit(concurrentRequestLimit: String) { - it.property("concurrentRequestLimit", concurrentRequestLimit) - } - - /** - * The maximum number of concurrent receive request send to AWS in single consumer polling. - */ - public fun concurrentRequestLimit(concurrentRequestLimit: Int) { - it.property("concurrentRequestLimit", concurrentRequestLimit.toString()) - } - - /** - * The default visibility timeout (in seconds) - */ - public fun defaultVisibilityTimeout(defaultVisibilityTimeout: String) { - it.property("defaultVisibilityTimeout", defaultVisibilityTimeout) - } - - /** - * The default visibility timeout (in seconds) - */ - public fun defaultVisibilityTimeout(defaultVisibilityTimeout: Int) { - it.property("defaultVisibilityTimeout", defaultVisibilityTimeout.toString()) - } - - /** - * Delete message from SQS after it has been read - */ - public fun deleteAfterRead(deleteAfterRead: String) { - it.property("deleteAfterRead", deleteAfterRead) - } - - /** - * Delete message from SQS after it has been read - */ - public fun deleteAfterRead(deleteAfterRead: Boolean) { - it.property("deleteAfterRead", deleteAfterRead.toString()) - } - - /** - * Whether to send the DeleteMessage to the SQS queue if the exchange has property with key - * Sqs2Constants#SQS_DELETE_FILTERED (CamelAwsSqsDeleteFiltered) set to true. - */ - public fun deleteIfFiltered(deleteIfFiltered: String) { - it.property("deleteIfFiltered", deleteIfFiltered) - } - - /** - * Whether to send the DeleteMessage to the SQS queue if the exchange has property with key - * Sqs2Constants#SQS_DELETE_FILTERED (CamelAwsSqsDeleteFiltered) set to true. - */ - public fun deleteIfFiltered(deleteIfFiltered: Boolean) { - it.property("deleteIfFiltered", deleteIfFiltered.toString()) - } - - /** - * If enabled, then a scheduled background task will keep extending the message visibility on SQS. - * This is needed if it takes a long time to process the message. If set to true - * defaultVisibilityTimeout must be set. See details at Amazon docs. - */ - public fun extendMessageVisibility(extendMessageVisibility: String) { - it.property("extendMessageVisibility", extendMessageVisibility) - } - - /** - * If enabled, then a scheduled background task will keep extending the message visibility on SQS. - * This is needed if it takes a long time to process the message. If set to true - * defaultVisibilityTimeout must be set. See details at Amazon docs. - */ - public fun extendMessageVisibility(extendMessageVisibility: Boolean) { - it.property("extendMessageVisibility", extendMessageVisibility.toString()) - } - - /** - * The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt - * messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 - * minute) and 86,400 seconds (24 hours). Default: 300 (5 minutes). - */ - public fun kmsDataKeyReusePeriodSeconds(kmsDataKeyReusePeriodSeconds: String) { - it.property("kmsDataKeyReusePeriodSeconds", kmsDataKeyReusePeriodSeconds) - } - - /** - * The length of time, in seconds, for which Amazon SQS can reuse a data key to encrypt or decrypt - * messages before calling AWS KMS again. An integer representing seconds, between 60 seconds (1 - * minute) and 86,400 seconds (24 hours). Default: 300 (5 minutes). - */ - public fun kmsDataKeyReusePeriodSeconds(kmsDataKeyReusePeriodSeconds: Int) { - it.property("kmsDataKeyReusePeriodSeconds", kmsDataKeyReusePeriodSeconds.toString()) - } - - /** - * The ID of an AWS-managed customer master key (CMK) for Amazon SQS or a custom CMK. - */ - public fun kmsMasterKeyId(kmsMasterKeyId: String) { - it.property("kmsMasterKeyId", kmsMasterKeyId) - } - - /** - * Gets the maximum number of messages as a limit to poll at each polling. Is default unlimited, - * but use 0 or negative number to disable it as unlimited. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * Gets the maximum number of messages as a limit to poll at each polling. Is default unlimited, - * but use 0 or negative number to disable it as unlimited. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * A list of message attribute names to receive when consuming. Multiple names can be separated by - * comma. - */ - public fun messageAttributeNames(messageAttributeNames: String) { - it.property("messageAttributeNames", messageAttributeNames) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Define if Server Side Encryption is enabled or not on the queue - */ - public fun serverSideEncryptionEnabled(serverSideEncryptionEnabled: String) { - it.property("serverSideEncryptionEnabled", serverSideEncryptionEnabled) - } - - /** - * Define if Server Side Encryption is enabled or not on the queue - */ - public fun serverSideEncryptionEnabled(serverSideEncryptionEnabled: Boolean) { - it.property("serverSideEncryptionEnabled", serverSideEncryptionEnabled.toString()) - } - - /** - * The name of the message attribute used for sorting the messages. When specified, the messages - * polled by the consumer will be sorted by this attribute. This configuration may be of importance - * when you configure maxMessagesPerPoll parameter exceeding 10. In such cases, the messages will be - * fetched concurrently so the ordering is not guaranteed. - */ - public fun sortAttributeName(sortAttributeName: String) { - it.property("sortAttributeName", sortAttributeName) - } - - /** - * The duration (in seconds) that the received messages are hidden from subsequent retrieve - * requests after being retrieved by a ReceiveMessage request to set in the - * com.amazonaws.services.sqs.model.SetQueueAttributesRequest. This only makes sense if it's - * different from defaultVisibilityTimeout. It changes the queue visibility timeout attribute - * permanently. - */ - public fun visibilityTimeout(visibilityTimeout: String) { - it.property("visibilityTimeout", visibilityTimeout) - } - - /** - * The duration (in seconds) that the received messages are hidden from subsequent retrieve - * requests after being retrieved by a ReceiveMessage request to set in the - * com.amazonaws.services.sqs.model.SetQueueAttributesRequest. This only makes sense if it's - * different from defaultVisibilityTimeout. It changes the queue visibility timeout attribute - * permanently. - */ - public fun visibilityTimeout(visibilityTimeout: Int) { - it.property("visibilityTimeout", visibilityTimeout.toString()) - } - - /** - * Duration in seconds (0 to 20) that the ReceiveMessage action call will wait until a message is - * in the queue to include in the response. - */ - public fun waitTimeSeconds(waitTimeSeconds: String) { - it.property("waitTimeSeconds", waitTimeSeconds) - } - - /** - * Duration in seconds (0 to 20) that the ReceiveMessage action call will wait until a message is - * in the queue to include in the response. - */ - public fun waitTimeSeconds(waitTimeSeconds: Int) { - it.property("waitTimeSeconds", waitTimeSeconds.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Set the separator when passing a String to send batch message operation - */ - public fun batchSeparator(batchSeparator: String) { - it.property("batchSeparator", batchSeparator) - } - - /** - * Delay sending messages for a number of seconds. - */ - public fun delaySeconds(delaySeconds: String) { - it.property("delaySeconds", delaySeconds) - } - - /** - * Delay sending messages for a number of seconds. - */ - public fun delaySeconds(delaySeconds: Int) { - it.property("delaySeconds", delaySeconds.toString()) - } - - /** - * Only for FIFO queues. Strategy for setting the messageDeduplicationId on the message. It can be - * one of the following options: useExchangeId, useContentBasedDeduplication. For the - * useContentBasedDeduplication option, no messageDeduplicationId will be set on the message. - */ - public fun messageDeduplicationIdStrategy(messageDeduplicationIdStrategy: String) { - it.property("messageDeduplicationIdStrategy", messageDeduplicationIdStrategy) - } - - /** - * Only for FIFO queues. Strategy for setting the messageGroupId on the message. It can be one of - * the following options: useConstant, useExchangeId, usePropertyValue. For the usePropertyValue - * option, the value of property CamelAwsMessageGroupId will be used. - */ - public fun messageGroupIdStrategy(messageGroupIdStrategy: String) { - it.property("messageGroupIdStrategy", messageGroupIdStrategy) - } - - /** - * What to do if sending to AWS SQS has more messages than AWS allows (currently only maximum 10 - * message headers are allowed). WARN will log a WARN about the limit is for each additional header, - * so the message can be sent to AWS. WARN_ONCE will only log one time a WARN about the limit is hit, - * and drop additional headers, so the message can be sent to AWS. IGNORE will ignore (no logging) - * and drop additional headers, so the message can be sent to AWS. FAIL will cause an exception to be - * thrown and the message is not sent to AWS. - */ - public fun messageHeaderExceededLimit(messageHeaderExceededLimit: String) { - it.property("messageHeaderExceededLimit", messageHeaderExceededLimit) - } - - /** - * The operation to do in case the user don't want to send only a message - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use the AmazonSQS client - */ - public fun amazonSQSClient(amazonSQSClient: String) { - it.property("amazonSQSClient", amazonSQSClient) - } - - /** - * Define if you want to apply delaySeconds option to the queue or on single messages - */ - public fun delayQueue(delayQueue: String) { - it.property("delayQueue", delayQueue) - } - - /** - * Define if you want to apply delaySeconds option to the queue or on single messages - */ - public fun delayQueue(delayQueue: Boolean) { - it.property("delayQueue", delayQueue.toString()) - } - - /** - * To define a proxy host when instantiating the SQS client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the SQS client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the SQS client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the SQS client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * The maximumMessageSize (in bytes) an SQS message can contain for this queue. - */ - public fun maximumMessageSize(maximumMessageSize: String) { - it.property("maximumMessageSize", maximumMessageSize) - } - - /** - * The maximumMessageSize (in bytes) an SQS message can contain for this queue. - */ - public fun maximumMessageSize(maximumMessageSize: Int) { - it.property("maximumMessageSize", maximumMessageSize.toString()) - } - - /** - * The messageRetentionPeriod (in seconds) a message will be retained by SQS for this queue. - */ - public fun messageRetentionPeriod(messageRetentionPeriod: String) { - it.property("messageRetentionPeriod", messageRetentionPeriod) - } - - /** - * The messageRetentionPeriod (in seconds) a message will be retained by SQS for this queue. - */ - public fun messageRetentionPeriod(messageRetentionPeriod: Int) { - it.property("messageRetentionPeriod", messageRetentionPeriod.toString()) - } - - /** - * The policy for this queue. It can be loaded by default from classpath, but you can prefix with - * classpath:, file:, or http: to load the resource from different systems. - */ - public fun policy(policy: String) { - it.property("policy", policy) - } - - /** - * To define the queueUrl explicitly. All other parameters, which would influence the queueUrl, - * are ignored. This parameter is intended to be used to connect to a mock implementation of SQS, for - * testing purposes. - */ - public fun queueUrl(queueUrl: String) { - it.property("queueUrl", queueUrl) - } - - /** - * If you do not specify WaitTimeSeconds in the request, the queue attribute - * ReceiveMessageWaitTimeSeconds is used to determine how long to wait. - */ - public fun receiveMessageWaitTimeSeconds(receiveMessageWaitTimeSeconds: String) { - it.property("receiveMessageWaitTimeSeconds", receiveMessageWaitTimeSeconds) - } - - /** - * If you do not specify WaitTimeSeconds in the request, the queue attribute - * ReceiveMessageWaitTimeSeconds is used to determine how long to wait. - */ - public fun receiveMessageWaitTimeSeconds(receiveMessageWaitTimeSeconds: Int) { - it.property("receiveMessageWaitTimeSeconds", receiveMessageWaitTimeSeconds.toString()) - } - - /** - * Specify the policy that send message to DeadLetter queue. See detail at Amazon docs. - */ - public fun redrivePolicy(redrivePolicy: String) { - it.property("redrivePolicy", redrivePolicy) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the SQS client should expect to load credentials on an AWS infra instance or to - * expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the SQS client should expect to load credentials on an AWS infra instance or to - * expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the SQS client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the SQS client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the SQS client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in SQS. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the SQS client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in SQS. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2StepFunctionsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2StepFunctionsUriDsl.kt deleted file mode 100644 index bfff36c861019..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2StepFunctionsUriDsl.kt +++ /dev/null @@ -1,259 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage and invoke AWS Step functions. - */ -public fun UriDsl.`aws2-step-functions`(i: Aws2StepFunctionsUriDsl.() -> Unit) { - Aws2StepFunctionsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2StepFunctionsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-step-functions") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * The operation to perform. It can be listFunctions, getFunction, createFunction, deleteFunction - * or invokeFunction - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * The region in which StepFunctions client needs to work. When using this parameter, the - * configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to - * use the name Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * Set whether the StepFunctions client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the StepFunctions client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the StepFunctions client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the StepFunctions client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing configured AwsStepFunctionsClient client - */ - public fun awsSfnClient(awsSfnClient: String) { - it.property("awsSfnClient", awsSfnClient) - } - - /** - * To define a proxy host when instantiating the StepFunctions client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the StepFunctions client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the StepFunctions client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the StepFunctions client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * Set whether the Step Functions client should expect to use Session Credentials. This is useful - * in a situation in which the user needs to assume an IAM role for doing operations in Step - * Functions. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the Step Functions client should expect to use Session Credentials. This is useful - * in a situation in which the user needs to assume an IAM role for doing operations in Step - * Functions. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2StsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2StsUriDsl.kt deleted file mode 100644 index 6e0ebe8d6101e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2StsUriDsl.kt +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage AWS STS cluster instances. - */ -public fun UriDsl.`aws2-sts`(i: Aws2StsUriDsl.() -> Unit) { - Aws2StsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2StsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-sts") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * The operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * The region in which the STS client needs to work. When using this parameter, the configuration - * will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing configured AWS STS client - */ - public fun stsClient(stsClient: String) { - it.property("stsClient", stsClient) - } - - /** - * To define a proxy host when instantiating the STS client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the STS client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the STS client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the STS client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the STS client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the STS client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the STS client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the STS client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2TimestreamUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2TimestreamUriDsl.kt deleted file mode 100644 index 1b1b9ea7b67b0..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2TimestreamUriDsl.kt +++ /dev/null @@ -1,255 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Write records and execute queries on AWS time-series database - */ -public fun UriDsl.`aws2-timestream`(i: Aws2TimestreamUriDsl.() -> Unit) { - Aws2TimestreamUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2TimestreamUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-timestream") - } - - private var clientType: String = "" - - private var label: String = "" - - /** - * Type of client - write/query - */ - public fun clientType(clientType: String) { - this.clientType = clientType - it.url("$clientType:$label") - } - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$clientType:$label") - } - - /** - * The operation to perform. It can be - * describeEndpoints,createBatchLoadTask,describeBatchLoadTask, - * resumeBatchLoadTask,listBatchLoadTasks,createDatabase,deleteDatabase,describeDatabase,updateDatabase, - * listDatabases,createTable,deleteTable,describeTable,updateTable,listTables,writeRecords, - * createScheduledQuery,deleteScheduledQuery,executeScheduledQuery,updateScheduledQuery, - * describeScheduledQuery,listScheduledQueries,prepareQuery,query,cancelQuery - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * The region in which the Timestream client needs to work. When using this parameter, the - * configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to - * use the name Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * Set whether the Timestream client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the Timestream client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the Timestream client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the Timestream client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing configured AwsTimestreamQueryClient client - */ - public fun awsTimestreamQueryClient(awsTimestreamQueryClient: String) { - it.property("awsTimestreamQueryClient", awsTimestreamQueryClient) - } - - /** - * To use an existing configured AwsTimestreamWriteClient client - */ - public fun awsTimestreamWriteClient(awsTimestreamWriteClient: String) { - it.property("awsTimestreamWriteClient", awsTimestreamWriteClient) - } - - /** - * To define a proxy host when instantiating the Timestream client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the Timestream client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the Timestream client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the Timestream client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2TranslateUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2TranslateUriDsl.kt deleted file mode 100644 index 12e4a01d91217..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Aws2TranslateUriDsl.kt +++ /dev/null @@ -1,284 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Translate texts using AWS Translate and AWS SDK version 2.x. - */ -public fun UriDsl.`aws2-translate`(i: Aws2TranslateUriDsl.() -> Unit) { - Aws2TranslateUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Aws2TranslateUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws2-translate") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * Being able to autodetect the source language - */ - public fun autodetectSourceLanguage(autodetectSourceLanguage: String) { - it.property("autodetectSourceLanguage", autodetectSourceLanguage) - } - - /** - * Being able to autodetect the source language - */ - public fun autodetectSourceLanguage(autodetectSourceLanguage: Boolean) { - it.property("autodetectSourceLanguage", autodetectSourceLanguage.toString()) - } - - /** - * The operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * The region in which the Translate client needs to work. When using this parameter, the - * configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to - * use the name Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Source language to use - */ - public fun sourceLanguage(sourceLanguage: String) { - it.property("sourceLanguage", sourceLanguage) - } - - /** - * Target language to use - */ - public fun targetLanguage(targetLanguage: String) { - it.property("targetLanguage", targetLanguage) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing configured AWS Translate client - */ - public fun translateClient(translateClient: String) { - it.property("translateClient", translateClient) - } - - /** - * To define a proxy host when instantiating the Translate client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the Translate client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the Translate client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the Translate client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the Translate client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the Translate client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the Translate client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the Translate client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the Translate client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in Translate. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the Translate client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in Translate. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsBedrockAgentRuntimeUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsBedrockAgentRuntimeUriDsl.kt deleted file mode 100644 index bd0c8902b7e7e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsBedrockAgentRuntimeUriDsl.kt +++ /dev/null @@ -1,272 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Invoke Model of AWS Bedrock Agent Runtime service. - */ -public fun UriDsl.`aws-bedrock-agent-runtime`(i: AwsBedrockAgentRuntimeUriDsl.() -> Unit) { - AwsBedrockAgentRuntimeUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AwsBedrockAgentRuntimeUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws-bedrock-agent-runtime") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * Define the Knowledge Base Id we are going to use - */ - public fun knowledgeBaseId(knowledgeBaseId: String) { - it.property("knowledgeBaseId", knowledgeBaseId) - } - - /** - * Define the model Id we are going to use - */ - public fun modelId(modelId: String) { - it.property("modelId", modelId) - } - - /** - * The operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * The region in which Bedrock Agent Runtime client needs to work. When using this parameter, the - * configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to - * use the name Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * Set whether the Bedrock Agent Runtime client should expect to load credentials through a - * default credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the Bedrock Agent Runtime client should expect to load credentials through a - * default credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the Bedrock Agent Runtime client should expect to load credentials through a - * profile credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the Bedrock Agent Runtime client should expect to load credentials through a - * profile credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing configured AWS Bedrock Agent Runtime client - */ - public fun bedrockAgentRuntimeClient(bedrockAgentRuntimeClient: String) { - it.property("bedrockAgentRuntimeClient", bedrockAgentRuntimeClient) - } - - /** - * To define a proxy host when instantiating the Bedrock Agent Runtime client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the Bedrock Agent Runtime client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the Bedrock Agent Runtime client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the Bedrock Agent Runtime client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the Bedrock Agent Runtime client should expect to use Session Credentials. This is - * useful in a situation in which the user needs to assume an IAM role for doing operations in - * Bedrock. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the Bedrock Agent Runtime client should expect to use Session Credentials. This is - * useful in a situation in which the user needs to assume an IAM role for doing operations in - * Bedrock. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsBedrockAgentUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsBedrockAgentUriDsl.kt deleted file mode 100644 index 65ce8dc714d07..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsBedrockAgentUriDsl.kt +++ /dev/null @@ -1,536 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Operate on AWS Bedrock through its Agent. - */ -public fun UriDsl.`aws-bedrock-agent`(i: AwsBedrockAgentUriDsl.() -> Unit) { - AwsBedrockAgentUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AwsBedrockAgentUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws-bedrock-agent") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * Define the Data source Id we are going to use - */ - public fun dataSourceId(dataSourceId: String) { - it.property("dataSourceId", dataSourceId) - } - - /** - * Define the Knowledge Base Id we are going to use - */ - public fun knowledgeBaseId(knowledgeBaseId: String) { - it.property("knowledgeBaseId", knowledgeBaseId) - } - - /** - * Define the model Id we are going to use - */ - public fun modelId(modelId: String) { - it.property("modelId", modelId) - } - - /** - * The operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * The region in which Bedrock Agent client needs to work. When using this parameter, the - * configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to - * use the name Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * Set whether the Bedrock Agent client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the Bedrock Agent client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the Bedrock Agent client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the Bedrock Agent client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Define the Ingestion Job Id we want to track - */ - public fun ingestionJobId(ingestionJobId: String) { - it.property("ingestionJobId", ingestionJobId) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing configured AWS Bedrock Agent client - */ - public fun bedrockAgentClient(bedrockAgentClient: String) { - it.property("bedrockAgentClient", bedrockAgentClient) - } - - /** - * To define a proxy host when instantiating the Bedrock Agent client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the Bedrock Agent client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the Bedrock Agent client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the Bedrock Agent client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the Bedrock Agent client should expect to use Session Credentials. This is useful - * in a situation in which the user needs to assume an IAM role for doing operations in Bedrock. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the Bedrock Agent client should expect to use Session Credentials. This is useful - * in a situation in which the user needs to assume an IAM role for doing operations in Bedrock. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsBedrockUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsBedrockUriDsl.kt deleted file mode 100644 index 03adbe89da7b3..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsBedrockUriDsl.kt +++ /dev/null @@ -1,263 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Invoke Model of AWS Bedrock service. - */ -public fun UriDsl.`aws-bedrock`(i: AwsBedrockUriDsl.() -> Unit) { - AwsBedrockUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AwsBedrockUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws-bedrock") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * Define the model Id we are going to use - */ - public fun modelId(modelId: String) { - it.property("modelId", modelId) - } - - /** - * The operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * The region in which Bedrock client needs to work. When using this parameter, the configuration - * will expect the lowercase name of the region (for example, ap-east-1) You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * Set whether the Bedrock client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the Bedrock client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the Bedrock client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the Bedrock client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing configured AWS Bedrock Runtime client - */ - public fun bedrockRuntimeClient(bedrockRuntimeClient: String) { - it.property("bedrockRuntimeClient", bedrockRuntimeClient) - } - - /** - * To define a proxy host when instantiating the Bedrock client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the Bedrock client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the Bedrock client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the Bedrock client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the Bedrock client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in Bedrock. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the Bedrock client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in Bedrock. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsCloudtrailUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsCloudtrailUriDsl.kt deleted file mode 100644 index f66faf3aee6e1..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsCloudtrailUriDsl.kt +++ /dev/null @@ -1,484 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Consume events from Amazon Cloudtrail using AWS SDK version 2.x. - */ -public fun UriDsl.`aws-cloudtrail`(i: AwsCloudtrailUriDsl.() -> Unit) { - AwsCloudtrailUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AwsCloudtrailUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws-cloudtrail") - } - - private var label: String = "" - - /** - * A label for indexing cloudtrail endpoints - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * Specify an event source to select events - */ - public fun eventSource(eventSource: String) { - it.property("eventSource", eventSource) - } - - /** - * Maximum number of records that will be fetched in each poll - */ - public fun maxResults(maxResults: String) { - it.property("maxResults", maxResults) - } - - /** - * Maximum number of records that will be fetched in each poll - */ - public fun maxResults(maxResults: Int) { - it.property("maxResults", maxResults.toString()) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * The region in which Cloudtrail client needs to work. When using this parameter, the - * configuration will expect the lowercase name of the region (for example ap-east-1) You'll need to - * use the name Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Amazon Cloudtrail client to use for all requests for this endpoint - */ - public fun cloudTrailClient(cloudTrailClient: String) { - it.property("cloudTrailClient", cloudTrailClient) - } - - /** - * To define a proxy host when instantiating the Cloudtrail client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the Cloudtrail client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the Cloudtrail client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the Cloudtrail client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider this parameter will set the profile name. - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume a IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the Cloudtrail client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the Cloudtrail client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the Cloudtrail client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the Cloudtrail client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the CloudTrail client should expect to use Session Credentials. This is useful in - * situation in which the user needs to assume a IAM role for doing operations in CloudTrail. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the CloudTrail client should expect to use Session Credentials. This is useful in - * situation in which the user needs to assume a IAM role for doing operations in CloudTrail. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsConfigUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsConfigUriDsl.kt deleted file mode 100644 index 2fd3e2e62c5a3..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsConfigUriDsl.kt +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage AWS Config service. - */ -public fun UriDsl.`aws-config`(i: AwsConfigUriDsl.() -> Unit) { - AwsConfigUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AwsConfigUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws-config") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * The operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * The region in which the Config client needs to work. When using this parameter, the - * configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to - * use the name Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Amazon AWS Config Client instance - */ - public fun configClient(configClient: String) { - it.property("configClient", configClient) - } - - /** - * To define a proxy host when instantiating the Config client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the Config client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the Config client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the Config client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the Config client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the Config client should expect to load credentials through a default credentials - * provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the Config client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the Config client should expect to load credentials through a profile credentials - * provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * Set whether the Config client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in Config. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the Config client should expect to use Session Credentials. This is useful in a - * situation in which the user needs to assume an IAM role for doing operations in Config. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsSecretsManagerUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsSecretsManagerUriDsl.kt deleted file mode 100644 index 43b91ea3ac492..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AwsSecretsManagerUriDsl.kt +++ /dev/null @@ -1,272 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage secrets using AWS Secrets Manager. - */ -public fun UriDsl.`aws-secrets-manager`(i: AwsSecretsManagerUriDsl.() -> Unit) { - AwsSecretsManagerUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AwsSecretsManagerUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("aws-secrets-manager") - } - - private var label: String = "" - - /** - * Logical name - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * Set if the secret is binary or not - */ - public fun binaryPayload(binaryPayload: String) { - it.property("binaryPayload", binaryPayload) - } - - /** - * Set if the secret is binary or not - */ - public fun binaryPayload(binaryPayload: Boolean) { - it.property("binaryPayload", binaryPayload.toString()) - } - - /** - * The operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: String) { - it.property("overrideEndpoint", overrideEndpoint) - } - - /** - * Set the need for overriding the endpoint. This option needs to be used in combination with the - * uriEndpointOverride option - */ - public fun overrideEndpoint(overrideEndpoint: Boolean) { - it.property("overrideEndpoint", overrideEndpoint.toString()) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * If using a profile credentials provider, this parameter will set the profile name - */ - public fun profileCredentialsName(profileCredentialsName: String) { - it.property("profileCredentialsName", profileCredentialsName) - } - - /** - * The region in which a Secrets Manager client needs to work. When using this parameter, the - * configuration will expect the lowercase name of the region (for example, ap-east-1) You'll need to - * use the name Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Set the overriding uri endpoint. This option needs to be used in combination with - * overrideEndpoint option - */ - public fun uriEndpointOverride(uriEndpointOverride: String) { - it.property("uriEndpointOverride", uriEndpointOverride) - } - - /** - * Set whether the Secrets Manager client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: String) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider) - } - - /** - * Set whether the Secrets Manager client should expect to load credentials through a profile - * credentials provider. - */ - public fun useProfileCredentialsProvider(useProfileCredentialsProvider: Boolean) { - it.property("useProfileCredentialsProvider", useProfileCredentialsProvider.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing configured AWS Secrets Manager client - */ - public fun secretsManagerClient(secretsManagerClient: String) { - it.property("secretsManagerClient", secretsManagerClient) - } - - /** - * To define a proxy host when instantiating the Secrets Manager client - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * To define a proxy port when instantiating the Secrets Manager client - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * To define a proxy port when instantiating the Secrets Manager client - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * To define a proxy protocol when instantiating the Secrets Manager client - */ - public fun proxyProtocol(proxyProtocol: String) { - it.property("proxyProtocol", proxyProtocol) - } - - /** - * Amazon AWS Access Key - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Amazon AWS Secret Key - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Amazon AWS Session Token used when the user needs to assume an IAM role - */ - public fun sessionToken(sessionToken: String) { - it.property("sessionToken", sessionToken) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: String) { - it.property("trustAllCertificates", trustAllCertificates) - } - - /** - * If we want to trust all certificates in case of overriding the endpoint - */ - public fun trustAllCertificates(trustAllCertificates: Boolean) { - it.property("trustAllCertificates", trustAllCertificates.toString()) - } - - /** - * Set whether the Translate client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: String) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider) - } - - /** - * Set whether the Translate client should expect to load credentials through a default - * credentials provider or to expect static credentials to be passed in. - */ - public fun useDefaultCredentialsProvider(useDefaultCredentialsProvider: Boolean) { - it.property("useDefaultCredentialsProvider", useDefaultCredentialsProvider.toString()) - } - - /** - * Set whether the Secrets Manager client should expect to use Session Credentials. This is useful - * in a situation in which the user needs to assume an IAM role for doing operations in Secrets - * Manager. - */ - public fun useSessionCredentials(useSessionCredentials: String) { - it.property("useSessionCredentials", useSessionCredentials) - } - - /** - * Set whether the Secrets Manager client should expect to use Session Credentials. This is useful - * in a situation in which the user needs to assume an IAM role for doing operations in Secrets - * Manager. - */ - public fun useSessionCredentials(useSessionCredentials: Boolean) { - it.property("useSessionCredentials", useSessionCredentials.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureCosmosdbUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureCosmosdbUriDsl.kt deleted file mode 100644 index 45af38b738512..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureCosmosdbUriDsl.kt +++ /dev/null @@ -1,462 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * To read and write records to the CosmosDB database on Azure cloud platform. - */ -public fun UriDsl.`azure-cosmosdb`(i: AzureCosmosdbUriDsl.() -> Unit) { - AzureCosmosdbUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AzureCosmosdbUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("azure-cosmosdb") - } - - private var databaseName: String = "" - - private var containerName: String = "" - - /** - * The name of the Cosmos database that component should connect to. In case you are producing - * data and have createDatabaseIfNotExists=true, the component will automatically auto create a - * Cosmos database. - */ - public fun databaseName(databaseName: String) { - this.databaseName = databaseName - it.url("$databaseName/$containerName") - } - - /** - * The name of the Cosmos container that component should connect to. In case you are producing - * data and have createContainerIfNotExists=true, the component will automatically auto create a - * Cosmos container. - */ - public fun containerName(containerName: String) { - this.containerName = containerName - it.url("$databaseName/$containerName") - } - - /** - * Sets the flag to enable client telemetry which will periodically collect database operations - * aggregation statistics, system information like cpu/memory and send it to cosmos monitoring - * service, which will be helpful during debugging. DEFAULT value is false indicating this is an - * opt-in feature, by default no telemetry collection. - */ - public fun clientTelemetryEnabled(clientTelemetryEnabled: String) { - it.property("clientTelemetryEnabled", clientTelemetryEnabled) - } - - /** - * Sets the flag to enable client telemetry which will periodically collect database operations - * aggregation statistics, system information like cpu/memory and send it to cosmos monitoring - * service, which will be helpful during debugging. DEFAULT value is false indicating this is an - * opt-in feature, by default no telemetry collection. - */ - public fun clientTelemetryEnabled(clientTelemetryEnabled: Boolean) { - it.property("clientTelemetryEnabled", clientTelemetryEnabled.toString()) - } - - /** - * Enables connections sharing across multiple Cosmos Clients. The default is false. When you have - * multiple instances of Cosmos Client in the same JVM interacting with multiple Cosmos accounts, - * enabling this allows connection sharing in Direct mode if possible between instances of Cosmos - * Client. Please note, when setting this option, the connection configuration (e.g., socket timeout - * config, idle timeout config) of the first instantiated client will be used for all other client - * instances. - */ - public fun connectionSharingAcrossClientsEnabled(connectionSharingAcrossClientsEnabled: String) { - it.property("connectionSharingAcrossClientsEnabled", connectionSharingAcrossClientsEnabled) - } - - /** - * Enables connections sharing across multiple Cosmos Clients. The default is false. When you have - * multiple instances of Cosmos Client in the same JVM interacting with multiple Cosmos accounts, - * enabling this allows connection sharing in Direct mode if possible between instances of Cosmos - * Client. Please note, when setting this option, the connection configuration (e.g., socket timeout - * config, idle timeout config) of the first instantiated client will be used for all other client - * instances. - */ - public fun connectionSharingAcrossClientsEnabled(connectionSharingAcrossClientsEnabled: Boolean) { - it.property("connectionSharingAcrossClientsEnabled", - connectionSharingAcrossClientsEnabled.toString()) - } - - /** - * Sets the consistency levels supported for Azure Cosmos DB client operations in the Azure Cosmos - * DB service. The requested ConsistencyLevel must match or be weaker than that provisioned for the - * database account. Consistency levels by order of strength are STRONG, BOUNDED_STALENESS, SESSION - * and EVENTUAL. Refer to consistency level documentation for additional details: - * https://docs.microsoft.com/en-us/azure/cosmos-db/consistency-levels - */ - public fun consistencyLevel(consistencyLevel: String) { - it.property("consistencyLevel", consistencyLevel) - } - - /** - * Sets the container partition key path. - */ - public fun containerPartitionKeyPath(containerPartitionKeyPath: String) { - it.property("containerPartitionKeyPath", containerPartitionKeyPath) - } - - /** - * Sets the boolean to only return the headers and status code in Cosmos DB response in case of - * Create, Update and Delete operations on CosmosItem. In Consumer, it is enabled by default because - * of the ChangeFeed in the consumer that needs this flag to be enabled, and thus it shouldn't be - * overridden. In Producer, it is advised to disable it since it reduces the network overhead - */ - public fun contentResponseOnWriteEnabled(contentResponseOnWriteEnabled: String) { - it.property("contentResponseOnWriteEnabled", contentResponseOnWriteEnabled) - } - - /** - * Sets the boolean to only return the headers and status code in Cosmos DB response in case of - * Create, Update and Delete operations on CosmosItem. In Consumer, it is enabled by default because - * of the ChangeFeed in the consumer that needs this flag to be enabled, and thus it shouldn't be - * overridden. In Producer, it is advised to disable it since it reduces the network overhead - */ - public fun contentResponseOnWriteEnabled(contentResponseOnWriteEnabled: Boolean) { - it.property("contentResponseOnWriteEnabled", contentResponseOnWriteEnabled.toString()) - } - - /** - * Inject an external CosmosAsyncClient into the component which provides a client-side logical - * representation of the Azure Cosmos DB service. This asynchronous client is used to configure and - * execute requests against the service. - */ - public fun cosmosAsyncClient(cosmosAsyncClient: String) { - it.property("cosmosAsyncClient", cosmosAsyncClient) - } - - /** - * Sets if the component should create the Cosmos container automatically in case it doesn't exist - * in the Cosmos database - */ - public fun createContainerIfNotExists(createContainerIfNotExists: String) { - it.property("createContainerIfNotExists", createContainerIfNotExists) - } - - /** - * Sets if the component should create the Cosmos container automatically in case it doesn't exist - * in the Cosmos database - */ - public fun createContainerIfNotExists(createContainerIfNotExists: Boolean) { - it.property("createContainerIfNotExists", createContainerIfNotExists.toString()) - } - - /** - * Sets if the component should create the Cosmos database automatically in case it doesn't exist - * in the Cosmos account - */ - public fun createDatabaseIfNotExists(createDatabaseIfNotExists: String) { - it.property("createDatabaseIfNotExists", createDatabaseIfNotExists) - } - - /** - * Sets if the component should create the Cosmos database automatically in case it doesn't exist - * in the Cosmos account - */ - public fun createDatabaseIfNotExists(createDatabaseIfNotExists: Boolean) { - it.property("createDatabaseIfNotExists", createDatabaseIfNotExists.toString()) - } - - /** - * Sets the Azure Cosmos database endpoint the component will connect to. - */ - public fun databaseEndpoint(databaseEndpoint: String) { - it.property("databaseEndpoint", databaseEndpoint) - } - - /** - * Sets the flag to enable writes on any regions for geo-replicated database accounts in the Azure - * Cosmos DB service. When the value of this property is true, the SDK will direct write operations - * to available writable regions of geo-replicated database account. Writable regions are ordered by - * PreferredRegions property. Setting the property value to true has no effect until - * EnableMultipleWriteRegions in DatabaseAccount is also set to true. DEFAULT value is true - * indicating that writes are directed to available writable regions of geo-replicated database - * account. - */ - public fun multipleWriteRegionsEnabled(multipleWriteRegionsEnabled: String) { - it.property("multipleWriteRegionsEnabled", multipleWriteRegionsEnabled) - } - - /** - * Sets the flag to enable writes on any regions for geo-replicated database accounts in the Azure - * Cosmos DB service. When the value of this property is true, the SDK will direct write operations - * to available writable regions of geo-replicated database account. Writable regions are ordered by - * PreferredRegions property. Setting the property value to true has no effect until - * EnableMultipleWriteRegions in DatabaseAccount is also set to true. DEFAULT value is true - * indicating that writes are directed to available writable regions of geo-replicated database - * account. - */ - public fun multipleWriteRegionsEnabled(multipleWriteRegionsEnabled: Boolean) { - it.property("multipleWriteRegionsEnabled", multipleWriteRegionsEnabled.toString()) - } - - /** - * Sets the comma separated preferred regions for geo-replicated database accounts. For example, - * East US as the preferred region. When EnableEndpointDiscovery is true and PreferredRegions is - * non-empty, the SDK will prefer to use the regions in the container in the order they are specified - * to perform operations. - */ - public fun preferredRegions(preferredRegions: String) { - it.property("preferredRegions", preferredRegions) - } - - /** - * Sets whether to allow for reads to go to multiple regions configured on an account of Azure - * Cosmos DB service. DEFAULT value is true. If this property is not set, the default is true for all - * Consistency Levels other than Bounded Staleness, The default is false for Bounded Staleness. 1. - * endpointDiscoveryEnabled is true 2. the Azure Cosmos DB account has more than one region - */ - public fun readRequestsFallbackEnabled(readRequestsFallbackEnabled: String) { - it.property("readRequestsFallbackEnabled", readRequestsFallbackEnabled) - } - - /** - * Sets whether to allow for reads to go to multiple regions configured on an account of Azure - * Cosmos DB service. DEFAULT value is true. If this property is not set, the default is true for all - * Consistency Levels other than Bounded Staleness, The default is false for Bounded Staleness. 1. - * endpointDiscoveryEnabled is true 2. the Azure Cosmos DB account has more than one region - */ - public fun readRequestsFallbackEnabled(readRequestsFallbackEnabled: Boolean) { - it.property("readRequestsFallbackEnabled", readRequestsFallbackEnabled.toString()) - } - - /** - * Sets throughput of the resources in the Azure Cosmos DB service. - */ - public fun throughputProperties(throughputProperties: String) { - it.property("throughputProperties", throughputProperties) - } - - /** - * Sets the ChangeFeedProcessorOptions to be used. Unless specifically set the default values that - * will be used are: maximum items per page or FeedResponse: 100 lease renew interval: 17 seconds - * lease acquire interval: 13 seconds lease expiration interval: 60 seconds feed poll delay: 5 - * seconds maximum scale count: unlimited - */ - public fun changeFeedProcessorOptions(changeFeedProcessorOptions: String) { - it.property("changeFeedProcessorOptions", changeFeedProcessorOptions) - } - - /** - * Sets if the component should create Cosmos lease container for the consumer automatically in - * case it doesn't exist in Cosmos database - */ - public fun createLeaseContainerIfNotExists(createLeaseContainerIfNotExists: String) { - it.property("createLeaseContainerIfNotExists", createLeaseContainerIfNotExists) - } - - /** - * Sets if the component should create Cosmos lease container for the consumer automatically in - * case it doesn't exist in Cosmos database - */ - public fun createLeaseContainerIfNotExists(createLeaseContainerIfNotExists: Boolean) { - it.property("createLeaseContainerIfNotExists", createLeaseContainerIfNotExists.toString()) - } - - /** - * Sets if the component should create the Cosmos lease database for the consumer automatically in - * case it doesn't exist in the Cosmos account - */ - public fun createLeaseDatabaseIfNotExists(createLeaseDatabaseIfNotExists: String) { - it.property("createLeaseDatabaseIfNotExists", createLeaseDatabaseIfNotExists) - } - - /** - * Sets if the component should create the Cosmos lease database for the consumer automatically in - * case it doesn't exist in the Cosmos account - */ - public fun createLeaseDatabaseIfNotExists(createLeaseDatabaseIfNotExists: Boolean) { - it.property("createLeaseDatabaseIfNotExists", createLeaseDatabaseIfNotExists.toString()) - } - - /** - * Sets the hostname. The host: a host is an application instance that uses the change feed - * processor to listen for changes. Multiple instances with the same lease configuration can run in - * parallel, but each instance should have a different instance name. If not specified, this will be - * a generated random hostname. - */ - public fun hostName(hostName: String) { - it.property("hostName", hostName) - } - - /** - * Sets the lease container which acts as a state storage and coordinates processing the change - * feed across multiple workers. The lease container can be stored in the same account as the - * monitored container or in a separate account. It will be auto-created if - * createLeaseContainerIfNotExists is set to true. - */ - public fun leaseContainerName(leaseContainerName: String) { - it.property("leaseContainerName", leaseContainerName) - } - - /** - * Sets the lease database where the leaseContainerName will be stored. If it is not specified, - * this component will store the lease container in the same database that is specified in - * databaseName. It will be auto-created if createLeaseDatabaseIfNotExists is set to true. - */ - public fun leaseDatabaseName(leaseDatabaseName: String) { - it.property("leaseDatabaseName", leaseDatabaseName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Sets the itemId in case needed for operation on item like delete, replace - */ - public fun itemId(itemId: String) { - it.property("itemId", itemId) - } - - /** - * Sets partition key. Represents a partition key value in the Azure Cosmos DB database service. A - * partition key identifies the partition where the item is stored in. - */ - public fun itemPartitionKey(itemPartitionKey: String) { - it.property("itemPartitionKey", itemPartitionKey) - } - - /** - * The CosmosDB operation that can be used with this component on the producer. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * An SQL query to execute on a given resources. To learn more about Cosmos SQL API, check this - * link {link https://docs.microsoft.com/en-us/azure/cosmos-db/sql-query-getting-started} - */ - public fun query(query: String) { - it.property("query", query) - } - - /** - * Set additional QueryRequestOptions that can be used with queryItems, queryContainers, - * queryDatabases, listDatabases, listItems, listContainers operations - */ - public fun queryRequestOptions(queryRequestOptions: String) { - it.property("queryRequestOptions", queryRequestOptions) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The CosmosDB Indexing Policy that will be set in case of container creation, this option is - * related to createLeaseContainerIfNotExists and it will be taken into account when the latter is - * true. - */ - public fun indexingPolicy(indexingPolicy: String) { - it.property("indexingPolicy", indexingPolicy) - } - - /** - * Sets either a master or readonly key used to perform authentication for accessing resource. - */ - public fun accountKey(accountKey: String) { - it.property("accountKey", accountKey) - } - - /** - * Determines the credential strategy to adopt - */ - public fun credentialType(credentialType: String) { - it.property("credentialType", credentialType) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureEventhubsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureEventhubsUriDsl.kt deleted file mode 100644 index c7be9ab035ee9..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureEventhubsUriDsl.kt +++ /dev/null @@ -1,329 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive events to/from Azure Event Hubs using AMQP protocol. - */ -public fun UriDsl.`azure-eventhubs`(i: AzureEventhubsUriDsl.() -> Unit) { - AzureEventhubsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AzureEventhubsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("azure-eventhubs") - } - - private var namespace: String = "" - - private var eventHubName: String = "" - - /** - * EventHubs namespace created in Azure Portal. - */ - public fun namespace(namespace: String) { - this.namespace = namespace - it.url("$namespace/$eventHubName") - } - - /** - * EventHubs name under a specific namespace. - */ - public fun eventHubName(eventHubName: String) { - this.eventHubName = eventHubName - it.url("$namespace/$eventHubName") - } - - /** - * Sets the retry policy for EventHubProducerAsyncClient. If not specified, the default retry - * options are used. - */ - public fun amqpRetryOptions(amqpRetryOptions: String) { - it.property("amqpRetryOptions", amqpRetryOptions) - } - - /** - * Sets the transport type by which all the communication with Azure Event Hubs occurs. - */ - public fun amqpTransportType(amqpTransportType: String) { - it.property("amqpTransportType", amqpTransportType) - } - - /** - * In case you chose the default BlobCheckpointStore, this sets access key for the associated - * azure account name to be used for authentication with azure blob services. - */ - public fun blobAccessKey(blobAccessKey: String) { - it.property("blobAccessKey", blobAccessKey) - } - - /** - * In case you chose the default BlobCheckpointStore, this sets Azure account name to be used for - * authentication with azure blob services. - */ - public fun blobAccountName(blobAccountName: String) { - it.property("blobAccountName", blobAccountName) - } - - /** - * In case you chose the default BlobCheckpointStore, this sets the blob container that shall be - * used by the BlobCheckpointStore to store the checkpoint offsets. - */ - public fun blobContainerName(blobContainerName: String) { - it.property("blobContainerName", blobContainerName) - } - - /** - * In case you chose the default BlobCheckpointStore, StorageSharedKeyCredential can be injected - * to create the azure client, this holds the important authentication information. - */ - public fun blobStorageSharedKeyCredential(blobStorageSharedKeyCredential: String) { - it.property("blobStorageSharedKeyCredential", blobStorageSharedKeyCredential) - } - - /** - * Sets the batch size between each checkpoint update. Works jointly with checkpointBatchTimeout. - */ - public fun checkpointBatchSize(checkpointBatchSize: String) { - it.property("checkpointBatchSize", checkpointBatchSize) - } - - /** - * Sets the batch size between each checkpoint update. Works jointly with checkpointBatchTimeout. - */ - public fun checkpointBatchSize(checkpointBatchSize: Int) { - it.property("checkpointBatchSize", checkpointBatchSize.toString()) - } - - /** - * Sets the batch timeout between each checkpoint update. Works jointly with checkpointBatchSize. - */ - public fun checkpointBatchTimeout(checkpointBatchTimeout: String) { - it.property("checkpointBatchTimeout", checkpointBatchTimeout) - } - - /** - * Sets the batch timeout between each checkpoint update. Works jointly with checkpointBatchSize. - */ - public fun checkpointBatchTimeout(checkpointBatchTimeout: Int) { - it.property("checkpointBatchTimeout", checkpointBatchTimeout.toString()) - } - - /** - * Sets the CheckpointStore the EventProcessorClient will use for storing partition ownership and - * checkpoint information. Users can, optionally, provide their own implementation of CheckpointStore - * which will store ownership and checkpoint information. By default, it's set to use - * com.azure.messaging.eventhubs.checkpointstore.blob.BlobCheckpointStore which stores all checkpoint - * offsets into Azure Blob Storage. - */ - public fun checkpointStore(checkpointStore: String) { - it.property("checkpointStore", checkpointStore) - } - - /** - * Sets the name of the consumer group this consumer is associated with. Events are read in the - * context of this group. The name of the consumer group that is created by default is $Default. - */ - public fun consumerGroupName(consumerGroupName: String) { - it.property("consumerGroupName", consumerGroupName) - } - - /** - * Sets the map containing the event position to use for each partition if a checkpoint for the - * partition does not exist in CheckpointStore. This map is keyed off of the partition id. If there - * is no checkpoint in CheckpointStore and there is no entry in this map, the processing of the - * partition will start from EventPosition#latest() position. - */ - public fun eventPosition(eventPosition: String) { - it.property("eventPosition", eventPosition) - } - - /** - * Sets the count used by the receiver to control the number of events the Event Hub consumer will - * actively receive and queue locally without regard to whether a receive operation is currently - * active. - */ - public fun prefetchCount(prefetchCount: String) { - it.property("prefetchCount", prefetchCount) - } - - /** - * Sets the count used by the receiver to control the number of events the Event Hub consumer will - * actively receive and queue locally without regard to whether a receive operation is currently - * active. - */ - public fun prefetchCount(prefetchCount: Int) { - it.property("prefetchCount", prefetchCount.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Sets the identifier of the Event Hub partition that the EventData events will be sent to. If - * the identifier is not specified, the Event Hubs service will be responsible for routing events - * that are sent to an available partition. - */ - public fun partitionId(partitionId: String) { - it.property("partitionId", partitionId) - } - - /** - * Sets a hashing key to be provided for the batch of events, which instructs the Event Hubs - * service to map this key to a specific partition. The selection of a partition is stable for a - * given partition hashing key. Should any other batches of events be sent using the same exact - * partition hashing key, the Event Hubs service will route them all to the same partition. This - * should be specified only when there is a need to group events by partition, but there is - * flexibility into which partition they are routed. If ensuring that a batch of events is sent only - * to a specific partition, it is recommended that the identifier of the position be specified - * directly when sending the batch. - */ - public fun partitionKey(partitionKey: String) { - it.property("partitionKey", partitionKey) - } - - /** - * Sets the EventHubProducerAsyncClient.An asynchronous producer responsible for transmitting - * EventData to a specific Event Hub, grouped together in batches. Depending on the - * com.azure.messaging.eventhubs.models.CreateBatchOptions options specified when creating an - * com.azure.messaging.eventhubs.EventDataBatch, the events may be automatically routed to an - * available partition or specific to a partition. Use by this component to produce the data in camel - * producer. - */ - public fun producerAsyncClient(producerAsyncClient: String) { - it.property("producerAsyncClient", producerAsyncClient) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Instead of supplying namespace, sharedAccessKey, sharedAccessName, etc. you can supply the - * connection string for your eventHub. The connection string for EventHubs already includes all the - * necessary information to connect to your EventHub. To learn how to generate the connection string, - * take a look at this documentation: - * https://docs.microsoft.com/en-us/azure/event-hubs/event-hubs-get-connection-string - */ - public fun connectionString(connectionString: String) { - it.property("connectionString", connectionString) - } - - /** - * Determines the credential strategy to adopt - */ - public fun credentialType(credentialType: String) { - it.property("credentialType", credentialType) - } - - /** - * The generated value for the SharedAccessName. - */ - public fun sharedAccessKey(sharedAccessKey: String) { - it.property("sharedAccessKey", sharedAccessKey) - } - - /** - * The name you chose for your EventHubs SAS keys. - */ - public fun sharedAccessName(sharedAccessName: String) { - it.property("sharedAccessName", sharedAccessName) - } - - /** - * Provide custom authentication credentials using an implementation of TokenCredential. - */ - public fun tokenCredential(tokenCredential: String) { - it.property("tokenCredential", tokenCredential) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureFilesUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureFilesUriDsl.kt deleted file mode 100644 index f70613a5d6a80..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureFilesUriDsl.kt +++ /dev/null @@ -1,1447 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive files to Azure storage file share - */ -public fun UriDsl.`azure-files`(i: AzureFilesUriDsl.() -> Unit) { - AzureFilesUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AzureFilesUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("azure-files") - } - - private var account: String = "" - - private var share: String = "" - - private var port: String = "" - - private var directoryName: String = "" - - /** - * The account to use - */ - public fun account(account: String) { - this.account = account - it.url("$account/$share") - } - - /** - * The share to use - */ - public fun share(share: String) { - this.share = share - it.url("$account/$share") - } - - /** - * Port of the FTP server - */ - public fun port(port: String) { - this.port = port - it.url("$account/$share") - } - - /** - * Port of the FTP server - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$account/$share") - } - - /** - * The starting directory - */ - public fun directoryName(directoryName: String) { - this.directoryName = directoryName - it.url("$account/$share") - } - - /** - * Determines the credential strategy to adopt - */ - public fun credentialType(credentialType: String) { - it.property("credentialType", credentialType) - } - - /** - * Whether or not to disconnect from remote FTP server right after use. Disconnect will only - * disconnect the current connection to the FTP server. If you have a consumer which you want to - * stop, then you need to stop the consumer/route instead. - */ - public fun disconnect(disconnect: String) { - it.property("disconnect", disconnect) - } - - /** - * Whether or not to disconnect from remote FTP server right after use. Disconnect will only - * disconnect the current connection to the FTP server. If you have a consumer which you want to - * stop, then you need to stop the consumer/route instead. - */ - public fun disconnect(disconnect: Boolean) { - it.property("disconnect", disconnect.toString()) - } - - /** - * Producer: If provided, then Camel will write a 2nd done file when the original file has been - * written. The done file will be empty. This option configures what file name to use. Either you can - * specify a fixed name. Or you can use dynamic placeholders. The done file will always be written in - * the same folder as the original file. Consumer: If provided, Camel will only consume files if a - * done file exists. This option configures what file name to use. Either you can specify a fixed - * name. Or you can use dynamic placeholders.The done file is always expected in the same folder as - * the original file. Only ${file.name} and ${file.name.next} is supported as dynamic placeholders. - */ - public fun doneFileName(doneFileName: String) { - it.property("doneFileName", doneFileName) - } - - /** - * Use Expression such as File Language to dynamically set the filename. For consumers, it's used - * as a filename filter. For producers, it's used to evaluate the filename to write. If an expression - * is set, it take precedence over the CamelFileName header. (Note: The header itself can also be an - * Expression). The expression options support both String and Expression types. If the expression is - * a String type, it is always evaluated using the File Language. If the expression is an Expression - * type, the specified Expression type is used - this allows you, for instance, to use OGNL - * expressions. For the consumer, you can use it to filter filenames, so you can for instance consume - * today's file using the File Language syntax: mydata-${date:now:yyyyMMdd}.txt. The producers - * support the CamelOverruleFileName header which takes precedence over any existing CamelFileName - * header; the CamelOverruleFileName is a header that is used only once, and makes it easier as this - * avoids to temporary store CamelFileName and have to restore it afterwards. - */ - public fun fileName(fileName: String) { - it.property("fileName", fileName) - } - - /** - * Shared key (storage account key) - */ - public fun sharedKey(sharedKey: String) { - it.property("sharedKey", sharedKey) - } - - /** - * If true, the file will be deleted after it is processed successfully. - */ - public fun delete(delete: String) { - it.property("delete", delete) - } - - /** - * If true, the file will be deleted after it is processed successfully. - */ - public fun delete(delete: Boolean) { - it.property("delete", delete.toString()) - } - - /** - * Sets the move failure expression based on Simple language. For example, to move files into a - * .error subdirectory use: .error. Note: When moving the files to the fail location Camel will - * handle the error and will not pick up the file again. - */ - public fun moveFailed(moveFailed: String) { - it.property("moveFailed", moveFailed) - } - - /** - * If true, the file is not moved or deleted in any way. This option is good for readonly data, or - * for ETL type requirements. If noop=true, Camel will set idempotent=true as well, to avoid - * consuming the same files over and over again. - */ - public fun noop(noop: String) { - it.property("noop", noop) - } - - /** - * If true, the file is not moved or deleted in any way. This option is good for readonly data, or - * for ETL type requirements. If noop=true, Camel will set idempotent=true as well, to avoid - * consuming the same files over and over again. - */ - public fun noop(noop: Boolean) { - it.property("noop", noop.toString()) - } - - /** - * Expression (such as File Language) used to dynamically set the filename when moving it before - * processing. For example to move in-progress files into the order directory set this value to - * order. - */ - public fun preMove(preMove: String) { - it.property("preMove", preMove) - } - - /** - * When pre-sort is enabled then the consumer will sort the file and directory names during - * polling, that was retrieved from the file system. You may want to do this in case you need to - * operate on the files in a sorted order. The pre-sort is executed before the consumer starts to - * filter, and accept files to process by Camel. This option is default=false meaning disabled. - */ - public fun preSort(preSort: String) { - it.property("preSort", preSort) - } - - /** - * When pre-sort is enabled then the consumer will sort the file and directory names during - * polling, that was retrieved from the file system. You may want to do this in case you need to - * operate on the files in a sorted order. The pre-sort is executed before the consumer starts to - * filter, and accept files to process by Camel. This option is default=false meaning disabled. - */ - public fun preSort(preSort: Boolean) { - it.property("preSort", preSort.toString()) - } - - /** - * If a directory, will look for files in all the sub-directories as well. - */ - public fun recursive(recursive: String) { - it.property("recursive", recursive) - } - - /** - * If a directory, will look for files in all the sub-directories as well. - */ - public fun recursive(recursive: Boolean) { - it.property("recursive", recursive.toString()) - } - - /** - * Configures whether resume download is enabled. In addition the options localWorkDirectory must - * be configured so downloaded files are stored in a local directory, which is required to support - * resuming of downloads. - */ - public fun resumeDownload(resumeDownload: String) { - it.property("resumeDownload", resumeDownload) - } - - /** - * Configures whether resume download is enabled. In addition the options localWorkDirectory must - * be configured so downloaded files are stored in a local directory, which is required to support - * resuming of downloads. - */ - public fun resumeDownload(resumeDownload: Boolean) { - it.property("resumeDownload", resumeDownload.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Sets the download method to use when not using a local working directory. If set to true, the - * remote files are streamed to the route as they are read. When set to false, the remote files are - * loaded into memory before being sent into the route. If enabling this option then you must set - * stepwise=false as both cannot be enabled at the same time. - */ - public fun streamDownload(streamDownload: String) { - it.property("streamDownload", streamDownload) - } - - /** - * Sets the download method to use when not using a local working directory. If set to true, the - * remote files are streamed to the route as they are read. When set to false, the remote files are - * loaded into memory before being sent into the route. If enabling this option then you must set - * stepwise=false as both cannot be enabled at the same time. - */ - public fun streamDownload(streamDownload: Boolean) { - it.property("streamDownload", streamDownload.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Whether the FTP consumer should download the file. If this option is set to false, then the - * message body will be null, but the consumer will still trigger a Camel Exchange that has details - * about the file such as file name, file size, etc. It's just that the file will not be downloaded. - */ - public fun download(download: String) { - it.property("download", download) - } - - /** - * Whether the FTP consumer should download the file. If this option is set to false, then the - * message body will be null, but the consumer will still trigger a Camel Exchange that has details - * about the file such as file name, file size, etc. It's just that the file will not be downloaded. - */ - public fun download(download: Boolean) { - it.property("download", download.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable in-progress repository org.apache.camel.spi.IdempotentRepository. The in-progress - * repository is used to account the current in progress files being consumed. By default a memory - * based repository is used. - */ - public fun inProgressRepository(inProgressRepository: String) { - it.property("inProgressRepository", inProgressRepository) - } - - /** - * When consuming, a local work directory can be used to store the remote file content directly in - * local files, to avoid loading the content into memory. This is beneficial, if you consume a very - * big remote file and thus can conserve memory. - */ - public fun localWorkDirectory(localWorkDirectory: String) { - it.property("localWorkDirectory", localWorkDirectory) - } - - /** - * To use a custom org.apache.camel.spi.ExceptionHandler to handle any thrown exceptions that - * happens during the file on completion process where the consumer does either a commit or rollback. - * The default implementation will log any exception at WARN level and ignore. - */ - public fun onCompletionExceptionHandler(onCompletionExceptionHandler: String) { - it.property("onCompletionExceptionHandler", onCompletionExceptionHandler) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * A pluggable org.apache.camel.component.file.GenericFileProcessStrategy allowing you to - * implement your own readLock option or similar. Can also be used when special conditions must be - * met before a file can be consumed, such as a special ready file exists. If this option is set then - * the readLock option does not apply. - */ - public fun processStrategy(processStrategy: String) { - it.property("processStrategy", processStrategy) - } - - /** - * If provided, then Camel will write a checksum file when the original file has been written. The - * checksum file will contain the checksum created with the provided algorithm for the original file. - * The checksum file will always be written in the same folder as the original file. - */ - public fun checksumFileAlgorithm(checksumFileAlgorithm: String) { - it.property("checksumFileAlgorithm", checksumFileAlgorithm) - } - - /** - * What to do if a file already exists with the same name. Override, which is the default, - * replaces the existing file. - Append - adds content to the existing file. - Fail - throws a - * GenericFileOperationException, indicating that there is already an existing file. - Ignore - - * silently ignores the problem and does not override the existing file, but assumes everything is - * okay. - Move - option requires to use the moveExisting option to be configured as well. The option - * eagerDeleteTargetFile can be used to control what to do if an moving the file, and there exists - * already an existing file, otherwise causing the move operation to fail. The Move option will move - * any existing files, before writing the target file. - TryRename is only applicable if tempFileName - * option is in use. This allows to try renaming the file from the temporary name to the actual name, - * without doing any exists check. This check may be faster on some file systems and especially FTP - * servers. - */ - public fun fileExist(fileExist: String) { - it.property("fileExist", fileExist) - } - - /** - * Flatten is used to flatten the file name path to strip any leading paths, so it's just the file - * name. This allows you to consume recursively into sub-directories, but when you eg write the files - * to another directory they will be written in a single directory. Setting this to true on the - * producer enforces that any file name in CamelFileName header will be stripped for any leading - * paths. - */ - public fun flatten(flatten: String) { - it.property("flatten", flatten) - } - - /** - * Flatten is used to flatten the file name path to strip any leading paths, so it's just the file - * name. This allows you to consume recursively into sub-directories, but when you eg write the files - * to another directory they will be written in a single directory. Setting this to true on the - * producer enforces that any file name in CamelFileName header will be stripped for any leading - * paths. - */ - public fun flatten(flatten: Boolean) { - it.property("flatten", flatten.toString()) - } - - /** - * Used for jailing (restricting) writing files to the starting directory (and sub) only. This is - * enabled by default to not allow Camel to write files to outside directories (to be more secured - * out of the box). You can turn this off to allow writing files to directories outside the starting - * directory, such as parent or root folders. - */ - public fun jailStartingDirectory(jailStartingDirectory: String) { - it.property("jailStartingDirectory", jailStartingDirectory) - } - - /** - * Used for jailing (restricting) writing files to the starting directory (and sub) only. This is - * enabled by default to not allow Camel to write files to outside directories (to be more secured - * out of the box). You can turn this off to allow writing files to directories outside the starting - * directory, such as parent or root folders. - */ - public fun jailStartingDirectory(jailStartingDirectory: Boolean) { - it.property("jailStartingDirectory", jailStartingDirectory.toString()) - } - - /** - * The same as tempPrefix option but offering a more fine grained control on the naming of the - * temporary filename as it uses the File Language. The location for tempFilename is relative to the - * final file location in the option 'fileName', not the target directory in the base uri. For - * example if option fileName includes a directory prefix: dir/finalFilename then tempFileName is - * relative to that subdirectory dir. - */ - public fun tempFileName(tempFileName: String) { - it.property("tempFileName", tempFileName) - } - - /** - * This option is used to write the file using a temporary name and then, after the write is - * complete, rename it to the real name. Can be used to identify files being written and also avoid - * consumers (not using exclusive read locks) reading in progress files. Is often used by FTP when - * uploading big files. - */ - public fun tempPrefix(tempPrefix: String) { - it.property("tempPrefix", tempPrefix) - } - - /** - * Used to specify if a null body is allowed during file writing. If set to true then an empty - * file will be created, when set to false, and attempting to send a null body to the file component, - * a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist - * option is set to 'Override', then the file will be truncated, and if set to append the file will - * remain unchanged. - */ - public fun allowNullBody(allowNullBody: String) { - it.property("allowNullBody", allowNullBody) - } - - /** - * Used to specify if a null body is allowed during file writing. If set to true then an empty - * file will be created, when set to false, and attempting to send a null body to the file component, - * a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist - * option is set to 'Override', then the file will be truncated, and if set to append the file will - * remain unchanged. - */ - public fun allowNullBody(allowNullBody: Boolean) { - it.property("allowNullBody", allowNullBody.toString()) - } - - /** - * Whether or not to disconnect from remote FTP server right after a Batch upload is complete. - * disconnectOnBatchComplete will only disconnect the current connection to the FTP server. - */ - public fun disconnectOnBatchComplete(disconnectOnBatchComplete: String) { - it.property("disconnectOnBatchComplete", disconnectOnBatchComplete) - } - - /** - * Whether or not to disconnect from remote FTP server right after a Batch upload is complete. - * disconnectOnBatchComplete will only disconnect the current connection to the FTP server. - */ - public fun disconnectOnBatchComplete(disconnectOnBatchComplete: Boolean) { - it.property("disconnectOnBatchComplete", disconnectOnBatchComplete.toString()) - } - - /** - * Whether or not to eagerly delete any existing target file. This option only applies when you - * use fileExists=Override and the tempFileName option as well. You can use this to disable (set it - * to false) deleting the target file before the temp file is written. For example you may write big - * files and want the target file to exists during the temp file is being written. This ensure the - * target file is only deleted until the very last moment, just before the temp file is being renamed - * to the target filename. This option is also used to control whether to delete any existing files - * when fileExist=Move is enabled, and an existing file exists. If this option - * copyAndDeleteOnRenameFails false, then an exception will be thrown if an existing file existed, if - * its true, then the existing file is deleted before the move operation. - */ - public fun eagerDeleteTargetFile(eagerDeleteTargetFile: String) { - it.property("eagerDeleteTargetFile", eagerDeleteTargetFile) - } - - /** - * Whether or not to eagerly delete any existing target file. This option only applies when you - * use fileExists=Override and the tempFileName option as well. You can use this to disable (set it - * to false) deleting the target file before the temp file is written. For example you may write big - * files and want the target file to exists during the temp file is being written. This ensure the - * target file is only deleted until the very last moment, just before the temp file is being renamed - * to the target filename. This option is also used to control whether to delete any existing files - * when fileExist=Move is enabled, and an existing file exists. If this option - * copyAndDeleteOnRenameFails false, then an exception will be thrown if an existing file existed, if - * its true, then the existing file is deleted before the move operation. - */ - public fun eagerDeleteTargetFile(eagerDeleteTargetFile: Boolean) { - it.property("eagerDeleteTargetFile", eagerDeleteTargetFile.toString()) - } - - /** - * Will keep the last modified timestamp from the source file (if any). Will use the - * FileConstants.FILE_LAST_MODIFIED header to located the timestamp. This header can contain either a - * java.util.Date or long with the timestamp. If the timestamp exists and the option is enabled it - * will set this timestamp on the written file. Note: This option only applies to the file producer. - * You cannot use this option with any of the ftp producers. - */ - public fun keepLastModified(keepLastModified: String) { - it.property("keepLastModified", keepLastModified) - } - - /** - * Will keep the last modified timestamp from the source file (if any). Will use the - * FileConstants.FILE_LAST_MODIFIED header to located the timestamp. This header can contain either a - * java.util.Date or long with the timestamp. If the timestamp exists and the option is enabled it - * will set this timestamp on the written file. Note: This option only applies to the file producer. - * You cannot use this option with any of the ftp producers. - */ - public fun keepLastModified(keepLastModified: Boolean) { - it.property("keepLastModified", keepLastModified.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Strategy (Custom Strategy) used to move file with special naming token to use when - * fileExist=Move is configured. By default, there is an implementation used if no custom strategy is - * provided - */ - public fun moveExistingFileStrategy(moveExistingFileStrategy: String) { - it.property("moveExistingFileStrategy", moveExistingFileStrategy) - } - - /** - * Automatically create missing directories in the file's pathname. For the file consumer, that - * means creating the starting directory. For the file producer, it means the directory the files - * should be written to. - */ - public fun autoCreate(autoCreate: String) { - it.property("autoCreate", autoCreate) - } - - /** - * Automatically create missing directories in the file's pathname. For the file consumer, that - * means creating the starting directory. For the file producer, it means the directory the files - * should be written to. - */ - public fun autoCreate(autoCreate: Boolean) { - it.property("autoCreate", autoCreate.toString()) - } - - /** - * Sets the connect timeout for waiting for a connection to be established Used by both FTPClient - * and JSCH - */ - public fun connectTimeout(connectTimeout: String) { - it.property("connectTimeout", connectTimeout) - } - - /** - * Specifies the maximum reconnect attempts Camel performs when it tries to connect to the remote - * FTP server. Use 0 to disable this behavior. - */ - public fun maximumReconnectAttempts(maximumReconnectAttempts: String) { - it.property("maximumReconnectAttempts", maximumReconnectAttempts) - } - - /** - * Specifies the maximum reconnect attempts Camel performs when it tries to connect to the remote - * FTP server. Use 0 to disable this behavior. - */ - public fun maximumReconnectAttempts(maximumReconnectAttempts: Int) { - it.property("maximumReconnectAttempts", maximumReconnectAttempts.toString()) - } - - /** - * Delay in millis Camel will wait before performing a reconnect attempt. - */ - public fun reconnectDelay(reconnectDelay: String) { - it.property("reconnectDelay", reconnectDelay) - } - - /** - * Should an exception be thrown if connection failed (exhausted)By default exception is not - * thrown and a WARN is logged. You can use this to enable exception being thrown and handle the - * thrown exception from the org.apache.camel.spi.PollingConsumerPollStrategy rollback method. - */ - public fun throwExceptionOnConnectFailed(throwExceptionOnConnectFailed: String) { - it.property("throwExceptionOnConnectFailed", throwExceptionOnConnectFailed) - } - - /** - * Should an exception be thrown if connection failed (exhausted)By default exception is not - * thrown and a WARN is logged. You can use this to enable exception being thrown and handle the - * thrown exception from the org.apache.camel.spi.PollingConsumerPollStrategy rollback method. - */ - public fun throwExceptionOnConnectFailed(throwExceptionOnConnectFailed: Boolean) { - it.property("throwExceptionOnConnectFailed", throwExceptionOnConnectFailed.toString()) - } - - /** - * Sets the data timeout for waiting for reply Used only by FTPClient - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Ant style filter exclusion. If both antInclude and antExclude are used, antExclude takes - * precedence over antInclude. Multiple exclusions may be specified in comma-delimited format. - */ - public fun antExclude(antExclude: String) { - it.property("antExclude", antExclude) - } - - /** - * Sets case sensitive flag on ant filter. - */ - public fun antFilterCaseSensitive(antFilterCaseSensitive: String) { - it.property("antFilterCaseSensitive", antFilterCaseSensitive) - } - - /** - * Sets case sensitive flag on ant filter. - */ - public fun antFilterCaseSensitive(antFilterCaseSensitive: Boolean) { - it.property("antFilterCaseSensitive", antFilterCaseSensitive.toString()) - } - - /** - * Ant style filter inclusion. Multiple inclusions may be specified in comma-delimited format. - */ - public fun antInclude(antInclude: String) { - it.property("antInclude", antInclude) - } - - /** - * Allows for controlling whether the limit from maxMessagesPerPoll is eager or not. If eager then - * the limit is during the scanning of files. Where as false would scan all files, and then perform - * sorting. Setting this option to false allows for sorting all files first, and then limit the poll. - * Mind that this requires a higher memory usage as all file details are in memory to perform the - * sorting. - */ - public fun eagerMaxMessagesPerPoll(eagerMaxMessagesPerPoll: String) { - it.property("eagerMaxMessagesPerPoll", eagerMaxMessagesPerPoll) - } - - /** - * Allows for controlling whether the limit from maxMessagesPerPoll is eager or not. If eager then - * the limit is during the scanning of files. Where as false would scan all files, and then perform - * sorting. Setting this option to false allows for sorting all files first, and then limit the poll. - * Mind that this requires a higher memory usage as all file details are in memory to perform the - * sorting. - */ - public fun eagerMaxMessagesPerPoll(eagerMaxMessagesPerPoll: Boolean) { - it.property("eagerMaxMessagesPerPoll", eagerMaxMessagesPerPoll.toString()) - } - - /** - * Is used to exclude files, if filename matches the regex pattern (matching is case - * in-sensitive). Notice if you use symbols such as plus sign and others you would need to configure - * this using the RAW() syntax if configuring this as an endpoint uri. See more details at - * configuring endpoint uris - */ - public fun exclude(exclude: String) { - it.property("exclude", exclude) - } - - /** - * Is used to exclude files matching file extension name (case insensitive). For example to - * exclude bak files, then use excludeExt=bak. Multiple extensions can be separated by comma, for - * example to exclude bak and dat files, use excludeExt=bak,dat. Note that the file extension - * includes all parts, for example having a file named mydata.tar.gz will have extension as tar.gz. - * For more flexibility then use the include/exclude options. - */ - public fun excludeExt(excludeExt: String) { - it.property("excludeExt", excludeExt) - } - - /** - * Pluggable filter as a org.apache.camel.component.file.GenericFileFilter class. Will skip files - * if filter returns false in its accept() method. - */ - public fun filter(filter: String) { - it.property("filter", filter) - } - - /** - * Filters the directory based on Simple language. For example to filter on current date, you can - * use a simple date pattern such as ${date:now:yyyMMdd} - */ - public fun filterDirectory(filterDirectory: String) { - it.property("filterDirectory", filterDirectory) - } - - /** - * Filters the file based on Simple language. For example to filter on file size, you can use - * ${file:size} 5000 - */ - public fun filterFile(filterFile: String) { - it.property("filterFile", filterFile) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotent(idempotent: String) { - it.property("idempotent", idempotent) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotent(idempotent: Boolean) { - it.property("idempotent", idempotent.toString()) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotentEager(idempotentEager: String) { - it.property("idempotentEager", idempotentEager) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotentEager(idempotentEager: Boolean) { - it.property("idempotentEager", idempotentEager.toString()) - } - - /** - * To use a custom idempotent key. By default the absolute path of the file is used. You can use - * the File Language, for example to use the file name and file size, you can do: - * idempotentKey=${file:name}-${file:size} - */ - public fun idempotentKey(idempotentKey: String) { - it.property("idempotentKey", idempotentKey) - } - - /** - * A pluggable repository org.apache.camel.spi.IdempotentRepository which by default use - * MemoryIdempotentRepository if none is specified and idempotent is true. - */ - public fun idempotentRepository(idempotentRepository: String) { - it.property("idempotentRepository", idempotentRepository) - } - - /** - * Is used to include files, if filename matches the regex pattern (matching is case - * in-sensitive). Notice if you use symbols such as plus sign and others you would need to configure - * this using the RAW() syntax if configuring this as an endpoint uri. See more details at - * configuring endpoint uris - */ - public fun include(include: String) { - it.property("include", include) - } - - /** - * Is used to include files matching file extension name (case insensitive). For example to - * include txt files, then use includeExt=txt. Multiple extensions can be separated by comma, for - * example to include txt and xml files, use includeExt=txt,xml. Note that the file extension - * includes all parts, for example having a file named mydata.tar.gz will have extension as tar.gz. - * For more flexibility then use the include/exclude options. - */ - public fun includeExt(includeExt: String) { - it.property("includeExt", includeExt) - } - - /** - * The maximum depth to traverse when recursively processing a directory. - */ - public fun maxDepth(maxDepth: String) { - it.property("maxDepth", maxDepth) - } - - /** - * The maximum depth to traverse when recursively processing a directory. - */ - public fun maxDepth(maxDepth: Int) { - it.property("maxDepth", maxDepth.toString()) - } - - /** - * To define a maximum messages to gather per poll. By default no maximum is set. Can be used to - * set a limit of e.g. 1000 to avoid when starting up the server that there are thousands of files. - * Set a value of 0 or negative to disabled it. Notice: If this option is in use then the File and - * FTP components will limit before any sorting. For example if you have 100000 files and use - * maxMessagesPerPoll=500, then only the first 500 files will be picked up, and then sorted. You can - * use the eagerMaxMessagesPerPoll option and set this to false to allow to scan all files first and - * then sort afterwards. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * To define a maximum messages to gather per poll. By default no maximum is set. Can be used to - * set a limit of e.g. 1000 to avoid when starting up the server that there are thousands of files. - * Set a value of 0 or negative to disabled it. Notice: If this option is in use then the File and - * FTP components will limit before any sorting. For example if you have 100000 files and use - * maxMessagesPerPoll=500, then only the first 500 files will be picked up, and then sorted. You can - * use the eagerMaxMessagesPerPoll option and set this to false to allow to scan all files first and - * then sort afterwards. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * The minimum depth to start processing when recursively processing a directory. Using minDepth=1 - * means the base directory. Using minDepth=2 means the first sub directory. - */ - public fun minDepth(minDepth: String) { - it.property("minDepth", minDepth) - } - - /** - * The minimum depth to start processing when recursively processing a directory. Using minDepth=1 - * means the base directory. Using minDepth=2 means the first sub directory. - */ - public fun minDepth(minDepth: Int) { - it.property("minDepth", minDepth.toString()) - } - - /** - * Expression (such as Simple Language) used to dynamically set the filename when moving it after - * processing. To move files into a .done subdirectory just enter .done. - */ - public fun move(move: String) { - it.property("move", move) - } - - /** - * Pluggable read-lock as a org.apache.camel.component.file.GenericFileExclusiveReadLockStrategy - * implementation. - */ - public fun exclusiveReadLockStrategy(exclusiveReadLockStrategy: String) { - it.property("exclusiveReadLockStrategy", exclusiveReadLockStrategy) - } - - /** - * Used by consumer, to only poll the files if it has exclusive read-lock on the file (i.e. the - * file is not in-progress or being written). Camel will wait until the file lock is granted. This - * option provides the build in strategies: - none - No read lock is in use - markerFile - Camel - * creates a marker file (fileName.camelLock) and then holds a lock on it. This option is not - * available for the FTP component - changed - Changed is using file length/modification timestamp to - * detect whether the file is currently being copied or not. Will at least use 1 sec to determine - * this, so this option cannot consume files as fast as the others, but can be more reliable as the - * JDK IO API cannot always determine whether a file is currently being used by another process. The - * option readLockCheckInterval can be used to set the check frequency. - fileLock - is for using - * java.nio.channels.FileLock. This option is not avail for Windows OS and the FTP component. This - * approach should be avoided when accessing a remote file system via a mount/share unless that file - * system supports distributed file locks. - rename - rename is for using a try to rename the file as - * a test if we can get exclusive read-lock. - idempotent - (only for file component) idempotent is - * for using a idempotentRepository as the read-lock. This allows to use read locks that supports - * clustering if the idempotent repository implementation supports that. - idempotent-changed - (only - * for file component) idempotent-changed is for using a idempotentRepository and changed as the - * combined read-lock. This allows to use read locks that supports clustering if the idempotent - * repository implementation supports that. - idempotent-rename - (only for file component) - * idempotent-rename is for using a idempotentRepository and rename as the combined read-lock. This - * allows to use read locks that supports clustering if the idempotent repository implementation - * supports that.Notice: The various read locks is not all suited to work in clustered mode, where - * concurrent consumers on different nodes is competing for the same files on a shared file system. - * The markerFile using a close to atomic operation to create the empty marker file, but its not - * guaranteed to work in a cluster. The fileLock may work better but then the file system need to - * support distributed file locks, and so on. Using the idempotent read lock can support clustering - * if the idempotent repository supports clustering, such as Hazelcast Component or Infinispan. - */ - public fun readLock(readLock: String) { - it.property("readLock", readLock) - } - - /** - * Interval in millis for the read-lock, if supported by the read lock. This interval is used for - * sleeping between attempts to acquire the read lock. For example when using the changed read lock, - * you can set a higher interval period to cater for slow writes. The default of 1 sec. may be too - * fast if the producer is very slow writing the file. Notice: For FTP the default - * readLockCheckInterval is 5000. The readLockTimeout value must be higher than - * readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or more times - * higher than the readLockCheckInterval. This is needed to ensure that ample time is allowed for the - * read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockCheckInterval(readLockCheckInterval: String) { - it.property("readLockCheckInterval", readLockCheckInterval) - } - - /** - * Interval in millis for the read-lock, if supported by the read lock. This interval is used for - * sleeping between attempts to acquire the read lock. For example when using the changed read lock, - * you can set a higher interval period to cater for slow writes. The default of 1 sec. may be too - * fast if the producer is very slow writing the file. Notice: For FTP the default - * readLockCheckInterval is 5000. The readLockTimeout value must be higher than - * readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or more times - * higher than the readLockCheckInterval. This is needed to ensure that ample time is allowed for the - * read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockCheckInterval(readLockCheckInterval: Int) { - it.property("readLockCheckInterval", readLockCheckInterval.toString()) - } - - /** - * Whether or not read lock with marker files should upon startup delete any orphan read lock - * files, which may have been left on the file system, if Camel was not properly shutdown (such as a - * JVM crash). If turning this option to false then any orphaned lock file will cause Camel to not - * attempt to pickup that file, this could also be due another node is concurrently reading files - * from the same shared directory. - */ - public fun readLockDeleteOrphanLockFiles(readLockDeleteOrphanLockFiles: String) { - it.property("readLockDeleteOrphanLockFiles", readLockDeleteOrphanLockFiles) - } - - /** - * Whether or not read lock with marker files should upon startup delete any orphan read lock - * files, which may have been left on the file system, if Camel was not properly shutdown (such as a - * JVM crash). If turning this option to false then any orphaned lock file will cause Camel to not - * attempt to pickup that file, this could also be due another node is concurrently reading files - * from the same shared directory. - */ - public fun readLockDeleteOrphanLockFiles(readLockDeleteOrphanLockFiles: Boolean) { - it.property("readLockDeleteOrphanLockFiles", readLockDeleteOrphanLockFiles.toString()) - } - - /** - * Logging level used when a read lock could not be acquired. By default a DEBUG is logged. You - * can change this level, for example to OFF to not have any logging. This option is only applicable - * for readLock of types: changed, fileLock, idempotent, idempotent-changed, idempotent-rename, - * rename. - */ - public fun readLockLoggingLevel(readLockLoggingLevel: String) { - it.property("readLockLoggingLevel", readLockLoggingLevel) - } - - /** - * Whether to use marker file with the changed, rename, or exclusive read lock types. By default a - * marker file is used as well to guard against other processes picking up the same files. This - * behavior can be turned off by setting this option to false. For example if you do not want to - * write marker files to the file systems by the Camel application. - */ - public fun readLockMarkerFile(readLockMarkerFile: String) { - it.property("readLockMarkerFile", readLockMarkerFile) - } - - /** - * Whether to use marker file with the changed, rename, or exclusive read lock types. By default a - * marker file is used as well to guard against other processes picking up the same files. This - * behavior can be turned off by setting this option to false. For example if you do not want to - * write marker files to the file systems by the Camel application. - */ - public fun readLockMarkerFile(readLockMarkerFile: Boolean) { - it.property("readLockMarkerFile", readLockMarkerFile.toString()) - } - - /** - * This option is applied only for readLock=changed. It allows to specify a minimum age the file - * must be before attempting to acquire the read lock. For example use readLockMinAge=300s to require - * the file is at last 5 minutes old. This can speedup the changed read lock as it will only attempt - * to acquire files which are at least that given age. - */ - public fun readLockMinAge(readLockMinAge: String) { - it.property("readLockMinAge", readLockMinAge) - } - - /** - * This option is applied only for readLock=changed. It allows to specify a minimum age the file - * must be before attempting to acquire the read lock. For example use readLockMinAge=300s to require - * the file is at last 5 minutes old. This can speedup the changed read lock as it will only attempt - * to acquire files which are at least that given age. - */ - public fun readLockMinAge(readLockMinAge: Int) { - it.property("readLockMinAge", readLockMinAge.toString()) - } - - /** - * This option is applied only for readLock=changed. It allows you to configure a minimum file - * length. By default Camel expects the file to contain data, and thus the default value is 1. You - * can set this option to zero, to allow consuming zero-length files. - */ - public fun readLockMinLength(readLockMinLength: String) { - it.property("readLockMinLength", readLockMinLength) - } - - /** - * This option is applied only for readLock=changed. It allows you to configure a minimum file - * length. By default Camel expects the file to contain data, and thus the default value is 1. You - * can set this option to zero, to allow consuming zero-length files. - */ - public fun readLockMinLength(readLockMinLength: Int) { - it.property("readLockMinLength", readLockMinLength.toString()) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file is succeeded and a commit - * happens. By default the file is not removed which ensures that any race-condition do not occur so - * another active node may attempt to grab the file. Instead the idempotent repository may support - * eviction strategies that you can configure to evict the file name entry after X minutes - this - * ensures no problems with race conditions. See more details at the readLockIdempotentReleaseDelay - * option. - */ - public fun readLockRemoveOnCommit(readLockRemoveOnCommit: String) { - it.property("readLockRemoveOnCommit", readLockRemoveOnCommit) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file is succeeded and a commit - * happens. By default the file is not removed which ensures that any race-condition do not occur so - * another active node may attempt to grab the file. Instead the idempotent repository may support - * eviction strategies that you can configure to evict the file name entry after X minutes - this - * ensures no problems with race conditions. See more details at the readLockIdempotentReleaseDelay - * option. - */ - public fun readLockRemoveOnCommit(readLockRemoveOnCommit: Boolean) { - it.property("readLockRemoveOnCommit", readLockRemoveOnCommit.toString()) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file failed and a rollback - * happens. If this option is false, then the file name entry is confirmed (as if the file did a - * commit). - */ - public fun readLockRemoveOnRollback(readLockRemoveOnRollback: String) { - it.property("readLockRemoveOnRollback", readLockRemoveOnRollback) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file failed and a rollback - * happens. If this option is false, then the file name entry is confirmed (as if the file did a - * commit). - */ - public fun readLockRemoveOnRollback(readLockRemoveOnRollback: Boolean) { - it.property("readLockRemoveOnRollback", readLockRemoveOnRollback.toString()) - } - - /** - * Optional timeout in millis for the read-lock, if supported by the read-lock. If the read-lock - * could not be granted and the timeout triggered, then Camel will skip the file. At next poll Camel, - * will try the file again, and this time maybe the read-lock could be granted. Use a value of 0 or - * lower to indicate forever. Currently fileLock, changed and rename support the timeout. Notice: For - * FTP the default readLockTimeout value is 20000 instead of 10000. The readLockTimeout value must be - * higher than readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or - * more times higher than the readLockCheckInterval. This is needed to ensure that ample time is - * allowed for the read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockTimeout(readLockTimeout: String) { - it.property("readLockTimeout", readLockTimeout) - } - - /** - * Optional timeout in millis for the read-lock, if supported by the read-lock. If the read-lock - * could not be granted and the timeout triggered, then Camel will skip the file. At next poll Camel, - * will try the file again, and this time maybe the read-lock could be granted. Use a value of 0 or - * lower to indicate forever. Currently fileLock, changed and rename support the timeout. Notice: For - * FTP the default readLockTimeout value is 20000 instead of 10000. The readLockTimeout value must be - * higher than readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or - * more times higher than the readLockCheckInterval. This is needed to ensure that ample time is - * allowed for the read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockTimeout(readLockTimeout: Int) { - it.property("readLockTimeout", readLockTimeout.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * part of service SAS token - */ - public fun sdd(sdd: String) { - it.property("sdd", sdd) - } - - /** - * part of SAS token - */ - public fun se(se: String) { - it.property("se", se) - } - - /** - * part of service SAS token - */ - public fun si(si: String) { - it.property("si", si) - } - - /** - * part of SAS token - */ - public fun sig(sig: String) { - it.property("sig", sig) - } - - /** - * part of SAS token - */ - public fun sip(sip: String) { - it.property("sip", sip) - } - - /** - * part of SAS token - */ - public fun sp(sp: String) { - it.property("sp", sp) - } - - /** - * part of SAS token - */ - public fun spr(spr: String) { - it.property("spr", spr) - } - - /** - * part of service SAS token - */ - public fun sr(sr: String) { - it.property("sr", sr) - } - - /** - * part of SAS token - */ - public fun srt(srt: String) { - it.property("srt", srt) - } - - /** - * part of account SAS token - */ - public fun ss(ss: String) { - it.property("ss", ss) - } - - /** - * part of SAS token - */ - public fun st(st: String) { - it.property("st", st) - } - - /** - * part of SAS token - */ - public fun sv(sv: String) { - it.property("sv", sv) - } - - /** - * To shuffle the list of files (sort in random order) - */ - public fun shuffle(shuffle: String) { - it.property("shuffle", shuffle) - } - - /** - * To shuffle the list of files (sort in random order) - */ - public fun shuffle(shuffle: Boolean) { - it.property("shuffle", shuffle.toString()) - } - - /** - * Built-in sort by using the File Language. Supports nested sorts, so you can have a sort by file - * name and as a 2nd group sort by modified date. - */ - public fun sortBy(sortBy: String) { - it.property("sortBy", sortBy) - } - - /** - * Pluggable sorter as a java.util.Comparator class. - */ - public fun sorter(sorter: String) { - it.property("sorter", sorter) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureKeyVaultUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureKeyVaultUriDsl.kt deleted file mode 100644 index 9918e159a10f8..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureKeyVaultUriDsl.kt +++ /dev/null @@ -1,118 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage secrets and keys in Azure Key Vault Service - */ -public fun UriDsl.`azure-key-vault`(i: AzureKeyVaultUriDsl.() -> Unit) { - AzureKeyVaultUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AzureKeyVaultUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("azure-key-vault") - } - - private var vaultName: String = "" - - /** - * Vault Name to be used - */ - public fun vaultName(vaultName: String) { - this.vaultName = vaultName - it.url("$vaultName") - } - - /** - * Determines the credential strategy to adopt - */ - public fun credentialType(credentialType: String) { - it.property("credentialType", credentialType) - } - - /** - * Operation to be performed - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Instance of Secret client - */ - public fun secretClient(secretClient: String) { - it.property("secretClient", secretClient) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Client Id to be used - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * Client Secret to be used - */ - public fun clientSecret(clientSecret: String) { - it.property("clientSecret", clientSecret) - } - - /** - * Tenant Id to be used - */ - public fun tenantId(tenantId: String) { - it.property("tenantId", tenantId) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureServicebusUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureServicebusUriDsl.kt deleted file mode 100644 index 3f0103e635bcb..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureServicebusUriDsl.kt +++ /dev/null @@ -1,333 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from Azure Service Bus. - */ -public fun UriDsl.`azure-servicebus`(i: AzureServicebusUriDsl.() -> Unit) { - AzureServicebusUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AzureServicebusUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("azure-servicebus") - } - - private var topicOrQueueName: String = "" - - /** - * Selected topic name or the queue name, that is depending on serviceBusType config. For example - * if serviceBusType=queue, then this will be the queue name and if serviceBusType=topic, this will - * be the topic name. - */ - public fun topicOrQueueName(topicOrQueueName: String) { - this.topicOrQueueName = topicOrQueueName - it.url("$topicOrQueueName") - } - - /** - * Sets the retry options for Service Bus clients. If not specified, the default retry options are - * used. - */ - public fun amqpRetryOptions(amqpRetryOptions: String) { - it.property("amqpRetryOptions", amqpRetryOptions) - } - - /** - * Sets the transport type by which all the communication with Azure Service Bus occurs. Default - * value is AMQP. - */ - public fun amqpTransportType(amqpTransportType: String) { - it.property("amqpTransportType", amqpTransportType) - } - - /** - * Sets the ClientOptions to be sent from the client built from this builder, enabling - * customization of certain properties, as well as support the addition of custom header information. - */ - public fun clientOptions(clientOptions: String) { - it.property("clientOptions", clientOptions) - } - - /** - * To use a custom HeaderFilterStrategy to filter Service Bus application properties to and from - * Camel message headers. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * Sets the proxy configuration to use for ServiceBusSenderClient. When a proxy is configured, - * AMQP_WEB_SOCKETS must be used for the transport type. - */ - public fun proxyOptions(proxyOptions: String) { - it.property("proxyOptions", proxyOptions) - } - - /** - * The service bus type of connection to execute. Queue is for typical queue option and topic for - * subscription based model. - */ - public fun serviceBusType(serviceBusType: String) { - it.property("serviceBusType", serviceBusType) - } - - /** - * Enable application level deadlettering to the subscription deadletter subqueue if deadletter - * related headers are set. - */ - public fun enableDeadLettering(enableDeadLettering: String) { - it.property("enableDeadLettering", enableDeadLettering) - } - - /** - * Enable application level deadlettering to the subscription deadletter subqueue if deadletter - * related headers are set. - */ - public fun enableDeadLettering(enableDeadLettering: Boolean) { - it.property("enableDeadLettering", enableDeadLettering.toString()) - } - - /** - * Sets the amount of time to continue auto-renewing the lock. Setting ZERO disables auto-renewal. - * For ServiceBus receive mode (RECEIVE_AND_DELETE RECEIVE_AND_DELETE), auto-renewal is disabled. - */ - public fun maxAutoLockRenewDuration(maxAutoLockRenewDuration: String) { - it.property("maxAutoLockRenewDuration", maxAutoLockRenewDuration) - } - - /** - * Sets maximum number of concurrent calls - */ - public fun maxConcurrentCalls(maxConcurrentCalls: String) { - it.property("maxConcurrentCalls", maxConcurrentCalls) - } - - /** - * Sets maximum number of concurrent calls - */ - public fun maxConcurrentCalls(maxConcurrentCalls: Int) { - it.property("maxConcurrentCalls", maxConcurrentCalls.toString()) - } - - /** - * Sets the prefetch count of the receiver. For both PEEK_LOCK PEEK_LOCK and RECEIVE_AND_DELETE - * RECEIVE_AND_DELETE receive modes the default value is 1. Prefetch speeds up the message flow by - * aiming to have a message readily available for local retrieval when and before the application - * asks for one using receive message. Setting a non-zero value will prefetch that number of - * messages. Setting the value to zero turns prefetch off. - */ - public fun prefetchCount(prefetchCount: String) { - it.property("prefetchCount", prefetchCount) - } - - /** - * Sets the prefetch count of the receiver. For both PEEK_LOCK PEEK_LOCK and RECEIVE_AND_DELETE - * RECEIVE_AND_DELETE receive modes the default value is 1. Prefetch speeds up the message flow by - * aiming to have a message readily available for local retrieval when and before the application - * asks for one using receive message. Setting a non-zero value will prefetch that number of - * messages. Setting the value to zero turns prefetch off. - */ - public fun prefetchCount(prefetchCount: Int) { - it.property("prefetchCount", prefetchCount.toString()) - } - - /** - * Sets the processorClient in order to consume messages by the consumer - */ - public fun processorClient(processorClient: String) { - it.property("processorClient", processorClient) - } - - /** - * Sets the receive mode for the receiver. - */ - public fun serviceBusReceiveMode(serviceBusReceiveMode: String) { - it.property("serviceBusReceiveMode", serviceBusReceiveMode) - } - - /** - * Sets the type of the SubQueue to connect to. - */ - public fun subQueue(subQueue: String) { - it.property("subQueue", subQueue) - } - - /** - * Sets the name of the subscription in the topic to listen to. topicOrQueueName and - * serviceBusType=topic must also be set. This property is required if serviceBusType=topic and the - * consumer is in use. - */ - public fun subscriptionName(subscriptionName: String) { - it.property("subscriptionName", subscriptionName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Set binary mode. If true, message body will be sent as byte. By default, it is false. - */ - public fun binary(binary: String) { - it.property("binary", binary) - } - - /** - * Set binary mode. If true, message body will be sent as byte. By default, it is false. - */ - public fun binary(binary: Boolean) { - it.property("binary", binary.toString()) - } - - /** - * Sets the desired operation to be used in the producer - */ - public fun producerOperation(producerOperation: String) { - it.property("producerOperation", producerOperation) - } - - /** - * Sets OffsetDateTime at which the message should appear in the Service Bus queue or topic. - */ - public fun scheduledEnqueueTime(scheduledEnqueueTime: String) { - it.property("scheduledEnqueueTime", scheduledEnqueueTime) - } - - /** - * Sets senderClient to be used in the producer. - */ - public fun senderClient(senderClient: String) { - it.property("senderClient", senderClient) - } - - /** - * Represents transaction in service. This object just contains transaction id. - */ - public fun serviceBusTransactionContext(serviceBusTransactionContext: String) { - it.property("serviceBusTransactionContext", serviceBusTransactionContext) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Sets the connection string for a Service Bus namespace or a specific Service Bus resource. - */ - public fun connectionString(connectionString: String) { - it.property("connectionString", connectionString) - } - - /** - * Determines the credential strategy to adopt - */ - public fun credentialType(credentialType: String) { - it.property("credentialType", credentialType) - } - - /** - * Fully Qualified Namespace of the service bus - */ - public fun fullyQualifiedNamespace(fullyQualifiedNamespace: String) { - it.property("fullyQualifiedNamespace", fullyQualifiedNamespace) - } - - /** - * A TokenCredential for Azure AD authentication. - */ - public fun tokenCredential(tokenCredential: String) { - it.property("tokenCredential", tokenCredential) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureStorageBlobUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureStorageBlobUriDsl.kt deleted file mode 100644 index cce5574410981..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureStorageBlobUriDsl.kt +++ /dev/null @@ -1,668 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Store and retrieve blobs from Azure Storage Blob Service. - */ -public fun UriDsl.`azure-storage-blob`(i: AzureStorageBlobUriDsl.() -> Unit) { - AzureStorageBlobUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AzureStorageBlobUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("azure-storage-blob") - } - - private var accountName: String = "" - - private var containerName: String = "" - - /** - * Azure account name to be used for authentication with azure blob services - */ - public fun accountName(accountName: String) { - this.accountName = accountName - it.url("$accountName/$containerName") - } - - /** - * The blob container name - */ - public fun containerName(containerName: String) { - this.containerName = containerName - it.url("$accountName/$containerName") - } - - /** - * The blob name, to consume specific blob from a container. However, on producer it is only - * required for the operations on the blob level - */ - public fun blobName(blobName: String) { - it.property("blobName", blobName) - } - - /** - * Set the blob offset for the upload or download operations, default is 0 - */ - public fun blobOffset(blobOffset: String) { - it.property("blobOffset", blobOffset) - } - - /** - * Set the blob offset for the upload or download operations, default is 0 - */ - public fun blobOffset(blobOffset: Int) { - it.property("blobOffset", blobOffset.toString()) - } - - /** - * Client to a storage account. This client does not hold any state about a particular storage - * account but is instead a convenient way of sending off appropriate requests to the resource on the - * service. It may also be used to construct URLs to blobs and containers. This client contains - * operations on a service account. Operations on a container are available on BlobContainerClient - * through getBlobContainerClient(String), and operations on a blob are available on BlobClient - * through getBlobContainerClient(String).getBlobClient(String). - */ - public fun blobServiceClient(blobServiceClient: String) { - it.property("blobServiceClient", blobServiceClient) - } - - /** - * The blob type in order to initiate the appropriate settings for each blob type - */ - public fun blobType(blobType: String) { - it.property("blobType", blobType) - } - - /** - * Close the stream after read or keep it open, default is true - */ - public fun closeStreamAfterRead(closeStreamAfterRead: String) { - it.property("closeStreamAfterRead", closeStreamAfterRead) - } - - /** - * Close the stream after read or keep it open, default is true - */ - public fun closeStreamAfterRead(closeStreamAfterRead: Boolean) { - it.property("closeStreamAfterRead", closeStreamAfterRead.toString()) - } - - /** - * StorageSharedKeyCredential can be injected to create the azure client, this holds the important - * authentication information - */ - public fun credentials(credentials: String) { - it.property("credentials", credentials) - } - - /** - * Determines the credential strategy to adopt - */ - public fun credentialType(credentialType: String) { - it.property("credentialType", credentialType) - } - - /** - * How many bytes to include in the range. Must be greater than or equal to 0 if specified. - */ - public fun dataCount(dataCount: String) { - it.property("dataCount", dataCount) - } - - /** - * How many bytes to include in the range. Must be greater than or equal to 0 if specified. - */ - public fun dataCount(dataCount: Int) { - it.property("dataCount", dataCount.toString()) - } - - /** - * The file directory where the downloaded blobs will be saved to, this can be used in both, - * producer and consumer - */ - public fun fileDir(fileDir: String) { - it.property("fileDir", fileDir) - } - - /** - * Specifies the maximum number of blobs to return, including all BlobPrefix elements. If the - * request does not specify maxResultsPerPage or specifies a value greater than 5,000, the server - * will return up to 5,000 items. - */ - public fun maxResultsPerPage(maxResultsPerPage: String) { - it.property("maxResultsPerPage", maxResultsPerPage) - } - - /** - * Specifies the maximum number of blobs to return, including all BlobPrefix elements. If the - * request does not specify maxResultsPerPage or specifies a value greater than 5,000, the server - * will return up to 5,000 items. - */ - public fun maxResultsPerPage(maxResultsPerPage: Int) { - it.property("maxResultsPerPage", maxResultsPerPage.toString()) - } - - /** - * Specifies the maximum number of additional HTTP Get requests that will be made while reading - * the data from a response body. - */ - public fun maxRetryRequests(maxRetryRequests: String) { - it.property("maxRetryRequests", maxRetryRequests) - } - - /** - * Specifies the maximum number of additional HTTP Get requests that will be made while reading - * the data from a response body. - */ - public fun maxRetryRequests(maxRetryRequests: Int) { - it.property("maxRetryRequests", maxRetryRequests.toString()) - } - - /** - * Filters the results to return only blobs whose names begin with the specified prefix. May be - * null to return all blobs. - */ - public fun prefix(prefix: String) { - it.property("prefix", prefix) - } - - /** - * Filters the results to return only blobs whose names match the specified regular expression. - * May be null to return all if both prefix and regex are set, regex takes the priority and prefix is - * ignored. - */ - public fun regex(regex: String) { - it.property("regex", regex) - } - - /** - * In case of usage of Shared Access Signature we'll need to set a SAS Token - */ - public fun sasToken(sasToken: String) { - it.property("sasToken", sasToken) - } - - /** - * Client to a storage account. This client does not hold any state about a particular storage - * account but is instead a convenient way of sending off appropriate requests to the resource on the - * service. It may also be used to construct URLs to blobs and containers. This client contains - * operations on a service account. Operations on a container are available on BlobContainerClient - * through BlobServiceClient#getBlobContainerClient(String), and operations on a blob are available - * on BlobClient through BlobContainerClient#getBlobClient(String). - */ - public fun serviceClient(serviceClient: String) { - it.property("serviceClient", serviceClient) - } - - /** - * An optional timeout value beyond which a RuntimeException will be raised. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * A user-controlled value that you can use to track requests. The value of the sequence number - * must be between 0 and 263 - 1.The default value is 0. - */ - public fun blobSequenceNumber(blobSequenceNumber: String) { - it.property("blobSequenceNumber", blobSequenceNumber) - } - - /** - * A user-controlled value that you can use to track requests. The value of the sequence number - * must be between 0 and 263 - 1.The default value is 0. - */ - public fun blobSequenceNumber(blobSequenceNumber: Int) { - it.property("blobSequenceNumber", blobSequenceNumber.toString()) - } - - /** - * Specifies which type of blocks to return. - */ - public fun blockListType(blockListType: String) { - it.property("blockListType", blockListType) - } - - /** - * When using getChangeFeed producer operation, this gives additional context that is passed - * through the Http pipeline during the service call. - */ - public fun changeFeedContext(changeFeedContext: String) { - it.property("changeFeedContext", changeFeedContext) - } - - /** - * When using getChangeFeed producer operation, this filters the results to return events - * approximately before the end time. Note: A few events belonging to the next hour can also be - * returned. A few events belonging to this hour can be missing; to ensure all events from the hour - * are returned, round the end time up by an hour. - */ - public fun changeFeedEndTime(changeFeedEndTime: String) { - it.property("changeFeedEndTime", changeFeedEndTime) - } - - /** - * When using getChangeFeed producer operation, this filters the results to return events - * approximately after the start time. Note: A few events belonging to the previous hour can also be - * returned. A few events belonging to this hour can be missing; to ensure all events from the hour - * are returned, round the start time down by an hour. - */ - public fun changeFeedStartTime(changeFeedStartTime: String) { - it.property("changeFeedStartTime", changeFeedStartTime) - } - - /** - * Close the stream after write or keep it open, default is true - */ - public fun closeStreamAfterWrite(closeStreamAfterWrite: String) { - it.property("closeStreamAfterWrite", closeStreamAfterWrite) - } - - /** - * Close the stream after write or keep it open, default is true - */ - public fun closeStreamAfterWrite(closeStreamAfterWrite: Boolean) { - it.property("closeStreamAfterWrite", closeStreamAfterWrite.toString()) - } - - /** - * When is set to true, the staged blocks will not be committed directly. - */ - public fun commitBlockListLater(commitBlockListLater: String) { - it.property("commitBlockListLater", commitBlockListLater) - } - - /** - * When is set to true, the staged blocks will not be committed directly. - */ - public fun commitBlockListLater(commitBlockListLater: Boolean) { - it.property("commitBlockListLater", commitBlockListLater.toString()) - } - - /** - * When is set to true, the append blocks will be created when committing append blocks. - */ - public fun createAppendBlob(createAppendBlob: String) { - it.property("createAppendBlob", createAppendBlob) - } - - /** - * When is set to true, the append blocks will be created when committing append blocks. - */ - public fun createAppendBlob(createAppendBlob: Boolean) { - it.property("createAppendBlob", createAppendBlob.toString()) - } - - /** - * When is set to true, the page blob will be created when uploading page blob. - */ - public fun createPageBlob(createPageBlob: String) { - it.property("createPageBlob", createPageBlob) - } - - /** - * When is set to true, the page blob will be created when uploading page blob. - */ - public fun createPageBlob(createPageBlob: Boolean) { - it.property("createPageBlob", createPageBlob.toString()) - } - - /** - * Override the default expiration (millis) of URL download link. - */ - public fun downloadLinkExpiration(downloadLinkExpiration: String) { - it.property("downloadLinkExpiration", downloadLinkExpiration) - } - - /** - * Override the default expiration (millis) of URL download link. - */ - public fun downloadLinkExpiration(downloadLinkExpiration: Int) { - it.property("downloadLinkExpiration", downloadLinkExpiration.toString()) - } - - /** - * The blob operation that can be used with this component on the producer - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to - * a 512-byte boundary. - */ - public fun pageBlobSize(pageBlobSize: String) { - it.property("pageBlobSize", pageBlobSize) - } - - /** - * Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to - * a 512-byte boundary. - */ - public fun pageBlobSize(pageBlobSize: Int) { - it.property("pageBlobSize", pageBlobSize.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Access key for the associated azure account name to be used for authentication with azure blob - * services - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Source Blob Access Key: for copyblob operation, sadly, we need to have an accessKey for the - * source blob we want to copy Passing an accessKey as header, it's unsafe so we could set as key. - */ - public fun sourceBlobAccessKey(sourceBlobAccessKey: String) { - it.property("sourceBlobAccessKey", sourceBlobAccessKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureStorageDatalakeUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureStorageDatalakeUriDsl.kt deleted file mode 100644 index 0cd2e2986b853..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureStorageDatalakeUriDsl.kt +++ /dev/null @@ -1,649 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Sends and receives files to/from Azure Data Lake Storage. - */ -public fun UriDsl.`azure-storage-datalake`(i: AzureStorageDatalakeUriDsl.() -> Unit) { - AzureStorageDatalakeUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AzureStorageDatalakeUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("azure-storage-datalake") - } - - private var accountName: String = "" - - private var fileSystemName: String = "" - - /** - * name of the azure account - */ - public fun accountName(accountName: String) { - this.accountName = accountName - it.url("$accountName/$fileSystemName") - } - - /** - * name of filesystem to be used - */ - public fun fileSystemName(fileSystemName: String) { - this.fileSystemName = fileSystemName - it.url("$accountName/$fileSystemName") - } - - /** - * client id for azure account - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * Whether or not a file changed event raised indicates completion (true) or modification (false) - */ - public fun close(close: String) { - it.property("close", close) - } - - /** - * Whether or not a file changed event raised indicates completion (true) or modification (false) - */ - public fun close(close: Boolean) { - it.property("close", close.toString()) - } - - /** - * check for closing stream after read - */ - public fun closeStreamAfterRead(closeStreamAfterRead: String) { - it.property("closeStreamAfterRead", closeStreamAfterRead) - } - - /** - * check for closing stream after read - */ - public fun closeStreamAfterRead(closeStreamAfterRead: Boolean) { - it.property("closeStreamAfterRead", closeStreamAfterRead.toString()) - } - - /** - * Determines the credential strategy to adopt - */ - public fun credentialType(credentialType: String) { - it.property("credentialType", credentialType) - } - - /** - * count number of bytes to download - */ - public fun dataCount(dataCount: String) { - it.property("dataCount", dataCount) - } - - /** - * count number of bytes to download - */ - public fun dataCount(dataCount: Int) { - it.property("dataCount", dataCount.toString()) - } - - /** - * service client of data lake - */ - public fun dataLakeServiceClient(dataLakeServiceClient: String) { - it.property("dataLakeServiceClient", dataLakeServiceClient) - } - - /** - * directory of the file to be handled in component - */ - public fun directoryName(directoryName: String) { - it.property("directoryName", directoryName) - } - - /** - * download link expiration time - */ - public fun downloadLinkExpiration(downloadLinkExpiration: String) { - it.property("downloadLinkExpiration", downloadLinkExpiration) - } - - /** - * download link expiration time - */ - public fun downloadLinkExpiration(downloadLinkExpiration: Int) { - it.property("downloadLinkExpiration", downloadLinkExpiration.toString()) - } - - /** - * expression for queryInputStream - */ - public fun expression(expression: String) { - it.property("expression", expression) - } - - /** - * directory of file to do operations in the local system - */ - public fun fileDir(fileDir: String) { - it.property("fileDir", fileDir) - } - - /** - * name of file to be handled in component - */ - public fun fileName(fileName: String) { - it.property("fileName", fileName) - } - - /** - * offset position in file for different operations - */ - public fun fileOffset(fileOffset: String) { - it.property("fileOffset", fileOffset) - } - - /** - * offset position in file for different operations - */ - public fun fileOffset(fileOffset: Int) { - it.property("fileOffset", fileOffset.toString()) - } - - /** - * maximum number of results to show at a time - */ - public fun maxResults(maxResults: String) { - it.property("maxResults", maxResults) - } - - /** - * maximum number of results to show at a time - */ - public fun maxResults(maxResults: Int) { - it.property("maxResults", maxResults.toString()) - } - - /** - * no of retries to a given request - */ - public fun maxRetryRequests(maxRetryRequests: String) { - it.property("maxRetryRequests", maxRetryRequests) - } - - /** - * no of retries to a given request - */ - public fun maxRetryRequests(maxRetryRequests: Int) { - it.property("maxRetryRequests", maxRetryRequests.toString()) - } - - /** - * set open options for creating file - */ - public fun openOptions(openOptions: String) { - it.property("openOptions", openOptions) - } - - /** - * path in azure data lake for operations - */ - public fun path(path: String) { - it.property("path", path) - } - - /** - * permission string for the file - */ - public fun permission(permission: String) { - it.property("permission", permission) - } - - /** - * This parameter allows the caller to upload data in parallel and control the order in which it - * is appended to the file. - */ - public fun position(position: String) { - it.property("position", position) - } - - /** - * This parameter allows the caller to upload data in parallel and control the order in which it - * is appended to the file. - */ - public fun position(position: Int) { - it.property("position", position.toString()) - } - - /** - * recursively include all paths - */ - public fun recursive(recursive: String) { - it.property("recursive", recursive) - } - - /** - * recursively include all paths - */ - public fun recursive(recursive: Boolean) { - it.property("recursive", recursive.toString()) - } - - /** - * regular expression for matching file names - */ - public fun regex(regex: String) { - it.property("regex", regex) - } - - /** - * Whether or not uncommitted data is to be retained after the operation - */ - public fun retainUncommitedData(retainUncommitedData: String) { - it.property("retainUncommitedData", retainUncommitedData) - } - - /** - * Whether or not uncommitted data is to be retained after the operation - */ - public fun retainUncommitedData(retainUncommitedData: Boolean) { - it.property("retainUncommitedData", retainUncommitedData.toString()) - } - - /** - * data lake service client for azure storage data lake - */ - public fun serviceClient(serviceClient: String) { - it.property("serviceClient", serviceClient) - } - - /** - * shared key credential for azure data lake gen2 - */ - public fun sharedKeyCredential(sharedKeyCredential: String) { - it.property("sharedKeyCredential", sharedKeyCredential) - } - - /** - * tenant id for azure account - */ - public fun tenantId(tenantId: String) { - it.property("tenantId", tenantId) - } - - /** - * Timeout for operation - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * umask permission for file - */ - public fun umask(umask: String) { - it.property("umask", umask) - } - - /** - * whether or not to use upn - */ - public fun userPrincipalNameReturned(userPrincipalNameReturned: String) { - it.property("userPrincipalNameReturned", userPrincipalNameReturned) - } - - /** - * whether or not to use upn - */ - public fun userPrincipalNameReturned(userPrincipalNameReturned: Boolean) { - it.property("userPrincipalNameReturned", userPrincipalNameReturned.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * operation to be performed - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * account key for authentication - */ - public fun accountKey(accountKey: String) { - it.property("accountKey", accountKey) - } - - /** - * client secret for azure account - */ - public fun clientSecret(clientSecret: String) { - it.property("clientSecret", clientSecret) - } - - /** - * client secret credential for authentication - */ - public fun clientSecretCredential(clientSecretCredential: String) { - it.property("clientSecretCredential", clientSecretCredential) - } - - /** - * SAS token credential - */ - public fun sasCredential(sasCredential: String) { - it.property("sasCredential", sasCredential) - } - - /** - * SAS token signature - */ - public fun sasSignature(sasSignature: String) { - it.property("sasSignature", sasSignature) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureStorageQueueUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureStorageQueueUriDsl.kt deleted file mode 100644 index 3b4c27788817d..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/AzureStorageQueueUriDsl.kt +++ /dev/null @@ -1,459 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Stores and retrieves messages to/from Azure Storage Queue. - */ -public fun UriDsl.`azure-storage-queue`(i: AzureStorageQueueUriDsl.() -> Unit) { - AzureStorageQueueUriDsl(this).apply(i) -} - -@CamelDslMarker -public class AzureStorageQueueUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("azure-storage-queue") - } - - private var accountName: String = "" - - private var queueName: String = "" - - /** - * Azure account name to be used for authentication with azure queue services - */ - public fun accountName(accountName: String) { - this.accountName = accountName - it.url("$accountName/$queueName") - } - - /** - * The queue resource name - */ - public fun queueName(queueName: String) { - this.queueName = queueName - it.url("$accountName/$queueName") - } - - /** - * Determines the credential strategy to adopt - */ - public fun credentialType(credentialType: String) { - it.property("credentialType", credentialType) - } - - /** - * Service client to a storage account to interact with the queue service. This client does not - * hold any state about a particular storage account but is instead a convenient way of sending off - * appropriate requests to the resource on the service. This client contains all the operations for - * interacting with a queue account in Azure Storage. Operations allowed by the client are creating, - * listing, and deleting queues, retrieving and updating properties of the account, and retrieving - * statistics of the account. - */ - public fun serviceClient(serviceClient: String) { - it.property("serviceClient", serviceClient) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * When is set to true, the queue will be automatically created when sending messages to the - * queue. - */ - public fun createQueue(createQueue: String) { - it.property("createQueue", createQueue) - } - - /** - * When is set to true, the queue will be automatically created when sending messages to the - * queue. - */ - public fun createQueue(createQueue: Boolean) { - it.property("createQueue", createQueue.toString()) - } - - /** - * Queue service operation hint to the producer - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Maximum number of messages to get, if there are less messages exist in the queue than requested - * all the messages will be returned. If left empty only 1 message will be retrieved, the allowed - * range is 1 to 32 messages. - */ - public fun maxMessages(maxMessages: String) { - it.property("maxMessages", maxMessages) - } - - /** - * Maximum number of messages to get, if there are less messages exist in the queue than requested - * all the messages will be returned. If left empty only 1 message will be retrieved, the allowed - * range is 1 to 32 messages. - */ - public fun maxMessages(maxMessages: Int) { - it.property("maxMessages", maxMessages.toString()) - } - - /** - * The ID of the message to be deleted or updated. - */ - public fun messageId(messageId: String) { - it.property("messageId", messageId) - } - - /** - * Unique identifier that must match for the message to be deleted or updated. - */ - public fun popReceipt(popReceipt: String) { - it.property("popReceipt", popReceipt) - } - - /** - * An optional timeout applied to the operation. If a response is not returned before the timeout - * concludes a RuntimeException will be thrown. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * How long the message will stay alive in the queue. If unset the value will default to 7 days, - * if -1 is passed the message will not expire. The time to live must be -1 or any positive number. - * The format should be in this form: PnDTnHnMn.nS., e.g: PT20.345S -- parses as 20.345 seconds, - * P2D -- parses as 2 days However, in case you are using EndpointDsl/ComponentDsl, you can do - * something like Duration.ofSeconds() since these Java APIs are typesafe. - */ - public fun timeToLive(timeToLive: String) { - it.property("timeToLive", timeToLive) - } - - /** - * The timeout period for how long the message is invisible in the queue. The timeout must be - * between 1 seconds and 7 days. The format should be in this form: PnDTnHnMn.nS., e.g: PT20.345S -- - * parses as 20.345 seconds, P2D -- parses as 2 days However, in case you are using - * EndpointDsl/ComponentDsl, you can do something like Duration.ofSeconds() since these Java APIs are - * typesafe. - */ - public fun visibilityTimeout(visibilityTimeout: String) { - it.property("visibilityTimeout", visibilityTimeout) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Access key for the associated azure account name to be used for authentication with azure queue - * services - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * StorageSharedKeyCredential can be injected to create the azure client, this holds the important - * authentication information - */ - public fun credentials(credentials: String) { - it.property("credentials", credentials) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BeanUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BeanUriDsl.kt deleted file mode 100644 index 4bd202769bfed..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BeanUriDsl.kt +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Invoke methods of Java beans stored in Camel registry. - */ -public fun UriDsl.bean(i: BeanUriDsl.() -> Unit) { - BeanUriDsl(this).apply(i) -} - -@CamelDslMarker -public class BeanUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("bean") - } - - private var beanName: String = "" - - /** - * Sets the name of the bean to invoke - */ - public fun beanName(beanName: String) { - this.beanName = beanName - it.url("$beanName") - } - - /** - * Sets the name of the method to invoke on the bean - */ - public fun method(method: String) { - it.property("method", method) - } - - /** - * Scope of bean. When using singleton scope (default) the bean is created or looked up only once - * and reused for the lifetime of the endpoint. The bean should be thread-safe in case concurrent - * threads is calling the bean at the same time. When using request scope the bean is created or - * looked up once per request (exchange). This can be used if you want to store state on a bean while - * processing a request and you want to call the same bean instance multiple times while processing - * the request. The bean does not have to be thread-safe as the instance is only called from the same - * request. When using prototype scope, then the bean will be looked up or created per call. However - * in case of lookup then this is delegated to the bean registry such as Spring or CDI (if in use), - * which depends on their configuration can act as either singleton or prototype scope. so when using - * prototype then this depends on the delegated registry. - */ - public fun scope(scope: String) { - it.property("scope", scope) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Used for configuring additional properties on the bean - */ - public fun parameters(parameters: String) { - it.property("parameters", parameters) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BeanValidatorUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BeanValidatorUriDsl.kt deleted file mode 100644 index de23d33d26315..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BeanValidatorUriDsl.kt +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Validate the message body using the Java Bean Validation API. - */ -public fun UriDsl.`bean-validator`(i: BeanValidatorUriDsl.() -> Unit) { - BeanValidatorUriDsl(this).apply(i) -} - -@CamelDslMarker -public class BeanValidatorUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("bean-validator") - } - - private var label: String = "" - - /** - * Where label is an arbitrary text value describing the endpoint - */ - public fun label(label: String) { - this.label = label - it.url("$label") - } - - /** - * To use a custom validation group - */ - public fun group(group: String) { - it.property("group", group) - } - - /** - * Whether to ignore data from the META-INF/validation.xml file. - */ - public fun ignoreXmlConfiguration(ignoreXmlConfiguration: String) { - it.property("ignoreXmlConfiguration", ignoreXmlConfiguration) - } - - /** - * Whether to ignore data from the META-INF/validation.xml file. - */ - public fun ignoreXmlConfiguration(ignoreXmlConfiguration: Boolean) { - it.property("ignoreXmlConfiguration", ignoreXmlConfiguration.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use a custom ConstraintValidatorFactory - */ - public fun constraintValidatorFactory(constraintValidatorFactory: String) { - it.property("constraintValidatorFactory", constraintValidatorFactory) - } - - /** - * To use a custom MessageInterpolator - */ - public fun messageInterpolator(messageInterpolator: String) { - it.property("messageInterpolator", messageInterpolator) - } - - /** - * To use a custom TraversableResolver - */ - public fun traversableResolver(traversableResolver: String) { - it.property("traversableResolver", traversableResolver) - } - - /** - * To use a a custom ValidationProviderResolver - */ - public fun validationProviderResolver(validationProviderResolver: String) { - it.property("validationProviderResolver", validationProviderResolver) - } - - /** - * To use a custom ValidatorFactory - */ - public fun validatorFactory(validatorFactory: String) { - it.property("validatorFactory", validatorFactory) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BonitaUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BonitaUriDsl.kt deleted file mode 100644 index 3024d706ed567..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BonitaUriDsl.kt +++ /dev/null @@ -1,111 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Communicate with a remote Bonita BPM process engine. - */ -public fun UriDsl.bonita(i: BonitaUriDsl.() -> Unit) { - BonitaUriDsl(this).apply(i) -} - -@CamelDslMarker -public class BonitaUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("bonita") - } - - private var operation: String = "" - - /** - * Operation to use - */ - public fun operation(operation: String) { - this.operation = operation - it.url("$operation") - } - - /** - * Hostname where Bonita engine runs - */ - public fun hostname(hostname: String) { - it.property("hostname", hostname) - } - - /** - * Port of the server hosting Bonita engine - */ - public fun port(port: String) { - it.property("port", port) - } - - /** - * Name of the process involved in the operation - */ - public fun processName(processName: String) { - it.property("processName", processName) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Password to authenticate to Bonita engine. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Username to authenticate to Bonita engine. - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BoxUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BoxUriDsl.kt deleted file mode 100644 index c038e9be846b6..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BoxUriDsl.kt +++ /dev/null @@ -1,225 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Upload, download and manage files, folders, groups, collaborations, etc. on box.com. - */ -public fun UriDsl.box(i: BoxUriDsl.() -> Unit) { - BoxUriDsl(this).apply(i) -} - -@CamelDslMarker -public class BoxUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("box") - } - - private var apiName: String = "" - - private var methodName: String = "" - - /** - * What kind of operation to perform - */ - public fun apiName(apiName: String) { - this.apiName = apiName - it.url("$apiName/$methodName") - } - - /** - * What sub operation to use for the selected operation - */ - public fun methodName(methodName: String) { - this.methodName = methodName - it.url("$apiName/$methodName") - } - - /** - * Box application client ID - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * The enterprise ID to use for an App Enterprise. - */ - public fun enterpriseId(enterpriseId: String) { - it.property("enterpriseId", enterpriseId) - } - - /** - * Sets the name of a parameter to be passed in the exchange In Body - */ - public fun inBody(inBody: String) { - it.property("inBody", inBody) - } - - /** - * The user ID to use for an App User. - */ - public fun userId(userId: String) { - it.property("userId", userId) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Custom HTTP params for settings like proxy host - */ - public fun httpParams(httpParams: String) { - it.property("httpParams", httpParams) - } - - /** - * The type of authentication for connection. Types of Authentication: STANDARD_AUTHENTICATION - - * OAuth 2.0 (3-legged) SERVER_AUTHENTICATION - OAuth 2.0 with JSON Web Tokens - */ - public fun authenticationType(authenticationType: String) { - it.property("authenticationType", authenticationType) - } - - /** - * Custom Access Token Cache for storing and retrieving access tokens. - */ - public fun accessTokenCache(accessTokenCache: String) { - it.property("accessTokenCache", accessTokenCache) - } - - /** - * Box application client secret - */ - public fun clientSecret(clientSecret: String) { - it.property("clientSecret", clientSecret) - } - - /** - * The type of encryption algorithm for JWT. Supported Algorithms: RSA_SHA_256 RSA_SHA_384 - * RSA_SHA_512 - */ - public fun encryptionAlgorithm(encryptionAlgorithm: String) { - it.property("encryptionAlgorithm", encryptionAlgorithm) - } - - /** - * The maximum number of access tokens in cache. - */ - public fun maxCacheEntries(maxCacheEntries: String) { - it.property("maxCacheEntries", maxCacheEntries) - } - - /** - * The maximum number of access tokens in cache. - */ - public fun maxCacheEntries(maxCacheEntries: Int) { - it.property("maxCacheEntries", maxCacheEntries.toString()) - } - - /** - * The private key for generating the JWT signature. - */ - public fun privateKeyFile(privateKeyFile: String) { - it.property("privateKeyFile", privateKeyFile) - } - - /** - * The password for the private key. - */ - public fun privateKeyPassword(privateKeyPassword: String) { - it.property("privateKeyPassword", privateKeyPassword) - } - - /** - * The ID for public key for validating the JWT signature. - */ - public fun publicKeyId(publicKeyId: String) { - it.property("publicKeyId", publicKeyId) - } - - /** - * To configure security using SSLContextParameters. - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * Box user name, MUST be provided - */ - public fun userName(userName: String) { - it.property("userName", userName) - } - - /** - * Box user password, MUST be provided if authSecureStorage is not set, or returns null on first - * call - */ - public fun userPassword(userPassword: String) { - it.property("userPassword", userPassword) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BraintreeUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BraintreeUriDsl.kt deleted file mode 100644 index 1269c2e0ad3ed..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BraintreeUriDsl.kt +++ /dev/null @@ -1,197 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Process payments using Braintree Payments. - */ -public fun UriDsl.braintree(i: BraintreeUriDsl.() -> Unit) { - BraintreeUriDsl(this).apply(i) -} - -@CamelDslMarker -public class BraintreeUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("braintree") - } - - private var apiName: String = "" - - private var methodName: String = "" - - /** - * What kind of operation to perform - */ - public fun apiName(apiName: String) { - this.apiName = apiName - it.url("$apiName/$methodName") - } - - /** - * What sub operation to use for the selected operation - */ - public fun methodName(methodName: String) { - this.methodName = methodName - it.url("$apiName/$methodName") - } - - /** - * The environment Either SANDBOX or PRODUCTION - */ - public fun environment(environment: String) { - it.property("environment", environment) - } - - /** - * Sets the name of a parameter to be passed in the exchange In Body - */ - public fun inBody(inBody: String) { - it.property("inBody", inBody) - } - - /** - * The merchant id provided by Braintree. - */ - public fun merchantId(merchantId: String) { - it.property("merchantId", merchantId) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Set read timeout for http calls. - */ - public fun httpReadTimeout(httpReadTimeout: String) { - it.property("httpReadTimeout", httpReadTimeout) - } - - /** - * Set read timeout for http calls. - */ - public fun httpReadTimeout(httpReadTimeout: Int) { - it.property("httpReadTimeout", httpReadTimeout.toString()) - } - - /** - * Set logging level for http calls, see java.util.logging.Level - */ - public fun httpLogLevel(httpLogLevel: String) { - it.property("httpLogLevel", httpLogLevel) - } - - /** - * Set log category to use to log http calls. - */ - public fun httpLogName(httpLogName: String) { - it.property("httpLogName", httpLogName) - } - - /** - * Sets whether to enable the BraintreeLogHandler. It may be desirable to set this to 'false' - * where an existing JUL - SLF4J logger bridge is on the classpath. This option can also be - * configured globally on the BraintreeComponent. - */ - public fun logHandlerEnabled(logHandlerEnabled: String) { - it.property("logHandlerEnabled", logHandlerEnabled) - } - - /** - * Sets whether to enable the BraintreeLogHandler. It may be desirable to set this to 'false' - * where an existing JUL - SLF4J logger bridge is on the classpath. This option can also be - * configured globally on the BraintreeComponent. - */ - public fun logHandlerEnabled(logHandlerEnabled: Boolean) { - it.property("logHandlerEnabled", logHandlerEnabled.toString()) - } - - /** - * The proxy host - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * The proxy port - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * The proxy port - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * The access token granted by a merchant to another in order to process transactions on their - * behalf. Used in place of environment, merchant id, public key and private key fields. - */ - public fun accessToken(accessToken: String) { - it.property("accessToken", accessToken) - } - - /** - * The private key provided by Braintree. - */ - public fun privateKey(privateKey: String) { - it.property("privateKey", privateKey) - } - - /** - * The public key provided by Braintree. - */ - public fun publicKey(publicKey: String) { - it.property("publicKey", publicKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BrowseUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BrowseUriDsl.kt deleted file mode 100644 index 7a160e1d86d05..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/BrowseUriDsl.kt +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Inspect the messages received on endpoints supporting BrowsableEndpoint. - */ -public fun UriDsl.browse(i: BrowseUriDsl.() -> Unit) { - BrowseUriDsl(this).apply(i) -} - -@CamelDslMarker -public class BrowseUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("browse") - } - - private var name: String = "" - - /** - * A name which can be any string to uniquely identify the endpoint - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CaffeineCacheUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CaffeineCacheUriDsl.kt deleted file mode 100644 index 22bccdc9a5b92..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CaffeineCacheUriDsl.kt +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform caching operations using Caffeine Cache. - */ -public fun UriDsl.`caffeine-cache`(i: CaffeineCacheUriDsl.() -> Unit) { - CaffeineCacheUriDsl(this).apply(i) -} - -@CamelDslMarker -public class CaffeineCacheUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("caffeine-cache") - } - - private var cacheName: String = "" - - /** - * Cache name - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * To configure the default cache action. If an action is set in the message header, then the - * operation from the header takes precedence. - */ - public fun action(action: String) { - it.property("action", action) - } - - /** - * Automatic create the Caffeine cache if none has been configured or exists in the registry. - */ - public fun createCacheIfNotExist(createCacheIfNotExist: String) { - it.property("createCacheIfNotExist", createCacheIfNotExist) - } - - /** - * Automatic create the Caffeine cache if none has been configured or exists in the registry. - */ - public fun createCacheIfNotExist(createCacheIfNotExist: Boolean) { - it.property("createCacheIfNotExist", createCacheIfNotExist.toString()) - } - - /** - * Set the eviction Type for this cache - */ - public fun evictionType(evictionType: String) { - it.property("evictionType", evictionType) - } - - /** - * Specifies that each entry should be automatically removed from the cache once a fixed duration - * has elapsed after the entry's creation, the most recent replacement of its value, or its last - * read. Access time is reset by all cache read and write operations. The unit is in seconds. - */ - public fun expireAfterAccessTime(expireAfterAccessTime: String) { - it.property("expireAfterAccessTime", expireAfterAccessTime) - } - - /** - * Specifies that each entry should be automatically removed from the cache once a fixed duration - * has elapsed after the entry's creation, the most recent replacement of its value, or its last - * read. Access time is reset by all cache read and write operations. The unit is in seconds. - */ - public fun expireAfterAccessTime(expireAfterAccessTime: Int) { - it.property("expireAfterAccessTime", expireAfterAccessTime.toString()) - } - - /** - * Specifies that each entry should be automatically removed from the cache once a fixed duration - * has elapsed after the entry's creation, or the most recent replacement of its value. The unit is - * in seconds. - */ - public fun expireAfterWriteTime(expireAfterWriteTime: String) { - it.property("expireAfterWriteTime", expireAfterWriteTime) - } - - /** - * Specifies that each entry should be automatically removed from the cache once a fixed duration - * has elapsed after the entry's creation, or the most recent replacement of its value. The unit is - * in seconds. - */ - public fun expireAfterWriteTime(expireAfterWriteTime: Int) { - it.property("expireAfterWriteTime", expireAfterWriteTime.toString()) - } - - /** - * Sets the minimum total size for the internal data structures. Providing a large enough estimate - * at construction time avoids the need for expensive resizing operations later, but setting this - * value unnecessarily high wastes memory. - */ - public fun initialCapacity(initialCapacity: String) { - it.property("initialCapacity", initialCapacity) - } - - /** - * Sets the minimum total size for the internal data structures. Providing a large enough estimate - * at construction time avoids the need for expensive resizing operations later, but setting this - * value unnecessarily high wastes memory. - */ - public fun initialCapacity(initialCapacity: Int) { - it.property("initialCapacity", initialCapacity.toString()) - } - - /** - * To configure the default action key. If a key is set in the message header, then the key from - * the header takes precedence. - */ - public fun key(key: String) { - it.property("key", key) - } - - /** - * Specifies the maximum number of entries the cache may contain. Note that the cache may evict an - * entry before this limit is exceeded or temporarily exceed the threshold while evicting. As the - * cache size grows close to the maximum, the cache evicts entries that are less likely to be used - * again. For example, the cache may evict an entry because it hasn't been used recently or very - * often. When size is zero, elements will be evicted immediately after being loaded into the cache. - * This can be useful in testing or to disable caching temporarily without a code change. As eviction - * is scheduled on the configured executor, tests may instead prefer to configure the cache to - * execute tasks directly on the same thread. - */ - public fun maximumSize(maximumSize: String) { - it.property("maximumSize", maximumSize) - } - - /** - * Specifies the maximum number of entries the cache may contain. Note that the cache may evict an - * entry before this limit is exceeded or temporarily exceed the threshold while evicting. As the - * cache size grows close to the maximum, the cache evicts entries that are less likely to be used - * again. For example, the cache may evict an entry because it hasn't been used recently or very - * often. When size is zero, elements will be evicted immediately after being loaded into the cache. - * This can be useful in testing or to disable caching temporarily without a code change. As eviction - * is scheduled on the configured executor, tests may instead prefer to configure the cache to - * execute tasks directly on the same thread. - */ - public fun maximumSize(maximumSize: Int) { - it.property("maximumSize", maximumSize.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To configure a CacheLoader in case of a LoadCache use - */ - public fun cacheLoader(cacheLoader: String) { - it.property("cacheLoader", cacheLoader) - } - - /** - * Set a specific removal Listener for the cache - */ - public fun removalListener(removalListener: String) { - it.property("removalListener", removalListener) - } - - /** - * Set a specific Stats Counter for the cache stats - */ - public fun statsCounter(statsCounter: String) { - it.property("statsCounter", statsCounter) - } - - /** - * To enable stats on the cache - */ - public fun statsEnabled(statsEnabled: String) { - it.property("statsEnabled", statsEnabled) - } - - /** - * To enable stats on the cache - */ - public fun statsEnabled(statsEnabled: Boolean) { - it.property("statsEnabled", statsEnabled.toString()) - } - - /** - * The cache value type, default java.lang.Object - */ - public fun valueType(valueType: String) { - it.property("valueType", valueType) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CaffeineLoadcacheUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CaffeineLoadcacheUriDsl.kt deleted file mode 100644 index a1273b796816b..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CaffeineLoadcacheUriDsl.kt +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform caching operations using Caffeine Cache with an attached CacheLoader. - */ -public fun UriDsl.`caffeine-loadcache`(i: CaffeineLoadcacheUriDsl.() -> Unit) { - CaffeineLoadcacheUriDsl(this).apply(i) -} - -@CamelDslMarker -public class CaffeineLoadcacheUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("caffeine-loadcache") - } - - private var cacheName: String = "" - - /** - * the cache name - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * To configure the default cache action. If an action is set in the message header, then the - * operation from the header takes precedence. - */ - public fun action(action: String) { - it.property("action", action) - } - - /** - * Automatic create the Caffeine cache if none has been configured or exists in the registry. - */ - public fun createCacheIfNotExist(createCacheIfNotExist: String) { - it.property("createCacheIfNotExist", createCacheIfNotExist) - } - - /** - * Automatic create the Caffeine cache if none has been configured or exists in the registry. - */ - public fun createCacheIfNotExist(createCacheIfNotExist: Boolean) { - it.property("createCacheIfNotExist", createCacheIfNotExist.toString()) - } - - /** - * Set the eviction Type for this cache - */ - public fun evictionType(evictionType: String) { - it.property("evictionType", evictionType) - } - - /** - * Specifies that each entry should be automatically removed from the cache once a fixed duration - * has elapsed after the entry's creation, the most recent replacement of its value, or its last - * read. Access time is reset by all cache read and write operations. The unit is in seconds. - */ - public fun expireAfterAccessTime(expireAfterAccessTime: String) { - it.property("expireAfterAccessTime", expireAfterAccessTime) - } - - /** - * Specifies that each entry should be automatically removed from the cache once a fixed duration - * has elapsed after the entry's creation, the most recent replacement of its value, or its last - * read. Access time is reset by all cache read and write operations. The unit is in seconds. - */ - public fun expireAfterAccessTime(expireAfterAccessTime: Int) { - it.property("expireAfterAccessTime", expireAfterAccessTime.toString()) - } - - /** - * Specifies that each entry should be automatically removed from the cache once a fixed duration - * has elapsed after the entry's creation, or the most recent replacement of its value. The unit is - * in seconds. - */ - public fun expireAfterWriteTime(expireAfterWriteTime: String) { - it.property("expireAfterWriteTime", expireAfterWriteTime) - } - - /** - * Specifies that each entry should be automatically removed from the cache once a fixed duration - * has elapsed after the entry's creation, or the most recent replacement of its value. The unit is - * in seconds. - */ - public fun expireAfterWriteTime(expireAfterWriteTime: Int) { - it.property("expireAfterWriteTime", expireAfterWriteTime.toString()) - } - - /** - * Sets the minimum total size for the internal data structures. Providing a large enough estimate - * at construction time avoids the need for expensive resizing operations later, but setting this - * value unnecessarily high wastes memory. - */ - public fun initialCapacity(initialCapacity: String) { - it.property("initialCapacity", initialCapacity) - } - - /** - * Sets the minimum total size for the internal data structures. Providing a large enough estimate - * at construction time avoids the need for expensive resizing operations later, but setting this - * value unnecessarily high wastes memory. - */ - public fun initialCapacity(initialCapacity: Int) { - it.property("initialCapacity", initialCapacity.toString()) - } - - /** - * To configure the default action key. If a key is set in the message header, then the key from - * the header takes precedence. - */ - public fun key(key: String) { - it.property("key", key) - } - - /** - * Specifies the maximum number of entries the cache may contain. Note that the cache may evict an - * entry before this limit is exceeded or temporarily exceed the threshold while evicting. As the - * cache size grows close to the maximum, the cache evicts entries that are less likely to be used - * again. For example, the cache may evict an entry because it hasn't been used recently or very - * often. When size is zero, elements will be evicted immediately after being loaded into the cache. - * This can be useful in testing or to disable caching temporarily without a code change. As eviction - * is scheduled on the configured executor, tests may instead prefer to configure the cache to - * execute tasks directly on the same thread. - */ - public fun maximumSize(maximumSize: String) { - it.property("maximumSize", maximumSize) - } - - /** - * Specifies the maximum number of entries the cache may contain. Note that the cache may evict an - * entry before this limit is exceeded or temporarily exceed the threshold while evicting. As the - * cache size grows close to the maximum, the cache evicts entries that are less likely to be used - * again. For example, the cache may evict an entry because it hasn't been used recently or very - * often. When size is zero, elements will be evicted immediately after being loaded into the cache. - * This can be useful in testing or to disable caching temporarily without a code change. As eviction - * is scheduled on the configured executor, tests may instead prefer to configure the cache to - * execute tasks directly on the same thread. - */ - public fun maximumSize(maximumSize: Int) { - it.property("maximumSize", maximumSize.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To configure a CacheLoader in case of a LoadCache use - */ - public fun cacheLoader(cacheLoader: String) { - it.property("cacheLoader", cacheLoader) - } - - /** - * Set a specific removal Listener for the cache - */ - public fun removalListener(removalListener: String) { - it.property("removalListener", removalListener) - } - - /** - * Set a specific Stats Counter for the cache stats - */ - public fun statsCounter(statsCounter: String) { - it.property("statsCounter", statsCounter) - } - - /** - * To enable stats on the cache - */ - public fun statsEnabled(statsEnabled: String) { - it.property("statsEnabled", statsEnabled) - } - - /** - * To enable stats on the cache - */ - public fun statsEnabled(statsEnabled: Boolean) { - it.property("statsEnabled", statsEnabled.toString()) - } - - /** - * The cache value type, default java.lang.Object - */ - public fun valueType(valueType: String) { - it.property("valueType", valueType) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ChatscriptUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ChatscriptUriDsl.kt deleted file mode 100644 index ba6c42d760999..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ChatscriptUriDsl.kt +++ /dev/null @@ -1,127 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Chat with a ChatScript Server. - */ -public fun UriDsl.chatscript(i: ChatscriptUriDsl.() -> Unit) { - ChatscriptUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ChatscriptUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("chatscript") - } - - private var host: String = "" - - private var port: String = "" - - private var botName: String = "" - - /** - * Hostname or IP of the server on which CS server is running - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port/$botName") - } - - /** - * Port on which ChatScript is listening to - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port/$botName") - } - - /** - * Port on which ChatScript is listening to - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port/$botName") - } - - /** - * Name of the Bot in CS to converse with - */ - public fun botName(botName: String) { - this.botName = botName - it.url("$host:$port/$botName") - } - - /** - * Username who initializes the CS conversation. To be set when chat is initialized from camel - * route - */ - public fun chatUserName(chatUserName: String) { - it.property("chatUserName", chatUserName) - } - - /** - * Issues :reset command to start a new conversation everytime - */ - public fun resetChat(resetChat: String) { - it.property("resetChat", resetChat) - } - - /** - * Issues :reset command to start a new conversation everytime - */ - public fun resetChat(resetChat: Boolean) { - it.property("resetChat", resetChat.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ChunkUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ChunkUriDsl.kt deleted file mode 100644 index edf8fe9f577c4..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ChunkUriDsl.kt +++ /dev/null @@ -1,166 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Transform messages using Chunk templating engine. - */ -public fun UriDsl.chunk(i: ChunkUriDsl.() -> Unit) { - ChunkUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ChunkUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("chunk") - } - - private var resourceUri: String = "" - - /** - * Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file - * and http loads the resource using these protocols (classpath is default). ref will lookup the - * resource in the registry. bean will call a method on a bean to be used as the resource. For bean - * you can specify the method name after dot, eg bean:myBean.myMethod. - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: String) { - it.property("allowContextMapAll", allowContextMapAll) - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: Boolean) { - it.property("allowContextMapAll", allowContextMapAll.toString()) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: String) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: Boolean) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader.toString()) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * Define the encoding of the body - */ - public fun encoding(encoding: String) { - it.property("encoding", encoding) - } - - /** - * Define the file extension of the template - */ - public fun extension(extension: String) { - it.property("extension", extension) - } - - /** - * Define the themes folder to scan - */ - public fun themeFolder(themeFolder: String) { - it.property("themeFolder", themeFolder) - } - - /** - * Define the theme layer to elaborate - */ - public fun themeLayer(themeLayer: String) { - it.property("themeLayer", themeLayer) - } - - /** - * Define the themes subfolder to scan - */ - public fun themeSubfolder(themeSubfolder: String) { - it.property("themeSubfolder", themeSubfolder) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ClassUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ClassUriDsl.kt deleted file mode 100644 index 138d0008eaa64..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ClassUriDsl.kt +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Invoke methods of Java beans specified by class name. - */ -public fun UriDsl.`class`(i: ClassUriDsl.() -> Unit) { - ClassUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ClassUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("class") - } - - private var beanName: String = "" - - /** - * Sets the name of the bean to invoke - */ - public fun beanName(beanName: String) { - this.beanName = beanName - it.url("$beanName") - } - - /** - * Sets the name of the method to invoke on the bean - */ - public fun method(method: String) { - it.property("method", method) - } - - /** - * Scope of bean. When using singleton scope (default) the bean is created or looked up only once - * and reused for the lifetime of the endpoint. The bean should be thread-safe in case concurrent - * threads is calling the bean at the same time. When using request scope the bean is created or - * looked up once per request (exchange). This can be used if you want to store state on a bean while - * processing a request and you want to call the same bean instance multiple times while processing - * the request. The bean does not have to be thread-safe as the instance is only called from the same - * request. When using prototype scope, then the bean will be looked up or created per call. However - * in case of lookup then this is delegated to the bean registry such as Spring or CDI (if in use), - * which depends on their configuration can act as either singleton or prototype scope. so when using - * prototype then this depends on the delegated registry. - */ - public fun scope(scope: String) { - it.property("scope", scope) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Used for configuring additional properties on the bean - */ - public fun parameters(parameters: String) { - it.property("parameters", parameters) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CmSmsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CmSmsUriDsl.kt deleted file mode 100644 index 8cc001737ac63..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CmSmsUriDsl.kt +++ /dev/null @@ -1,123 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send SMS messages via CM SMS Gateway. - */ -public fun UriDsl.`cm-sms`(i: CmSmsUriDsl.() -> Unit) { - CmSmsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class CmSmsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("cm-sms") - } - - private var host: String = "" - - /** - * SMS Provider HOST with scheme - */ - public fun host(host: String) { - this.host = host - it.url("$host") - } - - /** - * This is the sender name. The maximum length is 11 characters. - */ - public fun defaultFrom(defaultFrom: String) { - it.property("defaultFrom", defaultFrom) - } - - /** - * If it is a multipart message forces the max number. Message can be truncated. Technically the - * gateway will first check if a message is larger than 160 characters, if so, the message will be - * cut into multiple 153 characters parts limited by these parameters. - */ - public fun defaultMaxNumberOfParts(defaultMaxNumberOfParts: String) { - it.property("defaultMaxNumberOfParts", defaultMaxNumberOfParts) - } - - /** - * If it is a multipart message forces the max number. Message can be truncated. Technically the - * gateway will first check if a message is larger than 160 characters, if so, the message will be - * cut into multiple 153 characters parts limited by these parameters. - */ - public fun defaultMaxNumberOfParts(defaultMaxNumberOfParts: Int) { - it.property("defaultMaxNumberOfParts", defaultMaxNumberOfParts.toString()) - } - - /** - * The unique token to use - */ - public fun productToken(productToken: String) { - it.property("productToken", productToken) - } - - /** - * Whether to test the connection to the SMS Gateway on startup - */ - public fun testConnectionOnStartup(testConnectionOnStartup: String) { - it.property("testConnectionOnStartup", testConnectionOnStartup) - } - - /** - * Whether to test the connection to the SMS Gateway on startup - */ - public fun testConnectionOnStartup(testConnectionOnStartup: Boolean) { - it.property("testConnectionOnStartup", testConnectionOnStartup.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CoapUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CoapUriDsl.kt deleted file mode 100644 index f502cb2b57004..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CoapUriDsl.kt +++ /dev/null @@ -1,256 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from CoAP (Constrained Application Protocol) capable devices. - */ -public fun UriDsl.coap(i: CoapUriDsl.() -> Unit) { - CoapUriDsl(this).apply(i) -} - -@CamelDslMarker -public class CoapUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("coap") - } - - private var uri: String = "" - - /** - * The URI for the CoAP endpoint - */ - public fun uri(uri: String) { - this.uri = uri - it.url("$uri") - } - - /** - * Comma separated list of methods that the CoAP consumer will bind to. The default is to bind to - * all methods (DELETE, GET, POST, PUT). - */ - public fun coapMethodRestrict(coapMethodRestrict: String) { - it.property("coapMethodRestrict", coapMethodRestrict) - } - - /** - * Make CoAP resource observable for source endpoint, based on RFC 7641. - */ - public fun observable(observable: String) { - it.property("observable", observable) - } - - /** - * Make CoAP resource observable for source endpoint, based on RFC 7641. - */ - public fun observable(observable: Boolean) { - it.property("observable", observable.toString()) - } - - /** - * Send an observe request from a source endpoint, based on RFC 7641. - */ - public fun observe(observe: String) { - it.property("observe", observe) - } - - /** - * Send an observe request from a source endpoint, based on RFC 7641. - */ - public fun observe(observe: Boolean) { - it.property("observe", observe.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Notify observers that the resource of this URI has changed, based on RFC 7641. Use this flag on - * a destination endpoint, with a URI that matches an existing source endpoint URI. - */ - public fun notify(notify: String) { - it.property("notify", notify) - } - - /** - * Notify observers that the resource of this URI has changed, based on RFC 7641. Use this flag on - * a destination endpoint, with a URI that matches an existing source endpoint URI. - */ - public fun notify(notify: Boolean) { - it.property("notify", notify.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Set the AdvancedCertificateVerifier to use to determine trust in raw public keys. - */ - public fun advancedCertificateVerifier(advancedCertificateVerifier: String) { - it.property("advancedCertificateVerifier", advancedCertificateVerifier) - } - - /** - * Set the AdvancedPskStore to use for pre-shared key. - */ - public fun advancedPskStore(advancedPskStore: String) { - it.property("advancedPskStore", advancedPskStore) - } - - /** - * Sets the alias used to query the KeyStore for the private key and certificate. This parameter - * is used when we are enabling TLS with certificates on the service side, and similarly on the - * client side when TLS is used with certificates and client authentication. If the parameter is not - * specified then the default behavior is to use the first alias in the keystore that contains a key - * entry. This configuration parameter does not apply to configuring TLS via a Raw Public Key or a - * Pre-Shared Key. - */ - public fun alias(alias: String) { - it.property("alias", alias) - } - - /** - * Sets the cipherSuites String. This is a comma separated String of ciphersuites to configure. If - * it is not specified, then it falls back to getting the ciphersuites from the sslContextParameters - * object. - */ - public fun cipherSuites(cipherSuites: String) { - it.property("cipherSuites", cipherSuites) - } - - /** - * Sets the configuration options for server-side client-authentication requirements. The value - * must be one of NONE, WANT, REQUIRE. If this value is not specified, then it falls back to checking - * the sslContextParameters.getServerParameters().getClientAuthentication() value. - */ - public fun clientAuthentication(clientAuthentication: String) { - it.property("clientAuthentication", clientAuthentication) - } - - /** - * Set the configured private key for use with Raw Public Key. - */ - public fun privateKey(privateKey: String) { - it.property("privateKey", privateKey) - } - - /** - * Set the configured public key for use with Raw Public Key. - */ - public fun publicKey(publicKey: String) { - it.property("publicKey", publicKey) - } - - /** - * The CBC cipher suites are not recommended. If you want to use them, you first need to set the - * recommendedCipherSuitesOnly option to false. - */ - public fun recommendedCipherSuitesOnly(recommendedCipherSuitesOnly: String) { - it.property("recommendedCipherSuitesOnly", recommendedCipherSuitesOnly) - } - - /** - * The CBC cipher suites are not recommended. If you want to use them, you first need to set the - * recommendedCipherSuitesOnly option to false. - */ - public fun recommendedCipherSuitesOnly(recommendedCipherSuitesOnly: Boolean) { - it.property("recommendedCipherSuitesOnly", recommendedCipherSuitesOnly.toString()) - } - - /** - * Set the SSLContextParameters object for setting up TLS. This is required for coapstcp, and for - * coaps when we are using certificates for TLS (as opposed to RPK or PKS). - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CometdUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CometdUriDsl.kt deleted file mode 100644 index 66282f3685448..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CometdUriDsl.kt +++ /dev/null @@ -1,313 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Offers publish/subscribe, peer-to-peer (via a server), and RPC style messaging using the - * CometD/Bayeux protocol. - */ -public fun UriDsl.cometd(i: CometdUriDsl.() -> Unit) { - CometdUriDsl(this).apply(i) -} - -@CamelDslMarker -public class CometdUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("cometd") - } - - private var host: String = "" - - private var port: String = "" - - private var channelName: String = "" - - /** - * Hostname - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port/$channelName") - } - - /** - * Host port number - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port/$channelName") - } - - /** - * Host port number - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port/$channelName") - } - - /** - * The channelName represents a topic that can be subscribed to by the Camel endpoints. - */ - public fun channelName(channelName: String) { - this.channelName = channelName - it.url("$host:$port/$channelName") - } - - /** - * The origins domain that support to cross, if the crosssOriginFilterOn is true - */ - public fun allowedOrigins(allowedOrigins: String) { - it.property("allowedOrigins", allowedOrigins) - } - - /** - * The root directory for the web resources or classpath. Use the protocol file: or classpath: - * depending if you want that the component loads the resource from file system or classpath. - * Classpath is required for OSGI deployment where the resources are packaged in the jar - */ - public fun baseResource(baseResource: String) { - it.property("baseResource", baseResource) - } - - /** - * If true, the server will support for cross-domain filtering - */ - public fun crossOriginFilterOn(crossOriginFilterOn: String) { - it.property("crossOriginFilterOn", crossOriginFilterOn) - } - - /** - * If true, the server will support for cross-domain filtering - */ - public fun crossOriginFilterOn(crossOriginFilterOn: Boolean) { - it.property("crossOriginFilterOn", crossOriginFilterOn.toString()) - } - - /** - * The filterPath will be used by the CrossOriginFilter, if the crosssOriginFilterOn is true - */ - public fun filterPath(filterPath: String) { - it.property("filterPath", filterPath) - } - - /** - * The client side poll timeout in milliseconds. How long a client will wait between reconnects - */ - public fun interval(interval: String) { - it.property("interval", interval) - } - - /** - * The client side poll timeout in milliseconds. How long a client will wait between reconnects - */ - public fun interval(interval: Int) { - it.property("interval", interval.toString()) - } - - /** - * If true, the server will accept JSON wrapped in a comment and will generate JSON wrapped in a - * comment. This is a defence against Ajax Hijacking. - */ - public fun jsonCommented(jsonCommented: String) { - it.property("jsonCommented", jsonCommented) - } - - /** - * If true, the server will accept JSON wrapped in a comment and will generate JSON wrapped in a - * comment. This is a defence against Ajax Hijacking. - */ - public fun jsonCommented(jsonCommented: Boolean) { - it.property("jsonCommented", jsonCommented.toString()) - } - - /** - * Logging level. 0=none, 1=info, 2=debug. - */ - public fun logLevel(logLevel: String) { - it.property("logLevel", logLevel) - } - - /** - * Logging level. 0=none, 1=info, 2=debug. - */ - public fun logLevel(logLevel: Int) { - it.property("logLevel", logLevel.toString()) - } - - /** - * The max client side poll timeout in milliseconds. A client will be removed if a connection is - * not received in this time. - */ - public fun maxInterval(maxInterval: String) { - it.property("maxInterval", maxInterval) - } - - /** - * The max client side poll timeout in milliseconds. A client will be removed if a connection is - * not received in this time. - */ - public fun maxInterval(maxInterval: Int) { - it.property("maxInterval", maxInterval.toString()) - } - - /** - * The client side poll timeout, if multiple connections are detected from the same browser. - */ - public fun multiFrameInterval(multiFrameInterval: String) { - it.property("multiFrameInterval", multiFrameInterval) - } - - /** - * The client side poll timeout, if multiple connections are detected from the same browser. - */ - public fun multiFrameInterval(multiFrameInterval: Int) { - it.property("multiFrameInterval", multiFrameInterval.toString()) - } - - /** - * The server side poll timeout in milliseconds. This is how long the server will hold a reconnect - * request before responding. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * The server side poll timeout in milliseconds. This is how long the server will hold a reconnect - * request before responding. - */ - public fun timeout(timeout: Int) { - it.property("timeout", timeout.toString()) - } - - /** - * Whether to include the server session headers in the Camel message when creating a Camel - * Message for incoming requests. - */ - public fun sessionHeadersEnabled(sessionHeadersEnabled: String) { - it.property("sessionHeadersEnabled", sessionHeadersEnabled) - } - - /** - * Whether to include the server session headers in the Camel message when creating a Camel - * Message for incoming requests. - */ - public fun sessionHeadersEnabled(sessionHeadersEnabled: Boolean) { - it.property("sessionHeadersEnabled", sessionHeadersEnabled.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Whether to disconnect local sessions after publishing a message to its channel. Disconnecting - * local session is needed as they are not swept by default by CometD, and therefore you can run out - * of memory. - */ - public fun disconnectLocalSession(disconnectLocalSession: String) { - it.property("disconnectLocalSession", disconnectLocalSession) - } - - /** - * Whether to disconnect local sessions after publishing a message to its channel. Disconnecting - * local session is needed as they are not swept by default by CometD, and therefore you can run out - * of memory. - */ - public fun disconnectLocalSession(disconnectLocalSession: Boolean) { - it.property("disconnectLocalSession", disconnectLocalSession.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ConsulUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ConsulUriDsl.kt deleted file mode 100644 index 1715c0ee3f486..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ConsulUriDsl.kt +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Integrate with Consul service discovery and configuration store. - */ -public fun UriDsl.consul(i: ConsulUriDsl.() -> Unit) { - ConsulUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ConsulUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("consul") - } - - private var apiEndpoint: String = "" - - /** - * The API endpoint - */ - public fun apiEndpoint(apiEndpoint: String) { - this.apiEndpoint = apiEndpoint - it.url("$apiEndpoint") - } - - /** - * Connect timeout for OkHttpClient - */ - public fun connectTimeout(connectTimeout: String) { - it.property("connectTimeout", connectTimeout) - } - - /** - * Reference to a org.kiwiproject.consul.Consul in the registry. - */ - public fun consulClient(consulClient: String) { - it.property("consulClient", consulClient) - } - - /** - * The default key. Can be overridden by CamelConsulKey - */ - public fun key(key: String) { - it.property("key", key) - } - - /** - * Configure if the AgentClient should attempt a ping before returning the Consul instance - */ - public fun pingInstance(pingInstance: String) { - it.property("pingInstance", pingInstance) - } - - /** - * Configure if the AgentClient should attempt a ping before returning the Consul instance - */ - public fun pingInstance(pingInstance: Boolean) { - it.property("pingInstance", pingInstance.toString()) - } - - /** - * Read timeout for OkHttpClient - */ - public fun readTimeout(readTimeout: String) { - it.property("readTimeout", readTimeout) - } - - /** - * Set tags. You can separate multiple tags by comma. - */ - public fun tags(tags: String) { - it.property("tags", tags) - } - - /** - * The Consul agent URL - */ - public fun url(url: String) { - it.property("url", url) - } - - /** - * Write timeout for OkHttpClient - */ - public fun writeTimeout(writeTimeout: String) { - it.property("writeTimeout", writeTimeout) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * The default action. Can be overridden by CamelConsulAction - */ - public fun action(action: String) { - it.property("action", action) - } - - /** - * Default to transform values retrieved from Consul i.e. on KV endpoint to string. - */ - public fun valueAsString(valueAsString: String) { - it.property("valueAsString", valueAsString) - } - - /** - * Default to transform values retrieved from Consul i.e. on KV endpoint to string. - */ - public fun valueAsString(valueAsString: Boolean) { - it.property("valueAsString", valueAsString.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The consistencyMode used for queries, default ConsistencyMode.DEFAULT - */ - public fun consistencyMode(consistencyMode: String) { - it.property("consistencyMode", consistencyMode) - } - - /** - * The data center - */ - public fun datacenter(datacenter: String) { - it.property("datacenter", datacenter) - } - - /** - * The near node to use for queries. - */ - public fun nearNode(nearNode: String) { - it.property("nearNode", nearNode) - } - - /** - * The note meta-data to use for queries. - */ - public fun nodeMeta(nodeMeta: String) { - it.property("nodeMeta", nodeMeta) - } - - /** - * Sets the ACL token to be used with Consul - */ - public fun aclToken(aclToken: String) { - it.property("aclToken", aclToken) - } - - /** - * Sets the password to be used for basic authentication - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * SSL configuration using an org.apache.camel.support.jsse.SSLContextParameters instance. - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * Sets the username to be used for basic authentication - */ - public fun userName(userName: String) { - it.property("userName", userName) - } - - /** - * The second to wait for a watch event, default 10 seconds - */ - public fun blockSeconds(blockSeconds: String) { - it.property("blockSeconds", blockSeconds) - } - - /** - * The second to wait for a watch event, default 10 seconds - */ - public fun blockSeconds(blockSeconds: Int) { - it.property("blockSeconds", blockSeconds.toString()) - } - - /** - * The first index for watch for, default 0 - */ - public fun firstIndex(firstIndex: String) { - it.property("firstIndex", firstIndex) - } - - /** - * Recursively watch, default false - */ - public fun recursive(recursive: String) { - it.property("recursive", recursive) - } - - /** - * Recursively watch, default false - */ - public fun recursive(recursive: Boolean) { - it.property("recursive", recursive.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ControlbusUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ControlbusUriDsl.kt deleted file mode 100644 index f01470b88e043..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ControlbusUriDsl.kt +++ /dev/null @@ -1,148 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage and monitor Camel routes. - */ -public fun UriDsl.controlbus(i: ControlbusUriDsl.() -> Unit) { - ControlbusUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ControlbusUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("controlbus") - } - - private var command: String = "" - - private var language: String = "" - - /** - * Command can be either route or language - */ - public fun command(command: String) { - this.command = command - it.url("$command:$language") - } - - /** - * Allows you to specify the name of a Language to use for evaluating the message body. If there - * is any result from the evaluation, then the result is put in the message body. - */ - public fun language(language: String) { - this.language = language - it.url("$command:$language") - } - - /** - * To denote an action that can be either: start, stop, or status. To either start or stop a - * route, or to get the status of the route as output in the message body. You can use suspend and - * resume to either suspend or resume a route. You can use stats to get performance statics returned - * in XML format; the routeId option can be used to define which route to get the performance stats - * for, if routeId is not defined, then you get statistics for the entire CamelContext. The restart - * action will restart the route. And the fail action will stop and mark the route as failed (stopped - * due to an exception) - */ - public fun action(action: String) { - it.property("action", action) - } - - /** - * Whether to execute the control bus task asynchronously. Important: If this option is enabled, - * then any result from the task is not set on the Exchange. This is only possible if executing tasks - * synchronously. - */ - public fun async(async: String) { - it.property("async", async) - } - - /** - * Whether to execute the control bus task asynchronously. Important: If this option is enabled, - * then any result from the task is not set on the Exchange. This is only possible if executing tasks - * synchronously. - */ - public fun async(async: Boolean) { - it.property("async", async.toString()) - } - - /** - * Logging level used for logging when task is done, or if any exceptions occurred during - * processing the task. - */ - public fun loggingLevel(loggingLevel: String) { - it.property("loggingLevel", loggingLevel) - } - - /** - * The delay in millis to use when restarting a route. - */ - public fun restartDelay(restartDelay: String) { - it.property("restartDelay", restartDelay) - } - - /** - * The delay in millis to use when restarting a route. - */ - public fun restartDelay(restartDelay: Int) { - it.property("restartDelay", restartDelay.toString()) - } - - /** - * To specify a route by its id. The special keyword current indicates the current route. - */ - public fun routeId(routeId: String) { - it.property("routeId", routeId) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CouchbaseUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CouchbaseUriDsl.kt deleted file mode 100644 index 36da35f2e7a2e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CouchbaseUriDsl.kt +++ /dev/null @@ -1,603 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Query Couchbase Views with a poll strategy and/or perform various operations against Couchbase - * databases. - */ -public fun UriDsl.couchbase(i: CouchbaseUriDsl.() -> Unit) { - CouchbaseUriDsl(this).apply(i) -} - -@CamelDslMarker -public class CouchbaseUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("couchbase") - } - - private var protocol: String = "" - - private var hostname: String = "" - - private var port: String = "" - - /** - * The protocol to use - */ - public fun protocol(protocol: String) { - this.protocol = protocol - it.url("$protocol://$hostname:$port") - } - - /** - * The hostname to use - */ - public fun hostname(hostname: String) { - this.hostname = hostname - it.url("$protocol://$hostname:$port") - } - - /** - * The port number to use - */ - public fun port(port: String) { - this.port = port - it.url("$protocol://$hostname:$port") - } - - /** - * The port number to use - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$protocol://$hostname:$port") - } - - /** - * The bucket to use - */ - public fun bucket(bucket: String) { - it.property("bucket", bucket) - } - - /** - * The collection to use - */ - public fun collection(collection: String) { - it.property("collection", collection) - } - - /** - * The key to use - */ - public fun key(key: String) { - it.property("key", key) - } - - /** - * The scope to use - */ - public fun scope(scope: String) { - it.property("scope", scope) - } - - /** - * Define the consumer Processed strategy to use - */ - public fun consumerProcessedStrategy(consumerProcessedStrategy: String) { - it.property("consumerProcessedStrategy", consumerProcessedStrategy) - } - - /** - * Define if this operation is descending or not - */ - public fun descending(descending: String) { - it.property("descending", descending) - } - - /** - * Define if this operation is descending or not - */ - public fun descending(descending: Boolean) { - it.property("descending", descending.toString()) - } - - /** - * The design document name to use - */ - public fun designDocumentName(designDocumentName: String) { - it.property("designDocumentName", designDocumentName) - } - - /** - * If true consumer will return complete document instead data defined in view - */ - public fun fullDocument(fullDocument: String) { - it.property("fullDocument", fullDocument) - } - - /** - * If true consumer will return complete document instead data defined in view - */ - public fun fullDocument(fullDocument: Boolean) { - it.property("fullDocument", fullDocument.toString()) - } - - /** - * The output limit to use - */ - public fun limit(limit: String) { - it.property("limit", limit) - } - - /** - * The output limit to use - */ - public fun limit(limit: Int) { - it.property("limit", limit.toString()) - } - - /** - * Define a range for the end key - */ - public fun rangeEndKey(rangeEndKey: String) { - it.property("rangeEndKey", rangeEndKey) - } - - /** - * Define a range for the start key - */ - public fun rangeStartKey(rangeStartKey: String) { - it.property("rangeStartKey", rangeStartKey) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Define the skip to use - */ - public fun skip(skip: String) { - it.property("skip", skip) - } - - /** - * Define the skip to use - */ - public fun skip(skip: Int) { - it.property("skip", skip.toString()) - } - - /** - * The view name to use - */ - public fun viewName(viewName: String) { - it.property("viewName", viewName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Define if we want an autostart Id when we are doing an insert operation - */ - public fun autoStartIdForInserts(autoStartIdForInserts: String) { - it.property("autoStartIdForInserts", autoStartIdForInserts) - } - - /** - * Define if we want an autostart Id when we are doing an insert operation - */ - public fun autoStartIdForInserts(autoStartIdForInserts: Boolean) { - it.property("autoStartIdForInserts", autoStartIdForInserts.toString()) - } - - /** - * The operation to do - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Where to persist the data - */ - public fun persistTo(persistTo: String) { - it.property("persistTo", persistTo) - } - - /** - * Where to persist the data - */ - public fun persistTo(persistTo: Int) { - it.property("persistTo", persistTo.toString()) - } - - /** - * Define the number of retry attempts - */ - public fun producerRetryAttempts(producerRetryAttempts: String) { - it.property("producerRetryAttempts", producerRetryAttempts) - } - - /** - * Define the number of retry attempts - */ - public fun producerRetryAttempts(producerRetryAttempts: Int) { - it.property("producerRetryAttempts", producerRetryAttempts.toString()) - } - - /** - * Define the retry pause between different attempts - */ - public fun producerRetryPause(producerRetryPause: String) { - it.property("producerRetryPause", producerRetryPause) - } - - /** - * Define the retry pause between different attempts - */ - public fun producerRetryPause(producerRetryPause: Int) { - it.property("producerRetryPause", producerRetryPause.toString()) - } - - /** - * Where to replicate the data - */ - public fun replicateTo(replicateTo: String) { - it.property("replicateTo", replicateTo) - } - - /** - * Where to replicate the data - */ - public fun replicateTo(replicateTo: Int) { - it.property("replicateTo", replicateTo.toString()) - } - - /** - * Define the starting Id where we are doing an insert operation - */ - public fun startingIdForInsertsFrom(startingIdForInsertsFrom: String) { - it.property("startingIdForInsertsFrom", startingIdForInsertsFrom) - } - - /** - * Define the starting Id where we are doing an insert operation - */ - public fun startingIdForInsertsFrom(startingIdForInsertsFrom: Int) { - it.property("startingIdForInsertsFrom", startingIdForInsertsFrom.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The additional hosts - */ - public fun additionalHosts(additionalHosts: String) { - it.property("additionalHosts", additionalHosts) - } - - /** - * Define the timeoutconnect in milliseconds - */ - public fun connectTimeout(connectTimeout: String) { - it.property("connectTimeout", connectTimeout) - } - - /** - * Define the operation timeout in milliseconds - */ - public fun queryTimeout(queryTimeout: String) { - it.property("queryTimeout", queryTimeout) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * The password to use - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * The username to use - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CouchdbUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CouchdbUriDsl.kt deleted file mode 100644 index 339623f21dbe0..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CouchdbUriDsl.kt +++ /dev/null @@ -1,252 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Consume changesets for inserts, updates and deletes in a CouchDB database, as well as get, save, - * update and delete documents from a CouchDB database. - */ -public fun UriDsl.couchdb(i: CouchdbUriDsl.() -> Unit) { - CouchdbUriDsl(this).apply(i) -} - -@CamelDslMarker -public class CouchdbUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("couchdb") - } - - private var protocol: String = "" - - private var hostname: String = "" - - private var port: String = "" - - private var database: String = "" - - /** - * The protocol to use for communicating with the database. - */ - public fun protocol(protocol: String) { - this.protocol = protocol - it.url("$protocol:$hostname:$port/$database") - } - - /** - * Hostname of the running couchdb instance - */ - public fun hostname(hostname: String) { - this.hostname = hostname - it.url("$protocol:$hostname:$port/$database") - } - - /** - * Port number for the running couchdb instance - */ - public fun port(port: String) { - this.port = port - it.url("$protocol:$hostname:$port/$database") - } - - /** - * Port number for the running couchdb instance - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$protocol:$hostname:$port/$database") - } - - /** - * Name of the database to use - */ - public fun database(database: String) { - this.database = database - it.url("$protocol:$hostname:$port/$database") - } - - /** - * Creates the database if it does not already exist - */ - public fun createDatabase(createDatabase: String) { - it.property("createDatabase", createDatabase) - } - - /** - * Creates the database if it does not already exist - */ - public fun createDatabase(createDatabase: Boolean) { - it.property("createDatabase", createDatabase.toString()) - } - - /** - * Document deletes are published as events - */ - public fun deletes(deletes: String) { - it.property("deletes", deletes) - } - - /** - * Document deletes are published as events - */ - public fun deletes(deletes: Boolean) { - it.property("deletes", deletes.toString()) - } - - /** - * How often to send an empty message to keep socket alive in millis - */ - public fun heartbeat(heartbeat: String) { - it.property("heartbeat", heartbeat) - } - - /** - * Gets the maximum number of messages as a limit to poll at each polling. Gets the maximum number - * of messages as a limit to poll at each polling. The default value is 10. Use 0 or a negative - * number to set it as unlimited. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * Gets the maximum number of messages as a limit to poll at each polling. Gets the maximum number - * of messages as a limit to poll at each polling. The default value is 10. Use 0 or a negative - * number to set it as unlimited. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * Specifies how many revisions are returned in the changes array. The default, main_only, will - * only return the current winning revision; all_docs will return all leaf revisions (including - * conflicts and deleted former conflicts.) - */ - public fun style(style: String) { - it.property("style", style) - } - - /** - * Document inserts/updates are published as events - */ - public fun updates(updates: String) { - it.property("updates", updates) - } - - /** - * Document inserts/updates are published as events - */ - public fun updates(updates: Boolean) { - it.property("updates", updates.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Password for authenticated databases - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Username in case of authenticated databases - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CqlUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CqlUriDsl.kt deleted file mode 100644 index 3076704dca8ad..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CqlUriDsl.kt +++ /dev/null @@ -1,450 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Integrate with Cassandra 2.0 using the CQL3 API (not the Thrift API). Based on Cassandra Java - * Driver provided by DataStax. - */ -public fun UriDsl.cql(i: CqlUriDsl.() -> Unit) { - CqlUriDsl(this).apply(i) -} - -@CamelDslMarker -public class CqlUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("cql") - } - - private var beanRef: String = "" - - private var hosts: String = "" - - private var port: String = "" - - private var keyspace: String = "" - - /** - * beanRef is defined using bean:id - */ - public fun beanRef(beanRef: String) { - this.beanRef = beanRef - it.url("$beanRef:$hosts:$port/$keyspace") - } - - /** - * Hostname(s) Cassandra server(s). Multiple hosts can be separated by comma. - */ - public fun hosts(hosts: String) { - this.hosts = hosts - it.url("$beanRef:$hosts:$port/$keyspace") - } - - /** - * Port number of Cassandra server(s) - */ - public fun port(port: String) { - this.port = port - it.url("$beanRef:$hosts:$port/$keyspace") - } - - /** - * Port number of Cassandra server(s) - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$beanRef:$hosts:$port/$keyspace") - } - - /** - * Keyspace to use - */ - public fun keyspace(keyspace: String) { - this.keyspace = keyspace - it.url("$beanRef:$hosts:$port/$keyspace") - } - - /** - * Cluster name - */ - public fun clusterName(clusterName: String) { - it.property("clusterName", clusterName) - } - - /** - * CQL query to perform. Can be overridden with the message header with key CamelCqlQuery. - */ - public fun cql(cql: String) { - it.property("cql", cql) - } - - /** - * Datacenter to use - */ - public fun datacenter(datacenter: String) { - it.property("datacenter", datacenter) - } - - /** - * Whether to use PreparedStatements or regular Statements - */ - public fun prepareStatements(prepareStatements: String) { - it.property("prepareStatements", prepareStatements) - } - - /** - * Whether to use PreparedStatements or regular Statements - */ - public fun prepareStatements(prepareStatements: Boolean) { - it.property("prepareStatements", prepareStatements.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use a specific comma separated list of Extra Type codecs. Possible values are: - * BLOB_TO_ARRAY, BOOLEAN_LIST_TO_ARRAY, BYTE_LIST_TO_ARRAY, SHORT_LIST_TO_ARRAY, INT_LIST_TO_ARRAY, - * LONG_LIST_TO_ARRAY, FLOAT_LIST_TO_ARRAY, DOUBLE_LIST_TO_ARRAY, TIMESTAMP_UTC, - * TIMESTAMP_MILLIS_SYSTEM, TIMESTAMP_MILLIS_UTC, ZONED_TIMESTAMP_SYSTEM, ZONED_TIMESTAMP_UTC, - * ZONED_TIMESTAMP_PERSISTED, LOCAL_TIMESTAMP_SYSTEM and LOCAL_TIMESTAMP_UTC - */ - public fun extraTypeCodecs(extraTypeCodecs: String) { - it.property("extraTypeCodecs", extraTypeCodecs) - } - - /** - * To use a specific LoadBalancingPolicyClass - */ - public fun loadBalancingPolicyClass(loadBalancingPolicyClass: String) { - it.property("loadBalancingPolicyClass", loadBalancingPolicyClass) - } - - /** - * To use a custom class that implements logic for converting ResultSet into message body ALL, - * ONE, LIMIT_10, LIMIT_100... - */ - public fun resultSetConversionStrategy(resultSetConversionStrategy: String) { - it.property("resultSetConversionStrategy", resultSetConversionStrategy) - } - - /** - * To use the Session instance (you would normally not use this option) - */ - public fun session(session: String) { - it.property("session", session) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Password for session authentication - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Username for session authentication - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CronUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CronUriDsl.kt deleted file mode 100644 index bad5e308c7f07..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CronUriDsl.kt +++ /dev/null @@ -1,105 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * A generic interface for triggering events at times specified through the Unix cron syntax. - */ -public fun UriDsl.cron(i: CronUriDsl.() -> Unit) { - CronUriDsl(this).apply(i) -} - -@CamelDslMarker -public class CronUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("cron") - } - - private var name: String = "" - - /** - * The name of the cron trigger - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * A cron expression that will be used to generate events - */ - public fun schedule(schedule: String) { - it.property("schedule", schedule) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CryptoUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CryptoUriDsl.kt deleted file mode 100644 index 9172c99c8b73c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CryptoUriDsl.kt +++ /dev/null @@ -1,243 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Sign and verify exchanges using the Signature Service of the Java Cryptographic Extension (JCE). - */ -public fun UriDsl.crypto(i: CryptoUriDsl.() -> Unit) { - CryptoUriDsl(this).apply(i) -} - -@CamelDslMarker -public class CryptoUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("crypto") - } - - private var cryptoOperation: String = "" - - private var name: String = "" - - /** - * Set the Crypto operation from that supplied after the crypto scheme in the endpoint uri e.g. - * crypto:sign sets sign as the operation. - */ - public fun cryptoOperation(cryptoOperation: String) { - this.cryptoOperation = cryptoOperation - it.url("$cryptoOperation:$name") - } - - /** - * The logical name of this operation. - */ - public fun name(name: String) { - this.name = name - it.url("$cryptoOperation:$name") - } - - /** - * Sets the JCE name of the Algorithm that should be used for the signer. - */ - public fun algorithm(algorithm: String) { - it.property("algorithm", algorithm) - } - - /** - * Sets the alias used to query the KeyStore for keys and {link java.security.cert.Certificate - * Certificates} to be used in signing and verifying exchanges. This value can be provided at runtime - * via the message header org.apache.camel.component.crypto.DigitalSignatureConstants#KEYSTORE_ALIAS - */ - public fun alias(alias: String) { - it.property("alias", alias) - } - - /** - * Sets the reference name for a PrivateKey that can be found in the registry. - */ - public fun certificateName(certificateName: String) { - it.property("certificateName", certificateName) - } - - /** - * Sets the KeyStore that can contain keys and Certficates for use in signing and verifying - * exchanges. A KeyStore is typically used with an alias, either one supplied in the Route definition - * or dynamically via the message header CamelSignatureKeyStoreAlias. If no alias is supplied and - * there is only a single entry in the Keystore, then this single entry will be used. - */ - public fun keystore(keystore: String) { - it.property("keystore", keystore) - } - - /** - * Sets the reference name for a Keystore that can be found in the registry. - */ - public fun keystoreName(keystoreName: String) { - it.property("keystoreName", keystoreName) - } - - /** - * Set the PrivateKey that should be used to sign the exchange - */ - public fun privateKey(privateKey: String) { - it.property("privateKey", privateKey) - } - - /** - * Sets the reference name for a PrivateKey that can be found in the registry. - */ - public fun privateKeyName(privateKeyName: String) { - it.property("privateKeyName", privateKeyName) - } - - /** - * Set the id of the security provider that provides the configured Signature algorithm. - */ - public fun provider(provider: String) { - it.property("provider", provider) - } - - /** - * references that should be resolved when the context changes - */ - public fun publicKeyName(publicKeyName: String) { - it.property("publicKeyName", publicKeyName) - } - - /** - * Sets the reference name for a SecureRandom that can be found in the registry. - */ - public fun secureRandomName(secureRandomName: String) { - it.property("secureRandomName", secureRandomName) - } - - /** - * Set the name of the message header that should be used to store the base64 encoded signature. - * This defaults to 'CamelDigitalSignature' - */ - public fun signatureHeaderName(signatureHeaderName: String) { - it.property("signatureHeaderName", signatureHeaderName) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Set the size of the buffer used to read in the Exchange payload data. - */ - public fun bufferSize(bufferSize: String) { - it.property("bufferSize", bufferSize) - } - - /** - * Set the size of the buffer used to read in the Exchange payload data. - */ - public fun bufferSize(bufferSize: Int) { - it.property("bufferSize", bufferSize.toString()) - } - - /** - * Set the Certificate that should be used to verify the signature in the exchange based on its - * payload. - */ - public fun certificate(certificate: String) { - it.property("certificate", certificate) - } - - /** - * Determines if the Signature specific headers be cleared after signing and verification. - * Defaults to true, and should only be made otherwise at your extreme peril as vital private - * information such as Keys and passwords may escape if unset. - */ - public fun clearHeaders(clearHeaders: String) { - it.property("clearHeaders", clearHeaders) - } - - /** - * Determines if the Signature specific headers be cleared after signing and verification. - * Defaults to true, and should only be made otherwise at your extreme peril as vital private - * information such as Keys and passwords may escape if unset. - */ - public fun clearHeaders(clearHeaders: Boolean) { - it.property("clearHeaders", clearHeaders.toString()) - } - - /** - * Sets the KeyStore that can contain keys and Certficates for use in signing and verifying - * exchanges based on the given KeyStoreParameters. A KeyStore is typically used with an alias, - * either one supplied in the Route definition or dynamically via the message header - * CamelSignatureKeyStoreAlias. If no alias is supplied and there is only a single entry in the - * Keystore, then this single entry will be used. - */ - public fun keyStoreParameters(keyStoreParameters: String) { - it.property("keyStoreParameters", keyStoreParameters) - } - - /** - * Set the PublicKey that should be used to verify the signature in the exchange. - */ - public fun publicKey(publicKey: String) { - it.property("publicKey", publicKey) - } - - /** - * Set the SecureRandom used to initialize the Signature service - */ - public fun secureRandom(secureRandom: String) { - it.property("secureRandom", secureRandom) - } - - /** - * Sets the password used to access an aliased PrivateKey in the KeyStore. - */ - public fun password(password: String) { - it.property("password", password) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CxfUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CxfUriDsl.kt deleted file mode 100644 index 8daa2971380d1..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CxfUriDsl.kt +++ /dev/null @@ -1,464 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Expose SOAP WebServices using Apache CXF or connect to external WebServices using CXF WS client. - */ -public fun UriDsl.cxf(i: CxfUriDsl.() -> Unit) { - CxfUriDsl(this).apply(i) -} - -@CamelDslMarker -public class CxfUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("cxf") - } - - private var beanId: String = "" - - private var address: String = "" - - /** - * To lookup an existing configured CxfEndpoint. Must used bean: as prefix. - */ - public fun beanId(beanId: String) { - this.beanId = beanId - it.url("$beanId:$address") - } - - /** - * The service publish address. - */ - public fun address(address: String) { - this.address = address - it.url("$beanId:$address") - } - - /** - * The data type messages supported by the CXF endpoint. - */ - public fun dataFormat(dataFormat: String) { - it.property("dataFormat", dataFormat) - } - - /** - * The WSDL style that describes how parameters are represented in the SOAP body. If the value is - * false, CXF will chose the document-literal unwrapped style, If the value is true, CXF will chose - * the document-literal wrapped style - */ - public fun wrappedStyle(wrappedStyle: String) { - it.property("wrappedStyle", wrappedStyle) - } - - /** - * The WSDL style that describes how parameters are represented in the SOAP body. If the value is - * false, CXF will chose the document-literal unwrapped style, If the value is true, CXF will chose - * the document-literal wrapped style - */ - public fun wrappedStyle(wrappedStyle: Boolean) { - it.property("wrappedStyle", wrappedStyle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Configure a cookie handler to maintain a HTTP session - */ - public fun cookieHandler(cookieHandler: String) { - it.property("cookieHandler", cookieHandler) - } - - /** - * This option will set the default operationName that will be used by the CxfProducer which - * invokes the remote service. - */ - public fun defaultOperationName(defaultOperationName: String) { - it.property("defaultOperationName", defaultOperationName) - } - - /** - * This option will set the default operationNamespace that will be used by the CxfProducer which - * invokes the remote service. - */ - public fun defaultOperationNamespace(defaultOperationNamespace: String) { - it.property("defaultOperationNamespace", defaultOperationNamespace) - } - - /** - * The hostname verifier to be used. Use the # notation to reference a HostnameVerifier from the - * registry. - */ - public fun hostnameVerifier(hostnameVerifier: String) { - it.property("hostnameVerifier", hostnameVerifier) - } - - /** - * The Camel SSL setting reference. Use the # notation to reference the SSL Context. - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * Which kind of operation that CXF endpoint producer will invoke - */ - public fun wrapped(wrapped: String) { - it.property("wrapped", wrapped) - } - - /** - * Which kind of operation that CXF endpoint producer will invoke - */ - public fun wrapped(wrapped: Boolean) { - it.property("wrapped", wrapped.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * This option controls whether the CXF component, when running in PAYLOAD mode, will DOM parse - * the incoming messages into DOM Elements or keep the payload as a javax.xml.transform.Source object - * that would allow streaming in some cases. - */ - public fun allowStreaming(allowStreaming: String) { - it.property("allowStreaming", allowStreaming) - } - - /** - * This option controls whether the CXF component, when running in PAYLOAD mode, will DOM parse - * the incoming messages into DOM Elements or keep the payload as a javax.xml.transform.Source object - * that would allow streaming in some cases. - */ - public fun allowStreaming(allowStreaming: Boolean) { - it.property("allowStreaming", allowStreaming.toString()) - } - - /** - * To use a custom configured CXF Bus. - */ - public fun bus(bus: String) { - it.property("bus", bus) - } - - /** - * This option is used to set the CXF continuation timeout which could be used in CxfConsumer by - * default when the CXF server is using Jetty or Servlet transport. - */ - public fun continuationTimeout(continuationTimeout: String) { - it.property("continuationTimeout", continuationTimeout) - } - - /** - * To use a custom CxfBinding to control the binding between Camel Message and CXF Message. - */ - public fun cxfBinding(cxfBinding: String) { - it.property("cxfBinding", cxfBinding) - } - - /** - * This option could apply the implementation of - * org.apache.camel.component.cxf.CxfEndpointConfigurer which supports to configure the CXF endpoint - * in programmatic way. User can configure the CXF server and client by implementing - * configure{ServerClient} method of CxfEndpointConfigurer. - */ - public fun cxfConfigurer(cxfConfigurer: String) { - it.property("cxfConfigurer", cxfConfigurer) - } - - /** - * Will set the default bus when CXF endpoint create a bus by itself - */ - public fun defaultBus(defaultBus: String) { - it.property("defaultBus", defaultBus) - } - - /** - * Will set the default bus when CXF endpoint create a bus by itself - */ - public fun defaultBus(defaultBus: Boolean) { - it.property("defaultBus", defaultBus.toString()) - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * Whether to merge protocol headers. If enabled then propagating headers between Camel and CXF - * becomes more consistent and similar. For more details see CAMEL-6393. - */ - public fun mergeProtocolHeaders(mergeProtocolHeaders: String) { - it.property("mergeProtocolHeaders", mergeProtocolHeaders) - } - - /** - * Whether to merge protocol headers. If enabled then propagating headers between Camel and CXF - * becomes more consistent and similar. For more details see CAMEL-6393. - */ - public fun mergeProtocolHeaders(mergeProtocolHeaders: Boolean) { - it.property("mergeProtocolHeaders", mergeProtocolHeaders.toString()) - } - - /** - * To enable MTOM (attachments). This requires to use POJO or PAYLOAD data format mode. - */ - public fun mtomEnabled(mtomEnabled: String) { - it.property("mtomEnabled", mtomEnabled) - } - - /** - * To enable MTOM (attachments). This requires to use POJO or PAYLOAD data format mode. - */ - public fun mtomEnabled(mtomEnabled: Boolean) { - it.property("mtomEnabled", mtomEnabled.toString()) - } - - /** - * To set additional CXF options using the key/value pairs from the Map. For example to turn on - * stacktraces in SOAP faults, properties.faultStackTraceEnabled=true - */ - public fun properties(properties: String) { - it.property("properties", properties) - } - - /** - * Enable schema validation for request and response. Disabled by default for performance reason - */ - public fun schemaValidationEnabled(schemaValidationEnabled: String) { - it.property("schemaValidationEnabled", schemaValidationEnabled) - } - - /** - * Enable schema validation for request and response. Disabled by default for performance reason - */ - public fun schemaValidationEnabled(schemaValidationEnabled: Boolean) { - it.property("schemaValidationEnabled", schemaValidationEnabled.toString()) - } - - /** - * Sets whether SOAP message validation should be disabled. - */ - public fun skipPayloadMessagePartCheck(skipPayloadMessagePartCheck: String) { - it.property("skipPayloadMessagePartCheck", skipPayloadMessagePartCheck) - } - - /** - * Sets whether SOAP message validation should be disabled. - */ - public fun skipPayloadMessagePartCheck(skipPayloadMessagePartCheck: Boolean) { - it.property("skipPayloadMessagePartCheck", skipPayloadMessagePartCheck.toString()) - } - - /** - * This option enables CXF Logging Feature which writes inbound and outbound SOAP messages to log. - */ - public fun loggingFeatureEnabled(loggingFeatureEnabled: String) { - it.property("loggingFeatureEnabled", loggingFeatureEnabled) - } - - /** - * This option enables CXF Logging Feature which writes inbound and outbound SOAP messages to log. - */ - public fun loggingFeatureEnabled(loggingFeatureEnabled: Boolean) { - it.property("loggingFeatureEnabled", loggingFeatureEnabled.toString()) - } - - /** - * To limit the total size of number of bytes the logger will output when logging feature has been - * enabled and -1 for no limit. - */ - public fun loggingSizeLimit(loggingSizeLimit: String) { - it.property("loggingSizeLimit", loggingSizeLimit) - } - - /** - * To limit the total size of number of bytes the logger will output when logging feature has been - * enabled and -1 for no limit. - */ - public fun loggingSizeLimit(loggingSizeLimit: Int) { - it.property("loggingSizeLimit", loggingSizeLimit.toString()) - } - - /** - * This option controls whether the PhaseInterceptorChain skips logging the Fault that it catches. - */ - public fun skipFaultLogging(skipFaultLogging: String) { - it.property("skipFaultLogging", skipFaultLogging) - } - - /** - * This option controls whether the PhaseInterceptorChain skips logging the Fault that it catches. - */ - public fun skipFaultLogging(skipFaultLogging: Boolean) { - it.property("skipFaultLogging", skipFaultLogging.toString()) - } - - /** - * This option is used to set the basic authentication information of password for the CXF client. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * This option is used to set the basic authentication information of username for the CXF client. - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * The bindingId for the service model to use. - */ - public fun bindingId(bindingId: String) { - it.property("bindingId", bindingId) - } - - /** - * The endpoint name this service is implementing, it maps to the wsdl:portname. In the format of - * ns:PORT_NAME where ns is a namespace prefix valid at this scope. - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * This option can override the endpointUrl that published from the WSDL which can be accessed - * with service address url plus wsd - */ - public fun publishedEndpointUrl(publishedEndpointUrl: String) { - it.property("publishedEndpointUrl", publishedEndpointUrl) - } - - /** - * The class name of the SEI (Service Endpoint Interface) class which could have JSR181 annotation - * or not. - */ - public fun serviceClass(serviceClass: String) { - it.property("serviceClass", serviceClass) - } - - /** - * The service name this service is implementing, it maps to the wsdl:servicename. - */ - public fun serviceName(serviceName: String) { - it.property("serviceName", serviceName) - } - - /** - * The location of the WSDL. Can be on the classpath, file system, or be hosted remotely. - */ - public fun wsdlURL(wsdlURL: String) { - it.property("wsdlURL", wsdlURL) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CxfrsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CxfrsUriDsl.kt deleted file mode 100644 index f82b775cfb89f..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/CxfrsUriDsl.kt +++ /dev/null @@ -1,437 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Expose JAX-RS REST services using Apache CXF or connect to external REST services using CXF REST - * client. - */ -public fun UriDsl.cxfrs(i: CxfrsUriDsl.() -> Unit) { - CxfrsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class CxfrsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("cxfrs") - } - - private var beanId: String = "" - - private var address: String = "" - - /** - * To lookup an existing configured CxfRsEndpoint. Must used bean: as prefix. - */ - public fun beanId(beanId: String) { - this.beanId = beanId - it.url("$beanId:$address") - } - - /** - * The service publish address. - */ - public fun address(address: String) { - this.address = address - it.url("$beanId:$address") - } - - /** - * Set the feature list to the CxfRs endpoint. - */ - public fun features(features: String) { - it.property("features", features) - } - - /** - * This option is used to specify the model file which is useful for the resource class without - * annotation. When using this option, then the service class can be omitted, to emulate - * document-only endpoints - */ - public fun modelRef(modelRef: String) { - it.property("modelRef", modelRef) - } - - /** - * Set custom JAX-RS provider(s) list to the CxfRs endpoint. You can specify a string with a list - * of providers to lookup in the registy separated by comma. - */ - public fun providers(providers: String) { - it.property("providers", providers) - } - - /** - * The resource classes which you want to export as REST service. Multiple classes can be - * separated by comma. - */ - public fun resourceClasses(resourceClasses: String) { - it.property("resourceClasses", resourceClasses) - } - - /** - * Sets the locations of the schema(s) which can be used to validate the incoming XML or - * JAXB-driven JSON. - */ - public fun schemaLocations(schemaLocations: String) { - it.property("schemaLocations", schemaLocations) - } - - /** - * This option controls whether the PhaseInterceptorChain skips logging the Fault that it catches. - */ - public fun skipFaultLogging(skipFaultLogging: String) { - it.property("skipFaultLogging", skipFaultLogging) - } - - /** - * This option controls whether the PhaseInterceptorChain skips logging the Fault that it catches. - */ - public fun skipFaultLogging(skipFaultLogging: Boolean) { - it.property("skipFaultLogging", skipFaultLogging.toString()) - } - - /** - * Sets how requests and responses will be mapped to/from Camel. Two values are possible: - * SimpleConsumer: This binding style processes request parameters, multiparts, etc. and maps them to - * IN headers, IN attachments and to the message body. It aims to eliminate low-level processing of - * org.apache.cxf.message.MessageContentsList. It also also adds more flexibility and simplicity to - * the response mapping. Only available for consumers. Default: The default style. For consumers this - * passes on a MessageContentsList to the route, requiring low-level processing in the route. This is - * the traditional binding style, which simply dumps the org.apache.cxf.message.MessageContentsList - * coming in from the CXF stack onto the IN message body. The user is then responsible for processing - * it according to the contract defined by the JAX-RS method signature. Custom: allows you to specify - * a custom binding through the binding option. - */ - public fun bindingStyle(bindingStyle: String) { - it.property("bindingStyle", bindingStyle) - } - - /** - * This option can override the endpointUrl that published from the WADL which can be accessed - * with resource address url plus _wadl - */ - public fun publishedEndpointUrl(publishedEndpointUrl: String) { - it.property("publishedEndpointUrl", publishedEndpointUrl) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * The service beans (the bean ids to lookup in the registry) which you want to export as REST - * service. Multiple beans can be separated by comma - */ - public fun serviceBeans(serviceBeans: String) { - it.property("serviceBeans", serviceBeans) - } - - /** - * Configure a cookie handler to maintain a HTTP session - */ - public fun cookieHandler(cookieHandler: String) { - it.property("cookieHandler", cookieHandler) - } - - /** - * The hostname verifier to be used. Use the # notation to reference a HostnameVerifier from the - * registry. - */ - public fun hostnameVerifier(hostnameVerifier: String) { - it.property("hostnameVerifier", hostnameVerifier) - } - - /** - * The Camel SSL setting reference. Use the # notation to reference the SSL Context. - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * This option tells the CxfRsProducer to inspect return codes and will generate an Exception if - * the return code is larger than 207. - */ - public fun throwExceptionOnFailure(throwExceptionOnFailure: String) { - it.property("throwExceptionOnFailure", throwExceptionOnFailure) - } - - /** - * This option tells the CxfRsProducer to inspect return codes and will generate an Exception if - * the return code is larger than 207. - */ - public fun throwExceptionOnFailure(throwExceptionOnFailure: Boolean) { - it.property("throwExceptionOnFailure", throwExceptionOnFailure.toString()) - } - - /** - * If it is true, the CxfRsProducer will use the HttpClientAPI to invoke the service. If it is - * false, the CxfRsProducer will use the ProxyClientAPI to invoke the service - */ - public fun httpClientAPI(httpClientAPI: String) { - it.property("httpClientAPI", httpClientAPI) - } - - /** - * If it is true, the CxfRsProducer will use the HttpClientAPI to invoke the service. If it is - * false, the CxfRsProducer will use the ProxyClientAPI to invoke the service - */ - public fun httpClientAPI(httpClientAPI: Boolean) { - it.property("httpClientAPI", httpClientAPI.toString()) - } - - /** - * This option is used to tell CxfRsProducer to ignore the message body of the DELETE method when - * using HTTP API. - */ - public fun ignoreDeleteMethodMessageBody(ignoreDeleteMethodMessageBody: String) { - it.property("ignoreDeleteMethodMessageBody", ignoreDeleteMethodMessageBody) - } - - /** - * This option is used to tell CxfRsProducer to ignore the message body of the DELETE method when - * using HTTP API. - */ - public fun ignoreDeleteMethodMessageBody(ignoreDeleteMethodMessageBody: Boolean) { - it.property("ignoreDeleteMethodMessageBody", ignoreDeleteMethodMessageBody.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * This option allows you to configure the maximum size of the cache. The implementation caches - * CXF clients or ClientFactoryBean in CxfProvider and CxfRsProvider. - */ - public fun maxClientCacheSize(maxClientCacheSize: String) { - it.property("maxClientCacheSize", maxClientCacheSize) - } - - /** - * This option allows you to configure the maximum size of the cache. The implementation caches - * CXF clients or ClientFactoryBean in CxfProvider and CxfRsProvider. - */ - public fun maxClientCacheSize(maxClientCacheSize: Int) { - it.property("maxClientCacheSize", maxClientCacheSize.toString()) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * To use a custom CxfBinding to control the binding between Camel Message and CXF Message. - */ - public fun binding(binding: String) { - it.property("binding", binding) - } - - /** - * To use a custom configured CXF Bus. - */ - public fun bus(bus: String) { - it.property("bus", bus) - } - - /** - * This option is used to set the CXF continuation timeout which could be used in CxfConsumer by - * default when the CXF server is using Jetty or Servlet transport. - */ - public fun continuationTimeout(continuationTimeout: String) { - it.property("continuationTimeout", continuationTimeout) - } - - /** - * This option could apply the implementation of - * org.apache.camel.component.cxf.jaxrs.CxfRsEndpointConfigurer which supports to configure the CXF - * endpoint in programmatic way. User can configure the CXF server and client by implementing - * configure{Server/Client} method of CxfEndpointConfigurer. - */ - public fun cxfRsConfigurer(cxfRsConfigurer: String) { - it.property("cxfRsConfigurer", cxfRsConfigurer) - } - - /** - * Will set the default bus when CXF endpoint create a bus by itself - */ - public fun defaultBus(defaultBus: String) { - it.property("defaultBus", defaultBus) - } - - /** - * Will set the default bus when CXF endpoint create a bus by itself - */ - public fun defaultBus(defaultBus: Boolean) { - it.property("defaultBus", defaultBus.toString()) - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * When the option is true, Camel will perform the invocation of the resource class instance and - * put the response object into the exchange for further processing. - */ - public fun performInvocation(performInvocation: String) { - it.property("performInvocation", performInvocation) - } - - /** - * When the option is true, Camel will perform the invocation of the resource class instance and - * put the response object into the exchange for further processing. - */ - public fun performInvocation(performInvocation: Boolean) { - it.property("performInvocation", performInvocation.toString()) - } - - /** - * When the option is true, JAXRS UriInfo, HttpHeaders, Request and SecurityContext contexts will - * be available to custom CXFRS processors as typed Camel exchange properties. These contexts can be - * used to analyze the current requests using JAX-RS API. - */ - public fun propagateContexts(propagateContexts: String) { - it.property("propagateContexts", propagateContexts) - } - - /** - * When the option is true, JAXRS UriInfo, HttpHeaders, Request and SecurityContext contexts will - * be available to custom CXFRS processors as typed Camel exchange properties. These contexts can be - * used to analyze the current requests using JAX-RS API. - */ - public fun propagateContexts(propagateContexts: Boolean) { - it.property("propagateContexts", propagateContexts.toString()) - } - - /** - * This option enables CXF Logging Feature which writes inbound and outbound REST messages to log. - */ - public fun loggingFeatureEnabled(loggingFeatureEnabled: String) { - it.property("loggingFeatureEnabled", loggingFeatureEnabled) - } - - /** - * This option enables CXF Logging Feature which writes inbound and outbound REST messages to log. - */ - public fun loggingFeatureEnabled(loggingFeatureEnabled: Boolean) { - it.property("loggingFeatureEnabled", loggingFeatureEnabled.toString()) - } - - /** - * To limit the total size of number of bytes the logger will output when logging feature has been - * enabled and -1 for no limit. - */ - public fun loggingSizeLimit(loggingSizeLimit: String) { - it.property("loggingSizeLimit", loggingSizeLimit) - } - - /** - * To limit the total size of number of bytes the logger will output when logging feature has been - * enabled and -1 for no limit. - */ - public fun loggingSizeLimit(loggingSizeLimit: Int) { - it.property("loggingSizeLimit", loggingSizeLimit.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DataformatUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DataformatUriDsl.kt deleted file mode 100644 index cbab07b5f08c0..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DataformatUriDsl.kt +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Use a Camel Data Format as a regular Camel Component. - */ -public fun UriDsl.dataformat(i: DataformatUriDsl.() -> Unit) { - DataformatUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DataformatUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("dataformat") - } - - private var name: String = "" - - private var operation: String = "" - - /** - * Name of data format - */ - public fun name(name: String) { - this.name = name - it.url("$name:$operation") - } - - /** - * Operation to use either marshal or unmarshal - */ - public fun operation(operation: String) { - this.operation = operation - it.url("$name:$operation") - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetTestUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetTestUriDsl.kt deleted file mode 100644 index b2f025cbeccab..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetTestUriDsl.kt +++ /dev/null @@ -1,319 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Extends the mock component by pulling messages from another endpoint on startup to set the - * expected message bodies. - */ -public fun UriDsl.`dataset-test`(i: DatasetTestUriDsl.() -> Unit) { - DatasetTestUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DatasetTestUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("dataset-test") - } - - private var name: String = "" - - /** - * Name of endpoint to lookup in the registry to use for polling messages used for testing - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * Whether the expected messages should arrive in the same order or can be in any order. - */ - public fun anyOrder(anyOrder: String) { - it.property("anyOrder", anyOrder) - } - - /** - * Whether the expected messages should arrive in the same order or can be in any order. - */ - public fun anyOrder(anyOrder: Boolean) { - it.property("anyOrder", anyOrder.toString()) - } - - /** - * Sets a grace period after which the mock endpoint will re-assert to ensure the preliminary - * assertion is still valid. This is used, for example, to assert that exactly a number of messages - * arrive. For example, if the expected count was set to 5, then the assertion is satisfied when five - * or more messages arrive. To ensure that exactly 5 messages arrive, then you would need to wait a - * little period to ensure no further message arrives. This is what you can use this method for. By - * default, this period is disabled. - */ - public fun assertPeriod(assertPeriod: String) { - it.property("assertPeriod", assertPeriod) - } - - /** - * The split delimiter to use when split is enabled. By default the delimiter is new line based. - * The delimiter can be a regular expression. - */ - public fun delimiter(delimiter: String) { - it.property("delimiter", delimiter) - } - - /** - * Specifies the expected number of message exchanges that should be received by this endpoint. - * Beware: If you want to expect that 0 messages, then take extra care, as 0 matches when the tests - * starts, so you need to set a assert period time to let the test run for a while to make sure there - * are still no messages arrived; for that use setAssertPeriod(long). An alternative is to use - * NotifyBuilder, and use the notifier to know when Camel is done routing some messages, before you - * call the assertIsSatisfied() method on the mocks. This allows you to not use a fixed assert - * period, to speedup testing times. If you want to assert that exactly nth message arrives to this - * mock endpoint, then see also the setAssertPeriod(long) method for further details. - */ - public fun expectedCount(expectedCount: String) { - it.property("expectedCount", expectedCount) - } - - /** - * Specifies the expected number of message exchanges that should be received by this endpoint. - * Beware: If you want to expect that 0 messages, then take extra care, as 0 matches when the tests - * starts, so you need to set a assert period time to let the test run for a while to make sure there - * are still no messages arrived; for that use setAssertPeriod(long). An alternative is to use - * NotifyBuilder, and use the notifier to know when Camel is done routing some messages, before you - * call the assertIsSatisfied() method on the mocks. This allows you to not use a fixed assert - * period, to speedup testing times. If you want to assert that exactly nth message arrives to this - * mock endpoint, then see also the setAssertPeriod(long) method for further details. - */ - public fun expectedCount(expectedCount: Int) { - it.property("expectedCount", expectedCount.toString()) - } - - /** - * Sets whether assertIsSatisfied() should fail fast at the first detected failed expectation - * while it may otherwise wait for all expected messages to arrive before performing expectations - * verifications. Is by default true. Set to false to use behavior as in Camel 2.x. - */ - public fun failFast(failFast: String) { - it.property("failFast", failFast) - } - - /** - * Sets whether assertIsSatisfied() should fail fast at the first detected failed expectation - * while it may otherwise wait for all expected messages to arrive before performing expectations - * verifications. Is by default true. Set to false to use behavior as in Camel 2.x. - */ - public fun failFast(failFast: Boolean) { - it.property("failFast", failFast.toString()) - } - - /** - * To turn on logging when the mock receives an incoming message. This will log only one time at - * INFO level for the incoming message. For more detailed logging then set the logger to DEBUG level - * for the org.apache.camel.component.mock.MockEndpoint class. - */ - public fun log(log: String) { - it.property("log", log) - } - - /** - * To turn on logging when the mock receives an incoming message. This will log only one time at - * INFO level for the incoming message. For more detailed logging then set the logger to DEBUG level - * for the org.apache.camel.component.mock.MockEndpoint class. - */ - public fun log(log: Boolean) { - it.property("log", log.toString()) - } - - /** - * A number that is used to turn on throughput logging based on groups of the size. - */ - public fun reportGroup(reportGroup: String) { - it.property("reportGroup", reportGroup) - } - - /** - * A number that is used to turn on throughput logging based on groups of the size. - */ - public fun reportGroup(reportGroup: Int) { - it.property("reportGroup", reportGroup.toString()) - } - - /** - * Sets the minimum expected amount of time (in millis) the assertIsSatisfied() will wait on a - * latch until it is satisfied - */ - public fun resultMinimumWaitTime(resultMinimumWaitTime: String) { - it.property("resultMinimumWaitTime", resultMinimumWaitTime) - } - - /** - * Sets the maximum amount of time (in millis) the assertIsSatisfied() will wait on a latch until - * it is satisfied - */ - public fun resultWaitTime(resultWaitTime: String) { - it.property("resultWaitTime", resultWaitTime) - } - - /** - * Specifies to only retain the first nth number of received Exchanges. This is used when testing - * with big data, to reduce memory consumption by not storing copies of every Exchange this mock - * endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still - * return the actual number of received Exchanges. For example if we have received 5000 Exchanges, - * and have configured to only retain the first 10 Exchanges, then the getReceivedCounter() will - * still return 5000 but there is only the first 10 Exchanges in the getExchanges() and - * getReceivedExchanges() methods. When using this method, then some of the other expectation methods - * is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the - * first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) - * methods, to limit both the first and last received. - */ - public fun retainFirst(retainFirst: String) { - it.property("retainFirst", retainFirst) - } - - /** - * Specifies to only retain the first nth number of received Exchanges. This is used when testing - * with big data, to reduce memory consumption by not storing copies of every Exchange this mock - * endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still - * return the actual number of received Exchanges. For example if we have received 5000 Exchanges, - * and have configured to only retain the first 10 Exchanges, then the getReceivedCounter() will - * still return 5000 but there is only the first 10 Exchanges in the getExchanges() and - * getReceivedExchanges() methods. When using this method, then some of the other expectation methods - * is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the - * first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) - * methods, to limit both the first and last received. - */ - public fun retainFirst(retainFirst: Int) { - it.property("retainFirst", retainFirst.toString()) - } - - /** - * Specifies to only retain the last nth number of received Exchanges. This is used when testing - * with big data, to reduce memory consumption by not storing copies of every Exchange this mock - * endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still - * return the actual number of received Exchanges. For example if we have received 5000 Exchanges, - * and have configured to only retain the last 20 Exchanges, then the getReceivedCounter() will still - * return 5000 but there is only the last 20 Exchanges in the getExchanges() and - * getReceivedExchanges() methods. When using this method, then some of the other expectation methods - * is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the - * first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) - * methods, to limit both the first and last received. - */ - public fun retainLast(retainLast: String) { - it.property("retainLast", retainLast) - } - - /** - * Specifies to only retain the last nth number of received Exchanges. This is used when testing - * with big data, to reduce memory consumption by not storing copies of every Exchange this mock - * endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still - * return the actual number of received Exchanges. For example if we have received 5000 Exchanges, - * and have configured to only retain the last 20 Exchanges, then the getReceivedCounter() will still - * return 5000 but there is only the last 20 Exchanges in the getExchanges() and - * getReceivedExchanges() methods. When using this method, then some of the other expectation methods - * is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the - * first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) - * methods, to limit both the first and last received. - */ - public fun retainLast(retainLast: Int) { - it.property("retainLast", retainLast.toString()) - } - - /** - * Allows a sleep to be specified to wait to check that this endpoint really is empty when - * expectedMessageCount(int) is called with zero - */ - public fun sleepForEmptyTest(sleepForEmptyTest: String) { - it.property("sleepForEmptyTest", sleepForEmptyTest) - } - - /** - * If enabled the messages loaded from the test endpoint will be split using new line delimiters - * so each line is an expected message. For example to use a file endpoint to load a file where each - * line is an expected message. - */ - public fun split(split: String) { - it.property("split", split) - } - - /** - * If enabled the messages loaded from the test endpoint will be split using new line delimiters - * so each line is an expected message. For example to use a file endpoint to load a file where each - * line is an expected message. - */ - public fun split(split: Boolean) { - it.property("split", split.toString()) - } - - /** - * The timeout to use when polling for message bodies from the URI - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Sets whether to make a deep copy of the incoming Exchange when received at this mock endpoint. - * Is by default true. - */ - public fun copyOnExchange(copyOnExchange: String) { - it.property("copyOnExchange", copyOnExchange) - } - - /** - * Sets whether to make a deep copy of the incoming Exchange when received at this mock endpoint. - * Is by default true. - */ - public fun copyOnExchange(copyOnExchange: Boolean) { - it.property("copyOnExchange", copyOnExchange.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetUriDsl.kt deleted file mode 100644 index 50cbc2c769ec7..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DatasetUriDsl.kt +++ /dev/null @@ -1,379 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Provide data for load and soak testing of your Camel application. - */ -public fun UriDsl.dataset(i: DatasetUriDsl.() -> Unit) { - DatasetUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DatasetUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("dataset") - } - - private var name: String = "" - - /** - * Name of DataSet to lookup in the registry - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * Controls the behaviour of the CamelDataSetIndex header. off (consumer) the header will not be - * set. strict (consumer) the header will be set. lenient (consumer) the header will be set. off - * (producer) the header value will not be verified, and will not be set if it is not present. strict - * (producer) the header value must be present and will be verified. lenient (producer) the header - * value will be verified if it is present, and will be set if it is not present. - */ - public fun dataSetIndex(dataSetIndex: String) { - it.property("dataSetIndex", dataSetIndex) - } - - /** - * Time period in millis to wait before starting sending messages. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Wait until the DataSet contains at least this number of messages - */ - public fun minRate(minRate: String) { - it.property("minRate", minRate) - } - - /** - * Wait until the DataSet contains at least this number of messages - */ - public fun minRate(minRate: Int) { - it.property("minRate", minRate.toString()) - } - - /** - * Sets how many messages should be preloaded (sent) before the route completes its initialization - */ - public fun preloadSize(preloadSize: String) { - it.property("preloadSize", preloadSize) - } - - /** - * Sets how many messages should be preloaded (sent) before the route completes its initialization - */ - public fun preloadSize(preloadSize: Int) { - it.property("preloadSize", preloadSize.toString()) - } - - /** - * Allows a delay to be specified which causes a delay when a message is sent by the consumer (to - * simulate slow processing) - */ - public fun produceDelay(produceDelay: String) { - it.property("produceDelay", produceDelay) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Sets a grace period after which the mock endpoint will re-assert to ensure the preliminary - * assertion is still valid. This is used, for example, to assert that exactly a number of messages - * arrive. For example, if the expected count was set to 5, then the assertion is satisfied when five - * or more messages arrive. To ensure that exactly 5 messages arrive, then you would need to wait a - * little period to ensure no further message arrives. This is what you can use this method for. By - * default, this period is disabled. - */ - public fun assertPeriod(assertPeriod: String) { - it.property("assertPeriod", assertPeriod) - } - - /** - * Allows a delay to be specified which causes a delay when a message is consumed by the producer - * (to simulate slow processing) - */ - public fun consumeDelay(consumeDelay: String) { - it.property("consumeDelay", consumeDelay) - } - - /** - * Specifies the expected number of message exchanges that should be received by this endpoint. - * Beware: If you want to expect that 0 messages, then take extra care, as 0 matches when the tests - * starts, so you need to set a assert period time to let the test run for a while to make sure there - * are still no messages arrived; for that use setAssertPeriod(long). An alternative is to use - * NotifyBuilder, and use the notifier to know when Camel is done routing some messages, before you - * call the assertIsSatisfied() method on the mocks. This allows you to not use a fixed assert - * period, to speedup testing times. If you want to assert that exactly nth message arrives to this - * mock endpoint, then see also the setAssertPeriod(long) method for further details. - */ - public fun expectedCount(expectedCount: String) { - it.property("expectedCount", expectedCount) - } - - /** - * Specifies the expected number of message exchanges that should be received by this endpoint. - * Beware: If you want to expect that 0 messages, then take extra care, as 0 matches when the tests - * starts, so you need to set a assert period time to let the test run for a while to make sure there - * are still no messages arrived; for that use setAssertPeriod(long). An alternative is to use - * NotifyBuilder, and use the notifier to know when Camel is done routing some messages, before you - * call the assertIsSatisfied() method on the mocks. This allows you to not use a fixed assert - * period, to speedup testing times. If you want to assert that exactly nth message arrives to this - * mock endpoint, then see also the setAssertPeriod(long) method for further details. - */ - public fun expectedCount(expectedCount: Int) { - it.property("expectedCount", expectedCount.toString()) - } - - /** - * Sets whether assertIsSatisfied() should fail fast at the first detected failed expectation - * while it may otherwise wait for all expected messages to arrive before performing expectations - * verifications. Is by default true. Set to false to use behavior as in Camel 2.x. - */ - public fun failFast(failFast: String) { - it.property("failFast", failFast) - } - - /** - * Sets whether assertIsSatisfied() should fail fast at the first detected failed expectation - * while it may otherwise wait for all expected messages to arrive before performing expectations - * verifications. Is by default true. Set to false to use behavior as in Camel 2.x. - */ - public fun failFast(failFast: Boolean) { - it.property("failFast", failFast.toString()) - } - - /** - * To turn on logging when the mock receives an incoming message. This will log only one time at - * INFO level for the incoming message. For more detailed logging then set the logger to DEBUG level - * for the org.apache.camel.component.mock.MockEndpoint class. - */ - public fun log(log: String) { - it.property("log", log) - } - - /** - * To turn on logging when the mock receives an incoming message. This will log only one time at - * INFO level for the incoming message. For more detailed logging then set the logger to DEBUG level - * for the org.apache.camel.component.mock.MockEndpoint class. - */ - public fun log(log: Boolean) { - it.property("log", log.toString()) - } - - /** - * A number that is used to turn on throughput logging based on groups of the size. - */ - public fun reportGroup(reportGroup: String) { - it.property("reportGroup", reportGroup) - } - - /** - * A number that is used to turn on throughput logging based on groups of the size. - */ - public fun reportGroup(reportGroup: Int) { - it.property("reportGroup", reportGroup.toString()) - } - - /** - * Sets the minimum expected amount of time (in millis) the assertIsSatisfied() will wait on a - * latch until it is satisfied - */ - public fun resultMinimumWaitTime(resultMinimumWaitTime: String) { - it.property("resultMinimumWaitTime", resultMinimumWaitTime) - } - - /** - * Sets the maximum amount of time (in millis) the assertIsSatisfied() will wait on a latch until - * it is satisfied - */ - public fun resultWaitTime(resultWaitTime: String) { - it.property("resultWaitTime", resultWaitTime) - } - - /** - * Specifies to only retain the first nth number of received Exchanges. This is used when testing - * with big data, to reduce memory consumption by not storing copies of every Exchange this mock - * endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still - * return the actual number of received Exchanges. For example if we have received 5000 Exchanges, - * and have configured to only retain the first 10 Exchanges, then the getReceivedCounter() will - * still return 5000 but there is only the first 10 Exchanges in the getExchanges() and - * getReceivedExchanges() methods. When using this method, then some of the other expectation methods - * is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the - * first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) - * methods, to limit both the first and last received. - */ - public fun retainFirst(retainFirst: String) { - it.property("retainFirst", retainFirst) - } - - /** - * Specifies to only retain the first nth number of received Exchanges. This is used when testing - * with big data, to reduce memory consumption by not storing copies of every Exchange this mock - * endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still - * return the actual number of received Exchanges. For example if we have received 5000 Exchanges, - * and have configured to only retain the first 10 Exchanges, then the getReceivedCounter() will - * still return 5000 but there is only the first 10 Exchanges in the getExchanges() and - * getReceivedExchanges() methods. When using this method, then some of the other expectation methods - * is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the - * first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) - * methods, to limit both the first and last received. - */ - public fun retainFirst(retainFirst: Int) { - it.property("retainFirst", retainFirst.toString()) - } - - /** - * Specifies to only retain the last nth number of received Exchanges. This is used when testing - * with big data, to reduce memory consumption by not storing copies of every Exchange this mock - * endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still - * return the actual number of received Exchanges. For example if we have received 5000 Exchanges, - * and have configured to only retain the last 20 Exchanges, then the getReceivedCounter() will still - * return 5000 but there is only the last 20 Exchanges in the getExchanges() and - * getReceivedExchanges() methods. When using this method, then some of the other expectation methods - * is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the - * first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) - * methods, to limit both the first and last received. - */ - public fun retainLast(retainLast: String) { - it.property("retainLast", retainLast) - } - - /** - * Specifies to only retain the last nth number of received Exchanges. This is used when testing - * with big data, to reduce memory consumption by not storing copies of every Exchange this mock - * endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still - * return the actual number of received Exchanges. For example if we have received 5000 Exchanges, - * and have configured to only retain the last 20 Exchanges, then the getReceivedCounter() will still - * return 5000 but there is only the last 20 Exchanges in the getExchanges() and - * getReceivedExchanges() methods. When using this method, then some of the other expectation methods - * is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the - * first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) - * methods, to limit both the first and last received. - */ - public fun retainLast(retainLast: Int) { - it.property("retainLast", retainLast.toString()) - } - - /** - * Allows a sleep to be specified to wait to check that this endpoint really is empty when - * expectedMessageCount(int) is called with zero - */ - public fun sleepForEmptyTest(sleepForEmptyTest: String) { - it.property("sleepForEmptyTest", sleepForEmptyTest) - } - - /** - * Sets whether to make a deep copy of the incoming Exchange when received at this mock endpoint. - * Is by default true. - */ - public fun copyOnExchange(copyOnExchange: String) { - it.property("copyOnExchange", copyOnExchange) - } - - /** - * Sets whether to make a deep copy of the incoming Exchange when received at this mock endpoint. - * Is by default true. - */ - public fun copyOnExchange(copyOnExchange: Boolean) { - it.property("copyOnExchange", copyOnExchange.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumDb2UriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumDb2UriDsl.kt deleted file mode 100644 index 758f51ea0a464..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumDb2UriDsl.kt +++ /dev/null @@ -1,953 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Capture changes from a DB2 database. - */ -public fun UriDsl.`debezium-db2`(i: DebeziumDb2UriDsl.() -> Unit) { - DebeziumDb2UriDsl(this).apply(i) -} - -@CamelDslMarker -public class DebeziumDb2UriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("debezium-db2") - } - - private var name: String = "" - - /** - * Unique name for the connector. Attempting to register again with the same name will fail. - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * Additional properties for debezium components in case they can't be set directly on the camel - * configurations (e.g: setting Kafka Connect properties needed by Debezium engine, for example - * setting KafkaOffsetBackingStore), the properties have to be prefixed with additionalProperties.. - * E.g: - * additionalProperties.transactional.id=12345&additionalProperties.schema.registry.url=http://localhost:8811/avro - */ - public fun additionalProperties(additionalProperties: String) { - it.property("additionalProperties", additionalProperties) - } - - /** - * The Converter class that should be used to serialize and deserialize key data for offsets. The - * default is JSON converter. - */ - public fun internalKeyConverter(internalKeyConverter: String) { - it.property("internalKeyConverter", internalKeyConverter) - } - - /** - * The Converter class that should be used to serialize and deserialize value data for offsets. - * The default is JSON converter. - */ - public fun internalValueConverter(internalValueConverter: String) { - it.property("internalValueConverter", internalValueConverter) - } - - /** - * The name of the Java class of the commit policy. It defines when offsets commit has to be - * triggered based on the number of events processed and the time elapsed since the last commit. This - * class must implement the interface 'OffsetCommitPolicy'. The default is a periodic commit policy - * based upon time intervals. - */ - public fun offsetCommitPolicy(offsetCommitPolicy: String) { - it.property("offsetCommitPolicy", offsetCommitPolicy) - } - - /** - * Maximum number of milliseconds to wait for records to flush and partition offset data to be - * committed to offset storage before cancelling the process and restoring the offset data to be - * committed in a future attempt. The default is 5 seconds. - */ - public fun offsetCommitTimeoutMs(offsetCommitTimeoutMs: String) { - it.property("offsetCommitTimeoutMs", offsetCommitTimeoutMs) - } - - /** - * Interval at which to try committing offsets. The default is 1 minute. - */ - public fun offsetFlushIntervalMs(offsetFlushIntervalMs: String) { - it.property("offsetFlushIntervalMs", offsetFlushIntervalMs) - } - - /** - * The name of the Java class that is responsible for persistence of connector offsets. - */ - public fun offsetStorage(offsetStorage: String) { - it.property("offsetStorage", offsetStorage) - } - - /** - * Path to file where offsets are to be stored. Required when offset.storage is set to the - * FileOffsetBackingStore. - */ - public fun offsetStorageFileName(offsetStorageFileName: String) { - it.property("offsetStorageFileName", offsetStorageFileName) - } - - /** - * The number of partitions used when creating the offset storage topic. Required when - * offset.storage is set to the 'KafkaOffsetBackingStore'. - */ - public fun offsetStoragePartitions(offsetStoragePartitions: String) { - it.property("offsetStoragePartitions", offsetStoragePartitions) - } - - /** - * The number of partitions used when creating the offset storage topic. Required when - * offset.storage is set to the 'KafkaOffsetBackingStore'. - */ - public fun offsetStoragePartitions(offsetStoragePartitions: Int) { - it.property("offsetStoragePartitions", offsetStoragePartitions.toString()) - } - - /** - * Replication factor used when creating the offset storage topic. Required when offset.storage is - * set to the KafkaOffsetBackingStore - */ - public fun offsetStorageReplicationFactor(offsetStorageReplicationFactor: String) { - it.property("offsetStorageReplicationFactor", offsetStorageReplicationFactor) - } - - /** - * Replication factor used when creating the offset storage topic. Required when offset.storage is - * set to the KafkaOffsetBackingStore - */ - public fun offsetStorageReplicationFactor(offsetStorageReplicationFactor: Int) { - it.property("offsetStorageReplicationFactor", offsetStorageReplicationFactor.toString()) - } - - /** - * The name of the Kafka topic where offsets are to be stored. Required when offset.storage is set - * to the KafkaOffsetBackingStore. - */ - public fun offsetStorageTopic(offsetStorageTopic: String) { - it.property("offsetStorageTopic", offsetStorageTopic) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * The name of the schema where CDC change tables are located; defaults to 'ASNCDC' - */ - public fun cdcChangeTablesSchema(cdcChangeTablesSchema: String) { - it.property("cdcChangeTablesSchema", cdcChangeTablesSchema) - } - - /** - * The name of the schema where CDC control structures are located; defaults to 'ASNCDC' - */ - public fun cdcControlSchema(cdcControlSchema: String) { - it.property("cdcControlSchema", cdcControlSchema) - } - - /** - * Regular expressions matching columns to exclude from change events - */ - public fun columnExcludeList(columnExcludeList: String) { - it.property("columnExcludeList", columnExcludeList) - } - - /** - * Regular expressions matching columns to include in change events - */ - public fun columnIncludeList(columnIncludeList: String) { - it.property("columnIncludeList", columnIncludeList) - } - - /** - * A comma-separated list of regular expressions matching fully-qualified names of columns that - * adds the columns original type and original length as parameters to the corresponding field - * schemas in the emitted change records. - */ - public fun columnPropagateSourceType(columnPropagateSourceType: String) { - it.property("columnPropagateSourceType", columnPropagateSourceType) - } - - /** - * Optional list of custom converters that would be used instead of default ones. The converters - * are defined using '.type' config option and configured using options '.' - */ - public fun converters(converters: String) { - it.property("converters", converters) - } - - /** - * The custom metric tags will accept key-value pairs to customize the MBean object name which - * should be appended the end of regular name, each key would represent a tag for the MBean object - * name, and the corresponding value would be the value of that tag the key is. For example: - * k1=v1,k2=v2 - */ - public fun customMetricTags(customMetricTags: String) { - it.property("customMetricTags", customMetricTags) - } - - /** - * The name of the database from which the connector should capture changes - */ - public fun databaseDbname(databaseDbname: String) { - it.property("databaseDbname", databaseDbname) - } - - /** - * Resolvable hostname or IP address of the database server. - */ - public fun databaseHostname(databaseHostname: String) { - it.property("databaseHostname", databaseHostname) - } - - /** - * Password of the database user to be used when connecting to the database. - */ - public fun databasePassword(databasePassword: String) { - it.property("databasePassword", databasePassword) - } - - /** - * Port of the database server. - */ - public fun databasePort(databasePort: String) { - it.property("databasePort", databasePort) - } - - /** - * Port of the database server. - */ - public fun databasePort(databasePort: Int) { - it.property("databasePort", databasePort.toString()) - } - - /** - * Name of the database user to be used when connecting to the database. - */ - public fun databaseUser(databaseUser: String) { - it.property("databaseUser", databaseUser) - } - - /** - * A comma-separated list of regular expressions matching the database-specific data type names - * that adds the data type's original type and original length as parameters to the corresponding - * field schemas in the emitted change records. - */ - public fun datatypePropagateSourceType(datatypePropagateSourceType: String) { - it.property("datatypePropagateSourceType", datatypePropagateSourceType) - } - - /** - * Informs connector which Db2 implementation platform it is connected to. The default is 'LUW', - * which means Windows, UNIX, Linux. Using a value of 'Z' ensures that the Db2 for z/OS specific SQL - * statements are used. - */ - public fun db2Platform(db2Platform: String) { - it.property("db2Platform", db2Platform) - } - - /** - * Specify how DECIMAL and NUMERIC columns should be represented in change events, including: - * 'precise' (the default) uses java.math.BigDecimal to represent values, which are encoded in the - * change events using a binary representation and Kafka Connect's - * 'org.apache.kafka.connect.data.Decimal' type; 'string' uses string to represent values; 'double' - * represents values using Java's 'double', which may not offer the precision but will be far easier - * to use in consumers. - */ - public fun decimalHandlingMode(decimalHandlingMode: String) { - it.property("decimalHandlingMode", decimalHandlingMode) - } - - /** - * The maximum number of retries on connection errors before failing (-1 = no limit, 0 = disabled, - * 0 = num of retries). - */ - public fun errorsMaxRetries(errorsMaxRetries: String) { - it.property("errorsMaxRetries", errorsMaxRetries) - } - - /** - * The maximum number of retries on connection errors before failing (-1 = no limit, 0 = disabled, - * 0 = num of retries). - */ - public fun errorsMaxRetries(errorsMaxRetries: Int) { - it.property("errorsMaxRetries", errorsMaxRetries.toString()) - } - - /** - * Specify how failures during processing of events (i.e. when encountering a corrupted event) - * should be handled, including: 'fail' (the default) an exception indicating the problematic event - * and its position is raised, causing the connector to be stopped; 'warn' the problematic event and - * its position will be logged and the event will be skipped; 'ignore' the problematic event will be - * skipped. - */ - public fun eventProcessingFailureHandlingMode(eventProcessingFailureHandlingMode: String) { - it.property("eventProcessingFailureHandlingMode", eventProcessingFailureHandlingMode) - } - - /** - * Length of an interval in milli-seconds in in which the connector periodically sends heartbeat - * messages to a heartbeat topic. Use 0 to disable heartbeat messages. Disabled by default. - */ - public fun heartbeatIntervalMs(heartbeatIntervalMs: String) { - it.property("heartbeatIntervalMs", heartbeatIntervalMs) - } - - /** - * The prefix that is used to name heartbeat topics.Defaults to __debezium-heartbeat. - */ - public fun heartbeatTopicsPrefix(heartbeatTopicsPrefix: String) { - it.property("heartbeatTopicsPrefix", heartbeatTopicsPrefix) - } - - /** - * Whether the connector should publish changes in the database schema to a Kafka topic with the - * same name as the database server ID. Each schema change will be recorded using a key that contains - * the database name and whose value include logical description of the new schema and optionally the - * DDL statement(s). The default is 'true'. This is independent of how the connector internally - * records database schema history. - */ - public fun includeSchemaChanges(includeSchemaChanges: String) { - it.property("includeSchemaChanges", includeSchemaChanges) - } - - /** - * Whether the connector should publish changes in the database schema to a Kafka topic with the - * same name as the database server ID. Each schema change will be recorded using a key that contains - * the database name and whose value include logical description of the new schema and optionally the - * DDL statement(s). The default is 'true'. This is independent of how the connector internally - * records database schema history. - */ - public fun includeSchemaChanges(includeSchemaChanges: Boolean) { - it.property("includeSchemaChanges", includeSchemaChanges.toString()) - } - - /** - * The maximum size of chunk (number of documents/rows) for incremental snapshotting - */ - public fun incrementalSnapshotChunkSize(incrementalSnapshotChunkSize: String) { - it.property("incrementalSnapshotChunkSize", incrementalSnapshotChunkSize) - } - - /** - * The maximum size of chunk (number of documents/rows) for incremental snapshotting - */ - public fun incrementalSnapshotChunkSize(incrementalSnapshotChunkSize: Int) { - it.property("incrementalSnapshotChunkSize", incrementalSnapshotChunkSize.toString()) - } - - /** - * Specify the strategy used for watermarking during an incremental snapshot: 'insert_insert' both - * open and close signal is written into signal data collection (default); 'insert_delete' only open - * signal is written on signal data collection, the close will delete the relative open signal; - */ - public - fun incrementalSnapshotWatermarkingStrategy(incrementalSnapshotWatermarkingStrategy: String) { - it.property("incrementalSnapshotWatermarkingStrategy", incrementalSnapshotWatermarkingStrategy) - } - - /** - * Maximum size of each batch of source records. Defaults to 2048. - */ - public fun maxBatchSize(maxBatchSize: String) { - it.property("maxBatchSize", maxBatchSize) - } - - /** - * Maximum size of each batch of source records. Defaults to 2048. - */ - public fun maxBatchSize(maxBatchSize: Int) { - it.property("maxBatchSize", maxBatchSize.toString()) - } - - /** - * Maximum size of the queue for change events read from the database log but not yet recorded or - * forwarded. Defaults to 8192, and should always be larger than the maximum batch size. - */ - public fun maxQueueSize(maxQueueSize: String) { - it.property("maxQueueSize", maxQueueSize) - } - - /** - * Maximum size of the queue for change events read from the database log but not yet recorded or - * forwarded. Defaults to 8192, and should always be larger than the maximum batch size. - */ - public fun maxQueueSize(maxQueueSize: Int) { - it.property("maxQueueSize", maxQueueSize.toString()) - } - - /** - * Maximum size of the queue in bytes for change events read from the database log but not yet - * recorded or forwarded. Defaults to 0. Mean the feature is not enabled - */ - public fun maxQueueSizeInBytes(maxQueueSizeInBytes: String) { - it.property("maxQueueSizeInBytes", maxQueueSizeInBytes) - } - - /** - * Maximum size of the queue in bytes for change events read from the database log but not yet - * recorded or forwarded. Defaults to 0. Mean the feature is not enabled - */ - public fun maxQueueSizeInBytes(maxQueueSizeInBytes: Int) { - it.property("maxQueueSizeInBytes", maxQueueSizeInBytes.toString()) - } - - /** - * A semicolon-separated list of expressions that match fully-qualified tables and column(s) to be - * used as message key. Each expression must match the pattern ':', where the table names could be - * defined as (DB_NAME.TABLE_NAME) or (SCHEMA_NAME.TABLE_NAME), depending on the specific connector, - * and the key columns are a comma-separated list of columns representing the custom key. For any - * table without an explicit key configuration the table's primary key column(s) will be used as - * message key. Example: - * dbserver1.inventory.orderlines:orderId,orderLineId;dbserver1.inventory.orders:id - */ - public fun messageKeyColumns(messageKeyColumns: String) { - it.property("messageKeyColumns", messageKeyColumns) - } - - /** - * List of notification channels names that are enabled. - */ - public fun notificationEnabledChannels(notificationEnabledChannels: String) { - it.property("notificationEnabledChannels", notificationEnabledChannels) - } - - /** - * The name of the topic for the notifications. This is required in case 'sink' is in the list of - * enabled channels - */ - public fun notificationSinkTopicName(notificationSinkTopicName: String) { - it.property("notificationSinkTopicName", notificationSinkTopicName) - } - - /** - * Time to wait for new change events to appear after receiving no events, given in milliseconds. - * Defaults to 500 ms. - */ - public fun pollIntervalMs(pollIntervalMs: String) { - it.property("pollIntervalMs", pollIntervalMs) - } - - /** - * Optional list of post processors. The processors are defined using '.type' config option and - * configured using options '' - */ - public fun postProcessors(postProcessors: String) { - it.property("postProcessors", postProcessors) - } - - /** - * Enables transaction metadata extraction together with event counting - */ - public fun provideTransactionMetadata(provideTransactionMetadata: String) { - it.property("provideTransactionMetadata", provideTransactionMetadata) - } - - /** - * Enables transaction metadata extraction together with event counting - */ - public fun provideTransactionMetadata(provideTransactionMetadata: Boolean) { - it.property("provideTransactionMetadata", provideTransactionMetadata.toString()) - } - - /** - * The maximum number of records that should be loaded into memory while streaming. A value of '0' - * uses the default JDBC fetch size. The default value is '10000'. - */ - public fun queryFetchSize(queryFetchSize: String) { - it.property("queryFetchSize", queryFetchSize) - } - - /** - * The maximum number of records that should be loaded into memory while streaming. A value of '0' - * uses the default JDBC fetch size. The default value is '10000'. - */ - public fun queryFetchSize(queryFetchSize: Int) { - it.property("queryFetchSize", queryFetchSize.toString()) - } - - /** - * Time to wait before restarting connector after retriable exception occurs. Defaults to 10000ms. - */ - public fun retriableRestartConnectorWaitMs(retriableRestartConnectorWaitMs: String) { - it.property("retriableRestartConnectorWaitMs", retriableRestartConnectorWaitMs) - } - - /** - * The name of the SchemaHistory class that should be used to store and recover database schema - * changes. The configuration properties for the history are prefixed with the - * 'schema.history.internal.' string. - */ - public fun schemaHistoryInternal(schemaHistoryInternal: String) { - it.property("schemaHistoryInternal", schemaHistoryInternal) - } - - /** - * The path to the file that will be used to record the database schema history - */ - public fun schemaHistoryInternalFileFilename(schemaHistoryInternalFileFilename: String) { - it.property("schemaHistoryInternalFileFilename", schemaHistoryInternalFileFilename) - } - - /** - * Controls the action Debezium will take when it meets a DDL statement in binlog, that it cannot - * parse.By default the connector will stop operating but by changing the setting it can ignore the - * statements which it cannot parse. If skipping is enabled then Debezium can miss metadata changes. - */ - public - fun schemaHistoryInternalSkipUnparseableDdl(schemaHistoryInternalSkipUnparseableDdl: String) { - it.property("schemaHistoryInternalSkipUnparseableDdl", schemaHistoryInternalSkipUnparseableDdl) - } - - /** - * Controls the action Debezium will take when it meets a DDL statement in binlog, that it cannot - * parse.By default the connector will stop operating but by changing the setting it can ignore the - * statements which it cannot parse. If skipping is enabled then Debezium can miss metadata changes. - */ - public - fun schemaHistoryInternalSkipUnparseableDdl(schemaHistoryInternalSkipUnparseableDdl: Boolean) { - it.property("schemaHistoryInternalSkipUnparseableDdl", - schemaHistoryInternalSkipUnparseableDdl.toString()) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (true) only DDL - * that manipulates a table from captured schema/database will be stored. If set to false, then - * Debezium will store all incoming DDL statements. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedDatabasesDdl(schemaHistoryInternalStoreOnlyCapturedDatabasesDdl: String) { - it.property("schemaHistoryInternalStoreOnlyCapturedDatabasesDdl", - schemaHistoryInternalStoreOnlyCapturedDatabasesDdl) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (true) only DDL - * that manipulates a table from captured schema/database will be stored. If set to false, then - * Debezium will store all incoming DDL statements. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedDatabasesDdl(schemaHistoryInternalStoreOnlyCapturedDatabasesDdl: Boolean) { - it.property("schemaHistoryInternalStoreOnlyCapturedDatabasesDdl", - schemaHistoryInternalStoreOnlyCapturedDatabasesDdl.toString()) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (false) Debezium - * will store all incoming DDL statements. If set to true, then only DDL that manipulates a captured - * table will be stored. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedTablesDdl(schemaHistoryInternalStoreOnlyCapturedTablesDdl: String) { - it.property("schemaHistoryInternalStoreOnlyCapturedTablesDdl", - schemaHistoryInternalStoreOnlyCapturedTablesDdl) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (false) Debezium - * will store all incoming DDL statements. If set to true, then only DDL that manipulates a captured - * table will be stored. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedTablesDdl(schemaHistoryInternalStoreOnlyCapturedTablesDdl: Boolean) { - it.property("schemaHistoryInternalStoreOnlyCapturedTablesDdl", - schemaHistoryInternalStoreOnlyCapturedTablesDdl.toString()) - } - - /** - * Specify how schema names should be adjusted for compatibility with the message converter used - * by the connector, including: 'avro' replaces the characters that cannot be used in the Avro type - * name with underscore; 'avro_unicode' replaces the underscore or characters that cannot be used in - * the Avro type name with corresponding unicode like _uxxxx. Note: _ is an escape sequence like - * backslash in Java;'none' does not apply any adjustment (default) - */ - public fun schemaNameAdjustmentMode(schemaNameAdjustmentMode: String) { - it.property("schemaNameAdjustmentMode", schemaNameAdjustmentMode) - } - - /** - * The name of the data collection that is used to send signals/commands to Debezium. Signaling is - * disabled when not set. - */ - public fun signalDataCollection(signalDataCollection: String) { - it.property("signalDataCollection", signalDataCollection) - } - - /** - * List of channels names that are enabled. Source channel is enabled by default - */ - public fun signalEnabledChannels(signalEnabledChannels: String) { - it.property("signalEnabledChannels", signalEnabledChannels) - } - - /** - * Interval for looking for new signals in registered channels, given in milliseconds. Defaults to - * 5 seconds. - */ - public fun signalPollIntervalMs(signalPollIntervalMs: String) { - it.property("signalPollIntervalMs", signalPollIntervalMs) - } - - /** - * The comma-separated list of operations to skip during streaming, defined as: 'c' for - * inserts/create; 'u' for updates; 'd' for deletes, 't' for truncates, and 'none' to indicate - * nothing skipped. By default, only truncate operations will be skipped. - */ - public fun skippedOperations(skippedOperations: String) { - it.property("skippedOperations", skippedOperations) - } - - /** - * A delay period before a snapshot will begin, given in milliseconds. Defaults to 0 ms. - */ - public fun snapshotDelayMs(snapshotDelayMs: String) { - it.property("snapshotDelayMs", snapshotDelayMs) - } - - /** - * The maximum number of records that should be loaded into memory while performing a snapshot. - */ - public fun snapshotFetchSize(snapshotFetchSize: String) { - it.property("snapshotFetchSize", snapshotFetchSize) - } - - /** - * The maximum number of records that should be loaded into memory while performing a snapshot. - */ - public fun snapshotFetchSize(snapshotFetchSize: Int) { - it.property("snapshotFetchSize", snapshotFetchSize.toString()) - } - - /** - * This setting must be set to specify a list of tables/collections whose snapshot must be taken - * on creating or restarting the connector. - */ - public fun snapshotIncludeCollectionList(snapshotIncludeCollectionList: String) { - it.property("snapshotIncludeCollectionList", snapshotIncludeCollectionList) - } - - /** - * The maximum number of millis to wait for table locks at the beginning of a snapshot. If locks - * cannot be acquired in this time frame, the snapshot will be aborted. Defaults to 10 seconds - */ - public fun snapshotLockTimeoutMs(snapshotLockTimeoutMs: String) { - it.property("snapshotLockTimeoutMs", snapshotLockTimeoutMs) - } - - /** - * The criteria for running a snapshot upon startup of the connector. Options include: 'initial' - * (the default) to specify the connector should run a snapshot only when no offsets are available - * for the logical server name; 'schema_only' to specify the connector should run a snapshot of the - * schema when no offsets are available for the logical server name. - */ - public fun snapshotMode(snapshotMode: String) { - it.property("snapshotMode", snapshotMode) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotData(snapshotModeConfigurationBasedSnapshotData: String) { - it.property("snapshotModeConfigurationBasedSnapshotData", - snapshotModeConfigurationBasedSnapshotData) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotData(snapshotModeConfigurationBasedSnapshotData: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotData", - snapshotModeConfigurationBasedSnapshotData.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnDataError(snapshotModeConfigurationBasedSnapshotOnDataError: String) { - it.property("snapshotModeConfigurationBasedSnapshotOnDataError", - snapshotModeConfigurationBasedSnapshotOnDataError) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnDataError(snapshotModeConfigurationBasedSnapshotOnDataError: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotOnDataError", - snapshotModeConfigurationBasedSnapshotOnDataError.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnSchemaError(snapshotModeConfigurationBasedSnapshotOnSchemaError: String) { - it.property("snapshotModeConfigurationBasedSnapshotOnSchemaError", - snapshotModeConfigurationBasedSnapshotOnSchemaError) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnSchemaError(snapshotModeConfigurationBasedSnapshotOnSchemaError: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotOnSchemaError", - snapshotModeConfigurationBasedSnapshotOnSchemaError.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotSchema(snapshotModeConfigurationBasedSnapshotSchema: String) { - it.property("snapshotModeConfigurationBasedSnapshotSchema", - snapshotModeConfigurationBasedSnapshotSchema) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotSchema(snapshotModeConfigurationBasedSnapshotSchema: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotSchema", - snapshotModeConfigurationBasedSnapshotSchema.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the stream should start or not after snapshot. - */ - public - fun snapshotModeConfigurationBasedStartStream(snapshotModeConfigurationBasedStartStream: String) { - it.property("snapshotModeConfigurationBasedStartStream", - snapshotModeConfigurationBasedStartStream) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the stream should start or not after snapshot. - */ - public - fun snapshotModeConfigurationBasedStartStream(snapshotModeConfigurationBasedStartStream: Boolean) { - it.property("snapshotModeConfigurationBasedStartStream", - snapshotModeConfigurationBasedStartStream.toString()) - } - - /** - * When 'snapshot.mode' is set as custom, this setting must be set to specify a the name of the - * custom implementation provided in the 'name()' method. The implementations must implement the - * 'Snapshotter' interface and is called on each app boot to determine whether to do a snapshot. - */ - public fun snapshotModeCustomName(snapshotModeCustomName: String) { - it.property("snapshotModeCustomName", snapshotModeCustomName) - } - - /** - * This property contains a comma-separated list of fully-qualified tables (DB_NAME.TABLE_NAME) or - * (SCHEMA_NAME.TABLE_NAME), depending on the specific connectors. Select statements for the - * individual tables are specified in further configuration properties, one for each table, - * identified by the id 'snapshot.select.statement.overrides.DB_NAME.TABLE_NAME' or - * 'snapshot.select.statement.overrides.SCHEMA_NAME.TABLE_NAME', respectively. The value of those - * properties is the select statement to use when retrieving data from the specific table during - * snapshotting. A possible use case for large append-only tables is setting a specific point where - * to start (resume) snapshotting, in case a previous snapshotting was interrupted. - */ - public fun snapshotSelectStatementOverrides(snapshotSelectStatementOverrides: String) { - it.property("snapshotSelectStatementOverrides", snapshotSelectStatementOverrides) - } - - /** - * Controls the order in which tables are processed in the initial snapshot. A descending value - * will order the tables by row count descending. A ascending value will order the tables by row - * count ascending. A value of disabled (the default) will disable ordering by row count. - */ - public fun snapshotTablesOrderByRowCount(snapshotTablesOrderByRowCount: String) { - it.property("snapshotTablesOrderByRowCount", snapshotTablesOrderByRowCount) - } - - /** - * The name of the SourceInfoStructMaker class that returns SourceInfo schema and struct. - */ - public fun sourceinfoStructMaker(sourceinfoStructMaker: String) { - it.property("sourceinfoStructMaker", sourceinfoStructMaker) - } - - /** - * A delay period after the snapshot is completed and the streaming begins, given in milliseconds. - * Defaults to 0 ms. - */ - public fun streamingDelayMs(streamingDelayMs: String) { - it.property("streamingDelayMs", streamingDelayMs) - } - - /** - * A comma-separated list of regular expressions that match the fully-qualified names of tables to - * be excluded from monitoring - */ - public fun tableExcludeList(tableExcludeList: String) { - it.property("tableExcludeList", tableExcludeList) - } - - /** - * Flag specifying whether built-in tables should be ignored. - */ - public fun tableIgnoreBuiltin(tableIgnoreBuiltin: String) { - it.property("tableIgnoreBuiltin", tableIgnoreBuiltin) - } - - /** - * Flag specifying whether built-in tables should be ignored. - */ - public fun tableIgnoreBuiltin(tableIgnoreBuiltin: Boolean) { - it.property("tableIgnoreBuiltin", tableIgnoreBuiltin.toString()) - } - - /** - * The tables for which changes are to be captured - */ - public fun tableIncludeList(tableIncludeList: String) { - it.property("tableIncludeList", tableIncludeList) - } - - /** - * Time, date, and timestamps can be represented with different kinds of precisions, including: - * 'adaptive' (the default) bases the precision of time, date, and timestamp values on the database - * column's precision; 'adaptive_time_microseconds' like 'adaptive' mode, but TIME fields always use - * microseconds precision; 'connect' always represents time, date, and timestamp values using Kafka - * Connect's built-in representations for Time, Date, and Timestamp, which uses millisecond precision - * regardless of the database columns' precision. - */ - public fun timePrecisionMode(timePrecisionMode: String) { - it.property("timePrecisionMode", timePrecisionMode) - } - - /** - * Whether delete operations should be represented by a delete event and a subsequent tombstone - * event (true) or only by a delete event (false). Emitting the tombstone event (the default - * behavior) allows Kafka to completely delete all events pertaining to the given key once the source - * record got deleted. - */ - public fun tombstonesOnDelete(tombstonesOnDelete: String) { - it.property("tombstonesOnDelete", tombstonesOnDelete) - } - - /** - * Whether delete operations should be represented by a delete event and a subsequent tombstone - * event (true) or only by a delete event (false). Emitting the tombstone event (the default - * behavior) allows Kafka to completely delete all events pertaining to the given key once the source - * record got deleted. - */ - public fun tombstonesOnDelete(tombstonesOnDelete: Boolean) { - it.property("tombstonesOnDelete", tombstonesOnDelete.toString()) - } - - /** - * The name of the TopicNamingStrategy class that should be used to determine the topic name for - * data change, schema change, transaction, heartbeat event etc. - */ - public fun topicNamingStrategy(topicNamingStrategy: String) { - it.property("topicNamingStrategy", topicNamingStrategy) - } - - /** - * Topic prefix that identifies and provides a namespace for the particular database - * server/cluster is capturing changes. The topic prefix should be unique across all other - * connectors, since it is used as a prefix for all Kafka topic names that receive events emitted by - * this connector. Only alphanumeric characters, hyphens, dots and underscores must be accepted. - */ - public fun topicPrefix(topicPrefix: String) { - it.property("topicPrefix", topicPrefix) - } - - /** - * Class to make transaction context & transaction struct/schemas - */ - public fun transactionMetadataFactory(transactionMetadataFactory: String) { - it.property("transactionMetadataFactory", transactionMetadataFactory) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumMongodbUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumMongodbUriDsl.kt deleted file mode 100644 index b38ee096061e2..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumMongodbUriDsl.kt +++ /dev/null @@ -1,838 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Capture changes from a MongoDB database. - */ -public fun UriDsl.`debezium-mongodb`(i: DebeziumMongodbUriDsl.() -> Unit) { - DebeziumMongodbUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DebeziumMongodbUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("debezium-mongodb") - } - - private var name: String = "" - - /** - * Unique name for the connector. Attempting to register again with the same name will fail. - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * Additional properties for debezium components in case they can't be set directly on the camel - * configurations (e.g: setting Kafka Connect properties needed by Debezium engine, for example - * setting KafkaOffsetBackingStore), the properties have to be prefixed with additionalProperties.. - * E.g: - * additionalProperties.transactional.id=12345&additionalProperties.schema.registry.url=http://localhost:8811/avro - */ - public fun additionalProperties(additionalProperties: String) { - it.property("additionalProperties", additionalProperties) - } - - /** - * The Converter class that should be used to serialize and deserialize key data for offsets. The - * default is JSON converter. - */ - public fun internalKeyConverter(internalKeyConverter: String) { - it.property("internalKeyConverter", internalKeyConverter) - } - - /** - * The Converter class that should be used to serialize and deserialize value data for offsets. - * The default is JSON converter. - */ - public fun internalValueConverter(internalValueConverter: String) { - it.property("internalValueConverter", internalValueConverter) - } - - /** - * The name of the Java class of the commit policy. It defines when offsets commit has to be - * triggered based on the number of events processed and the time elapsed since the last commit. This - * class must implement the interface 'OffsetCommitPolicy'. The default is a periodic commit policy - * based upon time intervals. - */ - public fun offsetCommitPolicy(offsetCommitPolicy: String) { - it.property("offsetCommitPolicy", offsetCommitPolicy) - } - - /** - * Maximum number of milliseconds to wait for records to flush and partition offset data to be - * committed to offset storage before cancelling the process and restoring the offset data to be - * committed in a future attempt. The default is 5 seconds. - */ - public fun offsetCommitTimeoutMs(offsetCommitTimeoutMs: String) { - it.property("offsetCommitTimeoutMs", offsetCommitTimeoutMs) - } - - /** - * Interval at which to try committing offsets. The default is 1 minute. - */ - public fun offsetFlushIntervalMs(offsetFlushIntervalMs: String) { - it.property("offsetFlushIntervalMs", offsetFlushIntervalMs) - } - - /** - * The name of the Java class that is responsible for persistence of connector offsets. - */ - public fun offsetStorage(offsetStorage: String) { - it.property("offsetStorage", offsetStorage) - } - - /** - * Path to file where offsets are to be stored. Required when offset.storage is set to the - * FileOffsetBackingStore. - */ - public fun offsetStorageFileName(offsetStorageFileName: String) { - it.property("offsetStorageFileName", offsetStorageFileName) - } - - /** - * The number of partitions used when creating the offset storage topic. Required when - * offset.storage is set to the 'KafkaOffsetBackingStore'. - */ - public fun offsetStoragePartitions(offsetStoragePartitions: String) { - it.property("offsetStoragePartitions", offsetStoragePartitions) - } - - /** - * The number of partitions used when creating the offset storage topic. Required when - * offset.storage is set to the 'KafkaOffsetBackingStore'. - */ - public fun offsetStoragePartitions(offsetStoragePartitions: Int) { - it.property("offsetStoragePartitions", offsetStoragePartitions.toString()) - } - - /** - * Replication factor used when creating the offset storage topic. Required when offset.storage is - * set to the KafkaOffsetBackingStore - */ - public fun offsetStorageReplicationFactor(offsetStorageReplicationFactor: String) { - it.property("offsetStorageReplicationFactor", offsetStorageReplicationFactor) - } - - /** - * Replication factor used when creating the offset storage topic. Required when offset.storage is - * set to the KafkaOffsetBackingStore - */ - public fun offsetStorageReplicationFactor(offsetStorageReplicationFactor: Int) { - it.property("offsetStorageReplicationFactor", offsetStorageReplicationFactor.toString()) - } - - /** - * The name of the Kafka topic where offsets are to be stored. Required when offset.storage is set - * to the KafkaOffsetBackingStore. - */ - public fun offsetStorageTopic(offsetStorageTopic: String) { - it.property("offsetStorageTopic", offsetStorageTopic) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * The method used to capture changes from MongoDB server. Options include: 'change_streams' to - * capture changes via MongoDB Change Streams, update events do not contain full documents; - * 'change_streams_update_full' (the default) to capture changes via MongoDB Change Streams, update - * events contain full documents - */ - public fun captureMode(captureMode: String) { - it.property("captureMode", captureMode) - } - - /** - * A comma-separated list of regular expressions or literals that match the collection names for - * which changes are to be excluded - */ - public fun collectionExcludeList(collectionExcludeList: String) { - it.property("collectionExcludeList", collectionExcludeList) - } - - /** - * A comma-separated list of regular expressions or literals that match the collection names for - * which changes are to be captured - */ - public fun collectionIncludeList(collectionIncludeList: String) { - it.property("collectionIncludeList", collectionIncludeList) - } - - /** - * Optional list of custom converters that would be used instead of default ones. The converters - * are defined using '.type' config option and configured using options '.' - */ - public fun converters(converters: String) { - it.property("converters", converters) - } - - /** - * The maximum processing time in milliseconds to wait for the oplog cursor to process a single - * poll request - */ - public fun cursorMaxAwaitTimeMs(cursorMaxAwaitTimeMs: String) { - it.property("cursorMaxAwaitTimeMs", cursorMaxAwaitTimeMs) - } - - /** - * The custom metric tags will accept key-value pairs to customize the MBean object name which - * should be appended the end of regular name, each key would represent a tag for the MBean object - * name, and the corresponding value would be the value of that tag the key is. For example: - * k1=v1,k2=v2 - */ - public fun customMetricTags(customMetricTags: String) { - it.property("customMetricTags", customMetricTags) - } - - /** - * A comma-separated list of regular expressions or literals that match the database names for - * which changes are to be excluded - */ - public fun databaseExcludeList(databaseExcludeList: String) { - it.property("databaseExcludeList", databaseExcludeList) - } - - /** - * A comma-separated list of regular expressions or literals that match the database names for - * which changes are to be captured - */ - public fun databaseIncludeList(databaseIncludeList: String) { - it.property("databaseIncludeList", databaseIncludeList) - } - - /** - * The maximum number of retries on connection errors before failing (-1 = no limit, 0 = disabled, - * 0 = num of retries). - */ - public fun errorsMaxRetries(errorsMaxRetries: String) { - it.property("errorsMaxRetries", errorsMaxRetries) - } - - /** - * The maximum number of retries on connection errors before failing (-1 = no limit, 0 = disabled, - * 0 = num of retries). - */ - public fun errorsMaxRetries(errorsMaxRetries: Int) { - it.property("errorsMaxRetries", errorsMaxRetries.toString()) - } - - /** - * Specify how failures during processing of events (i.e. when encountering a corrupted event) - * should be handled, including: 'fail' (the default) an exception indicating the problematic event - * and its position is raised, causing the connector to be stopped; 'warn' the problematic event and - * its position will be logged and the event will be skipped; 'ignore' the problematic event will be - * skipped. - */ - public fun eventProcessingFailureHandlingMode(eventProcessingFailureHandlingMode: String) { - it.property("eventProcessingFailureHandlingMode", eventProcessingFailureHandlingMode) - } - - /** - * A comma-separated list of the fully-qualified names of fields that should be excluded from - * change event message values - */ - public fun fieldExcludeList(fieldExcludeList: String) { - it.property("fieldExcludeList", fieldExcludeList) - } - - /** - * A comma-separated list of the fully-qualified replacements of fields that should be used to - * rename fields in change event message values. Fully-qualified replacements for fields are of the - * form databaseName.collectionName.fieldName.nestedFieldName:newNestedFieldName, where databaseName - * and collectionName may contain the wildcard () which matches any characters, the colon character - * (:) is used to determine rename mapping of field. - */ - public fun fieldRenames(fieldRenames: String) { - it.property("fieldRenames", fieldRenames) - } - - /** - * Length of an interval in milli-seconds in in which the connector periodically sends heartbeat - * messages to a heartbeat topic. Use 0 to disable heartbeat messages. Disabled by default. - */ - public fun heartbeatIntervalMs(heartbeatIntervalMs: String) { - it.property("heartbeatIntervalMs", heartbeatIntervalMs) - } - - /** - * The prefix that is used to name heartbeat topics.Defaults to __debezium-heartbeat. - */ - public fun heartbeatTopicsPrefix(heartbeatTopicsPrefix: String) { - it.property("heartbeatTopicsPrefix", heartbeatTopicsPrefix) - } - - /** - * Specify the strategy used for watermarking during an incremental snapshot: 'insert_insert' both - * open and close signal is written into signal data collection (default); 'insert_delete' only open - * signal is written on signal data collection, the close will delete the relative open signal; - */ - public - fun incrementalSnapshotWatermarkingStrategy(incrementalSnapshotWatermarkingStrategy: String) { - it.property("incrementalSnapshotWatermarkingStrategy", incrementalSnapshotWatermarkingStrategy) - } - - /** - * Maximum size of each batch of source records. Defaults to 2048. - */ - public fun maxBatchSize(maxBatchSize: String) { - it.property("maxBatchSize", maxBatchSize) - } - - /** - * Maximum size of each batch of source records. Defaults to 2048. - */ - public fun maxBatchSize(maxBatchSize: Int) { - it.property("maxBatchSize", maxBatchSize.toString()) - } - - /** - * Maximum size of the queue for change events read from the database log but not yet recorded or - * forwarded. Defaults to 8192, and should always be larger than the maximum batch size. - */ - public fun maxQueueSize(maxQueueSize: String) { - it.property("maxQueueSize", maxQueueSize) - } - - /** - * Maximum size of the queue for change events read from the database log but not yet recorded or - * forwarded. Defaults to 8192, and should always be larger than the maximum batch size. - */ - public fun maxQueueSize(maxQueueSize: Int) { - it.property("maxQueueSize", maxQueueSize.toString()) - } - - /** - * Maximum size of the queue in bytes for change events read from the database log but not yet - * recorded or forwarded. Defaults to 0. Mean the feature is not enabled - */ - public fun maxQueueSizeInBytes(maxQueueSizeInBytes: String) { - it.property("maxQueueSizeInBytes", maxQueueSizeInBytes) - } - - /** - * Maximum size of the queue in bytes for change events read from the database log but not yet - * recorded or forwarded. Defaults to 0. Mean the feature is not enabled - */ - public fun maxQueueSizeInBytes(maxQueueSizeInBytes: Int) { - it.property("maxQueueSizeInBytes", maxQueueSizeInBytes.toString()) - } - - /** - * Database containing user credentials. - */ - public fun mongodbAuthsource(mongodbAuthsource: String) { - it.property("mongodbAuthsource", mongodbAuthsource) - } - - /** - * Database connection string. - */ - public fun mongodbConnectionString(mongodbConnectionString: String) { - it.property("mongodbConnectionString", mongodbConnectionString) - } - - /** - * The connection timeout, given in milliseconds. Defaults to 10 seconds (10,000 ms). - */ - public fun mongodbConnectTimeoutMs(mongodbConnectTimeoutMs: String) { - it.property("mongodbConnectTimeoutMs", mongodbConnectTimeoutMs) - } - - /** - * The frequency that the cluster monitor attempts to reach each server. Defaults to 10 seconds - * (10,000 ms). - */ - public fun mongodbHeartbeatFrequencyMs(mongodbHeartbeatFrequencyMs: String) { - it.property("mongodbHeartbeatFrequencyMs", mongodbHeartbeatFrequencyMs) - } - - /** - * Password to be used when connecting to MongoDB, if necessary. - */ - public fun mongodbPassword(mongodbPassword: String) { - it.property("mongodbPassword", mongodbPassword) - } - - /** - * Interval for looking for new, removed, or changed replica sets, given in milliseconds. Defaults - * to 30 seconds (30,000 ms). - */ - public fun mongodbPollIntervalMs(mongodbPollIntervalMs: String) { - it.property("mongodbPollIntervalMs", mongodbPollIntervalMs) - } - - /** - * The server selection timeout, given in milliseconds. Defaults to 10 seconds (10,000 ms). - */ - public fun mongodbServerSelectionTimeoutMs(mongodbServerSelectionTimeoutMs: String) { - it.property("mongodbServerSelectionTimeoutMs", mongodbServerSelectionTimeoutMs) - } - - /** - * The socket timeout, given in milliseconds. Defaults to 0 ms. - */ - public fun mongodbSocketTimeoutMs(mongodbSocketTimeoutMs: String) { - it.property("mongodbSocketTimeoutMs", mongodbSocketTimeoutMs) - } - - /** - * Should connector use SSL to connect to MongoDB instances - */ - public fun mongodbSslEnabled(mongodbSslEnabled: String) { - it.property("mongodbSslEnabled", mongodbSslEnabled) - } - - /** - * Should connector use SSL to connect to MongoDB instances - */ - public fun mongodbSslEnabled(mongodbSslEnabled: Boolean) { - it.property("mongodbSslEnabled", mongodbSslEnabled.toString()) - } - - /** - * Whether invalid host names are allowed when using SSL. If true the connection will not prevent - * man-in-the-middle attacks - */ - public fun mongodbSslInvalidHostnameAllowed(mongodbSslInvalidHostnameAllowed: String) { - it.property("mongodbSslInvalidHostnameAllowed", mongodbSslInvalidHostnameAllowed) - } - - /** - * Whether invalid host names are allowed when using SSL. If true the connection will not prevent - * man-in-the-middle attacks - */ - public fun mongodbSslInvalidHostnameAllowed(mongodbSslInvalidHostnameAllowed: Boolean) { - it.property("mongodbSslInvalidHostnameAllowed", mongodbSslInvalidHostnameAllowed.toString()) - } - - /** - * Database user for connecting to MongoDB, if necessary. - */ - public fun mongodbUser(mongodbUser: String) { - it.property("mongodbUser", mongodbUser) - } - - /** - * List of notification channels names that are enabled. - */ - public fun notificationEnabledChannels(notificationEnabledChannels: String) { - it.property("notificationEnabledChannels", notificationEnabledChannels) - } - - /** - * The name of the topic for the notifications. This is required in case 'sink' is in the list of - * enabled channels - */ - public fun notificationSinkTopicName(notificationSinkTopicName: String) { - it.property("notificationSinkTopicName", notificationSinkTopicName) - } - - /** - * Time to wait for new change events to appear after receiving no events, given in milliseconds. - * Defaults to 500 ms. - */ - public fun pollIntervalMs(pollIntervalMs: String) { - it.property("pollIntervalMs", pollIntervalMs) - } - - /** - * Optional list of post processors. The processors are defined using '.type' config option and - * configured using options '' - */ - public fun postProcessors(postProcessors: String) { - it.property("postProcessors", postProcessors) - } - - /** - * Enables transaction metadata extraction together with event counting - */ - public fun provideTransactionMetadata(provideTransactionMetadata: String) { - it.property("provideTransactionMetadata", provideTransactionMetadata) - } - - /** - * Enables transaction metadata extraction together with event counting - */ - public fun provideTransactionMetadata(provideTransactionMetadata: Boolean) { - it.property("provideTransactionMetadata", provideTransactionMetadata.toString()) - } - - /** - * The maximum number of records that should be loaded into memory while streaming. A value of '0' - * uses the default JDBC fetch size. - */ - public fun queryFetchSize(queryFetchSize: String) { - it.property("queryFetchSize", queryFetchSize) - } - - /** - * The maximum number of records that should be loaded into memory while streaming. A value of '0' - * uses the default JDBC fetch size. - */ - public fun queryFetchSize(queryFetchSize: Int) { - it.property("queryFetchSize", queryFetchSize.toString()) - } - - /** - * Time to wait before restarting connector after retriable exception occurs. Defaults to 10000ms. - */ - public fun retriableRestartConnectorWaitMs(retriableRestartConnectorWaitMs: String) { - it.property("retriableRestartConnectorWaitMs", retriableRestartConnectorWaitMs) - } - - /** - * The path to the file that will be used to record the database schema history - */ - public fun schemaHistoryInternalFileFilename(schemaHistoryInternalFileFilename: String) { - it.property("schemaHistoryInternalFileFilename", schemaHistoryInternalFileFilename) - } - - /** - * Specify how schema names should be adjusted for compatibility with the message converter used - * by the connector, including: 'avro' replaces the characters that cannot be used in the Avro type - * name with underscore; 'avro_unicode' replaces the underscore or characters that cannot be used in - * the Avro type name with corresponding unicode like _uxxxx. Note: _ is an escape sequence like - * backslash in Java;'none' does not apply any adjustment (default) - */ - public fun schemaNameAdjustmentMode(schemaNameAdjustmentMode: String) { - it.property("schemaNameAdjustmentMode", schemaNameAdjustmentMode) - } - - /** - * The name of the data collection that is used to send signals/commands to Debezium. Signaling is - * disabled when not set. - */ - public fun signalDataCollection(signalDataCollection: String) { - it.property("signalDataCollection", signalDataCollection) - } - - /** - * List of channels names that are enabled. Source channel is enabled by default - */ - public fun signalEnabledChannels(signalEnabledChannels: String) { - it.property("signalEnabledChannels", signalEnabledChannels) - } - - /** - * Interval for looking for new signals in registered channels, given in milliseconds. Defaults to - * 5 seconds. - */ - public fun signalPollIntervalMs(signalPollIntervalMs: String) { - it.property("signalPollIntervalMs", signalPollIntervalMs) - } - - /** - * The comma-separated list of operations to skip during streaming, defined as: 'c' for - * inserts/create; 'u' for updates; 'd' for deletes, 't' for truncates, and 'none' to indicate - * nothing skipped. By default, only truncate operations will be skipped. - */ - public fun skippedOperations(skippedOperations: String) { - it.property("skippedOperations", skippedOperations) - } - - /** - * This property contains a comma-separated list of ., for which the initial snapshot may be a - * subset of data present in the data source. The subset would be defined by mongodb filter query - * specified as value for property snapshot.collection.filter.override.. - */ - public fun snapshotCollectionFilterOverrides(snapshotCollectionFilterOverrides: String) { - it.property("snapshotCollectionFilterOverrides", snapshotCollectionFilterOverrides) - } - - /** - * A delay period before a snapshot will begin, given in milliseconds. Defaults to 0 ms. - */ - public fun snapshotDelayMs(snapshotDelayMs: String) { - it.property("snapshotDelayMs", snapshotDelayMs) - } - - /** - * The maximum number of records that should be loaded into memory while performing a snapshot. - */ - public fun snapshotFetchSize(snapshotFetchSize: String) { - it.property("snapshotFetchSize", snapshotFetchSize) - } - - /** - * The maximum number of records that should be loaded into memory while performing a snapshot. - */ - public fun snapshotFetchSize(snapshotFetchSize: Int) { - it.property("snapshotFetchSize", snapshotFetchSize.toString()) - } - - /** - * This setting must be set to specify a list of tables/collections whose snapshot must be taken - * on creating or restarting the connector. - */ - public fun snapshotIncludeCollectionList(snapshotIncludeCollectionList: String) { - it.property("snapshotIncludeCollectionList", snapshotIncludeCollectionList) - } - - /** - * The maximum number of threads used to perform the snapshot. Defaults to 1. - */ - public fun snapshotMaxThreads(snapshotMaxThreads: String) { - it.property("snapshotMaxThreads", snapshotMaxThreads) - } - - /** - * The maximum number of threads used to perform the snapshot. Defaults to 1. - */ - public fun snapshotMaxThreads(snapshotMaxThreads: Int) { - it.property("snapshotMaxThreads", snapshotMaxThreads.toString()) - } - - /** - * The criteria for running a snapshot upon startup of the connector. Select one of the following - * snapshot options: 'initial' (default): If the connector does not detect any offsets for the - * logical server name, it runs a snapshot that captures the current full state of the configured - * tables. After the snapshot completes, the connector begins to stream changes from the oplog. - * 'never': The connector does not run a snapshot. Upon first startup, the connector immediately - * begins reading from the beginning of the oplog. - */ - public fun snapshotMode(snapshotMode: String) { - it.property("snapshotMode", snapshotMode) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotData(snapshotModeConfigurationBasedSnapshotData: String) { - it.property("snapshotModeConfigurationBasedSnapshotData", - snapshotModeConfigurationBasedSnapshotData) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotData(snapshotModeConfigurationBasedSnapshotData: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotData", - snapshotModeConfigurationBasedSnapshotData.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnDataError(snapshotModeConfigurationBasedSnapshotOnDataError: String) { - it.property("snapshotModeConfigurationBasedSnapshotOnDataError", - snapshotModeConfigurationBasedSnapshotOnDataError) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnDataError(snapshotModeConfigurationBasedSnapshotOnDataError: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotOnDataError", - snapshotModeConfigurationBasedSnapshotOnDataError.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnSchemaError(snapshotModeConfigurationBasedSnapshotOnSchemaError: String) { - it.property("snapshotModeConfigurationBasedSnapshotOnSchemaError", - snapshotModeConfigurationBasedSnapshotOnSchemaError) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnSchemaError(snapshotModeConfigurationBasedSnapshotOnSchemaError: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotOnSchemaError", - snapshotModeConfigurationBasedSnapshotOnSchemaError.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotSchema(snapshotModeConfigurationBasedSnapshotSchema: String) { - it.property("snapshotModeConfigurationBasedSnapshotSchema", - snapshotModeConfigurationBasedSnapshotSchema) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotSchema(snapshotModeConfigurationBasedSnapshotSchema: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotSchema", - snapshotModeConfigurationBasedSnapshotSchema.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the stream should start or not after snapshot. - */ - public - fun snapshotModeConfigurationBasedStartStream(snapshotModeConfigurationBasedStartStream: String) { - it.property("snapshotModeConfigurationBasedStartStream", - snapshotModeConfigurationBasedStartStream) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the stream should start or not after snapshot. - */ - public - fun snapshotModeConfigurationBasedStartStream(snapshotModeConfigurationBasedStartStream: Boolean) { - it.property("snapshotModeConfigurationBasedStartStream", - snapshotModeConfigurationBasedStartStream.toString()) - } - - /** - * When 'snapshot.mode' is set as custom, this setting must be set to specify a the name of the - * custom implementation provided in the 'name()' method. The implementations must implement the - * 'Snapshotter' interface and is called on each app boot to determine whether to do a snapshot. - */ - public fun snapshotModeCustomName(snapshotModeCustomName: String) { - it.property("snapshotModeCustomName", snapshotModeCustomName) - } - - /** - * The name of the SourceInfoStructMaker class that returns SourceInfo schema and struct. - */ - public fun sourceinfoStructMaker(sourceinfoStructMaker: String) { - it.property("sourceinfoStructMaker", sourceinfoStructMaker) - } - - /** - * A delay period after the snapshot is completed and the streaming begins, given in milliseconds. - * Defaults to 0 ms. - */ - public fun streamingDelayMs(streamingDelayMs: String) { - it.property("streamingDelayMs", streamingDelayMs) - } - - /** - * Whether delete operations should be represented by a delete event and a subsequent tombstone - * event (true) or only by a delete event (false). Emitting the tombstone event (the default - * behavior) allows Kafka to completely delete all events pertaining to the given key once the source - * record got deleted. - */ - public fun tombstonesOnDelete(tombstonesOnDelete: String) { - it.property("tombstonesOnDelete", tombstonesOnDelete) - } - - /** - * Whether delete operations should be represented by a delete event and a subsequent tombstone - * event (true) or only by a delete event (false). Emitting the tombstone event (the default - * behavior) allows Kafka to completely delete all events pertaining to the given key once the source - * record got deleted. - */ - public fun tombstonesOnDelete(tombstonesOnDelete: Boolean) { - it.property("tombstonesOnDelete", tombstonesOnDelete.toString()) - } - - /** - * The name of the TopicNamingStrategy class that should be used to determine the topic name for - * data change, schema change, transaction, heartbeat event etc. - */ - public fun topicNamingStrategy(topicNamingStrategy: String) { - it.property("topicNamingStrategy", topicNamingStrategy) - } - - /** - * Topic prefix that identifies and provides a namespace for the particular database - * server/cluster is capturing changes. The topic prefix should be unique across all other - * connectors, since it is used as a prefix for all Kafka topic names that receive events emitted by - * this connector. Only alphanumeric characters, hyphens, dots and underscores must be accepted. - */ - public fun topicPrefix(topicPrefix: String) { - it.property("topicPrefix", topicPrefix) - } - - /** - * Class to make transaction context & transaction struct/schemas - */ - public fun transactionMetadataFactory(transactionMetadataFactory: String) { - it.property("transactionMetadataFactory", transactionMetadataFactory) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumMysqlUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumMysqlUriDsl.kt deleted file mode 100644 index 7557365bca231..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumMysqlUriDsl.kt +++ /dev/null @@ -1,1355 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Capture changes from a MySQL database. - */ -public fun UriDsl.`debezium-mysql`(i: DebeziumMysqlUriDsl.() -> Unit) { - DebeziumMysqlUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DebeziumMysqlUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("debezium-mysql") - } - - private var name: String = "" - - /** - * Unique name for the connector. Attempting to register again with the same name will fail. - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * Additional properties for debezium components in case they can't be set directly on the camel - * configurations (e.g: setting Kafka Connect properties needed by Debezium engine, for example - * setting KafkaOffsetBackingStore), the properties have to be prefixed with additionalProperties.. - * E.g: - * additionalProperties.transactional.id=12345&additionalProperties.schema.registry.url=http://localhost:8811/avro - */ - public fun additionalProperties(additionalProperties: String) { - it.property("additionalProperties", additionalProperties) - } - - /** - * The Converter class that should be used to serialize and deserialize key data for offsets. The - * default is JSON converter. - */ - public fun internalKeyConverter(internalKeyConverter: String) { - it.property("internalKeyConverter", internalKeyConverter) - } - - /** - * The Converter class that should be used to serialize and deserialize value data for offsets. - * The default is JSON converter. - */ - public fun internalValueConverter(internalValueConverter: String) { - it.property("internalValueConverter", internalValueConverter) - } - - /** - * The name of the Java class of the commit policy. It defines when offsets commit has to be - * triggered based on the number of events processed and the time elapsed since the last commit. This - * class must implement the interface 'OffsetCommitPolicy'. The default is a periodic commit policy - * based upon time intervals. - */ - public fun offsetCommitPolicy(offsetCommitPolicy: String) { - it.property("offsetCommitPolicy", offsetCommitPolicy) - } - - /** - * Maximum number of milliseconds to wait for records to flush and partition offset data to be - * committed to offset storage before cancelling the process and restoring the offset data to be - * committed in a future attempt. The default is 5 seconds. - */ - public fun offsetCommitTimeoutMs(offsetCommitTimeoutMs: String) { - it.property("offsetCommitTimeoutMs", offsetCommitTimeoutMs) - } - - /** - * Interval at which to try committing offsets. The default is 1 minute. - */ - public fun offsetFlushIntervalMs(offsetFlushIntervalMs: String) { - it.property("offsetFlushIntervalMs", offsetFlushIntervalMs) - } - - /** - * The name of the Java class that is responsible for persistence of connector offsets. - */ - public fun offsetStorage(offsetStorage: String) { - it.property("offsetStorage", offsetStorage) - } - - /** - * Path to file where offsets are to be stored. Required when offset.storage is set to the - * FileOffsetBackingStore. - */ - public fun offsetStorageFileName(offsetStorageFileName: String) { - it.property("offsetStorageFileName", offsetStorageFileName) - } - - /** - * The number of partitions used when creating the offset storage topic. Required when - * offset.storage is set to the 'KafkaOffsetBackingStore'. - */ - public fun offsetStoragePartitions(offsetStoragePartitions: String) { - it.property("offsetStoragePartitions", offsetStoragePartitions) - } - - /** - * The number of partitions used when creating the offset storage topic. Required when - * offset.storage is set to the 'KafkaOffsetBackingStore'. - */ - public fun offsetStoragePartitions(offsetStoragePartitions: Int) { - it.property("offsetStoragePartitions", offsetStoragePartitions.toString()) - } - - /** - * Replication factor used when creating the offset storage topic. Required when offset.storage is - * set to the KafkaOffsetBackingStore - */ - public fun offsetStorageReplicationFactor(offsetStorageReplicationFactor: String) { - it.property("offsetStorageReplicationFactor", offsetStorageReplicationFactor) - } - - /** - * Replication factor used when creating the offset storage topic. Required when offset.storage is - * set to the KafkaOffsetBackingStore - */ - public fun offsetStorageReplicationFactor(offsetStorageReplicationFactor: Int) { - it.property("offsetStorageReplicationFactor", offsetStorageReplicationFactor.toString()) - } - - /** - * The name of the Kafka topic where offsets are to be stored. Required when offset.storage is set - * to the KafkaOffsetBackingStore. - */ - public fun offsetStorageTopic(offsetStorageTopic: String) { - it.property("offsetStorageTopic", offsetStorageTopic) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Specify how BIGINT UNSIGNED columns should be represented in change events, including: - * 'precise' uses java.math.BigDecimal to represent values, which are encoded in the change events - * using a binary representation and Kafka Connect's 'org.apache.kafka.connect.data.Decimal' type; - * 'long' (the default) represents values using Java's 'long', which may not offer the precision but - * will be far easier to use in consumers. - */ - public fun bigintUnsignedHandlingMode(bigintUnsignedHandlingMode: String) { - it.property("bigintUnsignedHandlingMode", bigintUnsignedHandlingMode) - } - - /** - * The size of a look-ahead buffer used by the binlog reader to decide whether the transaction in - * progress is going to be committed or rolled back. Use 0 to disable look-ahead buffering. Defaults - * to 0 (i.e. buffering is disabled. - */ - public fun binlogBufferSize(binlogBufferSize: String) { - it.property("binlogBufferSize", binlogBufferSize) - } - - /** - * The size of a look-ahead buffer used by the binlog reader to decide whether the transaction in - * progress is going to be committed or rolled back. Use 0 to disable look-ahead buffering. Defaults - * to 0 (i.e. buffering is disabled. - */ - public fun binlogBufferSize(binlogBufferSize: Int) { - it.property("binlogBufferSize", binlogBufferSize.toString()) - } - - /** - * Regular expressions matching columns to exclude from change events - */ - public fun columnExcludeList(columnExcludeList: String) { - it.property("columnExcludeList", columnExcludeList) - } - - /** - * Regular expressions matching columns to include in change events - */ - public fun columnIncludeList(columnIncludeList: String) { - it.property("columnIncludeList", columnIncludeList) - } - - /** - * A comma-separated list of regular expressions matching fully-qualified names of columns that - * adds the columns original type and original length as parameters to the corresponding field - * schemas in the emitted change records. - */ - public fun columnPropagateSourceType(columnPropagateSourceType: String) { - it.property("columnPropagateSourceType", columnPropagateSourceType) - } - - /** - * Whether a separate thread should be used to ensure the connection is kept alive. - */ - public fun connectKeepAlive(connectKeepAlive: String) { - it.property("connectKeepAlive", connectKeepAlive) - } - - /** - * Whether a separate thread should be used to ensure the connection is kept alive. - */ - public fun connectKeepAlive(connectKeepAlive: Boolean) { - it.property("connectKeepAlive", connectKeepAlive.toString()) - } - - /** - * Interval for connection checking if keep alive thread is used, given in milliseconds Defaults - * to 1 minute (60,000 ms). - */ - public fun connectKeepAliveIntervalMs(connectKeepAliveIntervalMs: String) { - it.property("connectKeepAliveIntervalMs", connectKeepAliveIntervalMs) - } - - /** - * Maximum time to wait after trying to connect to the database before timing out, given in - * milliseconds. Defaults to 30 seconds (30,000 ms). - */ - public fun connectTimeoutMs(connectTimeoutMs: String) { - it.property("connectTimeoutMs", connectTimeoutMs) - } - - /** - * Optional list of custom converters that would be used instead of default ones. The converters - * are defined using '.type' config option and configured using options '.' - */ - public fun converters(converters: String) { - it.property("converters", converters) - } - - /** - * The custom metric tags will accept key-value pairs to customize the MBean object name which - * should be appended the end of regular name, each key would represent a tag for the MBean object - * name, and the corresponding value would be the value of that tag the key is. For example: - * k1=v1,k2=v2 - */ - public fun customMetricTags(customMetricTags: String) { - it.property("customMetricTags", customMetricTags) - } - - /** - * A comma-separated list of regular expressions that match database names to be excluded from - * monitoring - */ - public fun databaseExcludeList(databaseExcludeList: String) { - it.property("databaseExcludeList", databaseExcludeList) - } - - /** - * Resolvable hostname or IP address of the database server. - */ - public fun databaseHostname(databaseHostname: String) { - it.property("databaseHostname", databaseHostname) - } - - /** - * The databases for which changes are to be captured - */ - public fun databaseIncludeList(databaseIncludeList: String) { - it.property("databaseIncludeList", databaseIncludeList) - } - - /** - * A semicolon separated list of SQL statements to be executed when a JDBC connection (not binlog - * reading connection) to the database is established. Note that the connector may establish JDBC - * connections at its own discretion, so this should typically be used for configuration of session - * parameters only, but not for executing DML statements. Use doubled semicolon (';;') to use a - * semicolon as a character and not as a delimiter. - */ - public fun databaseInitialStatements(databaseInitialStatements: String) { - it.property("databaseInitialStatements", databaseInitialStatements) - } - - /** - * JDBC Driver class name used to connect to the MySQL database server. - */ - public fun databaseJdbcDriver(databaseJdbcDriver: String) { - it.property("databaseJdbcDriver", databaseJdbcDriver) - } - - /** - * Password of the database user to be used when connecting to the database. - */ - public fun databasePassword(databasePassword: String) { - it.property("databasePassword", databasePassword) - } - - /** - * Port of the database server. - */ - public fun databasePort(databasePort: String) { - it.property("databasePort", databasePort) - } - - /** - * Port of the database server. - */ - public fun databasePort(databasePort: Int) { - it.property("databasePort", databasePort.toString()) - } - - /** - * JDBC protocol to use with the driver. - */ - public fun databaseProtocol(databaseProtocol: String) { - it.property("databaseProtocol", databaseProtocol) - } - - /** - * Time to wait for a query to execute, given in milliseconds. Defaults to 600 seconds (600,000 - * ms); zero means there is no limit. - */ - public fun databaseQueryTimeoutMs(databaseQueryTimeoutMs: String) { - it.property("databaseQueryTimeoutMs", databaseQueryTimeoutMs) - } - - /** - * A numeric ID of this database client, which must be unique across all currently-running - * database processes in the cluster. This connector joins the database cluster as another server - * (with this unique ID) so it can read the binlog. - */ - public fun databaseServerId(databaseServerId: String) { - it.property("databaseServerId", databaseServerId) - } - - /** - * A numeric ID of this database client, which must be unique across all currently-running - * database processes in the cluster. This connector joins the database cluster as another server - * (with this unique ID) so it can read the binlog. - */ - public fun databaseServerId(databaseServerId: Int) { - it.property("databaseServerId", databaseServerId.toString()) - } - - /** - * Only relevant if parallel snapshotting is configured. During parallel snapshotting, multiple - * (4) connections open to the database client, and they each need their own unique connection ID. - * This offset is used to generate those IDs from the base configured cluster ID. - */ - public fun databaseServerIdOffset(databaseServerIdOffset: String) { - it.property("databaseServerIdOffset", databaseServerIdOffset) - } - - /** - * Only relevant if parallel snapshotting is configured. During parallel snapshotting, multiple - * (4) connections open to the database client, and they each need their own unique connection ID. - * This offset is used to generate those IDs from the base configured cluster ID. - */ - public fun databaseServerIdOffset(databaseServerIdOffset: Int) { - it.property("databaseServerIdOffset", databaseServerIdOffset.toString()) - } - - /** - * The location of the key store file. This is optional and can be used for two-way authentication - * between the client and the database. - */ - public fun databaseSslKeystore(databaseSslKeystore: String) { - it.property("databaseSslKeystore", databaseSslKeystore) - } - - /** - * The password for the key store file. This is optional and only needed if - * 'database.ssl.keystore' is configured. - */ - public fun databaseSslKeystorePassword(databaseSslKeystorePassword: String) { - it.property("databaseSslKeystorePassword", databaseSslKeystorePassword) - } - - /** - * Whether to use an encrypted connection to the database. Options include: 'disabled' to use an - * unencrypted connection; 'preferred' (the default) to establish a secure (encrypted) connection if - * the server supports secure connections, but fall back to an unencrypted connection otherwise; - * 'required' to use a secure (encrypted) connection, and fail if one cannot be established; - * 'verify_ca' like 'required' but additionally verify the server TLS certificate against the - * configured Certificate Authority (CA) certificates, or fail if no valid matching CA certificates - * are found; or 'verify_identity' like 'verify_ca' but additionally verify that the server - * certificate matches the host to which the connection is attempted. - */ - public fun databaseSslMode(databaseSslMode: String) { - it.property("databaseSslMode", databaseSslMode) - } - - /** - * The location of the trust store file for the server certificate verification. - */ - public fun databaseSslTruststore(databaseSslTruststore: String) { - it.property("databaseSslTruststore", databaseSslTruststore) - } - - /** - * The password for the trust store file. Used to check the integrity of the truststore, and - * unlock the truststore. - */ - public fun databaseSslTruststorePassword(databaseSslTruststorePassword: String) { - it.property("databaseSslTruststorePassword", databaseSslTruststorePassword) - } - - /** - * Name of the database user to be used when connecting to the database. - */ - public fun databaseUser(databaseUser: String) { - it.property("databaseUser", databaseUser) - } - - /** - * A comma-separated list of regular expressions matching the database-specific data type names - * that adds the data type's original type and original length as parameters to the corresponding - * field schemas in the emitted change records. - */ - public fun datatypePropagateSourceType(datatypePropagateSourceType: String) { - it.property("datatypePropagateSourceType", datatypePropagateSourceType) - } - - /** - * Specify how DECIMAL and NUMERIC columns should be represented in change events, including: - * 'precise' (the default) uses java.math.BigDecimal to represent values, which are encoded in the - * change events using a binary representation and Kafka Connect's - * 'org.apache.kafka.connect.data.Decimal' type; 'string' uses string to represent values; 'double' - * represents values using Java's 'double', which may not offer the precision but will be far easier - * to use in consumers. - */ - public fun decimalHandlingMode(decimalHandlingMode: String) { - it.property("decimalHandlingMode", decimalHandlingMode) - } - - /** - * The database allows the user to insert year value as either 2-digit or 4-digit. In case of two - * digit the value is automatically mapped into 1970 - 2069.false - delegates the implicit conversion - * to the database; true - (the default) Debezium makes the conversion - */ - public fun enableTimeAdjuster(enableTimeAdjuster: String) { - it.property("enableTimeAdjuster", enableTimeAdjuster) - } - - /** - * The database allows the user to insert year value as either 2-digit or 4-digit. In case of two - * digit the value is automatically mapped into 1970 - 2069.false - delegates the implicit conversion - * to the database; true - (the default) Debezium makes the conversion - */ - public fun enableTimeAdjuster(enableTimeAdjuster: Boolean) { - it.property("enableTimeAdjuster", enableTimeAdjuster.toString()) - } - - /** - * The maximum number of retries on connection errors before failing (-1 = no limit, 0 = disabled, - * 0 = num of retries). - */ - public fun errorsMaxRetries(errorsMaxRetries: String) { - it.property("errorsMaxRetries", errorsMaxRetries) - } - - /** - * The maximum number of retries on connection errors before failing (-1 = no limit, 0 = disabled, - * 0 = num of retries). - */ - public fun errorsMaxRetries(errorsMaxRetries: Int) { - it.property("errorsMaxRetries", errorsMaxRetries.toString()) - } - - /** - * Specify how failures during deserialization of binlog events (i.e. when encountering a - * corrupted event) should be handled, including: 'fail' (the default) an exception indicating the - * problematic event and its binlog position is raised, causing the connector to be stopped; 'warn' - * the problematic event and its binlog position will be logged and the event will be skipped; - * 'ignore' the problematic event will be skipped. - */ - public - fun eventDeserializationFailureHandlingMode(eventDeserializationFailureHandlingMode: String) { - it.property("eventDeserializationFailureHandlingMode", eventDeserializationFailureHandlingMode) - } - - /** - * Specify how failures during processing of events (i.e. when encountering a corrupted event) - * should be handled, including: 'fail' (the default) an exception indicating the problematic event - * and its position is raised, causing the connector to be stopped; 'warn' the problematic event and - * its position will be logged and the event will be skipped; 'ignore' the problematic event will be - * skipped. - */ - public fun eventProcessingFailureHandlingMode(eventProcessingFailureHandlingMode: String) { - it.property("eventProcessingFailureHandlingMode", eventProcessingFailureHandlingMode) - } - - /** - * The source UUIDs used to exclude GTID ranges when determine the starting position in the MySQL - * server's binlog. - */ - public fun gtidSourceExcludes(gtidSourceExcludes: String) { - it.property("gtidSourceExcludes", gtidSourceExcludes) - } - - /** - * When set to true, only produce DML events for transactions that were written on the server with - * matching GTIDs defined by the gtid.source.includes or gtid.source.excludes, if they were - * specified. - */ - public fun gtidSourceFilterDmlEvents(gtidSourceFilterDmlEvents: String) { - it.property("gtidSourceFilterDmlEvents", gtidSourceFilterDmlEvents) - } - - /** - * When set to true, only produce DML events for transactions that were written on the server with - * matching GTIDs defined by the gtid.source.includes or gtid.source.excludes, if they were - * specified. - */ - public fun gtidSourceFilterDmlEvents(gtidSourceFilterDmlEvents: Boolean) { - it.property("gtidSourceFilterDmlEvents", gtidSourceFilterDmlEvents.toString()) - } - - /** - * The source UUIDs used to include GTID ranges when determine the starting position in the MySQL - * server's binlog. - */ - public fun gtidSourceIncludes(gtidSourceIncludes: String) { - it.property("gtidSourceIncludes", gtidSourceIncludes) - } - - /** - * The query executed with every heartbeat. - */ - public fun heartbeatActionQuery(heartbeatActionQuery: String) { - it.property("heartbeatActionQuery", heartbeatActionQuery) - } - - /** - * Length of an interval in milli-seconds in in which the connector periodically sends heartbeat - * messages to a heartbeat topic. Use 0 to disable heartbeat messages. Disabled by default. - */ - public fun heartbeatIntervalMs(heartbeatIntervalMs: String) { - it.property("heartbeatIntervalMs", heartbeatIntervalMs) - } - - /** - * The prefix that is used to name heartbeat topics.Defaults to __debezium-heartbeat. - */ - public fun heartbeatTopicsPrefix(heartbeatTopicsPrefix: String) { - it.property("heartbeatTopicsPrefix", heartbeatTopicsPrefix) - } - - /** - * Whether the connector should include the original SQL query that generated the change event. - * Note: This option requires the database to be configured using the server option - * binlog_rows_query_log_events (MySQL) or binlog_annotate_row_events (MariaDB) set to ON.Query will - * not be present for events generated from snapshot. WARNING: Enabling this option may expose tables - * or fields explicitly excluded or masked by including the original SQL statement in the change - * event. For this reason the default value is 'false'. - */ - public fun includeQuery(includeQuery: String) { - it.property("includeQuery", includeQuery) - } - - /** - * Whether the connector should include the original SQL query that generated the change event. - * Note: This option requires the database to be configured using the server option - * binlog_rows_query_log_events (MySQL) or binlog_annotate_row_events (MariaDB) set to ON.Query will - * not be present for events generated from snapshot. WARNING: Enabling this option may expose tables - * or fields explicitly excluded or masked by including the original SQL statement in the change - * event. For this reason the default value is 'false'. - */ - public fun includeQuery(includeQuery: Boolean) { - it.property("includeQuery", includeQuery.toString()) - } - - /** - * Whether the connector should publish changes in the database schema to a Kafka topic with the - * same name as the database server ID. Each schema change will be recorded using a key that contains - * the database name and whose value include logical description of the new schema and optionally the - * DDL statement(s). The default is 'true'. This is independent of how the connector internally - * records database schema history. - */ - public fun includeSchemaChanges(includeSchemaChanges: String) { - it.property("includeSchemaChanges", includeSchemaChanges) - } - - /** - * Whether the connector should publish changes in the database schema to a Kafka topic with the - * same name as the database server ID. Each schema change will be recorded using a key that contains - * the database name and whose value include logical description of the new schema and optionally the - * DDL statement(s). The default is 'true'. This is independent of how the connector internally - * records database schema history. - */ - public fun includeSchemaChanges(includeSchemaChanges: Boolean) { - it.property("includeSchemaChanges", includeSchemaChanges.toString()) - } - - /** - * Whether the connector parse table and column's comment to metadata object. Note: Enable this - * option will bring the implications on memory usage. The number and size of ColumnImpl objects is - * what largely impacts how much memory is consumed by the Debezium connectors, and adding a String - * to each of them can potentially be quite heavy. The default is 'false'. - */ - public fun includeSchemaComments(includeSchemaComments: String) { - it.property("includeSchemaComments", includeSchemaComments) - } - - /** - * Whether the connector parse table and column's comment to metadata object. Note: Enable this - * option will bring the implications on memory usage. The number and size of ColumnImpl objects is - * what largely impacts how much memory is consumed by the Debezium connectors, and adding a String - * to each of them can potentially be quite heavy. The default is 'false'. - */ - public fun includeSchemaComments(includeSchemaComments: Boolean) { - it.property("includeSchemaComments", includeSchemaComments.toString()) - } - - /** - * Specify how binlog events that belong to a table missing from internal schema representation - * (i.e. internal representation is not consistent with database) should be handled, including: - * 'fail' (the default) an exception indicating the problematic event and its binlog position is - * raised, causing the connector to be stopped; 'warn' the problematic event and its binlog position - * will be logged and the event will be skipped; 'skip' the problematic event will be skipped. - */ - public fun inconsistentSchemaHandlingMode(inconsistentSchemaHandlingMode: String) { - it.property("inconsistentSchemaHandlingMode", inconsistentSchemaHandlingMode) - } - - /** - * Detect schema change during an incremental snapshot and re-select a current chunk to avoid - * locking DDLs. Note that changes to a primary key are not supported and can cause incorrect results - * if performed during an incremental snapshot. Another limitation is that if a schema change affects - * only columns' default values, then the change won't be detected until the DDL is processed from - * the binlog stream. This doesn't affect the snapshot events' values, but the schema of snapshot - * events may have outdated defaults. - */ - public fun incrementalSnapshotAllowSchemaChanges(incrementalSnapshotAllowSchemaChanges: String) { - it.property("incrementalSnapshotAllowSchemaChanges", incrementalSnapshotAllowSchemaChanges) - } - - /** - * Detect schema change during an incremental snapshot and re-select a current chunk to avoid - * locking DDLs. Note that changes to a primary key are not supported and can cause incorrect results - * if performed during an incremental snapshot. Another limitation is that if a schema change affects - * only columns' default values, then the change won't be detected until the DDL is processed from - * the binlog stream. This doesn't affect the snapshot events' values, but the schema of snapshot - * events may have outdated defaults. - */ - public fun incrementalSnapshotAllowSchemaChanges(incrementalSnapshotAllowSchemaChanges: Boolean) { - it.property("incrementalSnapshotAllowSchemaChanges", - incrementalSnapshotAllowSchemaChanges.toString()) - } - - /** - * The maximum size of chunk (number of documents/rows) for incremental snapshotting - */ - public fun incrementalSnapshotChunkSize(incrementalSnapshotChunkSize: String) { - it.property("incrementalSnapshotChunkSize", incrementalSnapshotChunkSize) - } - - /** - * The maximum size of chunk (number of documents/rows) for incremental snapshotting - */ - public fun incrementalSnapshotChunkSize(incrementalSnapshotChunkSize: Int) { - it.property("incrementalSnapshotChunkSize", incrementalSnapshotChunkSize.toString()) - } - - /** - * Specify the strategy used for watermarking during an incremental snapshot: 'insert_insert' both - * open and close signal is written into signal data collection (default); 'insert_delete' only open - * signal is written on signal data collection, the close will delete the relative open signal; - */ - public - fun incrementalSnapshotWatermarkingStrategy(incrementalSnapshotWatermarkingStrategy: String) { - it.property("incrementalSnapshotWatermarkingStrategy", incrementalSnapshotWatermarkingStrategy) - } - - /** - * Maximum size of each batch of source records. Defaults to 2048. - */ - public fun maxBatchSize(maxBatchSize: String) { - it.property("maxBatchSize", maxBatchSize) - } - - /** - * Maximum size of each batch of source records. Defaults to 2048. - */ - public fun maxBatchSize(maxBatchSize: Int) { - it.property("maxBatchSize", maxBatchSize.toString()) - } - - /** - * Maximum size of the queue for change events read from the database log but not yet recorded or - * forwarded. Defaults to 8192, and should always be larger than the maximum batch size. - */ - public fun maxQueueSize(maxQueueSize: String) { - it.property("maxQueueSize", maxQueueSize) - } - - /** - * Maximum size of the queue for change events read from the database log but not yet recorded or - * forwarded. Defaults to 8192, and should always be larger than the maximum batch size. - */ - public fun maxQueueSize(maxQueueSize: Int) { - it.property("maxQueueSize", maxQueueSize.toString()) - } - - /** - * Maximum size of the queue in bytes for change events read from the database log but not yet - * recorded or forwarded. Defaults to 0. Mean the feature is not enabled - */ - public fun maxQueueSizeInBytes(maxQueueSizeInBytes: String) { - it.property("maxQueueSizeInBytes", maxQueueSizeInBytes) - } - - /** - * Maximum size of the queue in bytes for change events read from the database log but not yet - * recorded or forwarded. Defaults to 0. Mean the feature is not enabled - */ - public fun maxQueueSizeInBytes(maxQueueSizeInBytes: Int) { - it.property("maxQueueSizeInBytes", maxQueueSizeInBytes.toString()) - } - - /** - * A semicolon-separated list of expressions that match fully-qualified tables and column(s) to be - * used as message key. Each expression must match the pattern ':', where the table names could be - * defined as (DB_NAME.TABLE_NAME) or (SCHEMA_NAME.TABLE_NAME), depending on the specific connector, - * and the key columns are a comma-separated list of columns representing the custom key. For any - * table without an explicit key configuration the table's primary key column(s) will be used as - * message key. Example: - * dbserver1.inventory.orderlines:orderId,orderLineId;dbserver1.inventory.orders:id - */ - public fun messageKeyColumns(messageKeyColumns: String) { - it.property("messageKeyColumns", messageKeyColumns) - } - - /** - * The number of rows a table must contain to stream results rather than pull all into memory - * during snapshots. Defaults to 1,000. Use 0 to stream all results and completely avoid checking the - * size of each table. - */ - public fun minRowCountToStreamResults(minRowCountToStreamResults: String) { - it.property("minRowCountToStreamResults", minRowCountToStreamResults) - } - - /** - * The number of rows a table must contain to stream results rather than pull all into memory - * during snapshots. Defaults to 1,000. Use 0 to stream all results and completely avoid checking the - * size of each table. - */ - public fun minRowCountToStreamResults(minRowCountToStreamResults: Int) { - it.property("minRowCountToStreamResults", minRowCountToStreamResults.toString()) - } - - /** - * List of notification channels names that are enabled. - */ - public fun notificationEnabledChannels(notificationEnabledChannels: String) { - it.property("notificationEnabledChannels", notificationEnabledChannels) - } - - /** - * The name of the topic for the notifications. This is required in case 'sink' is in the list of - * enabled channels - */ - public fun notificationSinkTopicName(notificationSinkTopicName: String) { - it.property("notificationSinkTopicName", notificationSinkTopicName) - } - - /** - * Time to wait for new change events to appear after receiving no events, given in milliseconds. - * Defaults to 500 ms. - */ - public fun pollIntervalMs(pollIntervalMs: String) { - it.property("pollIntervalMs", pollIntervalMs) - } - - /** - * Optional list of post processors. The processors are defined using '.type' config option and - * configured using options '' - */ - public fun postProcessors(postProcessors: String) { - it.property("postProcessors", postProcessors) - } - - /** - * Enables transaction metadata extraction together with event counting - */ - public fun provideTransactionMetadata(provideTransactionMetadata: String) { - it.property("provideTransactionMetadata", provideTransactionMetadata) - } - - /** - * Enables transaction metadata extraction together with event counting - */ - public fun provideTransactionMetadata(provideTransactionMetadata: Boolean) { - it.property("provideTransactionMetadata", provideTransactionMetadata.toString()) - } - - /** - * The maximum number of records that should be loaded into memory while streaming. A value of '0' - * uses the default JDBC fetch size. - */ - public fun queryFetchSize(queryFetchSize: String) { - it.property("queryFetchSize", queryFetchSize) - } - - /** - * The maximum number of records that should be loaded into memory while streaming. A value of '0' - * uses the default JDBC fetch size. - */ - public fun queryFetchSize(queryFetchSize: Int) { - it.property("queryFetchSize", queryFetchSize.toString()) - } - - /** - * Time to wait before restarting connector after retriable exception occurs. Defaults to 10000ms. - */ - public fun retriableRestartConnectorWaitMs(retriableRestartConnectorWaitMs: String) { - it.property("retriableRestartConnectorWaitMs", retriableRestartConnectorWaitMs) - } - - /** - * The name of the SchemaHistory class that should be used to store and recover database schema - * changes. The configuration properties for the history are prefixed with the - * 'schema.history.internal.' string. - */ - public fun schemaHistoryInternal(schemaHistoryInternal: String) { - it.property("schemaHistoryInternal", schemaHistoryInternal) - } - - /** - * The path to the file that will be used to record the database schema history - */ - public fun schemaHistoryInternalFileFilename(schemaHistoryInternalFileFilename: String) { - it.property("schemaHistoryInternalFileFilename", schemaHistoryInternalFileFilename) - } - - /** - * Controls the action Debezium will take when it meets a DDL statement in binlog, that it cannot - * parse.By default the connector will stop operating but by changing the setting it can ignore the - * statements which it cannot parse. If skipping is enabled then Debezium can miss metadata changes. - */ - public - fun schemaHistoryInternalSkipUnparseableDdl(schemaHistoryInternalSkipUnparseableDdl: String) { - it.property("schemaHistoryInternalSkipUnparseableDdl", schemaHistoryInternalSkipUnparseableDdl) - } - - /** - * Controls the action Debezium will take when it meets a DDL statement in binlog, that it cannot - * parse.By default the connector will stop operating but by changing the setting it can ignore the - * statements which it cannot parse. If skipping is enabled then Debezium can miss metadata changes. - */ - public - fun schemaHistoryInternalSkipUnparseableDdl(schemaHistoryInternalSkipUnparseableDdl: Boolean) { - it.property("schemaHistoryInternalSkipUnparseableDdl", - schemaHistoryInternalSkipUnparseableDdl.toString()) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (true) only DDL - * that manipulates a table from captured schema/database will be stored. If set to false, then - * Debezium will store all incoming DDL statements. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedDatabasesDdl(schemaHistoryInternalStoreOnlyCapturedDatabasesDdl: String) { - it.property("schemaHistoryInternalStoreOnlyCapturedDatabasesDdl", - schemaHistoryInternalStoreOnlyCapturedDatabasesDdl) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (true) only DDL - * that manipulates a table from captured schema/database will be stored. If set to false, then - * Debezium will store all incoming DDL statements. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedDatabasesDdl(schemaHistoryInternalStoreOnlyCapturedDatabasesDdl: Boolean) { - it.property("schemaHistoryInternalStoreOnlyCapturedDatabasesDdl", - schemaHistoryInternalStoreOnlyCapturedDatabasesDdl.toString()) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (false) Debezium - * will store all incoming DDL statements. If set to true, then only DDL that manipulates a captured - * table will be stored. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedTablesDdl(schemaHistoryInternalStoreOnlyCapturedTablesDdl: String) { - it.property("schemaHistoryInternalStoreOnlyCapturedTablesDdl", - schemaHistoryInternalStoreOnlyCapturedTablesDdl) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (false) Debezium - * will store all incoming DDL statements. If set to true, then only DDL that manipulates a captured - * table will be stored. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedTablesDdl(schemaHistoryInternalStoreOnlyCapturedTablesDdl: Boolean) { - it.property("schemaHistoryInternalStoreOnlyCapturedTablesDdl", - schemaHistoryInternalStoreOnlyCapturedTablesDdl.toString()) - } - - /** - * Specify how schema names should be adjusted for compatibility with the message converter used - * by the connector, including: 'avro' replaces the characters that cannot be used in the Avro type - * name with underscore; 'avro_unicode' replaces the underscore or characters that cannot be used in - * the Avro type name with corresponding unicode like _uxxxx. Note: _ is an escape sequence like - * backslash in Java;'none' does not apply any adjustment (default) - */ - public fun schemaNameAdjustmentMode(schemaNameAdjustmentMode: String) { - it.property("schemaNameAdjustmentMode", schemaNameAdjustmentMode) - } - - /** - * The name of the data collection that is used to send signals/commands to Debezium. Signaling is - * disabled when not set. - */ - public fun signalDataCollection(signalDataCollection: String) { - it.property("signalDataCollection", signalDataCollection) - } - - /** - * List of channels names that are enabled. Source channel is enabled by default - */ - public fun signalEnabledChannels(signalEnabledChannels: String) { - it.property("signalEnabledChannels", signalEnabledChannels) - } - - /** - * Interval for looking for new signals in registered channels, given in milliseconds. Defaults to - * 5 seconds. - */ - public fun signalPollIntervalMs(signalPollIntervalMs: String) { - it.property("signalPollIntervalMs", signalPollIntervalMs) - } - - /** - * The comma-separated list of operations to skip during streaming, defined as: 'c' for - * inserts/create; 'u' for updates; 'd' for deletes, 't' for truncates, and 'none' to indicate - * nothing skipped. By default, only truncate operations will be skipped. - */ - public fun skippedOperations(skippedOperations: String) { - it.property("skippedOperations", skippedOperations) - } - - /** - * A delay period before a snapshot will begin, given in milliseconds. Defaults to 0 ms. - */ - public fun snapshotDelayMs(snapshotDelayMs: String) { - it.property("snapshotDelayMs", snapshotDelayMs) - } - - /** - * The maximum number of records that should be loaded into memory while performing a snapshot. - */ - public fun snapshotFetchSize(snapshotFetchSize: String) { - it.property("snapshotFetchSize", snapshotFetchSize) - } - - /** - * The maximum number of records that should be loaded into memory while performing a snapshot. - */ - public fun snapshotFetchSize(snapshotFetchSize: Int) { - it.property("snapshotFetchSize", snapshotFetchSize.toString()) - } - - /** - * This setting must be set to specify a list of tables/collections whose snapshot must be taken - * on creating or restarting the connector. - */ - public fun snapshotIncludeCollectionList(snapshotIncludeCollectionList: String) { - it.property("snapshotIncludeCollectionList", snapshotIncludeCollectionList) - } - - /** - * Controls how long the connector holds onto the global read lock while it is performing a - * snapshot. The default is 'minimal', which means the connector holds the global read lock (and thus - * prevents any updates) for just the initial portion of the snapshot while the database schemas and - * other metadata are being read. The remaining work in a snapshot involves selecting all rows from - * each table, and this can be done using the snapshot process' REPEATABLE READ transaction even when - * the lock is no longer held and other operations are updating the database. However, in some cases - * it may be desirable to block all writes for the entire duration of the snapshot; in such cases set - * this property to 'extended'. Using a value of 'none' will prevent the connector from acquiring any - * table locks during the snapshot process. This mode can only be used in combination with - * snapshot.mode values of 'schema_only' or 'schema_only_recovery' and is only safe to use if no - * schema changes are happening while the snapshot is taken. - */ - public fun snapshotLockingMode(snapshotLockingMode: String) { - it.property("snapshotLockingMode", snapshotLockingMode) - } - - /** - * The maximum number of millis to wait for table locks at the beginning of a snapshot. If locks - * cannot be acquired in this time frame, the snapshot will be aborted. Defaults to 10 seconds - */ - public fun snapshotLockTimeoutMs(snapshotLockTimeoutMs: String) { - it.property("snapshotLockTimeoutMs", snapshotLockTimeoutMs) - } - - /** - * The maximum number of threads used to perform the snapshot. Defaults to 1. - */ - public fun snapshotMaxThreads(snapshotMaxThreads: String) { - it.property("snapshotMaxThreads", snapshotMaxThreads) - } - - /** - * The maximum number of threads used to perform the snapshot. Defaults to 1. - */ - public fun snapshotMaxThreads(snapshotMaxThreads: Int) { - it.property("snapshotMaxThreads", snapshotMaxThreads.toString()) - } - - /** - * The criteria for running a snapshot upon startup of the connector. Select one of the following - * snapshot options: 'when_needed': On startup, the connector runs a snapshot if one is needed.; - * 'schema_only': If the connector does not detect any offsets for the logical server name, it runs a - * snapshot that captures only the schema (table structures), but not any table data. After the - * snapshot completes, the connector begins to stream changes from the binlog.; - * 'schema_only_recovery': The connector performs a snapshot that captures only the database schema - * history. The connector then transitions back to streaming. Use this setting to restore a corrupted - * or lost database schema history topic. Do not use if the database schema was modified after the - * connector stopped.; 'initial' (default): If the connector does not detect any offsets for the - * logical server name, it runs a snapshot that captures the current full state of the configured - * tables. After the snapshot completes, the connector begins to stream changes from the binlog.; - * 'initial_only': The connector performs a snapshot as it does for the 'initial' option, but after - * the connector completes the snapshot, it stops, and does not stream changes from the binlog.; - * 'never': The connector does not run a snapshot. Upon first startup, the connector immediately - * begins reading from the beginning of the binlog. The 'never' mode should be used with care, and - * only when the binlog is known to contain all history. - */ - public fun snapshotMode(snapshotMode: String) { - it.property("snapshotMode", snapshotMode) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotData(snapshotModeConfigurationBasedSnapshotData: String) { - it.property("snapshotModeConfigurationBasedSnapshotData", - snapshotModeConfigurationBasedSnapshotData) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotData(snapshotModeConfigurationBasedSnapshotData: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotData", - snapshotModeConfigurationBasedSnapshotData.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnDataError(snapshotModeConfigurationBasedSnapshotOnDataError: String) { - it.property("snapshotModeConfigurationBasedSnapshotOnDataError", - snapshotModeConfigurationBasedSnapshotOnDataError) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnDataError(snapshotModeConfigurationBasedSnapshotOnDataError: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotOnDataError", - snapshotModeConfigurationBasedSnapshotOnDataError.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnSchemaError(snapshotModeConfigurationBasedSnapshotOnSchemaError: String) { - it.property("snapshotModeConfigurationBasedSnapshotOnSchemaError", - snapshotModeConfigurationBasedSnapshotOnSchemaError) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnSchemaError(snapshotModeConfigurationBasedSnapshotOnSchemaError: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotOnSchemaError", - snapshotModeConfigurationBasedSnapshotOnSchemaError.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotSchema(snapshotModeConfigurationBasedSnapshotSchema: String) { - it.property("snapshotModeConfigurationBasedSnapshotSchema", - snapshotModeConfigurationBasedSnapshotSchema) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotSchema(snapshotModeConfigurationBasedSnapshotSchema: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotSchema", - snapshotModeConfigurationBasedSnapshotSchema.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the stream should start or not after snapshot. - */ - public - fun snapshotModeConfigurationBasedStartStream(snapshotModeConfigurationBasedStartStream: String) { - it.property("snapshotModeConfigurationBasedStartStream", - snapshotModeConfigurationBasedStartStream) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the stream should start or not after snapshot. - */ - public - fun snapshotModeConfigurationBasedStartStream(snapshotModeConfigurationBasedStartStream: Boolean) { - it.property("snapshotModeConfigurationBasedStartStream", - snapshotModeConfigurationBasedStartStream.toString()) - } - - /** - * When 'snapshot.mode' is set as custom, this setting must be set to specify a the name of the - * custom implementation provided in the 'name()' method. The implementations must implement the - * 'Snapshotter' interface and is called on each app boot to determine whether to do a snapshot. - */ - public fun snapshotModeCustomName(snapshotModeCustomName: String) { - it.property("snapshotModeCustomName", snapshotModeCustomName) - } - - /** - * Controls query used during the snapshot - */ - public fun snapshotQueryMode(snapshotQueryMode: String) { - it.property("snapshotQueryMode", snapshotQueryMode) - } - - /** - * When 'snapshot.query.mode' is set as custom, this setting must be set to specify a the name of - * the custom implementation provided in the 'name()' method. The implementations must implement the - * 'SnapshotterQuery' interface and is called to determine how to build queries during snapshot. - */ - public fun snapshotQueryModeCustomName(snapshotQueryModeCustomName: String) { - it.property("snapshotQueryModeCustomName", snapshotQueryModeCustomName) - } - - /** - * This property contains a comma-separated list of fully-qualified tables (DB_NAME.TABLE_NAME) or - * (SCHEMA_NAME.TABLE_NAME), depending on the specific connectors. Select statements for the - * individual tables are specified in further configuration properties, one for each table, - * identified by the id 'snapshot.select.statement.overrides.DB_NAME.TABLE_NAME' or - * 'snapshot.select.statement.overrides.SCHEMA_NAME.TABLE_NAME', respectively. The value of those - * properties is the select statement to use when retrieving data from the specific table during - * snapshotting. A possible use case for large append-only tables is setting a specific point where - * to start (resume) snapshotting, in case a previous snapshotting was interrupted. - */ - public fun snapshotSelectStatementOverrides(snapshotSelectStatementOverrides: String) { - it.property("snapshotSelectStatementOverrides", snapshotSelectStatementOverrides) - } - - /** - * Controls the order in which tables are processed in the initial snapshot. A descending value - * will order the tables by row count descending. A ascending value will order the tables by row - * count ascending. A value of disabled (the default) will disable ordering by row count. - */ - public fun snapshotTablesOrderByRowCount(snapshotTablesOrderByRowCount: String) { - it.property("snapshotTablesOrderByRowCount", snapshotTablesOrderByRowCount) - } - - /** - * The name of the SourceInfoStructMaker class that returns SourceInfo schema and struct. - */ - public fun sourceinfoStructMaker(sourceinfoStructMaker: String) { - it.property("sourceinfoStructMaker", sourceinfoStructMaker) - } - - /** - * A delay period after the snapshot is completed and the streaming begins, given in milliseconds. - * Defaults to 0 ms. - */ - public fun streamingDelayMs(streamingDelayMs: String) { - it.property("streamingDelayMs", streamingDelayMs) - } - - /** - * A comma-separated list of regular expressions that match the fully-qualified names of tables to - * be excluded from monitoring - */ - public fun tableExcludeList(tableExcludeList: String) { - it.property("tableExcludeList", tableExcludeList) - } - - /** - * Flag specifying whether built-in tables should be ignored. - */ - public fun tableIgnoreBuiltin(tableIgnoreBuiltin: String) { - it.property("tableIgnoreBuiltin", tableIgnoreBuiltin) - } - - /** - * Flag specifying whether built-in tables should be ignored. - */ - public fun tableIgnoreBuiltin(tableIgnoreBuiltin: Boolean) { - it.property("tableIgnoreBuiltin", tableIgnoreBuiltin.toString()) - } - - /** - * The tables for which changes are to be captured - */ - public fun tableIncludeList(tableIncludeList: String) { - it.property("tableIncludeList", tableIncludeList) - } - - /** - * Time, date and timestamps can be represented with different kinds of precisions, including: - * 'adaptive_time_microseconds': the precision of date and timestamp values is based the database - * column's precision; but time fields always use microseconds precision; 'connect': always - * represents time, date and timestamp values using Kafka Connect's built-in representations for - * Time, Date, and Timestamp, which uses millisecond precision regardless of the database columns' - * precision. - */ - public fun timePrecisionMode(timePrecisionMode: String) { - it.property("timePrecisionMode", timePrecisionMode) - } - - /** - * Whether delete operations should be represented by a delete event and a subsequent tombstone - * event (true) or only by a delete event (false). Emitting the tombstone event (the default - * behavior) allows Kafka to completely delete all events pertaining to the given key once the source - * record got deleted. - */ - public fun tombstonesOnDelete(tombstonesOnDelete: String) { - it.property("tombstonesOnDelete", tombstonesOnDelete) - } - - /** - * Whether delete operations should be represented by a delete event and a subsequent tombstone - * event (true) or only by a delete event (false). Emitting the tombstone event (the default - * behavior) allows Kafka to completely delete all events pertaining to the given key once the source - * record got deleted. - */ - public fun tombstonesOnDelete(tombstonesOnDelete: Boolean) { - it.property("tombstonesOnDelete", tombstonesOnDelete.toString()) - } - - /** - * The name of the TopicNamingStrategy class that should be used to determine the topic name for - * data change, schema change, transaction, heartbeat event etc. - */ - public fun topicNamingStrategy(topicNamingStrategy: String) { - it.property("topicNamingStrategy", topicNamingStrategy) - } - - /** - * Topic prefix that identifies and provides a namespace for the particular database - * server/cluster is capturing changes. The topic prefix should be unique across all other - * connectors, since it is used as a prefix for all Kafka topic names that receive events emitted by - * this connector. Only alphanumeric characters, hyphens, dots and underscores must be accepted. - */ - public fun topicPrefix(topicPrefix: String) { - it.property("topicPrefix", topicPrefix) - } - - /** - * Class to make transaction context & transaction struct/schemas - */ - public fun transactionMetadataFactory(transactionMetadataFactory: String) { - it.property("transactionMetadataFactory", transactionMetadataFactory) - } - - /** - * Whether to use socket.setSoLinger(true, 0) when BinaryLogClient keepalive thread triggers a - * disconnect for a stale connection. - */ - public fun useNongracefulDisconnect(useNongracefulDisconnect: String) { - it.property("useNongracefulDisconnect", useNongracefulDisconnect) - } - - /** - * Whether to use socket.setSoLinger(true, 0) when BinaryLogClient keepalive thread triggers a - * disconnect for a stale connection. - */ - public fun useNongracefulDisconnect(useNongracefulDisconnect: Boolean) { - it.property("useNongracefulDisconnect", useNongracefulDisconnect.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumOracleUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumOracleUriDsl.kt deleted file mode 100644 index 812f87562b305..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumOracleUriDsl.kt +++ /dev/null @@ -1,1442 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Capture changes from an Oracle database. - */ -public fun UriDsl.`debezium-oracle`(i: DebeziumOracleUriDsl.() -> Unit) { - DebeziumOracleUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DebeziumOracleUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("debezium-oracle") - } - - private var name: String = "" - - /** - * Unique name for the connector. Attempting to register again with the same name will fail. - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * Additional properties for debezium components in case they can't be set directly on the camel - * configurations (e.g: setting Kafka Connect properties needed by Debezium engine, for example - * setting KafkaOffsetBackingStore), the properties have to be prefixed with additionalProperties.. - * E.g: - * additionalProperties.transactional.id=12345&additionalProperties.schema.registry.url=http://localhost:8811/avro - */ - public fun additionalProperties(additionalProperties: String) { - it.property("additionalProperties", additionalProperties) - } - - /** - * The Converter class that should be used to serialize and deserialize key data for offsets. The - * default is JSON converter. - */ - public fun internalKeyConverter(internalKeyConverter: String) { - it.property("internalKeyConverter", internalKeyConverter) - } - - /** - * The Converter class that should be used to serialize and deserialize value data for offsets. - * The default is JSON converter. - */ - public fun internalValueConverter(internalValueConverter: String) { - it.property("internalValueConverter", internalValueConverter) - } - - /** - * The name of the Java class of the commit policy. It defines when offsets commit has to be - * triggered based on the number of events processed and the time elapsed since the last commit. This - * class must implement the interface 'OffsetCommitPolicy'. The default is a periodic commit policy - * based upon time intervals. - */ - public fun offsetCommitPolicy(offsetCommitPolicy: String) { - it.property("offsetCommitPolicy", offsetCommitPolicy) - } - - /** - * Maximum number of milliseconds to wait for records to flush and partition offset data to be - * committed to offset storage before cancelling the process and restoring the offset data to be - * committed in a future attempt. The default is 5 seconds. - */ - public fun offsetCommitTimeoutMs(offsetCommitTimeoutMs: String) { - it.property("offsetCommitTimeoutMs", offsetCommitTimeoutMs) - } - - /** - * Interval at which to try committing offsets. The default is 1 minute. - */ - public fun offsetFlushIntervalMs(offsetFlushIntervalMs: String) { - it.property("offsetFlushIntervalMs", offsetFlushIntervalMs) - } - - /** - * The name of the Java class that is responsible for persistence of connector offsets. - */ - public fun offsetStorage(offsetStorage: String) { - it.property("offsetStorage", offsetStorage) - } - - /** - * Path to file where offsets are to be stored. Required when offset.storage is set to the - * FileOffsetBackingStore. - */ - public fun offsetStorageFileName(offsetStorageFileName: String) { - it.property("offsetStorageFileName", offsetStorageFileName) - } - - /** - * The number of partitions used when creating the offset storage topic. Required when - * offset.storage is set to the 'KafkaOffsetBackingStore'. - */ - public fun offsetStoragePartitions(offsetStoragePartitions: String) { - it.property("offsetStoragePartitions", offsetStoragePartitions) - } - - /** - * The number of partitions used when creating the offset storage topic. Required when - * offset.storage is set to the 'KafkaOffsetBackingStore'. - */ - public fun offsetStoragePartitions(offsetStoragePartitions: Int) { - it.property("offsetStoragePartitions", offsetStoragePartitions.toString()) - } - - /** - * Replication factor used when creating the offset storage topic. Required when offset.storage is - * set to the KafkaOffsetBackingStore - */ - public fun offsetStorageReplicationFactor(offsetStorageReplicationFactor: String) { - it.property("offsetStorageReplicationFactor", offsetStorageReplicationFactor) - } - - /** - * Replication factor used when creating the offset storage topic. Required when offset.storage is - * set to the KafkaOffsetBackingStore - */ - public fun offsetStorageReplicationFactor(offsetStorageReplicationFactor: Int) { - it.property("offsetStorageReplicationFactor", offsetStorageReplicationFactor.toString()) - } - - /** - * The name of the Kafka topic where offsets are to be stored. Required when offset.storage is set - * to the KafkaOffsetBackingStore. - */ - public fun offsetStorageTopic(offsetStorageTopic: String) { - it.property("offsetStorageTopic", offsetStorageTopic) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Sets the specific archive log destination as the source for reading archive logs.When not set, - * the connector will automatically select the first LOCAL and VALID destination. - */ - public fun archiveDestinationName(archiveDestinationName: String) { - it.property("archiveDestinationName", archiveDestinationName) - } - - /** - * The number of hours in the past from SYSDATE to mine archive logs. Using 0 mines all available - * archive logs - */ - public fun archiveLogHours(archiveLogHours: String) { - it.property("archiveLogHours", archiveLogHours) - } - - /** - * The number of hours in the past from SYSDATE to mine archive logs. Using 0 mines all available - * archive logs - */ - public fun archiveLogHours(archiveLogHours: Int) { - it.property("archiveLogHours", archiveLogHours.toString()) - } - - /** - * Specify how binary (blob, binary, etc.) columns should be represented in change events, - * including: 'bytes' represents binary data as byte array (default); 'base64' represents binary data - * as base64-encoded string; 'base64-url-safe' represents binary data as base64-url-safe-encoded - * string; 'hex' represents binary data as hex-encoded (base16) string - */ - public fun binaryHandlingMode(binaryHandlingMode: String) { - it.property("binaryHandlingMode", binaryHandlingMode) - } - - /** - * Regular expressions matching columns to exclude from change events - */ - public fun columnExcludeList(columnExcludeList: String) { - it.property("columnExcludeList", columnExcludeList) - } - - /** - * Regular expressions matching columns to include in change events - */ - public fun columnIncludeList(columnIncludeList: String) { - it.property("columnIncludeList", columnIncludeList) - } - - /** - * A comma-separated list of regular expressions matching fully-qualified names of columns that - * adds the columns original type and original length as parameters to the corresponding field - * schemas in the emitted change records. - */ - public fun columnPropagateSourceType(columnPropagateSourceType: String) { - it.property("columnPropagateSourceType", columnPropagateSourceType) - } - - /** - * Optional list of custom converters that would be used instead of default ones. The converters - * are defined using '.type' config option and configured using options '.' - */ - public fun converters(converters: String) { - it.property("converters", converters) - } - - /** - * The custom metric tags will accept key-value pairs to customize the MBean object name which - * should be appended the end of regular name, each key would represent a tag for the MBean object - * name, and the corresponding value would be the value of that tag the key is. For example: - * k1=v1,k2=v2 - */ - public fun customMetricTags(customMetricTags: String) { - it.property("customMetricTags", customMetricTags) - } - - /** - * The adapter to use when capturing changes from the database. Options include: 'logminer': (the - * default) to capture changes using native Oracle LogMiner; 'xstream' to capture changes using - * Oracle XStreams - */ - public fun databaseConnectionAdapter(databaseConnectionAdapter: String) { - it.property("databaseConnectionAdapter", databaseConnectionAdapter) - } - - /** - * The name of the database from which the connector should capture changes - */ - public fun databaseDbname(databaseDbname: String) { - it.property("databaseDbname", databaseDbname) - } - - /** - * Resolvable hostname or IP address of the database server. - */ - public fun databaseHostname(databaseHostname: String) { - it.property("databaseHostname", databaseHostname) - } - - /** - * Name of the XStream Out server to connect to. - */ - public fun databaseOutServerName(databaseOutServerName: String) { - it.property("databaseOutServerName", databaseOutServerName) - } - - /** - * Password of the database user to be used when connecting to the database. - */ - public fun databasePassword(databasePassword: String) { - it.property("databasePassword", databasePassword) - } - - /** - * Name of the pluggable database when working with a multi-tenant set-up. The CDB name must be - * given via database.dbname in this case. - */ - public fun databasePdbName(databasePdbName: String) { - it.property("databasePdbName", databasePdbName) - } - - /** - * Port of the database server. - */ - public fun databasePort(databasePort: String) { - it.property("databasePort", databasePort) - } - - /** - * Port of the database server. - */ - public fun databasePort(databasePort: Int) { - it.property("databasePort", databasePort.toString()) - } - - /** - * Time to wait for a query to execute, given in milliseconds. Defaults to 600 seconds (600,000 - * ms); zero means there is no limit. - */ - public fun databaseQueryTimeoutMs(databaseQueryTimeoutMs: String) { - it.property("databaseQueryTimeoutMs", databaseQueryTimeoutMs) - } - - /** - * Complete JDBC URL as an alternative to specifying hostname, port and database provided as a way - * to support alternative connection scenarios. - */ - public fun databaseUrl(databaseUrl: String) { - it.property("databaseUrl", databaseUrl) - } - - /** - * Name of the database user to be used when connecting to the database. - */ - public fun databaseUser(databaseUser: String) { - it.property("databaseUser", databaseUser) - } - - /** - * A comma-separated list of regular expressions matching the database-specific data type names - * that adds the data type's original type and original length as parameters to the corresponding - * field schemas in the emitted change records. - */ - public fun datatypePropagateSourceType(datatypePropagateSourceType: String) { - it.property("datatypePropagateSourceType", datatypePropagateSourceType) - } - - /** - * Specify how DECIMAL and NUMERIC columns should be represented in change events, including: - * 'precise' (the default) uses java.math.BigDecimal to represent values, which are encoded in the - * change events using a binary representation and Kafka Connect's - * 'org.apache.kafka.connect.data.Decimal' type; 'string' uses string to represent values; 'double' - * represents values using Java's 'double', which may not offer the precision but will be far easier - * to use in consumers. - */ - public fun decimalHandlingMode(decimalHandlingMode: String) { - it.property("decimalHandlingMode", decimalHandlingMode) - } - - /** - * The maximum number of retries on connection errors before failing (-1 = no limit, 0 = disabled, - * 0 = num of retries). - */ - public fun errorsMaxRetries(errorsMaxRetries: String) { - it.property("errorsMaxRetries", errorsMaxRetries) - } - - /** - * The maximum number of retries on connection errors before failing (-1 = no limit, 0 = disabled, - * 0 = num of retries). - */ - public fun errorsMaxRetries(errorsMaxRetries: Int) { - it.property("errorsMaxRetries", errorsMaxRetries.toString()) - } - - /** - * Specify how failures during processing of events (i.e. when encountering a corrupted event) - * should be handled, including: 'fail' (the default) an exception indicating the problematic event - * and its position is raised, causing the connector to be stopped; 'warn' the problematic event and - * its position will be logged and the event will be skipped; 'ignore' the problematic event will be - * skipped. - */ - public fun eventProcessingFailureHandlingMode(eventProcessingFailureHandlingMode: String) { - it.property("eventProcessingFailureHandlingMode", eventProcessingFailureHandlingMode) - } - - /** - * The query executed with every heartbeat. - */ - public fun heartbeatActionQuery(heartbeatActionQuery: String) { - it.property("heartbeatActionQuery", heartbeatActionQuery) - } - - /** - * Length of an interval in milli-seconds in in which the connector periodically sends heartbeat - * messages to a heartbeat topic. Use 0 to disable heartbeat messages. Disabled by default. - */ - public fun heartbeatIntervalMs(heartbeatIntervalMs: String) { - it.property("heartbeatIntervalMs", heartbeatIntervalMs) - } - - /** - * The prefix that is used to name heartbeat topics.Defaults to __debezium-heartbeat. - */ - public fun heartbeatTopicsPrefix(heartbeatTopicsPrefix: String) { - it.property("heartbeatTopicsPrefix", heartbeatTopicsPrefix) - } - - /** - * Whether the connector should publish changes in the database schema to a Kafka topic with the - * same name as the database server ID. Each schema change will be recorded using a key that contains - * the database name and whose value include logical description of the new schema and optionally the - * DDL statement(s). The default is 'true'. This is independent of how the connector internally - * records database schema history. - */ - public fun includeSchemaChanges(includeSchemaChanges: String) { - it.property("includeSchemaChanges", includeSchemaChanges) - } - - /** - * Whether the connector should publish changes in the database schema to a Kafka topic with the - * same name as the database server ID. Each schema change will be recorded using a key that contains - * the database name and whose value include logical description of the new schema and optionally the - * DDL statement(s). The default is 'true'. This is independent of how the connector internally - * records database schema history. - */ - public fun includeSchemaChanges(includeSchemaChanges: Boolean) { - it.property("includeSchemaChanges", includeSchemaChanges.toString()) - } - - /** - * Whether the connector parse table and column's comment to metadata object. Note: Enable this - * option will bring the implications on memory usage. The number and size of ColumnImpl objects is - * what largely impacts how much memory is consumed by the Debezium connectors, and adding a String - * to each of them can potentially be quite heavy. The default is 'false'. - */ - public fun includeSchemaComments(includeSchemaComments: String) { - it.property("includeSchemaComments", includeSchemaComments) - } - - /** - * Whether the connector parse table and column's comment to metadata object. Note: Enable this - * option will bring the implications on memory usage. The number and size of ColumnImpl objects is - * what largely impacts how much memory is consumed by the Debezium connectors, and adding a String - * to each of them can potentially be quite heavy. The default is 'false'. - */ - public fun includeSchemaComments(includeSchemaComments: Boolean) { - it.property("includeSchemaComments", includeSchemaComments.toString()) - } - - /** - * Specify the strategy used for watermarking during an incremental snapshot: 'insert_insert' both - * open and close signal is written into signal data collection (default); 'insert_delete' only open - * signal is written on signal data collection, the close will delete the relative open signal; - */ - public - fun incrementalSnapshotWatermarkingStrategy(incrementalSnapshotWatermarkingStrategy: String) { - it.property("incrementalSnapshotWatermarkingStrategy", incrementalSnapshotWatermarkingStrategy) - } - - /** - * Specify how INTERVAL columns should be represented in change events, including: 'string' - * represents values as an exact ISO formatted string; 'numeric' (default) represents values using - * the inexact conversion into microseconds - */ - public fun intervalHandlingMode(intervalHandlingMode: String) { - it.property("intervalHandlingMode", intervalHandlingMode) - } - - /** - * When set to 'false', the default, LOB fields will not be captured nor emitted. When set to - * 'true', the connector will capture LOB fields and emit changes for those fields like any other - * column type. - */ - public fun lobEnabled(lobEnabled: String) { - it.property("lobEnabled", lobEnabled) - } - - /** - * When set to 'false', the default, LOB fields will not be captured nor emitted. When set to - * 'true', the connector will capture LOB fields and emit changes for those fields like any other - * column type. - */ - public fun lobEnabled(lobEnabled: Boolean) { - it.property("lobEnabled", lobEnabled.toString()) - } - - /** - * When set to 'false', the default, the connector will mine both archive log and redo logs to - * emit change events. When set to 'true', the connector will only mine archive logs. There are - * circumstances where its advantageous to only mine archive logs and accept latency in event - * emission due to frequent revolving redo logs. - */ - public fun logMiningArchiveLogOnlyMode(logMiningArchiveLogOnlyMode: String) { - it.property("logMiningArchiveLogOnlyMode", logMiningArchiveLogOnlyMode) - } - - /** - * When set to 'false', the default, the connector will mine both archive log and redo logs to - * emit change events. When set to 'true', the connector will only mine archive logs. There are - * circumstances where its advantageous to only mine archive logs and accept latency in event - * emission due to frequent revolving redo logs. - */ - public fun logMiningArchiveLogOnlyMode(logMiningArchiveLogOnlyMode: Boolean) { - it.property("logMiningArchiveLogOnlyMode", logMiningArchiveLogOnlyMode.toString()) - } - - /** - * The interval in milliseconds to wait between polls checking to see if the SCN is in the archive - * logs. - */ - public - fun logMiningArchiveLogOnlyScnPollIntervalMs(logMiningArchiveLogOnlyScnPollIntervalMs: String) { - it.property("logMiningArchiveLogOnlyScnPollIntervalMs", - logMiningArchiveLogOnlyScnPollIntervalMs) - } - - /** - * The starting SCN interval size that the connector will use for reading data from redo/archive - * logs. - */ - public fun logMiningBatchSizeDefault(logMiningBatchSizeDefault: String) { - it.property("logMiningBatchSizeDefault", logMiningBatchSizeDefault) - } - - /** - * The starting SCN interval size that the connector will use for reading data from redo/archive - * logs. - */ - public fun logMiningBatchSizeDefault(logMiningBatchSizeDefault: Int) { - it.property("logMiningBatchSizeDefault", logMiningBatchSizeDefault.toString()) - } - - /** - * The maximum SCN interval size that this connector will use when reading from redo/archive logs. - */ - public fun logMiningBatchSizeMax(logMiningBatchSizeMax: String) { - it.property("logMiningBatchSizeMax", logMiningBatchSizeMax) - } - - /** - * The maximum SCN interval size that this connector will use when reading from redo/archive logs. - */ - public fun logMiningBatchSizeMax(logMiningBatchSizeMax: Int) { - it.property("logMiningBatchSizeMax", logMiningBatchSizeMax.toString()) - } - - /** - * The minimum SCN interval size that this connector will try to read from redo/archive logs. - * Active batch size will be also increased/decreased by this amount for tuning connector throughput - * when needed. - */ - public fun logMiningBatchSizeMin(logMiningBatchSizeMin: String) { - it.property("logMiningBatchSizeMin", logMiningBatchSizeMin) - } - - /** - * The minimum SCN interval size that this connector will try to read from redo/archive logs. - * Active batch size will be also increased/decreased by this amount for tuning connector throughput - * when needed. - */ - public fun logMiningBatchSizeMin(logMiningBatchSizeMin: Int) { - it.property("logMiningBatchSizeMin", logMiningBatchSizeMin.toString()) - } - - /** - * When set to true the underlying buffer cache is not retained when the connector is stopped. - * When set to false (the default), the buffer cache is retained across restarts. - */ - public fun logMiningBufferDropOnStop(logMiningBufferDropOnStop: String) { - it.property("logMiningBufferDropOnStop", logMiningBufferDropOnStop) - } - - /** - * When set to true the underlying buffer cache is not retained when the connector is stopped. - * When set to false (the default), the buffer cache is retained across restarts. - */ - public fun logMiningBufferDropOnStop(logMiningBufferDropOnStop: Boolean) { - it.property("logMiningBufferDropOnStop", logMiningBufferDropOnStop.toString()) - } - - /** - * Specifies the XML configuration for the Infinispan 'events' cache - */ - public fun logMiningBufferInfinispanCacheEvents(logMiningBufferInfinispanCacheEvents: String) { - it.property("logMiningBufferInfinispanCacheEvents", logMiningBufferInfinispanCacheEvents) - } - - /** - * Specifies the XML configuration for the Infinispan 'global' configuration - */ - public fun logMiningBufferInfinispanCacheGlobal(logMiningBufferInfinispanCacheGlobal: String) { - it.property("logMiningBufferInfinispanCacheGlobal", logMiningBufferInfinispanCacheGlobal) - } - - /** - * Specifies the XML configuration for the Infinispan 'processed-transactions' cache - */ - public - fun logMiningBufferInfinispanCacheProcessedTransactions(logMiningBufferInfinispanCacheProcessedTransactions: String) { - it.property("logMiningBufferInfinispanCacheProcessedTransactions", - logMiningBufferInfinispanCacheProcessedTransactions) - } - - /** - * Specifies the XML configuration for the Infinispan 'schema-changes' cache - */ - public - fun logMiningBufferInfinispanCacheSchemaChanges(logMiningBufferInfinispanCacheSchemaChanges: String) { - it.property("logMiningBufferInfinispanCacheSchemaChanges", - logMiningBufferInfinispanCacheSchemaChanges) - } - - /** - * Specifies the XML configuration for the Infinispan 'transactions' cache - */ - public - fun logMiningBufferInfinispanCacheTransactions(logMiningBufferInfinispanCacheTransactions: String) { - it.property("logMiningBufferInfinispanCacheTransactions", - logMiningBufferInfinispanCacheTransactions) - } - - /** - * The number of events a transaction can include before the transaction is discarded. This is - * useful for managing buffer memory and/or space when dealing with very large transactions. Defaults - * to 0, meaning that no threshold is applied and transactions can have unlimited events. - */ - public - fun logMiningBufferTransactionEventsThreshold(logMiningBufferTransactionEventsThreshold: String) { - it.property("logMiningBufferTransactionEventsThreshold", - logMiningBufferTransactionEventsThreshold) - } - - /** - * The number of events a transaction can include before the transaction is discarded. This is - * useful for managing buffer memory and/or space when dealing with very large transactions. Defaults - * to 0, meaning that no threshold is applied and transactions can have unlimited events. - */ - public - fun logMiningBufferTransactionEventsThreshold(logMiningBufferTransactionEventsThreshold: Int) { - it.property("logMiningBufferTransactionEventsThreshold", - logMiningBufferTransactionEventsThreshold.toString()) - } - - /** - * The buffer type controls how the connector manages buffering transaction data. memory - Uses - * the JVM process' heap to buffer all transaction data. infinispan_embedded - This option uses an - * embedded Infinispan cache to buffer transaction data and persist it to disk. infinispan_remote - - * This option uses a remote Infinispan cluster to buffer transaction data and persist it to disk. - */ - public fun logMiningBufferType(logMiningBufferType: String) { - it.property("logMiningBufferType", logMiningBufferType) - } - - /** - * The name of the flush table used by the connector, defaults to LOG_MINING_FLUSH. - */ - public fun logMiningFlushTableName(logMiningFlushTableName: String) { - it.property("logMiningFlushTableName", logMiningFlushTableName) - } - - /** - * When enabled, the transaction log REDO SQL will be included in the source information block. - */ - public fun logMiningIncludeRedoSql(logMiningIncludeRedoSql: String) { - it.property("logMiningIncludeRedoSql", logMiningIncludeRedoSql) - } - - /** - * When enabled, the transaction log REDO SQL will be included in the source information block. - */ - public fun logMiningIncludeRedoSql(logMiningIncludeRedoSql: Boolean) { - it.property("logMiningIncludeRedoSql", logMiningIncludeRedoSql.toString()) - } - - /** - * Specifies how the filter configuration is applied to the LogMiner database query. none - The - * query does not apply any schema or table filters, all filtering is at runtime by the connector. - * in - The query uses SQL in-clause expressions to specify the schema or table filters. regex - The - * query uses Oracle REGEXP_LIKE expressions to specify the schema or table filters. - */ - public fun logMiningQueryFilterMode(logMiningQueryFilterMode: String) { - it.property("logMiningQueryFilterMode", logMiningQueryFilterMode) - } - - /** - * Debezium opens a database connection and keeps that connection open throughout the entire - * streaming phase. In some situations, this can lead to excessive SGA memory usage. By setting this - * option to 'true' (the default is 'false'), the connector will close and re-open a database - * connection after every detected log switch or if the log.mining.session.max.ms has been reached. - */ - public fun logMiningRestartConnection(logMiningRestartConnection: String) { - it.property("logMiningRestartConnection", logMiningRestartConnection) - } - - /** - * Debezium opens a database connection and keeps that connection open throughout the entire - * streaming phase. In some situations, this can lead to excessive SGA memory usage. By setting this - * option to 'true' (the default is 'false'), the connector will close and re-open a database - * connection after every detected log switch or if the log.mining.session.max.ms has been reached. - */ - public fun logMiningRestartConnection(logMiningRestartConnection: Boolean) { - it.property("logMiningRestartConnection", logMiningRestartConnection.toString()) - } - - /** - * Used for SCN gap detection, if the difference between current SCN and previous end SCN is - * bigger than this value, and the time difference of current SCN and previous end SCN is smaller - * than log.mining.scn.gap.detection.time.interval.max.ms, consider it a SCN gap. - */ - public fun logMiningScnGapDetectionGapSizeMin(logMiningScnGapDetectionGapSizeMin: String) { - it.property("logMiningScnGapDetectionGapSizeMin", logMiningScnGapDetectionGapSizeMin) - } - - /** - * Used for SCN gap detection, if the difference between current SCN and previous end SCN is - * bigger than this value, and the time difference of current SCN and previous end SCN is smaller - * than log.mining.scn.gap.detection.time.interval.max.ms, consider it a SCN gap. - */ - public fun logMiningScnGapDetectionGapSizeMin(logMiningScnGapDetectionGapSizeMin: Int) { - it.property("logMiningScnGapDetectionGapSizeMin", logMiningScnGapDetectionGapSizeMin.toString()) - } - - /** - * Used for SCN gap detection, if the difference between current SCN and previous end SCN is - * bigger than log.mining.scn.gap.detection.gap.size.min, and the time difference of current SCN and - * previous end SCN is smaller than this value, consider it a SCN gap. - */ - public - fun logMiningScnGapDetectionTimeIntervalMaxMs(logMiningScnGapDetectionTimeIntervalMaxMs: String) { - it.property("logMiningScnGapDetectionTimeIntervalMaxMs", - logMiningScnGapDetectionTimeIntervalMaxMs) - } - - /** - * The maximum number of milliseconds that a LogMiner session lives for before being restarted. - * Defaults to 0 (indefinite until a log switch occurs) - */ - public fun logMiningSessionMaxMs(logMiningSessionMaxMs: String) { - it.property("logMiningSessionMaxMs", logMiningSessionMaxMs) - } - - /** - * The amount of time that the connector will sleep after reading data from redo/archive logs and - * before starting reading data again. Value is in milliseconds. - */ - public fun logMiningSleepTimeDefaultMs(logMiningSleepTimeDefaultMs: String) { - it.property("logMiningSleepTimeDefaultMs", logMiningSleepTimeDefaultMs) - } - - /** - * The maximum amount of time that the connector will use to tune the optimal sleep time when - * reading data from LogMiner. Value is in milliseconds. - */ - public fun logMiningSleepTimeIncrementMs(logMiningSleepTimeIncrementMs: String) { - it.property("logMiningSleepTimeIncrementMs", logMiningSleepTimeIncrementMs) - } - - /** - * The maximum amount of time that the connector will sleep after reading data from redo/archive - * logs and before starting reading data again. Value is in milliseconds. - */ - public fun logMiningSleepTimeMaxMs(logMiningSleepTimeMaxMs: String) { - it.property("logMiningSleepTimeMaxMs", logMiningSleepTimeMaxMs) - } - - /** - * The minimum amount of time that the connector will sleep after reading data from redo/archive - * logs and before starting reading data again. Value is in milliseconds. - */ - public fun logMiningSleepTimeMinMs(logMiningSleepTimeMinMs: String) { - it.property("logMiningSleepTimeMinMs", logMiningSleepTimeMinMs) - } - - /** - * There are strategies: Online catalog with faster mining but no captured DDL. Another - with - * data dictionary loaded into REDO LOG files - */ - public fun logMiningStrategy(logMiningStrategy: String) { - it.property("logMiningStrategy", logMiningStrategy) - } - - /** - * Duration in milliseconds to keep long running transactions in transaction buffer between log - * mining sessions. By default, all transactions are retained. - */ - public fun logMiningTransactionRetentionMs(logMiningTransactionRetentionMs: String) { - it.property("logMiningTransactionRetentionMs", logMiningTransactionRetentionMs) - } - - /** - * Comma separated list of usernames to exclude from LogMiner query. - */ - public fun logMiningUsernameExcludeList(logMiningUsernameExcludeList: String) { - it.property("logMiningUsernameExcludeList", logMiningUsernameExcludeList) - } - - /** - * Comma separated list of usernames to include from LogMiner query. - */ - public fun logMiningUsernameIncludeList(logMiningUsernameIncludeList: String) { - it.property("logMiningUsernameIncludeList", logMiningUsernameIncludeList) - } - - /** - * Maximum size of each batch of source records. Defaults to 2048. - */ - public fun maxBatchSize(maxBatchSize: String) { - it.property("maxBatchSize", maxBatchSize) - } - - /** - * Maximum size of each batch of source records. Defaults to 2048. - */ - public fun maxBatchSize(maxBatchSize: Int) { - it.property("maxBatchSize", maxBatchSize.toString()) - } - - /** - * Maximum size of the queue for change events read from the database log but not yet recorded or - * forwarded. Defaults to 8192, and should always be larger than the maximum batch size. - */ - public fun maxQueueSize(maxQueueSize: String) { - it.property("maxQueueSize", maxQueueSize) - } - - /** - * Maximum size of the queue for change events read from the database log but not yet recorded or - * forwarded. Defaults to 8192, and should always be larger than the maximum batch size. - */ - public fun maxQueueSize(maxQueueSize: Int) { - it.property("maxQueueSize", maxQueueSize.toString()) - } - - /** - * Maximum size of the queue in bytes for change events read from the database log but not yet - * recorded or forwarded. Defaults to 0. Mean the feature is not enabled - */ - public fun maxQueueSizeInBytes(maxQueueSizeInBytes: String) { - it.property("maxQueueSizeInBytes", maxQueueSizeInBytes) - } - - /** - * Maximum size of the queue in bytes for change events read from the database log but not yet - * recorded or forwarded. Defaults to 0. Mean the feature is not enabled - */ - public fun maxQueueSizeInBytes(maxQueueSizeInBytes: Int) { - it.property("maxQueueSizeInBytes", maxQueueSizeInBytes.toString()) - } - - /** - * A semicolon-separated list of expressions that match fully-qualified tables and column(s) to be - * used as message key. Each expression must match the pattern ':', where the table names could be - * defined as (DB_NAME.TABLE_NAME) or (SCHEMA_NAME.TABLE_NAME), depending on the specific connector, - * and the key columns are a comma-separated list of columns representing the custom key. For any - * table without an explicit key configuration the table's primary key column(s) will be used as - * message key. Example: - * dbserver1.inventory.orderlines:orderId,orderLineId;dbserver1.inventory.orders:id - */ - public fun messageKeyColumns(messageKeyColumns: String) { - it.property("messageKeyColumns", messageKeyColumns) - } - - /** - * List of notification channels names that are enabled. - */ - public fun notificationEnabledChannels(notificationEnabledChannels: String) { - it.property("notificationEnabledChannels", notificationEnabledChannels) - } - - /** - * The name of the topic for the notifications. This is required in case 'sink' is in the list of - * enabled channels - */ - public fun notificationSinkTopicName(notificationSinkTopicName: String) { - it.property("notificationSinkTopicName", notificationSinkTopicName) - } - - /** - * The hostname of the OpenLogReplicator network service - */ - public fun openlogreplicatorHost(openlogreplicatorHost: String) { - it.property("openlogreplicatorHost", openlogreplicatorHost) - } - - /** - * The port of the OpenLogReplicator network service - */ - public fun openlogreplicatorPort(openlogreplicatorPort: String) { - it.property("openlogreplicatorPort", openlogreplicatorPort) - } - - /** - * The port of the OpenLogReplicator network service - */ - public fun openlogreplicatorPort(openlogreplicatorPort: Int) { - it.property("openlogreplicatorPort", openlogreplicatorPort.toString()) - } - - /** - * The configured logical source name in the OpenLogReplicator configuration that is to stream - * changes - */ - public fun openlogreplicatorSource(openlogreplicatorSource: String) { - it.property("openlogreplicatorSource", openlogreplicatorSource) - } - - /** - * Time to wait for new change events to appear after receiving no events, given in milliseconds. - * Defaults to 500 ms. - */ - public fun pollIntervalMs(pollIntervalMs: String) { - it.property("pollIntervalMs", pollIntervalMs) - } - - /** - * Optional list of post processors. The processors are defined using '.type' config option and - * configured using options '' - */ - public fun postProcessors(postProcessors: String) { - it.property("postProcessors", postProcessors) - } - - /** - * Enables transaction metadata extraction together with event counting - */ - public fun provideTransactionMetadata(provideTransactionMetadata: String) { - it.property("provideTransactionMetadata", provideTransactionMetadata) - } - - /** - * Enables transaction metadata extraction together with event counting - */ - public fun provideTransactionMetadata(provideTransactionMetadata: Boolean) { - it.property("provideTransactionMetadata", provideTransactionMetadata.toString()) - } - - /** - * The maximum number of records that should be loaded into memory while streaming. A value of '0' - * uses the default JDBC fetch size, defaults to '2000'. - */ - public fun queryFetchSize(queryFetchSize: String) { - it.property("queryFetchSize", queryFetchSize) - } - - /** - * The maximum number of records that should be loaded into memory while streaming. A value of '0' - * uses the default JDBC fetch size, defaults to '2000'. - */ - public fun queryFetchSize(queryFetchSize: Int) { - it.property("queryFetchSize", queryFetchSize.toString()) - } - - /** - * A comma-separated list of RAC node hostnames or ip addresses - */ - public fun racNodes(racNodes: String) { - it.property("racNodes", racNodes) - } - - /** - * Time to wait before restarting connector after retriable exception occurs. Defaults to 10000ms. - */ - public fun retriableRestartConnectorWaitMs(retriableRestartConnectorWaitMs: String) { - it.property("retriableRestartConnectorWaitMs", retriableRestartConnectorWaitMs) - } - - /** - * The name of the SchemaHistory class that should be used to store and recover database schema - * changes. The configuration properties for the history are prefixed with the - * 'schema.history.internal.' string. - */ - public fun schemaHistoryInternal(schemaHistoryInternal: String) { - it.property("schemaHistoryInternal", schemaHistoryInternal) - } - - /** - * The path to the file that will be used to record the database schema history - */ - public fun schemaHistoryInternalFileFilename(schemaHistoryInternalFileFilename: String) { - it.property("schemaHistoryInternalFileFilename", schemaHistoryInternalFileFilename) - } - - /** - * Controls the action Debezium will take when it meets a DDL statement in binlog, that it cannot - * parse.By default the connector will stop operating but by changing the setting it can ignore the - * statements which it cannot parse. If skipping is enabled then Debezium can miss metadata changes. - */ - public - fun schemaHistoryInternalSkipUnparseableDdl(schemaHistoryInternalSkipUnparseableDdl: String) { - it.property("schemaHistoryInternalSkipUnparseableDdl", schemaHistoryInternalSkipUnparseableDdl) - } - - /** - * Controls the action Debezium will take when it meets a DDL statement in binlog, that it cannot - * parse.By default the connector will stop operating but by changing the setting it can ignore the - * statements which it cannot parse. If skipping is enabled then Debezium can miss metadata changes. - */ - public - fun schemaHistoryInternalSkipUnparseableDdl(schemaHistoryInternalSkipUnparseableDdl: Boolean) { - it.property("schemaHistoryInternalSkipUnparseableDdl", - schemaHistoryInternalSkipUnparseableDdl.toString()) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (true) only DDL - * that manipulates a table from captured schema/database will be stored. If set to false, then - * Debezium will store all incoming DDL statements. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedDatabasesDdl(schemaHistoryInternalStoreOnlyCapturedDatabasesDdl: String) { - it.property("schemaHistoryInternalStoreOnlyCapturedDatabasesDdl", - schemaHistoryInternalStoreOnlyCapturedDatabasesDdl) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (true) only DDL - * that manipulates a table from captured schema/database will be stored. If set to false, then - * Debezium will store all incoming DDL statements. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedDatabasesDdl(schemaHistoryInternalStoreOnlyCapturedDatabasesDdl: Boolean) { - it.property("schemaHistoryInternalStoreOnlyCapturedDatabasesDdl", - schemaHistoryInternalStoreOnlyCapturedDatabasesDdl.toString()) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (false) Debezium - * will store all incoming DDL statements. If set to true, then only DDL that manipulates a captured - * table will be stored. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedTablesDdl(schemaHistoryInternalStoreOnlyCapturedTablesDdl: String) { - it.property("schemaHistoryInternalStoreOnlyCapturedTablesDdl", - schemaHistoryInternalStoreOnlyCapturedTablesDdl) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (false) Debezium - * will store all incoming DDL statements. If set to true, then only DDL that manipulates a captured - * table will be stored. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedTablesDdl(schemaHistoryInternalStoreOnlyCapturedTablesDdl: Boolean) { - it.property("schemaHistoryInternalStoreOnlyCapturedTablesDdl", - schemaHistoryInternalStoreOnlyCapturedTablesDdl.toString()) - } - - /** - * Specify how schema names should be adjusted for compatibility with the message converter used - * by the connector, including: 'avro' replaces the characters that cannot be used in the Avro type - * name with underscore; 'avro_unicode' replaces the underscore or characters that cannot be used in - * the Avro type name with corresponding unicode like _uxxxx. Note: _ is an escape sequence like - * backslash in Java;'none' does not apply any adjustment (default) - */ - public fun schemaNameAdjustmentMode(schemaNameAdjustmentMode: String) { - it.property("schemaNameAdjustmentMode", schemaNameAdjustmentMode) - } - - /** - * The name of the data collection that is used to send signals/commands to Debezium. Signaling is - * disabled when not set. - */ - public fun signalDataCollection(signalDataCollection: String) { - it.property("signalDataCollection", signalDataCollection) - } - - /** - * List of channels names that are enabled. Source channel is enabled by default - */ - public fun signalEnabledChannels(signalEnabledChannels: String) { - it.property("signalEnabledChannels", signalEnabledChannels) - } - - /** - * Interval for looking for new signals in registered channels, given in milliseconds. Defaults to - * 5 seconds. - */ - public fun signalPollIntervalMs(signalPollIntervalMs: String) { - it.property("signalPollIntervalMs", signalPollIntervalMs) - } - - /** - * The comma-separated list of operations to skip during streaming, defined as: 'c' for - * inserts/create; 'u' for updates; 'd' for deletes, 't' for truncates, and 'none' to indicate - * nothing skipped. By default, only truncate operations will be skipped. - */ - public fun skippedOperations(skippedOperations: String) { - it.property("skippedOperations", skippedOperations) - } - - /** - * The number of attempts to retry database errors during snapshots before failing. - */ - public fun snapshotDatabaseErrorsMaxRetries(snapshotDatabaseErrorsMaxRetries: String) { - it.property("snapshotDatabaseErrorsMaxRetries", snapshotDatabaseErrorsMaxRetries) - } - - /** - * The number of attempts to retry database errors during snapshots before failing. - */ - public fun snapshotDatabaseErrorsMaxRetries(snapshotDatabaseErrorsMaxRetries: Int) { - it.property("snapshotDatabaseErrorsMaxRetries", snapshotDatabaseErrorsMaxRetries.toString()) - } - - /** - * A delay period before a snapshot will begin, given in milliseconds. Defaults to 0 ms. - */ - public fun snapshotDelayMs(snapshotDelayMs: String) { - it.property("snapshotDelayMs", snapshotDelayMs) - } - - /** - * The maximum number of records that should be loaded into memory while performing a snapshot. - */ - public fun snapshotFetchSize(snapshotFetchSize: String) { - it.property("snapshotFetchSize", snapshotFetchSize) - } - - /** - * The maximum number of records that should be loaded into memory while performing a snapshot. - */ - public fun snapshotFetchSize(snapshotFetchSize: Int) { - it.property("snapshotFetchSize", snapshotFetchSize.toString()) - } - - /** - * This setting must be set to specify a list of tables/collections whose snapshot must be taken - * on creating or restarting the connector. - */ - public fun snapshotIncludeCollectionList(snapshotIncludeCollectionList: String) { - it.property("snapshotIncludeCollectionList", snapshotIncludeCollectionList) - } - - /** - * Controls how the connector holds locks on tables while performing the schema snapshot. The - * default is 'shared', which means the connector will hold a table lock that prevents exclusive - * table access for just the initial portion of the snapshot while the database schemas and other - * metadata are being read. The remaining work in a snapshot involves selecting all rows from each - * table, and this is done using a flashback query that requires no locks. However, in some cases it - * may be desirable to avoid locks entirely which can be done by specifying 'none'. This mode is only - * safe to use if no schema changes are happening while the snapshot is taken. - */ - public fun snapshotLockingMode(snapshotLockingMode: String) { - it.property("snapshotLockingMode", snapshotLockingMode) - } - - /** - * The maximum number of millis to wait for table locks at the beginning of a snapshot. If locks - * cannot be acquired in this time frame, the snapshot will be aborted. Defaults to 10 seconds - */ - public fun snapshotLockTimeoutMs(snapshotLockTimeoutMs: String) { - it.property("snapshotLockTimeoutMs", snapshotLockTimeoutMs) - } - - /** - * The maximum number of threads used to perform the snapshot. Defaults to 1. - */ - public fun snapshotMaxThreads(snapshotMaxThreads: String) { - it.property("snapshotMaxThreads", snapshotMaxThreads) - } - - /** - * The maximum number of threads used to perform the snapshot. Defaults to 1. - */ - public fun snapshotMaxThreads(snapshotMaxThreads: Int) { - it.property("snapshotMaxThreads", snapshotMaxThreads.toString()) - } - - /** - * The criteria for running a snapshot upon startup of the connector. Select one of the following - * snapshot options: 'always': The connector runs a snapshot every time that it starts. After the - * snapshot completes, the connector begins to stream changes from the redo logs.; 'initial' - * (default): If the connector does not detect any offsets for the logical server name, it runs a - * snapshot that captures the current full state of the configured tables. After the snapshot - * completes, the connector begins to stream changes from the redo logs. 'initial_only': The - * connector performs a snapshot as it does for the 'initial' option, but after the connector - * completes the snapshot, it stops, and does not stream changes from the redo logs.; 'schema_only': - * If the connector does not detect any offsets for the logical server name, it runs a snapshot that - * captures only the schema (table structures), but not any table data. After the snapshot completes, - * the connector begins to stream changes from the redo logs.; 'schema_only_recovery': The connector - * performs a snapshot that captures only the database schema history. The connector then transitions - * to streaming from the redo logs. Use this setting to restore a corrupted or lost database schema - * history topic. Do not use if the database schema was modified after the connector stopped. - */ - public fun snapshotMode(snapshotMode: String) { - it.property("snapshotMode", snapshotMode) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotData(snapshotModeConfigurationBasedSnapshotData: String) { - it.property("snapshotModeConfigurationBasedSnapshotData", - snapshotModeConfigurationBasedSnapshotData) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotData(snapshotModeConfigurationBasedSnapshotData: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotData", - snapshotModeConfigurationBasedSnapshotData.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnDataError(snapshotModeConfigurationBasedSnapshotOnDataError: String) { - it.property("snapshotModeConfigurationBasedSnapshotOnDataError", - snapshotModeConfigurationBasedSnapshotOnDataError) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnDataError(snapshotModeConfigurationBasedSnapshotOnDataError: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotOnDataError", - snapshotModeConfigurationBasedSnapshotOnDataError.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnSchemaError(snapshotModeConfigurationBasedSnapshotOnSchemaError: String) { - it.property("snapshotModeConfigurationBasedSnapshotOnSchemaError", - snapshotModeConfigurationBasedSnapshotOnSchemaError) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnSchemaError(snapshotModeConfigurationBasedSnapshotOnSchemaError: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotOnSchemaError", - snapshotModeConfigurationBasedSnapshotOnSchemaError.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotSchema(snapshotModeConfigurationBasedSnapshotSchema: String) { - it.property("snapshotModeConfigurationBasedSnapshotSchema", - snapshotModeConfigurationBasedSnapshotSchema) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotSchema(snapshotModeConfigurationBasedSnapshotSchema: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotSchema", - snapshotModeConfigurationBasedSnapshotSchema.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the stream should start or not after snapshot. - */ - public - fun snapshotModeConfigurationBasedStartStream(snapshotModeConfigurationBasedStartStream: String) { - it.property("snapshotModeConfigurationBasedStartStream", - snapshotModeConfigurationBasedStartStream) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the stream should start or not after snapshot. - */ - public - fun snapshotModeConfigurationBasedStartStream(snapshotModeConfigurationBasedStartStream: Boolean) { - it.property("snapshotModeConfigurationBasedStartStream", - snapshotModeConfigurationBasedStartStream.toString()) - } - - /** - * When 'snapshot.mode' is set as custom, this setting must be set to specify a the name of the - * custom implementation provided in the 'name()' method. The implementations must implement the - * 'Snapshotter' interface and is called on each app boot to determine whether to do a snapshot. - */ - public fun snapshotModeCustomName(snapshotModeCustomName: String) { - it.property("snapshotModeCustomName", snapshotModeCustomName) - } - - /** - * This property contains a comma-separated list of fully-qualified tables (DB_NAME.TABLE_NAME) or - * (SCHEMA_NAME.TABLE_NAME), depending on the specific connectors. Select statements for the - * individual tables are specified in further configuration properties, one for each table, - * identified by the id 'snapshot.select.statement.overrides.DB_NAME.TABLE_NAME' or - * 'snapshot.select.statement.overrides.SCHEMA_NAME.TABLE_NAME', respectively. The value of those - * properties is the select statement to use when retrieving data from the specific table during - * snapshotting. A possible use case for large append-only tables is setting a specific point where - * to start (resume) snapshotting, in case a previous snapshotting was interrupted. - */ - public fun snapshotSelectStatementOverrides(snapshotSelectStatementOverrides: String) { - it.property("snapshotSelectStatementOverrides", snapshotSelectStatementOverrides) - } - - /** - * Controls the order in which tables are processed in the initial snapshot. A descending value - * will order the tables by row count descending. A ascending value will order the tables by row - * count ascending. A value of disabled (the default) will disable ordering by row count. - */ - public fun snapshotTablesOrderByRowCount(snapshotTablesOrderByRowCount: String) { - it.property("snapshotTablesOrderByRowCount", snapshotTablesOrderByRowCount) - } - - /** - * The name of the SourceInfoStructMaker class that returns SourceInfo schema and struct. - */ - public fun sourceinfoStructMaker(sourceinfoStructMaker: String) { - it.property("sourceinfoStructMaker", sourceinfoStructMaker) - } - - /** - * A delay period after the snapshot is completed and the streaming begins, given in milliseconds. - * Defaults to 0 ms. - */ - public fun streamingDelayMs(streamingDelayMs: String) { - it.property("streamingDelayMs", streamingDelayMs) - } - - /** - * A comma-separated list of regular expressions that match the fully-qualified names of tables to - * be excluded from monitoring - */ - public fun tableExcludeList(tableExcludeList: String) { - it.property("tableExcludeList", tableExcludeList) - } - - /** - * The tables for which changes are to be captured - */ - public fun tableIncludeList(tableIncludeList: String) { - it.property("tableIncludeList", tableIncludeList) - } - - /** - * Time, date, and timestamps can be represented with different kinds of precisions, including: - * 'adaptive' (the default) bases the precision of time, date, and timestamp values on the database - * column's precision; 'adaptive_time_microseconds' like 'adaptive' mode, but TIME fields always use - * microseconds precision; 'connect' always represents time, date, and timestamp values using Kafka - * Connect's built-in representations for Time, Date, and Timestamp, which uses millisecond precision - * regardless of the database columns' precision. - */ - public fun timePrecisionMode(timePrecisionMode: String) { - it.property("timePrecisionMode", timePrecisionMode) - } - - /** - * Whether delete operations should be represented by a delete event and a subsequent tombstone - * event (true) or only by a delete event (false). Emitting the tombstone event (the default - * behavior) allows Kafka to completely delete all events pertaining to the given key once the source - * record got deleted. - */ - public fun tombstonesOnDelete(tombstonesOnDelete: String) { - it.property("tombstonesOnDelete", tombstonesOnDelete) - } - - /** - * Whether delete operations should be represented by a delete event and a subsequent tombstone - * event (true) or only by a delete event (false). Emitting the tombstone event (the default - * behavior) allows Kafka to completely delete all events pertaining to the given key once the source - * record got deleted. - */ - public fun tombstonesOnDelete(tombstonesOnDelete: Boolean) { - it.property("tombstonesOnDelete", tombstonesOnDelete.toString()) - } - - /** - * The name of the TopicNamingStrategy class that should be used to determine the topic name for - * data change, schema change, transaction, heartbeat event etc. - */ - public fun topicNamingStrategy(topicNamingStrategy: String) { - it.property("topicNamingStrategy", topicNamingStrategy) - } - - /** - * Topic prefix that identifies and provides a namespace for the particular database - * server/cluster is capturing changes. The topic prefix should be unique across all other - * connectors, since it is used as a prefix for all Kafka topic names that receive events emitted by - * this connector. Only alphanumeric characters, hyphens, dots and underscores must be accepted. - */ - public fun topicPrefix(topicPrefix: String) { - it.property("topicPrefix", topicPrefix) - } - - /** - * Class to make transaction context & transaction struct/schemas - */ - public fun transactionMetadataFactory(transactionMetadataFactory: String) { - it.property("transactionMetadataFactory", transactionMetadataFactory) - } - - /** - * Specify the constant that will be provided by Debezium to indicate that the original value is - * unavailable and not provided by the database. - */ - public fun unavailableValuePlaceholder(unavailableValuePlaceholder: String) { - it.property("unavailableValuePlaceholder", unavailableValuePlaceholder) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumPostgresUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumPostgresUriDsl.kt deleted file mode 100644 index e3de844f1398f..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumPostgresUriDsl.kt +++ /dev/null @@ -1,1250 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Capture changes from a PostgresSQL database. - */ -public fun UriDsl.`debezium-postgres`(i: DebeziumPostgresUriDsl.() -> Unit) { - DebeziumPostgresUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DebeziumPostgresUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("debezium-postgres") - } - - private var name: String = "" - - /** - * Unique name for the connector. Attempting to register again with the same name will fail. - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * Additional properties for debezium components in case they can't be set directly on the camel - * configurations (e.g: setting Kafka Connect properties needed by Debezium engine, for example - * setting KafkaOffsetBackingStore), the properties have to be prefixed with additionalProperties.. - * E.g: - * additionalProperties.transactional.id=12345&additionalProperties.schema.registry.url=http://localhost:8811/avro - */ - public fun additionalProperties(additionalProperties: String) { - it.property("additionalProperties", additionalProperties) - } - - /** - * The Converter class that should be used to serialize and deserialize key data for offsets. The - * default is JSON converter. - */ - public fun internalKeyConverter(internalKeyConverter: String) { - it.property("internalKeyConverter", internalKeyConverter) - } - - /** - * The Converter class that should be used to serialize and deserialize value data for offsets. - * The default is JSON converter. - */ - public fun internalValueConverter(internalValueConverter: String) { - it.property("internalValueConverter", internalValueConverter) - } - - /** - * The name of the Java class of the commit policy. It defines when offsets commit has to be - * triggered based on the number of events processed and the time elapsed since the last commit. This - * class must implement the interface 'OffsetCommitPolicy'. The default is a periodic commit policy - * based upon time intervals. - */ - public fun offsetCommitPolicy(offsetCommitPolicy: String) { - it.property("offsetCommitPolicy", offsetCommitPolicy) - } - - /** - * Maximum number of milliseconds to wait for records to flush and partition offset data to be - * committed to offset storage before cancelling the process and restoring the offset data to be - * committed in a future attempt. The default is 5 seconds. - */ - public fun offsetCommitTimeoutMs(offsetCommitTimeoutMs: String) { - it.property("offsetCommitTimeoutMs", offsetCommitTimeoutMs) - } - - /** - * Interval at which to try committing offsets. The default is 1 minute. - */ - public fun offsetFlushIntervalMs(offsetFlushIntervalMs: String) { - it.property("offsetFlushIntervalMs", offsetFlushIntervalMs) - } - - /** - * The name of the Java class that is responsible for persistence of connector offsets. - */ - public fun offsetStorage(offsetStorage: String) { - it.property("offsetStorage", offsetStorage) - } - - /** - * Path to file where offsets are to be stored. Required when offset.storage is set to the - * FileOffsetBackingStore. - */ - public fun offsetStorageFileName(offsetStorageFileName: String) { - it.property("offsetStorageFileName", offsetStorageFileName) - } - - /** - * The number of partitions used when creating the offset storage topic. Required when - * offset.storage is set to the 'KafkaOffsetBackingStore'. - */ - public fun offsetStoragePartitions(offsetStoragePartitions: String) { - it.property("offsetStoragePartitions", offsetStoragePartitions) - } - - /** - * The number of partitions used when creating the offset storage topic. Required when - * offset.storage is set to the 'KafkaOffsetBackingStore'. - */ - public fun offsetStoragePartitions(offsetStoragePartitions: Int) { - it.property("offsetStoragePartitions", offsetStoragePartitions.toString()) - } - - /** - * Replication factor used when creating the offset storage topic. Required when offset.storage is - * set to the KafkaOffsetBackingStore - */ - public fun offsetStorageReplicationFactor(offsetStorageReplicationFactor: String) { - it.property("offsetStorageReplicationFactor", offsetStorageReplicationFactor) - } - - /** - * Replication factor used when creating the offset storage topic. Required when offset.storage is - * set to the KafkaOffsetBackingStore - */ - public fun offsetStorageReplicationFactor(offsetStorageReplicationFactor: Int) { - it.property("offsetStorageReplicationFactor", offsetStorageReplicationFactor.toString()) - } - - /** - * The name of the Kafka topic where offsets are to be stored. Required when offset.storage is set - * to the KafkaOffsetBackingStore. - */ - public fun offsetStorageTopic(offsetStorageTopic: String) { - it.property("offsetStorageTopic", offsetStorageTopic) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Specify how binary (blob, binary, etc.) columns should be represented in change events, - * including: 'bytes' represents binary data as byte array (default); 'base64' represents binary data - * as base64-encoded string; 'base64-url-safe' represents binary data as base64-url-safe-encoded - * string; 'hex' represents binary data as hex-encoded (base16) string - */ - public fun binaryHandlingMode(binaryHandlingMode: String) { - it.property("binaryHandlingMode", binaryHandlingMode) - } - - /** - * Regular expressions matching columns to exclude from change events - */ - public fun columnExcludeList(columnExcludeList: String) { - it.property("columnExcludeList", columnExcludeList) - } - - /** - * Regular expressions matching columns to include in change events - */ - public fun columnIncludeList(columnIncludeList: String) { - it.property("columnIncludeList", columnIncludeList) - } - - /** - * A comma-separated list of regular expressions matching fully-qualified names of columns that - * adds the columns original type and original length as parameters to the corresponding field - * schemas in the emitted change records. - */ - public fun columnPropagateSourceType(columnPropagateSourceType: String) { - it.property("columnPropagateSourceType", columnPropagateSourceType) - } - - /** - * Optional list of custom converters that would be used instead of default ones. The converters - * are defined using '.type' config option and configured using options '.' - */ - public fun converters(converters: String) { - it.property("converters", converters) - } - - /** - * The custom metric tags will accept key-value pairs to customize the MBean object name which - * should be appended the end of regular name, each key would represent a tag for the MBean object - * name, and the corresponding value would be the value of that tag the key is. For example: - * k1=v1,k2=v2 - */ - public fun customMetricTags(customMetricTags: String) { - it.property("customMetricTags", customMetricTags) - } - - /** - * The name of the database from which the connector should capture changes - */ - public fun databaseDbname(databaseDbname: String) { - it.property("databaseDbname", databaseDbname) - } - - /** - * Resolvable hostname or IP address of the database server. - */ - public fun databaseHostname(databaseHostname: String) { - it.property("databaseHostname", databaseHostname) - } - - /** - * A semicolon separated list of SQL statements to be executed when a JDBC connection to the - * database is established. Note that the connector may establish JDBC connections at its own - * discretion, so this should typically be used for configuration of session parameters only, but not - * for executing DML statements. Use doubled semicolon (';;') to use a semicolon as a character and - * not as a delimiter. - */ - public fun databaseInitialStatements(databaseInitialStatements: String) { - it.property("databaseInitialStatements", databaseInitialStatements) - } - - /** - * Password of the database user to be used when connecting to the database. - */ - public fun databasePassword(databasePassword: String) { - it.property("databasePassword", databasePassword) - } - - /** - * Port of the database server. - */ - public fun databasePort(databasePort: String) { - it.property("databasePort", databasePort) - } - - /** - * Port of the database server. - */ - public fun databasePort(databasePort: Int) { - it.property("databasePort", databasePort.toString()) - } - - /** - * Time to wait for a query to execute, given in milliseconds. Defaults to 600 seconds (600,000 - * ms); zero means there is no limit. - */ - public fun databaseQueryTimeoutMs(databaseQueryTimeoutMs: String) { - it.property("databaseQueryTimeoutMs", databaseQueryTimeoutMs) - } - - /** - * File containing the SSL Certificate for the client. See the Postgres SSL docs for further - * information - */ - public fun databaseSslcert(databaseSslcert: String) { - it.property("databaseSslcert", databaseSslcert) - } - - /** - * A name of class to that creates SSL Sockets. Use org.postgresql.ssl.NonValidatingFactory to - * disable SSL validation in development environments - */ - public fun databaseSslfactory(databaseSslfactory: String) { - it.property("databaseSslfactory", databaseSslfactory) - } - - /** - * File containing the SSL private key for the client. See the Postgres SSL docs for further - * information - */ - public fun databaseSslkey(databaseSslkey: String) { - it.property("databaseSslkey", databaseSslkey) - } - - /** - * Whether to use an encrypted connection to Postgres. Options include: 'disable' (the default) to - * use an unencrypted connection; 'allow' to try and use an unencrypted connection first and, failing - * that, a secure (encrypted) connection; 'prefer' (the default) to try and use a secure (encrypted) - * connection first and, failing that, an unencrypted connection; 'require' to use a secure - * (encrypted) connection, and fail if one cannot be established; 'verify-ca' like 'required' but - * additionally verify the server TLS certificate against the configured Certificate Authority (CA) - * certificates, or fail if no valid matching CA certificates are found; or 'verify-full' like - * 'verify-ca' but additionally verify that the server certificate matches the host to which the - * connection is attempted. - */ - public fun databaseSslmode(databaseSslmode: String) { - it.property("databaseSslmode", databaseSslmode) - } - - /** - * Password to access the client private key from the file specified by 'database.sslkey'. See the - * Postgres SSL docs for further information - */ - public fun databaseSslpassword(databaseSslpassword: String) { - it.property("databaseSslpassword", databaseSslpassword) - } - - /** - * File containing the root certificate(s) against which the server is validated. See the Postgres - * JDBC SSL docs for further information - */ - public fun databaseSslrootcert(databaseSslrootcert: String) { - it.property("databaseSslrootcert", databaseSslrootcert) - } - - /** - * Enable or disable TCP keep-alive probe to avoid dropping TCP connection - */ - public fun databaseTcpkeepalive(databaseTcpkeepalive: String) { - it.property("databaseTcpkeepalive", databaseTcpkeepalive) - } - - /** - * Enable or disable TCP keep-alive probe to avoid dropping TCP connection - */ - public fun databaseTcpkeepalive(databaseTcpkeepalive: Boolean) { - it.property("databaseTcpkeepalive", databaseTcpkeepalive.toString()) - } - - /** - * Name of the database user to be used when connecting to the database. - */ - public fun databaseUser(databaseUser: String) { - it.property("databaseUser", databaseUser) - } - - /** - * A comma-separated list of regular expressions matching the database-specific data type names - * that adds the data type's original type and original length as parameters to the corresponding - * field schemas in the emitted change records. - */ - public fun datatypePropagateSourceType(datatypePropagateSourceType: String) { - it.property("datatypePropagateSourceType", datatypePropagateSourceType) - } - - /** - * Specify how DECIMAL and NUMERIC columns should be represented in change events, including: - * 'precise' (the default) uses java.math.BigDecimal to represent values, which are encoded in the - * change events using a binary representation and Kafka Connect's - * 'org.apache.kafka.connect.data.Decimal' type; 'string' uses string to represent values; 'double' - * represents values using Java's 'double', which may not offer the precision but will be far easier - * to use in consumers. - */ - public fun decimalHandlingMode(decimalHandlingMode: String) { - it.property("decimalHandlingMode", decimalHandlingMode) - } - - /** - * The maximum number of retries on connection errors before failing (-1 = no limit, 0 = disabled, - * 0 = num of retries). - */ - public fun errorsMaxRetries(errorsMaxRetries: String) { - it.property("errorsMaxRetries", errorsMaxRetries) - } - - /** - * The maximum number of retries on connection errors before failing (-1 = no limit, 0 = disabled, - * 0 = num of retries). - */ - public fun errorsMaxRetries(errorsMaxRetries: Int) { - it.property("errorsMaxRetries", errorsMaxRetries.toString()) - } - - /** - * Specify how failures during processing of events (i.e. when encountering a corrupted event) - * should be handled, including: 'fail' (the default) an exception indicating the problematic event - * and its position is raised, causing the connector to be stopped; 'warn' the problematic event and - * its position will be logged and the event will be skipped; 'ignore' the problematic event will be - * skipped. - */ - public fun eventProcessingFailureHandlingMode(eventProcessingFailureHandlingMode: String) { - it.property("eventProcessingFailureHandlingMode", eventProcessingFailureHandlingMode) - } - - /** - * Boolean to determine if Debezium should flush LSN in the source postgres database. If set to - * false, user will have to flush the LSN manually outside Debezium. - */ - public fun flushLsnSource(flushLsnSource: String) { - it.property("flushLsnSource", flushLsnSource) - } - - /** - * Boolean to determine if Debezium should flush LSN in the source postgres database. If set to - * false, user will have to flush the LSN manually outside Debezium. - */ - public fun flushLsnSource(flushLsnSource: Boolean) { - it.property("flushLsnSource", flushLsnSource.toString()) - } - - /** - * The query executed with every heartbeat. - */ - public fun heartbeatActionQuery(heartbeatActionQuery: String) { - it.property("heartbeatActionQuery", heartbeatActionQuery) - } - - /** - * Length of an interval in milli-seconds in in which the connector periodically sends heartbeat - * messages to a heartbeat topic. Use 0 to disable heartbeat messages. Disabled by default. - */ - public fun heartbeatIntervalMs(heartbeatIntervalMs: String) { - it.property("heartbeatIntervalMs", heartbeatIntervalMs) - } - - /** - * The prefix that is used to name heartbeat topics.Defaults to __debezium-heartbeat. - */ - public fun heartbeatTopicsPrefix(heartbeatTopicsPrefix: String) { - it.property("heartbeatTopicsPrefix", heartbeatTopicsPrefix) - } - - /** - * Specify how HSTORE columns should be represented in change events, including: 'json' represents - * values as string-ified JSON (default); 'map' represents values as a key/value map - */ - public fun hstoreHandlingMode(hstoreHandlingMode: String) { - it.property("hstoreHandlingMode", hstoreHandlingMode) - } - - /** - * Whether the connector parse table and column's comment to metadata object. Note: Enable this - * option will bring the implications on memory usage. The number and size of ColumnImpl objects is - * what largely impacts how much memory is consumed by the Debezium connectors, and adding a String - * to each of them can potentially be quite heavy. The default is 'false'. - */ - public fun includeSchemaComments(includeSchemaComments: String) { - it.property("includeSchemaComments", includeSchemaComments) - } - - /** - * Whether the connector parse table and column's comment to metadata object. Note: Enable this - * option will bring the implications on memory usage. The number and size of ColumnImpl objects is - * what largely impacts how much memory is consumed by the Debezium connectors, and adding a String - * to each of them can potentially be quite heavy. The default is 'false'. - */ - public fun includeSchemaComments(includeSchemaComments: Boolean) { - it.property("includeSchemaComments", includeSchemaComments.toString()) - } - - /** - * Specify whether the fields of data type not supported by Debezium should be processed: 'false' - * (the default) omits the fields; 'true' converts the field into an implementation dependent binary - * representation. - */ - public fun includeUnknownDatatypes(includeUnknownDatatypes: String) { - it.property("includeUnknownDatatypes", includeUnknownDatatypes) - } - - /** - * Specify whether the fields of data type not supported by Debezium should be processed: 'false' - * (the default) omits the fields; 'true' converts the field into an implementation dependent binary - * representation. - */ - public fun includeUnknownDatatypes(includeUnknownDatatypes: Boolean) { - it.property("includeUnknownDatatypes", includeUnknownDatatypes.toString()) - } - - /** - * The maximum size of chunk (number of documents/rows) for incremental snapshotting - */ - public fun incrementalSnapshotChunkSize(incrementalSnapshotChunkSize: String) { - it.property("incrementalSnapshotChunkSize", incrementalSnapshotChunkSize) - } - - /** - * The maximum size of chunk (number of documents/rows) for incremental snapshotting - */ - public fun incrementalSnapshotChunkSize(incrementalSnapshotChunkSize: Int) { - it.property("incrementalSnapshotChunkSize", incrementalSnapshotChunkSize.toString()) - } - - /** - * Specify the strategy used for watermarking during an incremental snapshot: 'insert_insert' both - * open and close signal is written into signal data collection (default); 'insert_delete' only open - * signal is written on signal data collection, the close will delete the relative open signal; - */ - public - fun incrementalSnapshotWatermarkingStrategy(incrementalSnapshotWatermarkingStrategy: String) { - it.property("incrementalSnapshotWatermarkingStrategy", incrementalSnapshotWatermarkingStrategy) - } - - /** - * Specify how INTERVAL columns should be represented in change events, including: 'string' - * represents values as an exact ISO formatted string; 'numeric' (default) represents values using - * the inexact conversion into microseconds - */ - public fun intervalHandlingMode(intervalHandlingMode: String) { - it.property("intervalHandlingMode", intervalHandlingMode) - } - - /** - * Maximum size of each batch of source records. Defaults to 2048. - */ - public fun maxBatchSize(maxBatchSize: String) { - it.property("maxBatchSize", maxBatchSize) - } - - /** - * Maximum size of each batch of source records. Defaults to 2048. - */ - public fun maxBatchSize(maxBatchSize: Int) { - it.property("maxBatchSize", maxBatchSize.toString()) - } - - /** - * Maximum size of the queue for change events read from the database log but not yet recorded or - * forwarded. Defaults to 8192, and should always be larger than the maximum batch size. - */ - public fun maxQueueSize(maxQueueSize: String) { - it.property("maxQueueSize", maxQueueSize) - } - - /** - * Maximum size of the queue for change events read from the database log but not yet recorded or - * forwarded. Defaults to 8192, and should always be larger than the maximum batch size. - */ - public fun maxQueueSize(maxQueueSize: Int) { - it.property("maxQueueSize", maxQueueSize.toString()) - } - - /** - * Maximum size of the queue in bytes for change events read from the database log but not yet - * recorded or forwarded. Defaults to 0. Mean the feature is not enabled - */ - public fun maxQueueSizeInBytes(maxQueueSizeInBytes: String) { - it.property("maxQueueSizeInBytes", maxQueueSizeInBytes) - } - - /** - * Maximum size of the queue in bytes for change events read from the database log but not yet - * recorded or forwarded. Defaults to 0. Mean the feature is not enabled - */ - public fun maxQueueSizeInBytes(maxQueueSizeInBytes: Int) { - it.property("maxQueueSizeInBytes", maxQueueSizeInBytes.toString()) - } - - /** - * A semicolon-separated list of expressions that match fully-qualified tables and column(s) to be - * used as message key. Each expression must match the pattern ':', where the table names could be - * defined as (DB_NAME.TABLE_NAME) or (SCHEMA_NAME.TABLE_NAME), depending on the specific connector, - * and the key columns are a comma-separated list of columns representing the custom key. For any - * table without an explicit key configuration the table's primary key column(s) will be used as - * message key. Example: - * dbserver1.inventory.orderlines:orderId,orderLineId;dbserver1.inventory.orders:id - */ - public fun messageKeyColumns(messageKeyColumns: String) { - it.property("messageKeyColumns", messageKeyColumns) - } - - /** - * A comma-separated list of regular expressions that match the logical decoding message prefixes - * to be excluded from monitoring. - */ - public fun messagePrefixExcludeList(messagePrefixExcludeList: String) { - it.property("messagePrefixExcludeList", messagePrefixExcludeList) - } - - /** - * A comma-separated list of regular expressions that match the logical decoding message prefixes - * to be monitored. All prefixes are monitored by default. - */ - public fun messagePrefixIncludeList(messagePrefixIncludeList: String) { - it.property("messagePrefixIncludeList", messagePrefixIncludeList) - } - - /** - * List of notification channels names that are enabled. - */ - public fun notificationEnabledChannels(notificationEnabledChannels: String) { - it.property("notificationEnabledChannels", notificationEnabledChannels) - } - - /** - * The name of the topic for the notifications. This is required in case 'sink' is in the list of - * enabled channels - */ - public fun notificationSinkTopicName(notificationSinkTopicName: String) { - it.property("notificationSinkTopicName", notificationSinkTopicName) - } - - /** - * The name of the Postgres logical decoding plugin installed on the server. Supported values are - * 'decoderbufs' and 'pgoutput'. Defaults to 'decoderbufs'. - */ - public fun pluginName(pluginName: String) { - it.property("pluginName", pluginName) - } - - /** - * Time to wait for new change events to appear after receiving no events, given in milliseconds. - * Defaults to 500 ms. - */ - public fun pollIntervalMs(pollIntervalMs: String) { - it.property("pollIntervalMs", pollIntervalMs) - } - - /** - * Optional list of post processors. The processors are defined using '.type' config option and - * configured using options '' - */ - public fun postProcessors(postProcessors: String) { - it.property("postProcessors", postProcessors) - } - - /** - * Enables transaction metadata extraction together with event counting - */ - public fun provideTransactionMetadata(provideTransactionMetadata: String) { - it.property("provideTransactionMetadata", provideTransactionMetadata) - } - - /** - * Enables transaction metadata extraction together with event counting - */ - public fun provideTransactionMetadata(provideTransactionMetadata: Boolean) { - it.property("provideTransactionMetadata", provideTransactionMetadata.toString()) - } - - /** - * Applies only when streaming changes using pgoutput.Determine how creation of a publication - * should work, the default is all_tables.DISABLED - The connector will not attempt to create a - * publication at all. The expectation is that the user has created the publication up-front. If the - * publication isn't found to exist upon startup, the connector will throw an exception and - * stop.ALL_TABLES - If no publication exists, the connector will create a new publication for all - * tables. Note this requires that the configured user has access. If the publication already exists, - * it will be used. i.e CREATE PUBLICATION FOR ALL TABLES;FILTERED - If no publication exists, the - * connector will create a new publication for all those tables matchingthe current filter - * configuration (see table/database include/exclude list properties). If the publication already - * exists, it will be used. i.e CREATE PUBLICATION FOR TABLE - */ - public fun publicationAutocreateMode(publicationAutocreateMode: String) { - it.property("publicationAutocreateMode", publicationAutocreateMode) - } - - /** - * The name of the Postgres 10 publication used for streaming changes from a plugin. Defaults to - * 'dbz_publication' - */ - public fun publicationName(publicationName: String) { - it.property("publicationName", publicationName) - } - - /** - * The maximum number of records that should be loaded into memory while streaming. A value of '0' - * uses the default JDBC fetch size. - */ - public fun queryFetchSize(queryFetchSize: String) { - it.property("queryFetchSize", queryFetchSize) - } - - /** - * The maximum number of records that should be loaded into memory while streaming. A value of '0' - * uses the default JDBC fetch size. - */ - public fun queryFetchSize(queryFetchSize: Int) { - it.property("queryFetchSize", queryFetchSize.toString()) - } - - /** - * Applies only when streaming changes using pgoutput.Determines the value for Replica Identity at - * table level. This option will overwrite the existing value in databaseA comma-separated list of - * regular expressions that match fully-qualified tables and Replica Identity value to be used in the - * table. Each expression must match the pattern ':', where the table names could be defined as - * (SCHEMA_NAME.TABLE_NAME), and the replica identity values are: DEFAULT - Records the old values of - * the columns of the primary key, if any. This is the default for non-system tables.INDEX - * index_name - Records the old values of the columns covered by the named index, that must be - * unique, not partial, not deferrable, and include only columns marked NOT NULL. If this index is - * dropped, the behavior is the same as NOTHING.FULL - Records the old values of all columns in the - * row.NOTHING - Records no information about the old row. This is the default for system tables. - */ - public fun replicaIdentityAutosetValues(replicaIdentityAutosetValues: String) { - it.property("replicaIdentityAutosetValues", replicaIdentityAutosetValues) - } - - /** - * Time to wait before restarting connector after retriable exception occurs. Defaults to 10000ms. - */ - public fun retriableRestartConnectorWaitMs(retriableRestartConnectorWaitMs: String) { - it.property("retriableRestartConnectorWaitMs", retriableRestartConnectorWaitMs) - } - - /** - * The schemas for which events must not be captured - */ - public fun schemaExcludeList(schemaExcludeList: String) { - it.property("schemaExcludeList", schemaExcludeList) - } - - /** - * The path to the file that will be used to record the database schema history - */ - public fun schemaHistoryInternalFileFilename(schemaHistoryInternalFileFilename: String) { - it.property("schemaHistoryInternalFileFilename", schemaHistoryInternalFileFilename) - } - - /** - * The schemas for which events should be captured - */ - public fun schemaIncludeList(schemaIncludeList: String) { - it.property("schemaIncludeList", schemaIncludeList) - } - - /** - * Specify how schema names should be adjusted for compatibility with the message converter used - * by the connector, including: 'avro' replaces the characters that cannot be used in the Avro type - * name with underscore; 'avro_unicode' replaces the underscore or characters that cannot be used in - * the Avro type name with corresponding unicode like _uxxxx. Note: _ is an escape sequence like - * backslash in Java;'none' does not apply any adjustment (default) - */ - public fun schemaNameAdjustmentMode(schemaNameAdjustmentMode: String) { - it.property("schemaNameAdjustmentMode", schemaNameAdjustmentMode) - } - - /** - * Specify the conditions that trigger a refresh of the in-memory schema for a table. - * 'columns_diff' (the default) is the safest mode, ensuring the in-memory schema stays in-sync with - * the database table's schema at all times. 'columns_diff_exclude_unchanged_toast' instructs the - * connector to refresh the in-memory schema cache if there is a discrepancy between it and the - * schema derived from the incoming message, unless unchanged TOASTable data fully accounts for the - * discrepancy. This setting can improve connector performance significantly if there are - * frequently-updated tables that have TOASTed data that are rarely part of these updates. However, - * it is possible for the in-memory schema to become outdated if TOASTable columns are dropped from - * the table. - */ - public fun schemaRefreshMode(schemaRefreshMode: String) { - it.property("schemaRefreshMode", schemaRefreshMode) - } - - /** - * The name of the data collection that is used to send signals/commands to Debezium. Signaling is - * disabled when not set. - */ - public fun signalDataCollection(signalDataCollection: String) { - it.property("signalDataCollection", signalDataCollection) - } - - /** - * List of channels names that are enabled. Source channel is enabled by default - */ - public fun signalEnabledChannels(signalEnabledChannels: String) { - it.property("signalEnabledChannels", signalEnabledChannels) - } - - /** - * Interval for looking for new signals in registered channels, given in milliseconds. Defaults to - * 5 seconds. - */ - public fun signalPollIntervalMs(signalPollIntervalMs: String) { - it.property("signalPollIntervalMs", signalPollIntervalMs) - } - - /** - * The comma-separated list of operations to skip during streaming, defined as: 'c' for - * inserts/create; 'u' for updates; 'd' for deletes, 't' for truncates, and 'none' to indicate - * nothing skipped. By default, only truncate operations will be skipped. - */ - public fun skippedOperations(skippedOperations: String) { - it.property("skippedOperations", skippedOperations) - } - - /** - * Whether or not to drop the logical replication slot when the connector finishes orderly. By - * default the replication is kept so that on restart progress can resume from the last recorded - * location - */ - public fun slotDropOnStop(slotDropOnStop: String) { - it.property("slotDropOnStop", slotDropOnStop) - } - - /** - * Whether or not to drop the logical replication slot when the connector finishes orderly. By - * default the replication is kept so that on restart progress can resume from the last recorded - * location - */ - public fun slotDropOnStop(slotDropOnStop: Boolean) { - it.property("slotDropOnStop", slotDropOnStop.toString()) - } - - /** - * How many times to retry connecting to a replication slot when an attempt fails. - */ - public fun slotMaxRetries(slotMaxRetries: String) { - it.property("slotMaxRetries", slotMaxRetries) - } - - /** - * How many times to retry connecting to a replication slot when an attempt fails. - */ - public fun slotMaxRetries(slotMaxRetries: Int) { - it.property("slotMaxRetries", slotMaxRetries.toString()) - } - - /** - * The name of the Postgres logical decoding slot created for streaming changes from a plugin. - * Defaults to 'debezium - */ - public fun slotName(slotName: String) { - it.property("slotName", slotName) - } - - /** - * Time to wait between retry attempts when the connector fails to connect to a replication slot, - * given in milliseconds. Defaults to 10 seconds (10,000 ms). - */ - public fun slotRetryDelayMs(slotRetryDelayMs: String) { - it.property("slotRetryDelayMs", slotRetryDelayMs) - } - - /** - * Any optional parameters used by logical decoding plugin. Semi-colon separated. E.g. - * 'add-tables=public.table,public.table2;include-lsn=true' - */ - public fun slotStreamParams(slotStreamParams: String) { - it.property("slotStreamParams", slotStreamParams) - } - - /** - * A delay period before a snapshot will begin, given in milliseconds. Defaults to 0 ms. - */ - public fun snapshotDelayMs(snapshotDelayMs: String) { - it.property("snapshotDelayMs", snapshotDelayMs) - } - - /** - * The maximum number of records that should be loaded into memory while performing a snapshot. - */ - public fun snapshotFetchSize(snapshotFetchSize: String) { - it.property("snapshotFetchSize", snapshotFetchSize) - } - - /** - * The maximum number of records that should be loaded into memory while performing a snapshot. - */ - public fun snapshotFetchSize(snapshotFetchSize: Int) { - it.property("snapshotFetchSize", snapshotFetchSize.toString()) - } - - /** - * This setting must be set to specify a list of tables/collections whose snapshot must be taken - * on creating or restarting the connector. - */ - public fun snapshotIncludeCollectionList(snapshotIncludeCollectionList: String) { - it.property("snapshotIncludeCollectionList", snapshotIncludeCollectionList) - } - - /** - * Controls how the connector holds locks on tables while performing the schema snapshot. The - * 'shared' which means the connector will hold a table lock that prevents exclusive table access for - * just the initial portion of the snapshot while the database schemas and other metadata are being - * read. The remaining work in a snapshot involves selecting all rows from each table, and this is - * done using a flashback query that requires no locks. However, in some cases it may be desirable to - * avoid locks entirely which can be done by specifying 'none'. This mode is only safe to use if no - * schema changes are happening while the snapshot is taken. - */ - public fun snapshotLockingMode(snapshotLockingMode: String) { - it.property("snapshotLockingMode", snapshotLockingMode) - } - - /** - * When 'snapshot.locking.mode' is set as custom, this setting must be set to specify a the name - * of the custom implementation provided in the 'name()' method. The implementations must implement - * the 'SnapshotterLocking' interface and is called to determine how to lock tables during schema - * snapshot. - */ - public fun snapshotLockingModeCustomName(snapshotLockingModeCustomName: String) { - it.property("snapshotLockingModeCustomName", snapshotLockingModeCustomName) - } - - /** - * The maximum number of millis to wait for table locks at the beginning of a snapshot. If locks - * cannot be acquired in this time frame, the snapshot will be aborted. Defaults to 10 seconds - */ - public fun snapshotLockTimeoutMs(snapshotLockTimeoutMs: String) { - it.property("snapshotLockTimeoutMs", snapshotLockTimeoutMs) - } - - /** - * The maximum number of threads used to perform the snapshot. Defaults to 1. - */ - public fun snapshotMaxThreads(snapshotMaxThreads: String) { - it.property("snapshotMaxThreads", snapshotMaxThreads) - } - - /** - * The maximum number of threads used to perform the snapshot. Defaults to 1. - */ - public fun snapshotMaxThreads(snapshotMaxThreads: Int) { - it.property("snapshotMaxThreads", snapshotMaxThreads.toString()) - } - - /** - * The criteria for running a snapshot upon startup of the connector. Select one of the following - * snapshot options: 'always': The connector runs a snapshot every time that it starts. After the - * snapshot completes, the connector begins to stream changes from the transaction log.; 'initial' - * (default): If the connector does not detect any offsets for the logical server name, it runs a - * snapshot that captures the current full state of the configured tables. After the snapshot - * completes, the connector begins to stream changes from the transaction log. 'initial_only': The - * connector performs a snapshot as it does for the 'initial' option, but after the connector - * completes the snapshot, it stops, and does not stream changes from the transaction log.; 'never': - * The connector does not run a snapshot. Upon first startup, the connector immediately begins - * reading from the beginning of the transaction log. 'exported': This option is deprecated; use - * 'initial' instead.; 'custom': The connector loads a custom class to specify how the connector - * performs snapshots. For more information, see Custom snapshotter SPI in the PostgreSQL connector - * documentation. - */ - public fun snapshotMode(snapshotMode: String) { - it.property("snapshotMode", snapshotMode) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotData(snapshotModeConfigurationBasedSnapshotData: String) { - it.property("snapshotModeConfigurationBasedSnapshotData", - snapshotModeConfigurationBasedSnapshotData) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotData(snapshotModeConfigurationBasedSnapshotData: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotData", - snapshotModeConfigurationBasedSnapshotData.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnDataError(snapshotModeConfigurationBasedSnapshotOnDataError: String) { - it.property("snapshotModeConfigurationBasedSnapshotOnDataError", - snapshotModeConfigurationBasedSnapshotOnDataError) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnDataError(snapshotModeConfigurationBasedSnapshotOnDataError: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotOnDataError", - snapshotModeConfigurationBasedSnapshotOnDataError.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnSchemaError(snapshotModeConfigurationBasedSnapshotOnSchemaError: String) { - it.property("snapshotModeConfigurationBasedSnapshotOnSchemaError", - snapshotModeConfigurationBasedSnapshotOnSchemaError) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnSchemaError(snapshotModeConfigurationBasedSnapshotOnSchemaError: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotOnSchemaError", - snapshotModeConfigurationBasedSnapshotOnSchemaError.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotSchema(snapshotModeConfigurationBasedSnapshotSchema: String) { - it.property("snapshotModeConfigurationBasedSnapshotSchema", - snapshotModeConfigurationBasedSnapshotSchema) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotSchema(snapshotModeConfigurationBasedSnapshotSchema: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotSchema", - snapshotModeConfigurationBasedSnapshotSchema.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the stream should start or not after snapshot. - */ - public - fun snapshotModeConfigurationBasedStartStream(snapshotModeConfigurationBasedStartStream: String) { - it.property("snapshotModeConfigurationBasedStartStream", - snapshotModeConfigurationBasedStartStream) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the stream should start or not after snapshot. - */ - public - fun snapshotModeConfigurationBasedStartStream(snapshotModeConfigurationBasedStartStream: Boolean) { - it.property("snapshotModeConfigurationBasedStartStream", - snapshotModeConfigurationBasedStartStream.toString()) - } - - /** - * When 'snapshot.mode' is set as custom, this setting must be set to specify a the name of the - * custom implementation provided in the 'name()' method. The implementations must implement the - * 'Snapshotter' interface and is called on each app boot to determine whether to do a snapshot. - */ - public fun snapshotModeCustomName(snapshotModeCustomName: String) { - it.property("snapshotModeCustomName", snapshotModeCustomName) - } - - /** - * Controls query used during the snapshot - */ - public fun snapshotQueryMode(snapshotQueryMode: String) { - it.property("snapshotQueryMode", snapshotQueryMode) - } - - /** - * When 'snapshot.query.mode' is set as custom, this setting must be set to specify a the name of - * the custom implementation provided in the 'name()' method. The implementations must implement the - * 'SnapshotterQuery' interface and is called to determine how to build queries during snapshot. - */ - public fun snapshotQueryModeCustomName(snapshotQueryModeCustomName: String) { - it.property("snapshotQueryModeCustomName", snapshotQueryModeCustomName) - } - - /** - * This property contains a comma-separated list of fully-qualified tables (DB_NAME.TABLE_NAME) or - * (SCHEMA_NAME.TABLE_NAME), depending on the specific connectors. Select statements for the - * individual tables are specified in further configuration properties, one for each table, - * identified by the id 'snapshot.select.statement.overrides.DB_NAME.TABLE_NAME' or - * 'snapshot.select.statement.overrides.SCHEMA_NAME.TABLE_NAME', respectively. The value of those - * properties is the select statement to use when retrieving data from the specific table during - * snapshotting. A possible use case for large append-only tables is setting a specific point where - * to start (resume) snapshotting, in case a previous snapshotting was interrupted. - */ - public fun snapshotSelectStatementOverrides(snapshotSelectStatementOverrides: String) { - it.property("snapshotSelectStatementOverrides", snapshotSelectStatementOverrides) - } - - /** - * Controls the order in which tables are processed in the initial snapshot. A descending value - * will order the tables by row count descending. A ascending value will order the tables by row - * count ascending. A value of disabled (the default) will disable ordering by row count. - */ - public fun snapshotTablesOrderByRowCount(snapshotTablesOrderByRowCount: String) { - it.property("snapshotTablesOrderByRowCount", snapshotTablesOrderByRowCount) - } - - /** - * The name of the SourceInfoStructMaker class that returns SourceInfo schema and struct. - */ - public fun sourceinfoStructMaker(sourceinfoStructMaker: String) { - it.property("sourceinfoStructMaker", sourceinfoStructMaker) - } - - /** - * Frequency for sending replication connection status updates to the server, given in - * milliseconds. Defaults to 10 seconds (10,000 ms). - */ - public fun statusUpdateIntervalMs(statusUpdateIntervalMs: String) { - it.property("statusUpdateIntervalMs", statusUpdateIntervalMs) - } - - /** - * A delay period after the snapshot is completed and the streaming begins, given in milliseconds. - * Defaults to 0 ms. - */ - public fun streamingDelayMs(streamingDelayMs: String) { - it.property("streamingDelayMs", streamingDelayMs) - } - - /** - * A comma-separated list of regular expressions that match the fully-qualified names of tables to - * be excluded from monitoring - */ - public fun tableExcludeList(tableExcludeList: String) { - it.property("tableExcludeList", tableExcludeList) - } - - /** - * Flag specifying whether built-in tables should be ignored. - */ - public fun tableIgnoreBuiltin(tableIgnoreBuiltin: String) { - it.property("tableIgnoreBuiltin", tableIgnoreBuiltin) - } - - /** - * Flag specifying whether built-in tables should be ignored. - */ - public fun tableIgnoreBuiltin(tableIgnoreBuiltin: Boolean) { - it.property("tableIgnoreBuiltin", tableIgnoreBuiltin.toString()) - } - - /** - * The tables for which changes are to be captured - */ - public fun tableIncludeList(tableIncludeList: String) { - it.property("tableIncludeList", tableIncludeList) - } - - /** - * Time, date, and timestamps can be represented with different kinds of precisions, including: - * 'adaptive' (the default) bases the precision of time, date, and timestamp values on the database - * column's precision; 'adaptive_time_microseconds' like 'adaptive' mode, but TIME fields always use - * microseconds precision; 'connect' always represents time, date, and timestamp values using Kafka - * Connect's built-in representations for Time, Date, and Timestamp, which uses millisecond precision - * regardless of the database columns' precision. - */ - public fun timePrecisionMode(timePrecisionMode: String) { - it.property("timePrecisionMode", timePrecisionMode) - } - - /** - * Whether delete operations should be represented by a delete event and a subsequent tombstone - * event (true) or only by a delete event (false). Emitting the tombstone event (the default - * behavior) allows Kafka to completely delete all events pertaining to the given key once the source - * record got deleted. - */ - public fun tombstonesOnDelete(tombstonesOnDelete: String) { - it.property("tombstonesOnDelete", tombstonesOnDelete) - } - - /** - * Whether delete operations should be represented by a delete event and a subsequent tombstone - * event (true) or only by a delete event (false). Emitting the tombstone event (the default - * behavior) allows Kafka to completely delete all events pertaining to the given key once the source - * record got deleted. - */ - public fun tombstonesOnDelete(tombstonesOnDelete: Boolean) { - it.property("tombstonesOnDelete", tombstonesOnDelete.toString()) - } - - /** - * The name of the TopicNamingStrategy class that should be used to determine the topic name for - * data change, schema change, transaction, heartbeat event etc. - */ - public fun topicNamingStrategy(topicNamingStrategy: String) { - it.property("topicNamingStrategy", topicNamingStrategy) - } - - /** - * Topic prefix that identifies and provides a namespace for the particular database - * server/cluster is capturing changes. The topic prefix should be unique across all other - * connectors, since it is used as a prefix for all Kafka topic names that receive events emitted by - * this connector. Only alphanumeric characters, hyphens, dots and underscores must be accepted. - */ - public fun topicPrefix(topicPrefix: String) { - it.property("topicPrefix", topicPrefix) - } - - /** - * Class to make transaction context & transaction struct/schemas - */ - public fun transactionMetadataFactory(transactionMetadataFactory: String) { - it.property("transactionMetadataFactory", transactionMetadataFactory) - } - - /** - * Specify the constant that will be provided by Debezium to indicate that the original value is a - * toasted value not provided by the database. If starts with 'hex:' prefix it is expected that the - * rest of the string represents hexadecimal encoded octets. - */ - public fun unavailableValuePlaceholder(unavailableValuePlaceholder: String) { - it.property("unavailableValuePlaceholder", unavailableValuePlaceholder) - } - - /** - * Specify how often (in ms) the xmin will be fetched from the replication slot. This xmin value - * is exposed by the slot which gives a lower bound of where a new replication slot could start from. - * The lower the value, the more likely this value is to be the current 'true' value, but the bigger - * the performance cost. The bigger the value, the less likely this value is to be the current 'true' - * value, but the lower the performance penalty. The default is set to 0 ms, which disables tracking - * xmin. - */ - public fun xminFetchIntervalMs(xminFetchIntervalMs: String) { - it.property("xminFetchIntervalMs", xminFetchIntervalMs) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumSqlserverUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumSqlserverUriDsl.kt deleted file mode 100644 index 18341e341b082..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DebeziumSqlserverUriDsl.kt +++ /dev/null @@ -1,1071 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Capture changes from an SQL Server database. - */ -public fun UriDsl.`debezium-sqlserver`(i: DebeziumSqlserverUriDsl.() -> Unit) { - DebeziumSqlserverUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DebeziumSqlserverUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("debezium-sqlserver") - } - - private var name: String = "" - - /** - * Unique name for the connector. Attempting to register again with the same name will fail. - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * Additional properties for debezium components in case they can't be set directly on the camel - * configurations (e.g: setting Kafka Connect properties needed by Debezium engine, for example - * setting KafkaOffsetBackingStore), the properties have to be prefixed with additionalProperties.. - * E.g: - * additionalProperties.transactional.id=12345&additionalProperties.schema.registry.url=http://localhost:8811/avro - */ - public fun additionalProperties(additionalProperties: String) { - it.property("additionalProperties", additionalProperties) - } - - /** - * The Converter class that should be used to serialize and deserialize key data for offsets. The - * default is JSON converter. - */ - public fun internalKeyConverter(internalKeyConverter: String) { - it.property("internalKeyConverter", internalKeyConverter) - } - - /** - * The Converter class that should be used to serialize and deserialize value data for offsets. - * The default is JSON converter. - */ - public fun internalValueConverter(internalValueConverter: String) { - it.property("internalValueConverter", internalValueConverter) - } - - /** - * The name of the Java class of the commit policy. It defines when offsets commit has to be - * triggered based on the number of events processed and the time elapsed since the last commit. This - * class must implement the interface 'OffsetCommitPolicy'. The default is a periodic commit policy - * based upon time intervals. - */ - public fun offsetCommitPolicy(offsetCommitPolicy: String) { - it.property("offsetCommitPolicy", offsetCommitPolicy) - } - - /** - * Maximum number of milliseconds to wait for records to flush and partition offset data to be - * committed to offset storage before cancelling the process and restoring the offset data to be - * committed in a future attempt. The default is 5 seconds. - */ - public fun offsetCommitTimeoutMs(offsetCommitTimeoutMs: String) { - it.property("offsetCommitTimeoutMs", offsetCommitTimeoutMs) - } - - /** - * Interval at which to try committing offsets. The default is 1 minute. - */ - public fun offsetFlushIntervalMs(offsetFlushIntervalMs: String) { - it.property("offsetFlushIntervalMs", offsetFlushIntervalMs) - } - - /** - * The name of the Java class that is responsible for persistence of connector offsets. - */ - public fun offsetStorage(offsetStorage: String) { - it.property("offsetStorage", offsetStorage) - } - - /** - * Path to file where offsets are to be stored. Required when offset.storage is set to the - * FileOffsetBackingStore. - */ - public fun offsetStorageFileName(offsetStorageFileName: String) { - it.property("offsetStorageFileName", offsetStorageFileName) - } - - /** - * The number of partitions used when creating the offset storage topic. Required when - * offset.storage is set to the 'KafkaOffsetBackingStore'. - */ - public fun offsetStoragePartitions(offsetStoragePartitions: String) { - it.property("offsetStoragePartitions", offsetStoragePartitions) - } - - /** - * The number of partitions used when creating the offset storage topic. Required when - * offset.storage is set to the 'KafkaOffsetBackingStore'. - */ - public fun offsetStoragePartitions(offsetStoragePartitions: Int) { - it.property("offsetStoragePartitions", offsetStoragePartitions.toString()) - } - - /** - * Replication factor used when creating the offset storage topic. Required when offset.storage is - * set to the KafkaOffsetBackingStore - */ - public fun offsetStorageReplicationFactor(offsetStorageReplicationFactor: String) { - it.property("offsetStorageReplicationFactor", offsetStorageReplicationFactor) - } - - /** - * Replication factor used when creating the offset storage topic. Required when offset.storage is - * set to the KafkaOffsetBackingStore - */ - public fun offsetStorageReplicationFactor(offsetStorageReplicationFactor: Int) { - it.property("offsetStorageReplicationFactor", offsetStorageReplicationFactor.toString()) - } - - /** - * The name of the Kafka topic where offsets are to be stored. Required when offset.storage is set - * to the KafkaOffsetBackingStore. - */ - public fun offsetStorageTopic(offsetStorageTopic: String) { - it.property("offsetStorageTopic", offsetStorageTopic) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Specify how binary (blob, binary, etc.) columns should be represented in change events, - * including: 'bytes' represents binary data as byte array (default); 'base64' represents binary data - * as base64-encoded string; 'base64-url-safe' represents binary data as base64-url-safe-encoded - * string; 'hex' represents binary data as hex-encoded (base16) string - */ - public fun binaryHandlingMode(binaryHandlingMode: String) { - it.property("binaryHandlingMode", binaryHandlingMode) - } - - /** - * Regular expressions matching columns to exclude from change events - */ - public fun columnExcludeList(columnExcludeList: String) { - it.property("columnExcludeList", columnExcludeList) - } - - /** - * Regular expressions matching columns to include in change events - */ - public fun columnIncludeList(columnIncludeList: String) { - it.property("columnIncludeList", columnIncludeList) - } - - /** - * A comma-separated list of regular expressions matching fully-qualified names of columns that - * adds the columns original type and original length as parameters to the corresponding field - * schemas in the emitted change records. - */ - public fun columnPropagateSourceType(columnPropagateSourceType: String) { - it.property("columnPropagateSourceType", columnPropagateSourceType) - } - - /** - * Optional list of custom converters that would be used instead of default ones. The converters - * are defined using '.type' config option and configured using options '.' - */ - public fun converters(converters: String) { - it.property("converters", converters) - } - - /** - * The custom metric tags will accept key-value pairs to customize the MBean object name which - * should be appended the end of regular name, each key would represent a tag for the MBean object - * name, and the corresponding value would be the value of that tag the key is. For example: - * k1=v1,k2=v2 - */ - public fun customMetricTags(customMetricTags: String) { - it.property("customMetricTags", customMetricTags) - } - - /** - * Resolvable hostname or IP address of the database server. - */ - public fun databaseHostname(databaseHostname: String) { - it.property("databaseHostname", databaseHostname) - } - - /** - * The SQL Server instance name - */ - public fun databaseInstance(databaseInstance: String) { - it.property("databaseInstance", databaseInstance) - } - - /** - * The names of the databases from which the connector should capture changes - */ - public fun databaseNames(databaseNames: String) { - it.property("databaseNames", databaseNames) - } - - /** - * Password of the database user to be used when connecting to the database. - */ - public fun databasePassword(databasePassword: String) { - it.property("databasePassword", databasePassword) - } - - /** - * Port of the database server. - */ - public fun databasePort(databasePort: String) { - it.property("databasePort", databasePort) - } - - /** - * Port of the database server. - */ - public fun databasePort(databasePort: Int) { - it.property("databasePort", databasePort.toString()) - } - - /** - * Time to wait for a query to execute, given in milliseconds. Defaults to 600 seconds (600,000 - * ms); zero means there is no limit. - */ - public fun databaseQueryTimeoutMs(databaseQueryTimeoutMs: String) { - it.property("databaseQueryTimeoutMs", databaseQueryTimeoutMs) - } - - /** - * Name of the database user to be used when connecting to the database. - */ - public fun databaseUser(databaseUser: String) { - it.property("databaseUser", databaseUser) - } - - /** - * Controls how the connector queries CDC data. The default is 'function', which means the data is - * queried by means of calling cdc.fn_cdc_get_all_changes_# function. The value of 'direct' makes the - * connector to query the change tables directly. - */ - public fun dataQueryMode(dataQueryMode: String) { - it.property("dataQueryMode", dataQueryMode) - } - - /** - * A comma-separated list of regular expressions matching the database-specific data type names - * that adds the data type's original type and original length as parameters to the corresponding - * field schemas in the emitted change records. - */ - public fun datatypePropagateSourceType(datatypePropagateSourceType: String) { - it.property("datatypePropagateSourceType", datatypePropagateSourceType) - } - - /** - * Specify how DECIMAL and NUMERIC columns should be represented in change events, including: - * 'precise' (the default) uses java.math.BigDecimal to represent values, which are encoded in the - * change events using a binary representation and Kafka Connect's - * 'org.apache.kafka.connect.data.Decimal' type; 'string' uses string to represent values; 'double' - * represents values using Java's 'double', which may not offer the precision but will be far easier - * to use in consumers. - */ - public fun decimalHandlingMode(decimalHandlingMode: String) { - it.property("decimalHandlingMode", decimalHandlingMode) - } - - /** - * The maximum number of retries on connection errors before failing (-1 = no limit, 0 = disabled, - * 0 = num of retries). - */ - public fun errorsMaxRetries(errorsMaxRetries: String) { - it.property("errorsMaxRetries", errorsMaxRetries) - } - - /** - * The maximum number of retries on connection errors before failing (-1 = no limit, 0 = disabled, - * 0 = num of retries). - */ - public fun errorsMaxRetries(errorsMaxRetries: Int) { - it.property("errorsMaxRetries", errorsMaxRetries.toString()) - } - - /** - * Specify how failures during processing of events (i.e. when encountering a corrupted event) - * should be handled, including: 'fail' (the default) an exception indicating the problematic event - * and its position is raised, causing the connector to be stopped; 'warn' the problematic event and - * its position will be logged and the event will be skipped; 'ignore' the problematic event will be - * skipped. - */ - public fun eventProcessingFailureHandlingMode(eventProcessingFailureHandlingMode: String) { - it.property("eventProcessingFailureHandlingMode", eventProcessingFailureHandlingMode) - } - - /** - * The query executed with every heartbeat. - */ - public fun heartbeatActionQuery(heartbeatActionQuery: String) { - it.property("heartbeatActionQuery", heartbeatActionQuery) - } - - /** - * Length of an interval in milli-seconds in in which the connector periodically sends heartbeat - * messages to a heartbeat topic. Use 0 to disable heartbeat messages. Disabled by default. - */ - public fun heartbeatIntervalMs(heartbeatIntervalMs: String) { - it.property("heartbeatIntervalMs", heartbeatIntervalMs) - } - - /** - * The prefix that is used to name heartbeat topics.Defaults to __debezium-heartbeat. - */ - public fun heartbeatTopicsPrefix(heartbeatTopicsPrefix: String) { - it.property("heartbeatTopicsPrefix", heartbeatTopicsPrefix) - } - - /** - * Whether the connector should publish changes in the database schema to a Kafka topic with the - * same name as the database server ID. Each schema change will be recorded using a key that contains - * the database name and whose value include logical description of the new schema and optionally the - * DDL statement(s). The default is 'true'. This is independent of how the connector internally - * records database schema history. - */ - public fun includeSchemaChanges(includeSchemaChanges: String) { - it.property("includeSchemaChanges", includeSchemaChanges) - } - - /** - * Whether the connector should publish changes in the database schema to a Kafka topic with the - * same name as the database server ID. Each schema change will be recorded using a key that contains - * the database name and whose value include logical description of the new schema and optionally the - * DDL statement(s). The default is 'true'. This is independent of how the connector internally - * records database schema history. - */ - public fun includeSchemaChanges(includeSchemaChanges: Boolean) { - it.property("includeSchemaChanges", includeSchemaChanges.toString()) - } - - /** - * Whether the connector parse table and column's comment to metadata object. Note: Enable this - * option will bring the implications on memory usage. The number and size of ColumnImpl objects is - * what largely impacts how much memory is consumed by the Debezium connectors, and adding a String - * to each of them can potentially be quite heavy. The default is 'false'. - */ - public fun includeSchemaComments(includeSchemaComments: String) { - it.property("includeSchemaComments", includeSchemaComments) - } - - /** - * Whether the connector parse table and column's comment to metadata object. Note: Enable this - * option will bring the implications on memory usage. The number and size of ColumnImpl objects is - * what largely impacts how much memory is consumed by the Debezium connectors, and adding a String - * to each of them can potentially be quite heavy. The default is 'false'. - */ - public fun includeSchemaComments(includeSchemaComments: Boolean) { - it.property("includeSchemaComments", includeSchemaComments.toString()) - } - - /** - * Detect schema change during an incremental snapshot and re-select a current chunk to avoid - * locking DDLs. Note that changes to a primary key are not supported and can cause incorrect results - * if performed during an incremental snapshot. Another limitation is that if a schema change affects - * only columns' default values, then the change won't be detected until the DDL is processed from - * the binlog stream. This doesn't affect the snapshot events' values, but the schema of snapshot - * events may have outdated defaults. - */ - public fun incrementalSnapshotAllowSchemaChanges(incrementalSnapshotAllowSchemaChanges: String) { - it.property("incrementalSnapshotAllowSchemaChanges", incrementalSnapshotAllowSchemaChanges) - } - - /** - * Detect schema change during an incremental snapshot and re-select a current chunk to avoid - * locking DDLs. Note that changes to a primary key are not supported and can cause incorrect results - * if performed during an incremental snapshot. Another limitation is that if a schema change affects - * only columns' default values, then the change won't be detected until the DDL is processed from - * the binlog stream. This doesn't affect the snapshot events' values, but the schema of snapshot - * events may have outdated defaults. - */ - public fun incrementalSnapshotAllowSchemaChanges(incrementalSnapshotAllowSchemaChanges: Boolean) { - it.property("incrementalSnapshotAllowSchemaChanges", - incrementalSnapshotAllowSchemaChanges.toString()) - } - - /** - * The maximum size of chunk (number of documents/rows) for incremental snapshotting - */ - public fun incrementalSnapshotChunkSize(incrementalSnapshotChunkSize: String) { - it.property("incrementalSnapshotChunkSize", incrementalSnapshotChunkSize) - } - - /** - * The maximum size of chunk (number of documents/rows) for incremental snapshotting - */ - public fun incrementalSnapshotChunkSize(incrementalSnapshotChunkSize: Int) { - it.property("incrementalSnapshotChunkSize", incrementalSnapshotChunkSize.toString()) - } - - /** - * Add OPTION(RECOMPILE) on each SELECT statement during the incremental snapshot process. This - * prevents parameter sniffing but can cause CPU pressure on the source database. - */ - public fun incrementalSnapshotOptionRecompile(incrementalSnapshotOptionRecompile: String) { - it.property("incrementalSnapshotOptionRecompile", incrementalSnapshotOptionRecompile) - } - - /** - * Add OPTION(RECOMPILE) on each SELECT statement during the incremental snapshot process. This - * prevents parameter sniffing but can cause CPU pressure on the source database. - */ - public fun incrementalSnapshotOptionRecompile(incrementalSnapshotOptionRecompile: Boolean) { - it.property("incrementalSnapshotOptionRecompile", incrementalSnapshotOptionRecompile.toString()) - } - - /** - * Specify the strategy used for watermarking during an incremental snapshot: 'insert_insert' both - * open and close signal is written into signal data collection (default); 'insert_delete' only open - * signal is written on signal data collection, the close will delete the relative open signal; - */ - public - fun incrementalSnapshotWatermarkingStrategy(incrementalSnapshotWatermarkingStrategy: String) { - it.property("incrementalSnapshotWatermarkingStrategy", incrementalSnapshotWatermarkingStrategy) - } - - /** - * Maximum size of each batch of source records. Defaults to 2048. - */ - public fun maxBatchSize(maxBatchSize: String) { - it.property("maxBatchSize", maxBatchSize) - } - - /** - * Maximum size of each batch of source records. Defaults to 2048. - */ - public fun maxBatchSize(maxBatchSize: Int) { - it.property("maxBatchSize", maxBatchSize.toString()) - } - - /** - * This property can be used to reduce the connector memory usage footprint when changes are - * streamed from multiple tables per database. - */ - public fun maxIterationTransactions(maxIterationTransactions: String) { - it.property("maxIterationTransactions", maxIterationTransactions) - } - - /** - * This property can be used to reduce the connector memory usage footprint when changes are - * streamed from multiple tables per database. - */ - public fun maxIterationTransactions(maxIterationTransactions: Int) { - it.property("maxIterationTransactions", maxIterationTransactions.toString()) - } - - /** - * Maximum size of the queue for change events read from the database log but not yet recorded or - * forwarded. Defaults to 8192, and should always be larger than the maximum batch size. - */ - public fun maxQueueSize(maxQueueSize: String) { - it.property("maxQueueSize", maxQueueSize) - } - - /** - * Maximum size of the queue for change events read from the database log but not yet recorded or - * forwarded. Defaults to 8192, and should always be larger than the maximum batch size. - */ - public fun maxQueueSize(maxQueueSize: Int) { - it.property("maxQueueSize", maxQueueSize.toString()) - } - - /** - * Maximum size of the queue in bytes for change events read from the database log but not yet - * recorded or forwarded. Defaults to 0. Mean the feature is not enabled - */ - public fun maxQueueSizeInBytes(maxQueueSizeInBytes: String) { - it.property("maxQueueSizeInBytes", maxQueueSizeInBytes) - } - - /** - * Maximum size of the queue in bytes for change events read from the database log but not yet - * recorded or forwarded. Defaults to 0. Mean the feature is not enabled - */ - public fun maxQueueSizeInBytes(maxQueueSizeInBytes: Int) { - it.property("maxQueueSizeInBytes", maxQueueSizeInBytes.toString()) - } - - /** - * A semicolon-separated list of expressions that match fully-qualified tables and column(s) to be - * used as message key. Each expression must match the pattern ':', where the table names could be - * defined as (DB_NAME.TABLE_NAME) or (SCHEMA_NAME.TABLE_NAME), depending on the specific connector, - * and the key columns are a comma-separated list of columns representing the custom key. For any - * table without an explicit key configuration the table's primary key column(s) will be used as - * message key. Example: - * dbserver1.inventory.orderlines:orderId,orderLineId;dbserver1.inventory.orders:id - */ - public fun messageKeyColumns(messageKeyColumns: String) { - it.property("messageKeyColumns", messageKeyColumns) - } - - /** - * List of notification channels names that are enabled. - */ - public fun notificationEnabledChannels(notificationEnabledChannels: String) { - it.property("notificationEnabledChannels", notificationEnabledChannels) - } - - /** - * The name of the topic for the notifications. This is required in case 'sink' is in the list of - * enabled channels - */ - public fun notificationSinkTopicName(notificationSinkTopicName: String) { - it.property("notificationSinkTopicName", notificationSinkTopicName) - } - - /** - * Time to wait for new change events to appear after receiving no events, given in milliseconds. - * Defaults to 500 ms. - */ - public fun pollIntervalMs(pollIntervalMs: String) { - it.property("pollIntervalMs", pollIntervalMs) - } - - /** - * Optional list of post processors. The processors are defined using '.type' config option and - * configured using options '' - */ - public fun postProcessors(postProcessors: String) { - it.property("postProcessors", postProcessors) - } - - /** - * Enables transaction metadata extraction together with event counting - */ - public fun provideTransactionMetadata(provideTransactionMetadata: String) { - it.property("provideTransactionMetadata", provideTransactionMetadata) - } - - /** - * Enables transaction metadata extraction together with event counting - */ - public fun provideTransactionMetadata(provideTransactionMetadata: Boolean) { - it.property("provideTransactionMetadata", provideTransactionMetadata.toString()) - } - - /** - * Time to wait before restarting connector after retriable exception occurs. Defaults to 10000ms. - */ - public fun retriableRestartConnectorWaitMs(retriableRestartConnectorWaitMs: String) { - it.property("retriableRestartConnectorWaitMs", retriableRestartConnectorWaitMs) - } - - /** - * The name of the SchemaHistory class that should be used to store and recover database schema - * changes. The configuration properties for the history are prefixed with the - * 'schema.history.internal.' string. - */ - public fun schemaHistoryInternal(schemaHistoryInternal: String) { - it.property("schemaHistoryInternal", schemaHistoryInternal) - } - - /** - * The path to the file that will be used to record the database schema history - */ - public fun schemaHistoryInternalFileFilename(schemaHistoryInternalFileFilename: String) { - it.property("schemaHistoryInternalFileFilename", schemaHistoryInternalFileFilename) - } - - /** - * Controls the action Debezium will take when it meets a DDL statement in binlog, that it cannot - * parse.By default the connector will stop operating but by changing the setting it can ignore the - * statements which it cannot parse. If skipping is enabled then Debezium can miss metadata changes. - */ - public - fun schemaHistoryInternalSkipUnparseableDdl(schemaHistoryInternalSkipUnparseableDdl: String) { - it.property("schemaHistoryInternalSkipUnparseableDdl", schemaHistoryInternalSkipUnparseableDdl) - } - - /** - * Controls the action Debezium will take when it meets a DDL statement in binlog, that it cannot - * parse.By default the connector will stop operating but by changing the setting it can ignore the - * statements which it cannot parse. If skipping is enabled then Debezium can miss metadata changes. - */ - public - fun schemaHistoryInternalSkipUnparseableDdl(schemaHistoryInternalSkipUnparseableDdl: Boolean) { - it.property("schemaHistoryInternalSkipUnparseableDdl", - schemaHistoryInternalSkipUnparseableDdl.toString()) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (true) only DDL - * that manipulates a table from captured schema/database will be stored. If set to false, then - * Debezium will store all incoming DDL statements. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedDatabasesDdl(schemaHistoryInternalStoreOnlyCapturedDatabasesDdl: String) { - it.property("schemaHistoryInternalStoreOnlyCapturedDatabasesDdl", - schemaHistoryInternalStoreOnlyCapturedDatabasesDdl) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (true) only DDL - * that manipulates a table from captured schema/database will be stored. If set to false, then - * Debezium will store all incoming DDL statements. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedDatabasesDdl(schemaHistoryInternalStoreOnlyCapturedDatabasesDdl: Boolean) { - it.property("schemaHistoryInternalStoreOnlyCapturedDatabasesDdl", - schemaHistoryInternalStoreOnlyCapturedDatabasesDdl.toString()) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (false) Debezium - * will store all incoming DDL statements. If set to true, then only DDL that manipulates a captured - * table will be stored. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedTablesDdl(schemaHistoryInternalStoreOnlyCapturedTablesDdl: String) { - it.property("schemaHistoryInternalStoreOnlyCapturedTablesDdl", - schemaHistoryInternalStoreOnlyCapturedTablesDdl) - } - - /** - * Controls what DDL will Debezium store in database schema history. By default (false) Debezium - * will store all incoming DDL statements. If set to true, then only DDL that manipulates a captured - * table will be stored. - */ - public - fun schemaHistoryInternalStoreOnlyCapturedTablesDdl(schemaHistoryInternalStoreOnlyCapturedTablesDdl: Boolean) { - it.property("schemaHistoryInternalStoreOnlyCapturedTablesDdl", - schemaHistoryInternalStoreOnlyCapturedTablesDdl.toString()) - } - - /** - * Specify how schema names should be adjusted for compatibility with the message converter used - * by the connector, including: 'avro' replaces the characters that cannot be used in the Avro type - * name with underscore; 'avro_unicode' replaces the underscore or characters that cannot be used in - * the Avro type name with corresponding unicode like _uxxxx. Note: _ is an escape sequence like - * backslash in Java;'none' does not apply any adjustment (default) - */ - public fun schemaNameAdjustmentMode(schemaNameAdjustmentMode: String) { - it.property("schemaNameAdjustmentMode", schemaNameAdjustmentMode) - } - - /** - * The name of the data collection that is used to send signals/commands to Debezium. Signaling is - * disabled when not set. - */ - public fun signalDataCollection(signalDataCollection: String) { - it.property("signalDataCollection", signalDataCollection) - } - - /** - * List of channels names that are enabled. Source channel is enabled by default - */ - public fun signalEnabledChannels(signalEnabledChannels: String) { - it.property("signalEnabledChannels", signalEnabledChannels) - } - - /** - * Interval for looking for new signals in registered channels, given in milliseconds. Defaults to - * 5 seconds. - */ - public fun signalPollIntervalMs(signalPollIntervalMs: String) { - it.property("signalPollIntervalMs", signalPollIntervalMs) - } - - /** - * The comma-separated list of operations to skip during streaming, defined as: 'c' for - * inserts/create; 'u' for updates; 'd' for deletes, 't' for truncates, and 'none' to indicate - * nothing skipped. By default, only truncate operations will be skipped. - */ - public fun skippedOperations(skippedOperations: String) { - it.property("skippedOperations", skippedOperations) - } - - /** - * A delay period before a snapshot will begin, given in milliseconds. Defaults to 0 ms. - */ - public fun snapshotDelayMs(snapshotDelayMs: String) { - it.property("snapshotDelayMs", snapshotDelayMs) - } - - /** - * The maximum number of records that should be loaded into memory while performing a snapshot. - */ - public fun snapshotFetchSize(snapshotFetchSize: String) { - it.property("snapshotFetchSize", snapshotFetchSize) - } - - /** - * The maximum number of records that should be loaded into memory while performing a snapshot. - */ - public fun snapshotFetchSize(snapshotFetchSize: Int) { - it.property("snapshotFetchSize", snapshotFetchSize.toString()) - } - - /** - * This setting must be set to specify a list of tables/collections whose snapshot must be taken - * on creating or restarting the connector. - */ - public fun snapshotIncludeCollectionList(snapshotIncludeCollectionList: String) { - it.property("snapshotIncludeCollectionList", snapshotIncludeCollectionList) - } - - /** - * Controls which transaction isolation level is used and how long the connector locks the - * captured tables. The default is 'repeatable_read', which means that repeatable read isolation - * level is used. In addition, type of acquired lock during schema snapshot depends on - * snapshot.locking.mode property. Using a value of 'exclusive' ensures that the connector holds the - * type of lock specified with snapshot.locking.mode property (and thus prevents any reads and - * updates) for all captured tables during the entire snapshot duration. When 'snapshot' is - * specified, connector runs the initial snapshot in SNAPSHOT isolation level, which guarantees - * snapshot consistency. In addition, neither table nor row-level locks are held. When - * 'read_committed' is specified, connector runs the initial snapshot in READ COMMITTED isolation - * level. No long-running locks are taken, so that initial snapshot does not prevent other - * transactions from updating table rows. Snapshot consistency is not guaranteed.In - * 'read_uncommitted' mode neither table nor row-level locks are acquired, but connector does not - * guarantee snapshot consistency. - */ - public fun snapshotIsolationMode(snapshotIsolationMode: String) { - it.property("snapshotIsolationMode", snapshotIsolationMode) - } - - /** - * The maximum number of millis to wait for table locks at the beginning of a snapshot. If locks - * cannot be acquired in this time frame, the snapshot will be aborted. Defaults to 10 seconds - */ - public fun snapshotLockTimeoutMs(snapshotLockTimeoutMs: String) { - it.property("snapshotLockTimeoutMs", snapshotLockTimeoutMs) - } - - /** - * The maximum number of threads used to perform the snapshot. Defaults to 1. - */ - public fun snapshotMaxThreads(snapshotMaxThreads: String) { - it.property("snapshotMaxThreads", snapshotMaxThreads) - } - - /** - * The maximum number of threads used to perform the snapshot. Defaults to 1. - */ - public fun snapshotMaxThreads(snapshotMaxThreads: Int) { - it.property("snapshotMaxThreads", snapshotMaxThreads.toString()) - } - - /** - * The criteria for running a snapshot upon startup of the connector. Select one of the following - * snapshot options: 'initial' (default): If the connector does not detect any offsets for the - * logical server name, it runs a snapshot that captures the current full state of the configured - * tables. After the snapshot completes, the connector begins to stream changes from the transaction - * log.; 'initial_only': The connector performs a snapshot as it does for the 'initial' option, but - * after the connector completes the snapshot, it stops, and does not stream changes from the - * transaction log.; 'schema_only': If the connector does not detect any offsets for the logical - * server name, it runs a snapshot that captures only the schema (table structures), but not any - * table data. After the snapshot completes, the connector begins to stream changes from the - * transaction log. - */ - public fun snapshotMode(snapshotMode: String) { - it.property("snapshotMode", snapshotMode) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotData(snapshotModeConfigurationBasedSnapshotData: String) { - it.property("snapshotModeConfigurationBasedSnapshotData", - snapshotModeConfigurationBasedSnapshotData) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotData(snapshotModeConfigurationBasedSnapshotData: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotData", - snapshotModeConfigurationBasedSnapshotData.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnDataError(snapshotModeConfigurationBasedSnapshotOnDataError: String) { - it.property("snapshotModeConfigurationBasedSnapshotOnDataError", - snapshotModeConfigurationBasedSnapshotOnDataError) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the data should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnDataError(snapshotModeConfigurationBasedSnapshotOnDataError: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotOnDataError", - snapshotModeConfigurationBasedSnapshotOnDataError.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnSchemaError(snapshotModeConfigurationBasedSnapshotOnSchemaError: String) { - it.property("snapshotModeConfigurationBasedSnapshotOnSchemaError", - snapshotModeConfigurationBasedSnapshotOnSchemaError) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not in case of error. - */ - public - fun snapshotModeConfigurationBasedSnapshotOnSchemaError(snapshotModeConfigurationBasedSnapshotOnSchemaError: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotOnSchemaError", - snapshotModeConfigurationBasedSnapshotOnSchemaError.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotSchema(snapshotModeConfigurationBasedSnapshotSchema: String) { - it.property("snapshotModeConfigurationBasedSnapshotSchema", - snapshotModeConfigurationBasedSnapshotSchema) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the schema should be snapshotted or not. - */ - public - fun snapshotModeConfigurationBasedSnapshotSchema(snapshotModeConfigurationBasedSnapshotSchema: Boolean) { - it.property("snapshotModeConfigurationBasedSnapshotSchema", - snapshotModeConfigurationBasedSnapshotSchema.toString()) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the stream should start or not after snapshot. - */ - public - fun snapshotModeConfigurationBasedStartStream(snapshotModeConfigurationBasedStartStream: String) { - it.property("snapshotModeConfigurationBasedStartStream", - snapshotModeConfigurationBasedStartStream) - } - - /** - * When 'snapshot.mode' is set as configuration_based, this setting permits to specify whenever - * the stream should start or not after snapshot. - */ - public - fun snapshotModeConfigurationBasedStartStream(snapshotModeConfigurationBasedStartStream: Boolean) { - it.property("snapshotModeConfigurationBasedStartStream", - snapshotModeConfigurationBasedStartStream.toString()) - } - - /** - * When 'snapshot.mode' is set as custom, this setting must be set to specify a the name of the - * custom implementation provided in the 'name()' method. The implementations must implement the - * 'Snapshotter' interface and is called on each app boot to determine whether to do a snapshot. - */ - public fun snapshotModeCustomName(snapshotModeCustomName: String) { - it.property("snapshotModeCustomName", snapshotModeCustomName) - } - - /** - * This property contains a comma-separated list of fully-qualified tables (DB_NAME.TABLE_NAME) or - * (SCHEMA_NAME.TABLE_NAME), depending on the specific connectors. Select statements for the - * individual tables are specified in further configuration properties, one for each table, - * identified by the id 'snapshot.select.statement.overrides.DB_NAME.TABLE_NAME' or - * 'snapshot.select.statement.overrides.SCHEMA_NAME.TABLE_NAME', respectively. The value of those - * properties is the select statement to use when retrieving data from the specific table during - * snapshotting. A possible use case for large append-only tables is setting a specific point where - * to start (resume) snapshotting, in case a previous snapshotting was interrupted. - */ - public fun snapshotSelectStatementOverrides(snapshotSelectStatementOverrides: String) { - it.property("snapshotSelectStatementOverrides", snapshotSelectStatementOverrides) - } - - /** - * Controls the order in which tables are processed in the initial snapshot. A descending value - * will order the tables by row count descending. A ascending value will order the tables by row - * count ascending. A value of disabled (the default) will disable ordering by row count. - */ - public fun snapshotTablesOrderByRowCount(snapshotTablesOrderByRowCount: String) { - it.property("snapshotTablesOrderByRowCount", snapshotTablesOrderByRowCount) - } - - /** - * The name of the SourceInfoStructMaker class that returns SourceInfo schema and struct. - */ - public fun sourceinfoStructMaker(sourceinfoStructMaker: String) { - it.property("sourceinfoStructMaker", sourceinfoStructMaker) - } - - /** - * A delay period after the snapshot is completed and the streaming begins, given in milliseconds. - * Defaults to 0 ms. - */ - public fun streamingDelayMs(streamingDelayMs: String) { - it.property("streamingDelayMs", streamingDelayMs) - } - - /** - * A comma-separated list of regular expressions that match the fully-qualified names of tables to - * be excluded from monitoring - */ - public fun tableExcludeList(tableExcludeList: String) { - it.property("tableExcludeList", tableExcludeList) - } - - /** - * Flag specifying whether built-in tables should be ignored. - */ - public fun tableIgnoreBuiltin(tableIgnoreBuiltin: String) { - it.property("tableIgnoreBuiltin", tableIgnoreBuiltin) - } - - /** - * Flag specifying whether built-in tables should be ignored. - */ - public fun tableIgnoreBuiltin(tableIgnoreBuiltin: Boolean) { - it.property("tableIgnoreBuiltin", tableIgnoreBuiltin.toString()) - } - - /** - * The tables for which changes are to be captured - */ - public fun tableIncludeList(tableIncludeList: String) { - it.property("tableIncludeList", tableIncludeList) - } - - /** - * Time, date, and timestamps can be represented with different kinds of precisions, including: - * 'adaptive' (the default) bases the precision of time, date, and timestamp values on the database - * column's precision; 'adaptive_time_microseconds' like 'adaptive' mode, but TIME fields always use - * microseconds precision; 'connect' always represents time, date, and timestamp values using Kafka - * Connect's built-in representations for Time, Date, and Timestamp, which uses millisecond precision - * regardless of the database columns' precision. - */ - public fun timePrecisionMode(timePrecisionMode: String) { - it.property("timePrecisionMode", timePrecisionMode) - } - - /** - * Whether delete operations should be represented by a delete event and a subsequent tombstone - * event (true) or only by a delete event (false). Emitting the tombstone event (the default - * behavior) allows Kafka to completely delete all events pertaining to the given key once the source - * record got deleted. - */ - public fun tombstonesOnDelete(tombstonesOnDelete: String) { - it.property("tombstonesOnDelete", tombstonesOnDelete) - } - - /** - * Whether delete operations should be represented by a delete event and a subsequent tombstone - * event (true) or only by a delete event (false). Emitting the tombstone event (the default - * behavior) allows Kafka to completely delete all events pertaining to the given key once the source - * record got deleted. - */ - public fun tombstonesOnDelete(tombstonesOnDelete: Boolean) { - it.property("tombstonesOnDelete", tombstonesOnDelete.toString()) - } - - /** - * The name of the TopicNamingStrategy class that should be used to determine the topic name for - * data change, schema change, transaction, heartbeat event etc. - */ - public fun topicNamingStrategy(topicNamingStrategy: String) { - it.property("topicNamingStrategy", topicNamingStrategy) - } - - /** - * Topic prefix that identifies and provides a namespace for the particular database - * server/cluster is capturing changes. The topic prefix should be unique across all other - * connectors, since it is used as a prefix for all Kafka topic names that receive events emitted by - * this connector. Only alphanumeric characters, hyphens, dots and underscores must be accepted. - */ - public fun topicPrefix(topicPrefix: String) { - it.property("topicPrefix", topicPrefix) - } - - /** - * Class to make transaction context & transaction struct/schemas - */ - public fun transactionMetadataFactory(transactionMetadataFactory: String) { - it.property("transactionMetadataFactory", transactionMetadataFactory) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Dhis2UriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Dhis2UriDsl.kt deleted file mode 100644 index d0c24ab90447b..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Dhis2UriDsl.kt +++ /dev/null @@ -1,383 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Leverages the DHIS2 Java SDK to integrate Apache Camel with the DHIS2 Web API. - */ -public fun UriDsl.dhis2(i: Dhis2UriDsl.() -> Unit) { - Dhis2UriDsl(this).apply(i) -} - -@CamelDslMarker -public class Dhis2UriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("dhis2") - } - - private var apiName: String = "" - - private var methodName: String = "" - - /** - * API operation (e.g., get) - */ - public fun apiName(apiName: String) { - this.apiName = apiName - it.url("$apiName/$methodName") - } - - /** - * Subject of the API operation (e.g., resource) - */ - public fun methodName(methodName: String) { - this.methodName = methodName - it.url("$apiName/$methodName") - } - - /** - * DHIS2 server base API URL (e.g., https://play.dhis2.org/2.39.1.1/api) - */ - public fun baseApiUrl(baseApiUrl: String) { - it.property("baseApiUrl", baseApiUrl) - } - - /** - * Sets the name of a parameter to be passed in the exchange In Body - */ - public fun inBody(inBody: String) { - it.property("inBody", inBody) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * References a user-defined org.hisp.dhis.integration.sdk.api.Dhis2Client. This option is - * mutually exclusive to the baseApiUrl, username, password, and personalAccessToken options - */ - public fun client(client: String) { - it.property("client", client) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Password of the DHIS2 username - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Personal access token to authenticate with DHIS2. This option is mutually exclusive to username - * and password - */ - public fun personalAccessToken(personalAccessToken: String) { - it.property("personalAccessToken", personalAccessToken) - } - - /** - * Username of the DHIS2 user to operate as - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DigitaloceanUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DigitaloceanUriDsl.kt deleted file mode 100644 index c34f9f32838d2..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DigitaloceanUriDsl.kt +++ /dev/null @@ -1,163 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage Droplets and resources within the DigitalOcean cloud. - */ -public fun UriDsl.digitalocean(i: DigitaloceanUriDsl.() -> Unit) { - DigitaloceanUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DigitaloceanUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("digitalocean") - } - - private var operation: String = "" - - /** - * The operation to perform to the given resource. - */ - public fun operation(operation: String) { - this.operation = operation - it.url("$operation") - } - - /** - * Use for pagination. Force the page number. - */ - public fun page(page: String) { - it.property("page", page) - } - - /** - * Use for pagination. Force the page number. - */ - public fun page(page: Int) { - it.property("page", page.toString()) - } - - /** - * Use for pagination. Set the number of item per request. The maximum number of results per page - * is 200. - */ - public fun perPage(perPage: String) { - it.property("perPage", perPage) - } - - /** - * Use for pagination. Set the number of item per request. The maximum number of results per page - * is 200. - */ - public fun perPage(perPage: Int) { - it.property("perPage", perPage.toString()) - } - - /** - * The DigitalOcean resource type on which perform the operation. - */ - public fun resource(resource: String) { - it.property("resource", resource) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use a existing configured DigitalOceanClient as client - */ - public fun digitalOceanClient(digitalOceanClient: String) { - it.property("digitalOceanClient", digitalOceanClient) - } - - /** - * Set a proxy host if needed - */ - public fun httpProxyHost(httpProxyHost: String) { - it.property("httpProxyHost", httpProxyHost) - } - - /** - * Set a proxy password if needed - */ - public fun httpProxyPassword(httpProxyPassword: String) { - it.property("httpProxyPassword", httpProxyPassword) - } - - /** - * Set a proxy port if needed - */ - public fun httpProxyPort(httpProxyPort: String) { - it.property("httpProxyPort", httpProxyPort) - } - - /** - * Set a proxy port if needed - */ - public fun httpProxyPort(httpProxyPort: Int) { - it.property("httpProxyPort", httpProxyPort.toString()) - } - - /** - * Set a proxy host if needed - */ - public fun httpProxyUser(httpProxyUser: String) { - it.property("httpProxyUser", httpProxyUser) - } - - /** - * DigitalOcean OAuth Token - */ - public fun oAuthToken(oAuthToken: String) { - it.property("oAuthToken", oAuthToken) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DirectUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DirectUriDsl.kt deleted file mode 100644 index 34248f2dae140..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DirectUriDsl.kt +++ /dev/null @@ -1,189 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Call another endpoint from the same Camel Context synchronously. - */ -public fun UriDsl.direct(i: DirectUriDsl.() -> Unit) { - DirectUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DirectUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("direct") - } - - private var name: String = "" - - /** - * Name of direct endpoint - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * If sending a message to a direct endpoint which has no active consumer, then we can tell the - * producer to block and wait for the consumer to become active. - */ - public fun block(block: String) { - it.property("block", block) - } - - /** - * If sending a message to a direct endpoint which has no active consumer, then we can tell the - * producer to block and wait for the consumer to become active. - */ - public fun block(block: Boolean) { - it.property("block", block.toString()) - } - - /** - * Whether the producer should fail by throwing an exception, when sending to a DIRECT endpoint - * with no active consumers. - */ - public fun failIfNoConsumers(failIfNoConsumers: String) { - it.property("failIfNoConsumers", failIfNoConsumers) - } - - /** - * Whether the producer should fail by throwing an exception, when sending to a DIRECT endpoint - * with no active consumers. - */ - public fun failIfNoConsumers(failIfNoConsumers: Boolean) { - it.property("failIfNoConsumers", failIfNoConsumers.toString()) - } - - /** - * The timeout value to use if block is enabled. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * The timeout value to use if block is enabled. - */ - public fun timeout(timeout: Int) { - it.property("timeout", timeout.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Whether synchronous processing is forced. If enabled, then the producer thread will be forced - * to wait until the message has been completed before the same thread will continue processing. If - * disabled, the default, then the producer thread may be freed and can do other work while the - * message is continued processed by other threads (reactive). - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Whether synchronous processing is forced. If enabled, then the producer thread will be forced - * to wait until the message has been completed before the same thread will continue processing. If - * disabled, the default, then the producer thread may be freed and can do other work while the - * message is continued processed by other threads (reactive). - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DisruptorUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DisruptorUriDsl.kt deleted file mode 100644 index 90e41c934fbfc..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DisruptorUriDsl.kt +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Provides asynchronous SEDA behavior using LMAX Disruptor. - */ -public fun UriDsl.disruptor(i: DisruptorUriDsl.() -> Unit) { - DisruptorUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DisruptorUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("disruptor") - } - - private var name: String = "" - - /** - * Name of queue - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * The maximum capacity of the Disruptors ringbuffer Will be effectively increased to the nearest - * power of two. Notice: Mind if you use this option, then it's the first endpoint being created with - * the queue name that determines the size. To make sure all endpoints use the same size, then - * configure the size option on all of them, or the first endpoint being created. - */ - public fun size(size: String) { - it.property("size", size) - } - - /** - * The maximum capacity of the Disruptors ringbuffer Will be effectively increased to the nearest - * power of two. Notice: Mind if you use this option, then it's the first endpoint being created with - * the queue name that determines the size. To make sure all endpoints use the same size, then - * configure the size option on all of them, or the first endpoint being created. - */ - public fun size(size: Int) { - it.property("size", size.toString()) - } - - /** - * Number of concurrent threads processing exchanges. - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * Number of concurrent threads processing exchanges. - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * Specifies whether multiple consumers are allowed. If enabled, you can use Disruptor for - * Publish-Subscribe messaging. That is, you can send a message to the queue and have each consumer - * receive a copy of the message. When enabled, this option should be specified on every consumer - * endpoint. - */ - public fun multipleConsumers(multipleConsumers: String) { - it.property("multipleConsumers", multipleConsumers) - } - - /** - * Specifies whether multiple consumers are allowed. If enabled, you can use Disruptor for - * Publish-Subscribe messaging. That is, you can send a message to the queue and have each consumer - * receive a copy of the message. When enabled, this option should be specified on every consumer - * endpoint. - */ - public fun multipleConsumers(multipleConsumers: Boolean) { - it.property("multipleConsumers", multipleConsumers.toString()) - } - - /** - * Defines the strategy used by consumer threads to wait on new exchanges to be published. The - * options allowed are:Blocking, Sleeping, BusySpin and Yielding. - */ - public fun waitStrategy(waitStrategy: String) { - it.property("waitStrategy", waitStrategy) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Whether a thread that sends messages to a full Disruptor will block until the ringbuffer's - * capacity is no longer exhausted. By default, the calling thread will block and wait until the - * message can be accepted. By disabling this option, an exception will be thrown stating that the - * queue is full. - */ - public fun blockWhenFull(blockWhenFull: String) { - it.property("blockWhenFull", blockWhenFull) - } - - /** - * Whether a thread that sends messages to a full Disruptor will block until the ringbuffer's - * capacity is no longer exhausted. By default, the calling thread will block and wait until the - * message can be accepted. By disabling this option, an exception will be thrown stating that the - * queue is full. - */ - public fun blockWhenFull(blockWhenFull: Boolean) { - it.property("blockWhenFull", blockWhenFull.toString()) - } - - /** - * Defines the producers allowed on the Disruptor. The options allowed are: Multi to allow - * multiple producers and Single to enable certain optimizations only allowed when one concurrent - * producer (on one thread or otherwise synchronized) is active. - */ - public fun producerType(producerType: String) { - it.property("producerType", producerType) - } - - /** - * Timeout (in milliseconds) before a producer will stop waiting for an asynchronous task to - * complete. You can disable timeout by using 0 or a negative value. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Option to specify whether the caller should wait for the async task to complete or not before - * continuing. The following three options are supported: Always, Never or IfReplyExpected. The first - * two values are self-explanatory. The last value, IfReplyExpected, will only wait if the message is - * Request Reply based. - */ - public fun waitForTaskToComplete(waitForTaskToComplete: String) { - it.property("waitForTaskToComplete", waitForTaskToComplete) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DisruptorVmUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DisruptorVmUriDsl.kt deleted file mode 100644 index c90c3ab99b1cb..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DisruptorVmUriDsl.kt +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Provides asynchronous SEDA behavior using LMAX Disruptor. - */ -public fun UriDsl.`disruptor-vm`(i: DisruptorVmUriDsl.() -> Unit) { - DisruptorVmUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DisruptorVmUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("disruptor-vm") - } - - private var name: String = "" - - /** - * Name of queue - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * The maximum capacity of the Disruptors ringbuffer Will be effectively increased to the nearest - * power of two. Notice: Mind if you use this option, then it's the first endpoint being created with - * the queue name that determines the size. To make sure all endpoints use the same size, then - * configure the size option on all of them, or the first endpoint being created. - */ - public fun size(size: String) { - it.property("size", size) - } - - /** - * The maximum capacity of the Disruptors ringbuffer Will be effectively increased to the nearest - * power of two. Notice: Mind if you use this option, then it's the first endpoint being created with - * the queue name that determines the size. To make sure all endpoints use the same size, then - * configure the size option on all of them, or the first endpoint being created. - */ - public fun size(size: Int) { - it.property("size", size.toString()) - } - - /** - * Number of concurrent threads processing exchanges. - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * Number of concurrent threads processing exchanges. - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * Specifies whether multiple consumers are allowed. If enabled, you can use Disruptor for - * Publish-Subscribe messaging. That is, you can send a message to the queue and have each consumer - * receive a copy of the message. When enabled, this option should be specified on every consumer - * endpoint. - */ - public fun multipleConsumers(multipleConsumers: String) { - it.property("multipleConsumers", multipleConsumers) - } - - /** - * Specifies whether multiple consumers are allowed. If enabled, you can use Disruptor for - * Publish-Subscribe messaging. That is, you can send a message to the queue and have each consumer - * receive a copy of the message. When enabled, this option should be specified on every consumer - * endpoint. - */ - public fun multipleConsumers(multipleConsumers: Boolean) { - it.property("multipleConsumers", multipleConsumers.toString()) - } - - /** - * Defines the strategy used by consumer threads to wait on new exchanges to be published. The - * options allowed are:Blocking, Sleeping, BusySpin and Yielding. - */ - public fun waitStrategy(waitStrategy: String) { - it.property("waitStrategy", waitStrategy) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Whether a thread that sends messages to a full Disruptor will block until the ringbuffer's - * capacity is no longer exhausted. By default, the calling thread will block and wait until the - * message can be accepted. By disabling this option, an exception will be thrown stating that the - * queue is full. - */ - public fun blockWhenFull(blockWhenFull: String) { - it.property("blockWhenFull", blockWhenFull) - } - - /** - * Whether a thread that sends messages to a full Disruptor will block until the ringbuffer's - * capacity is no longer exhausted. By default, the calling thread will block and wait until the - * message can be accepted. By disabling this option, an exception will be thrown stating that the - * queue is full. - */ - public fun blockWhenFull(blockWhenFull: Boolean) { - it.property("blockWhenFull", blockWhenFull.toString()) - } - - /** - * Defines the producers allowed on the Disruptor. The options allowed are: Multi to allow - * multiple producers and Single to enable certain optimizations only allowed when one concurrent - * producer (on one thread or otherwise synchronized) is active. - */ - public fun producerType(producerType: String) { - it.property("producerType", producerType) - } - - /** - * Timeout (in milliseconds) before a producer will stop waiting for an asynchronous task to - * complete. You can disable timeout by using 0 or a negative value. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Option to specify whether the caller should wait for the async task to complete or not before - * continuing. The following three options are supported: Always, Never or IfReplyExpected. The first - * two values are self-explanatory. The last value, IfReplyExpected, will only wait if the message is - * Request Reply based. - */ - public fun waitForTaskToComplete(waitForTaskToComplete: String) { - it.property("waitForTaskToComplete", waitForTaskToComplete) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DjlUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DjlUriDsl.kt deleted file mode 100644 index 269bac39fcb46..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DjlUriDsl.kt +++ /dev/null @@ -1,111 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Infer Deep Learning models from message exchanges data using Deep Java Library (DJL). - */ -public fun UriDsl.djl(i: DjlUriDsl.() -> Unit) { - DjlUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DjlUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("djl") - } - - private var application: String = "" - - /** - * Application name - */ - public fun application(application: String) { - this.application = application - it.url("$application") - } - - /** - * Model Artifact - */ - public fun artifactId(artifactId: String) { - it.property("artifactId", artifactId) - } - - /** - * Model - */ - public fun model(model: String) { - it.property("model", model) - } - - /** - * Show progress while loading zoo models. This parameter takes effect only with zoo models - */ - public fun showProgress(showProgress: String) { - it.property("showProgress", showProgress) - } - - /** - * Show progress while loading zoo models. This parameter takes effect only with zoo models - */ - public fun showProgress(showProgress: Boolean) { - it.property("showProgress", showProgress.toString()) - } - - /** - * Translator - */ - public fun translator(translator: String) { - it.property("translator", translator) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DnsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DnsUriDsl.kt deleted file mode 100644 index f4753dccbb6d0..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DnsUriDsl.kt +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform DNS queries using DNSJava. - */ -public fun UriDsl.dns(i: DnsUriDsl.() -> Unit) { - DnsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DnsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("dns") - } - - private var dnsType: String = "" - - /** - * The type of the lookup. - */ - public fun dnsType(dnsType: String) { - this.dnsType = dnsType - it.url("$dnsType") - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DockerUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DockerUriDsl.kt deleted file mode 100644 index a57ab5b29c545..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DockerUriDsl.kt +++ /dev/null @@ -1,305 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage Docker containers. - */ -public fun UriDsl.docker(i: DockerUriDsl.() -> Unit) { - DockerUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DockerUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("docker") - } - - private var operation: String = "" - - /** - * Which operation to use - */ - public fun operation(operation: String) { - this.operation = operation - it.url("$operation") - } - - /** - * Email address associated with the user - */ - public fun email(email: String) { - it.property("email", email) - } - - /** - * Docker host - */ - public fun host(host: String) { - it.property("host", host) - } - - /** - * Docker port - */ - public fun port(port: String) { - it.property("port", port) - } - - /** - * Docker port - */ - public fun port(port: Int) { - it.property("port", port.toString()) - } - - /** - * Request timeout for response (in seconds) - */ - public fun requestTimeout(requestTimeout: String) { - it.property("requestTimeout", requestTimeout) - } - - /** - * Request timeout for response (in seconds) - */ - public fun requestTimeout(requestTimeout: Int) { - it.property("requestTimeout", requestTimeout.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The fully qualified class name of the DockerCmdExecFactory implementation to use - */ - public fun cmdExecFactory(cmdExecFactory: String) { - it.property("cmdExecFactory", cmdExecFactory) - } - - /** - * Whether to follow redirect filter - */ - public fun followRedirectFilter(followRedirectFilter: String) { - it.property("followRedirectFilter", followRedirectFilter) - } - - /** - * Whether to follow redirect filter - */ - public fun followRedirectFilter(followRedirectFilter: Boolean) { - it.property("followRedirectFilter", followRedirectFilter.toString()) - } - - /** - * Whether to use logging filter - */ - public fun loggingFilter(loggingFilter: String) { - it.property("loggingFilter", loggingFilter) - } - - /** - * Whether to use logging filter - */ - public fun loggingFilter(loggingFilter: Boolean) { - it.property("loggingFilter", loggingFilter.toString()) - } - - /** - * Maximum route connections - */ - public fun maxPerRouteConnections(maxPerRouteConnections: String) { - it.property("maxPerRouteConnections", maxPerRouteConnections) - } - - /** - * Maximum route connections - */ - public fun maxPerRouteConnections(maxPerRouteConnections: Int) { - it.property("maxPerRouteConnections", maxPerRouteConnections.toString()) - } - - /** - * Maximum total connections - */ - public fun maxTotalConnections(maxTotalConnections: String) { - it.property("maxTotalConnections", maxTotalConnections) - } - - /** - * Maximum total connections - */ - public fun maxTotalConnections(maxTotalConnections: Int) { - it.property("maxTotalConnections", maxTotalConnections.toString()) - } - - /** - * Additional configuration parameters as key/value pairs - */ - public fun parameters(parameters: String) { - it.property("parameters", parameters) - } - - /** - * Server address for docker registry. - */ - public fun serverAddress(serverAddress: String) { - it.property("serverAddress", serverAddress) - } - - /** - * Socket connection mode - */ - public fun socket(socket: String) { - it.property("socket", socket) - } - - /** - * Socket connection mode - */ - public fun socket(socket: Boolean) { - it.property("socket", socket.toString()) - } - - /** - * Location containing the SSL certificate chain - */ - public fun certPath(certPath: String) { - it.property("certPath", certPath) - } - - /** - * Password to authenticate with - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Use HTTPS communication - */ - public fun secure(secure: String) { - it.property("secure", secure) - } - - /** - * Use HTTPS communication - */ - public fun secure(secure: Boolean) { - it.property("secure", secure.toString()) - } - - /** - * Check TLS - */ - public fun tlsVerify(tlsVerify: String) { - it.property("tlsVerify", tlsVerify) - } - - /** - * Check TLS - */ - public fun tlsVerify(tlsVerify: Boolean) { - it.property("tlsVerify", tlsVerify.toString()) - } - - /** - * User name to authenticate with - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DrillUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DrillUriDsl.kt deleted file mode 100644 index c586cc0638ff5..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DrillUriDsl.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform queries against an Apache Drill cluster. - */ -public fun UriDsl.drill(i: DrillUriDsl.() -> Unit) { - DrillUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DrillUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("drill") - } - - private var host: String = "" - - /** - * Host name or IP address - */ - public fun host(host: String) { - this.host = host - it.url("$host") - } - - /** - * Cluster ID https://drill.apache.org/docs/using-the-jdbc-driver/#determining-the-cluster-id - */ - public fun clusterId(clusterId: String) { - it.property("clusterId", clusterId) - } - - /** - * Drill directory - */ - public fun directory(directory: String) { - it.property("directory", directory) - } - - /** - * Connection mode: zk: Zookeeper drillbit: Drillbit direct connection - * https://drill.apache.org/docs/using-the-jdbc-driver/ - */ - public fun mode(mode: String) { - it.property("mode", mode) - } - - /** - * Port number - */ - public fun port(port: String) { - it.property("port", port) - } - - /** - * Port number - */ - public fun port(port: Int) { - it.property("port", port.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DropboxUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DropboxUriDsl.kt deleted file mode 100644 index 5113c2ea9c7dc..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DropboxUriDsl.kt +++ /dev/null @@ -1,218 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Upload, download and manage files, folders, groups, collaborations, etc on Dropbox. - */ -public fun UriDsl.dropbox(i: DropboxUriDsl.() -> Unit) { - DropboxUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DropboxUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("dropbox") - } - - private var operation: String = "" - - /** - * The specific action (typically is a CRUD action) to perform on Dropbox remote folder. - */ - public fun operation(operation: String) { - this.operation = operation - it.url("$operation") - } - - /** - * Name of the app registered to make API requests - */ - public fun clientIdentifier(clientIdentifier: String) { - it.property("clientIdentifier", clientIdentifier) - } - - /** - * A space-separated list of sub-strings to search for. A file matches only if it contains all the - * sub-strings. If this option is not set, all files will be matched. - */ - public fun query(query: String) { - it.property("query", query) - } - - /** - * Original file or folder to move - */ - public fun remotePath(remotePath: String) { - it.property("remotePath", remotePath) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Optional folder or file to upload on Dropbox from the local filesystem. If this option has not - * been configured then the message body is used as the content to upload. - */ - public fun localPath(localPath: String) { - it.property("localPath", localPath) - } - - /** - * Destination file or folder - */ - public fun newRemotePath(newRemotePath: String) { - it.property("newRemotePath", newRemotePath) - } - - /** - * Which mode to upload. in case of add the new file will be renamed if a file with the same name - * already exists on dropbox. in case of force if a file with the same name already exists on - * dropbox, this will be overwritten. - */ - public fun uploadMode(uploadMode: String) { - it.property("uploadMode", uploadMode) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing DbxClient instance as Dropbox client. - */ - public fun client(client: String) { - it.property("client", client) - } - - /** - * The access token to make API requests for a specific Dropbox user - */ - public fun accessToken(accessToken: String) { - it.property("accessToken", accessToken) - } - - /** - * The apiKey to make API requests for a specific Dropbox user - */ - public fun apiKey(apiKey: String) { - it.property("apiKey", apiKey) - } - - /** - * The apiSecret to make API requests for a specific Dropbox user - */ - public fun apiSecret(apiSecret: String) { - it.property("apiSecret", apiSecret) - } - - /** - * The expire time to access token for a specific Dropbox user - */ - public fun expireIn(expireIn: String) { - it.property("expireIn", expireIn) - } - - /** - * The expire time to access token for a specific Dropbox user - */ - public fun expireIn(expireIn: Int) { - it.property("expireIn", expireIn.toString()) - } - - /** - * The refresh token to refresh the access token for a specific Dropbox user - */ - public fun refreshToken(refreshToken: String) { - it.property("refreshToken", refreshToken) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DynamicRouterControlUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DynamicRouterControlUriDsl.kt deleted file mode 100644 index a1d483dfce306..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DynamicRouterControlUriDsl.kt +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * The Dynamic Router control endpoint for operations that allow routing participants to subscribe - * or unsubscribe to participate in dynamic message routing. - */ -public fun UriDsl.`dynamic-router-control`(i: DynamicRouterControlUriDsl.() -> Unit) { - DynamicRouterControlUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DynamicRouterControlUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("dynamic-router-control") - } - - private var controlAction: String = "" - - /** - * Control action - */ - public fun controlAction(controlAction: String) { - this.controlAction = controlAction - it.url("$controlAction") - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The destination URI for exchanges that match. - */ - public fun destinationUri(destinationUri: String) { - it.property("destinationUri", destinationUri) - } - - /** - * The subscription predicate language. - */ - public fun expressionLanguage(expressionLanguage: String) { - it.property("expressionLanguage", expressionLanguage) - } - - /** - * The subscription predicate. - */ - public fun predicate(predicate: String) { - it.property("predicate", predicate) - } - - /** - * A Predicate instance in the registry. - */ - public fun predicateBean(predicateBean: String) { - it.property("predicateBean", predicateBean) - } - - /** - * The subscription priority. - */ - public fun priority(priority: String) { - it.property("priority", priority) - } - - /** - * The subscription priority. - */ - public fun priority(priority: Int) { - it.property("priority", priority.toString()) - } - - /** - * The channel to subscribe to - */ - public fun subscribeChannel(subscribeChannel: String) { - it.property("subscribeChannel", subscribeChannel) - } - - /** - * The subscription ID; if unspecified, one will be assigned and returned. - */ - public fun subscriptionId(subscriptionId: String) { - it.property("subscriptionId", subscriptionId) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DynamicRouterUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DynamicRouterUriDsl.kt deleted file mode 100644 index a4bbe54446efd..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/DynamicRouterUriDsl.kt +++ /dev/null @@ -1,360 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * The Dynamic Router component routes exchanges to recipients, and the recipients (and their rules) - * may change at runtime. - */ -public fun UriDsl.`dynamic-router`(i: DynamicRouterUriDsl.() -> Unit) { - DynamicRouterUriDsl(this).apply(i) -} - -@CamelDslMarker -public class DynamicRouterUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("dynamic-router") - } - - private var channel: String = "" - - /** - * Channel for the Dynamic Router. For example, if the Dynamic Router URI is - * dynamic-router://test, then the channel is test. Channels are a way of keeping routing - * participants, their rules, and exchanges logically separate from the participants, rules, and - * exchanges on other channels. This can be seen as analogous to VLANs in networking. - */ - public fun channel(channel: String) { - this.channel = channel - it.url("$channel") - } - - /** - * Refers to an AggregationStrategy to be used to assemble the replies from the multicasts, into a - * single outgoing message from the Multicast. By default, Camel will use the last reply as the - * outgoing message. You can also use a POJO as the AggregationStrategy. - */ - public fun aggregationStrategy(aggregationStrategy: String) { - it.property("aggregationStrategy", aggregationStrategy) - } - - /** - * Refers to an AggregationStrategy to be used to assemble the replies from the multicasts, into a - * single outgoing message from the Multicast. By default, Camel will use the last reply as the - * outgoing message. You can also use a POJO as the AggregationStrategy. - */ - public fun aggregationStrategyBean(aggregationStrategyBean: String) { - it.property("aggregationStrategyBean", aggregationStrategyBean) - } - - /** - * If this option is false then the aggregate method is not used if there was no data to enrich. - * If this option is true then null values is used as the oldExchange (when no data to enrich), when - * using POJOs as the AggregationStrategy - */ - public fun aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull: String) { - it.property("aggregationStrategyMethodAllowNull", aggregationStrategyMethodAllowNull) - } - - /** - * If this option is false then the aggregate method is not used if there was no data to enrich. - * If this option is true then null values is used as the oldExchange (when no data to enrich), when - * using POJOs as the AggregationStrategy - */ - public fun aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull: Boolean) { - it.property("aggregationStrategyMethodAllowNull", aggregationStrategyMethodAllowNull.toString()) - } - - /** - * You can use a POJO as the AggregationStrategy. This refers to the name of the method that - * aggregates the exchanges. - */ - public fun aggregationStrategyMethodName(aggregationStrategyMethodName: String) { - it.property("aggregationStrategyMethodName", aggregationStrategyMethodName) - } - - /** - * When caching producer endpoints, this is the size of the cache. Default is 100. - */ - public fun cacheSize(cacheSize: String) { - it.property("cacheSize", cacheSize) - } - - /** - * When caching producer endpoints, this is the size of the cache. Default is 100. - */ - public fun cacheSize(cacheSize: Int) { - it.property("cacheSize", cacheSize.toString()) - } - - /** - * Refers to a custom Thread Pool to be used for parallel processing. Notice that, if you set this - * option, then parallel processing is automatically implied, and you do not have to enable that - * option in addition to this one. - */ - public fun executorService(executorService: String) { - it.property("executorService", executorService) - } - - /** - * Refers to a custom Thread Pool to be used for parallel processing. Notice that, if you set this - * option, then parallel processing is automatically implied, and you do not have to enable that - * option in addition to this one. - */ - public fun executorServiceBean(executorServiceBean: String) { - it.property("executorServiceBean", executorServiceBean) - } - - /** - * Ignore the invalid endpoint exception when attempting to create a producer with an invalid - * endpoint. - */ - public fun ignoreInvalidEndpoints(ignoreInvalidEndpoints: String) { - it.property("ignoreInvalidEndpoints", ignoreInvalidEndpoints) - } - - /** - * Ignore the invalid endpoint exception when attempting to create a producer with an invalid - * endpoint. - */ - public fun ignoreInvalidEndpoints(ignoreInvalidEndpoints: Boolean) { - it.property("ignoreInvalidEndpoints", ignoreInvalidEndpoints.toString()) - } - - /** - * Uses the Processor when preparing the org.apache.camel.Exchange to be sent. This can be used to - * deep-clone messages that should be sent, or to provide any custom logic that is needed before the - * exchange is sent. This is the name of a bean in the registry. - */ - public fun onPrepare(onPrepare: String) { - it.property("onPrepare", onPrepare) - } - - /** - * Uses the Processor when preparing the org.apache.camel.Exchange to be sent. This can be used to - * deep-clone messages that should be sent, or to provide any custom logic that is needed before the - * exchange is sent. This is a Processor instance. - */ - public fun onPrepareProcessor(onPrepareProcessor: String) { - it.property("onPrepareProcessor", onPrepareProcessor) - } - - /** - * If enabled then the aggregate method on AggregationStrategy can be called concurrently. Notice - * that this would require the implementation of AggregationStrategy to be implemented as - * thread-safe. By default, this is false, meaning that Camel synchronizes the call to the aggregate - * method. Though, in some use-cases, this can be used to archive higher performance when the - * AggregationStrategy is implemented as thread-safe. - */ - public fun parallelAggregate(parallelAggregate: String) { - it.property("parallelAggregate", parallelAggregate) - } - - /** - * If enabled then the aggregate method on AggregationStrategy can be called concurrently. Notice - * that this would require the implementation of AggregationStrategy to be implemented as - * thread-safe. By default, this is false, meaning that Camel synchronizes the call to the aggregate - * method. Though, in some use-cases, this can be used to archive higher performance when the - * AggregationStrategy is implemented as thread-safe. - */ - public fun parallelAggregate(parallelAggregate: Boolean) { - it.property("parallelAggregate", parallelAggregate.toString()) - } - - /** - * If enabled, then sending via multicast occurs concurrently. Note that the caller thread will - * still wait until all messages have been fully processed before it continues. It is only the - * sending and processing of the replies from the multicast recipients that happens concurrently. - * When parallel processing is enabled, then the Camel routing engine will continue processing using - * the last used thread from the parallel thread pool. However, if you want to use the original - * thread that called the multicast, then make sure to enable the synchronous option as well. - */ - public fun parallelProcessing(parallelProcessing: String) { - it.property("parallelProcessing", parallelProcessing) - } - - /** - * If enabled, then sending via multicast occurs concurrently. Note that the caller thread will - * still wait until all messages have been fully processed before it continues. It is only the - * sending and processing of the replies from the multicast recipients that happens concurrently. - * When parallel processing is enabled, then the Camel routing engine will continue processing using - * the last used thread from the parallel thread pool. However, if you want to use the original - * thread that called the multicast, then make sure to enable the synchronous option as well. - */ - public fun parallelProcessing(parallelProcessing: Boolean) { - it.property("parallelProcessing", parallelProcessing.toString()) - } - - /** - * Recipient mode: firstMatch or allMatch - */ - public fun recipientMode(recipientMode: String) { - it.property("recipientMode", recipientMode) - } - - /** - * Shares the org.apache.camel.spi.UnitOfWork with the parent and each of the sub messages. - * Multicast will, by default, not share a unit of work between the parent exchange and each - * multicasted exchange. This means each sub exchange has its own individual unit of work. - */ - public fun shareUnitOfWork(shareUnitOfWork: String) { - it.property("shareUnitOfWork", shareUnitOfWork) - } - - /** - * Shares the org.apache.camel.spi.UnitOfWork with the parent and each of the sub messages. - * Multicast will, by default, not share a unit of work between the parent exchange and each - * multicasted exchange. This means each sub exchange has its own individual unit of work. - */ - public fun shareUnitOfWork(shareUnitOfWork: Boolean) { - it.property("shareUnitOfWork", shareUnitOfWork.toString()) - } - - /** - * Will stop further processing if an exception or failure occurred during processing of an - * org.apache.camel.Exchange and the caused exception will be thrown. Will also stop if processing - * the exchange failed (has a fault message), or an exception was thrown and handled by the error - * handler (such as using onException). In all situations, the multicast will stop further - * processing. This is the same behavior as in the pipeline that is used by the routing engine. The - * default behavior is to not stop, but to continue processing until the end. - */ - public fun stopOnException(stopOnException: String) { - it.property("stopOnException", stopOnException) - } - - /** - * Will stop further processing if an exception or failure occurred during processing of an - * org.apache.camel.Exchange and the caused exception will be thrown. Will also stop if processing - * the exchange failed (has a fault message), or an exception was thrown and handled by the error - * handler (such as using onException). In all situations, the multicast will stop further - * processing. This is the same behavior as in the pipeline that is used by the routing engine. The - * default behavior is to not stop, but to continue processing until the end. - */ - public fun stopOnException(stopOnException: Boolean) { - it.property("stopOnException", stopOnException.toString()) - } - - /** - * If enabled, then Camel will process replies out-of-order (e.g., in the order they come back). - * If disabled, Camel will process replies in the same order as defined by the multicast. - */ - public fun streaming(streaming: String) { - it.property("streaming", streaming) - } - - /** - * If enabled, then Camel will process replies out-of-order (e.g., in the order they come back). - * If disabled, Camel will process replies in the same order as defined by the multicast. - */ - public fun streaming(streaming: Boolean) { - it.property("streaming", streaming.toString()) - } - - /** - * Sets whether synchronous processing should be strictly used. When enabled then the same thread - * is used to continue routing after the multicast is complete, even if parallel processing is - * enabled. - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used. When enabled then the same thread - * is used to continue routing after the multicast is complete, even if parallel processing is - * enabled. - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * Sets a total timeout specified in milliseconds, when using parallel processing. If the - * Multicast has not been able to send and process all replies within the given timeframe, then the - * timeout triggers and the Multicast breaks out and continues. Notice that, if you provide a - * TimeoutAwareAggregationStrategy, then the timeout method is invoked before breaking out. If the - * timeout is reached with running tasks still remaining, certain tasks (for which it is difficult - * for Camel to shut down in a graceful manner) may continue to run. So use this option with a bit of - * care. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Sets a total timeout specified in milliseconds, when using parallel processing. If the - * Multicast has not been able to send and process all replies within the given timeframe, then the - * timeout triggers and the Multicast breaks out and continues. Notice that, if you provide a - * TimeoutAwareAggregationStrategy, then the timeout method is invoked before breaking out. If the - * timeout is reached with running tasks still remaining, certain tasks (for which it is difficult - * for Camel to shut down in a graceful manner) may continue to run. So use this option with a bit of - * care. - */ - public fun timeout(timeout: Int) { - it.property("timeout", timeout.toString()) - } - - /** - * Flag to log a warning if no predicates match for an exchange. - */ - public fun warnDroppedMessage(warnDroppedMessage: String) { - it.property("warnDroppedMessage", warnDroppedMessage) - } - - /** - * Flag to log a warning if no predicates match for an exchange. - */ - public fun warnDroppedMessage(warnDroppedMessage: Boolean) { - it.property("warnDroppedMessage", warnDroppedMessage.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/EhcacheUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/EhcacheUriDsl.kt deleted file mode 100644 index 8f573a3bb34b8..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/EhcacheUriDsl.kt +++ /dev/null @@ -1,223 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform caching operations using Ehcache. - */ -public fun UriDsl.ehcache(i: EhcacheUriDsl.() -> Unit) { - EhcacheUriDsl(this).apply(i) -} - -@CamelDslMarker -public class EhcacheUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("ehcache") - } - - private var cacheName: String = "" - - /** - * the cache name - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * The cache manager - */ - public fun cacheManager(cacheManager: String) { - it.property("cacheManager", cacheManager) - } - - /** - * The cache manager configuration - */ - public fun cacheManagerConfiguration(cacheManagerConfiguration: String) { - it.property("cacheManagerConfiguration", cacheManagerConfiguration) - } - - /** - * URI pointing to the Ehcache XML configuration file's location - */ - public fun configurationUri(configurationUri: String) { - it.property("configurationUri", configurationUri) - } - - /** - * Configure if a cache need to be created if it does exist or can't be pre-configured. - */ - public fun createCacheIfNotExist(createCacheIfNotExist: String) { - it.property("createCacheIfNotExist", createCacheIfNotExist) - } - - /** - * Configure if a cache need to be created if it does exist or can't be pre-configured. - */ - public fun createCacheIfNotExist(createCacheIfNotExist: Boolean) { - it.property("createCacheIfNotExist", createCacheIfNotExist.toString()) - } - - /** - * Set the delivery mode (synchronous, asynchronous) - */ - public fun eventFiring(eventFiring: String) { - it.property("eventFiring", eventFiring) - } - - /** - * Set the delivery mode (ordered, unordered) - */ - public fun eventOrdering(eventOrdering: String) { - it.property("eventOrdering", eventOrdering) - } - - /** - * Set the type of events to listen for (EVICTED,EXPIRED,REMOVED,CREATED,UPDATED). You can specify - * multiple entries separated by comma. - */ - public fun eventTypes(eventTypes: String) { - it.property("eventTypes", eventTypes) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * To configure the default cache action. If an action is set in the message header, then the - * operation from the header takes precedence. - */ - public fun action(action: String) { - it.property("action", action) - } - - /** - * To configure the default action key. If a key is set in the message header, then the key from - * the header takes precedence. - */ - public fun key(key: String) { - it.property("key", key) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The default cache configuration to be used to create caches. - */ - public fun configuration(configuration: String) { - it.property("configuration", configuration) - } - - /** - * A map of cache configuration to be used to create caches. - */ - public fun configurations(configurations: String) { - it.property("configurations", configurations) - } - - /** - * The cache key type, default java.lang.Object - */ - public fun keyType(keyType: String) { - it.property("keyType", keyType) - } - - /** - * The cache value type, default java.lang.Object - */ - public fun valueType(valueType: String) { - it.property("valueType", valueType) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ElasticsearchRestClientUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ElasticsearchRestClientUriDsl.kt deleted file mode 100644 index 21c0120fc18d9..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ElasticsearchRestClientUriDsl.kt +++ /dev/null @@ -1,196 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform queries and other operations on Elasticsearch or OpenSearch (uses low-level client). - */ -public fun UriDsl.`elasticsearch-rest-client`(i: ElasticsearchRestClientUriDsl.() -> Unit) { - ElasticsearchRestClientUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ElasticsearchRestClientUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("elasticsearch-rest-client") - } - - private var clusterName: String = "" - - /** - * Cluster Name - */ - public fun clusterName(clusterName: String) { - this.clusterName = clusterName - it.url("$clusterName") - } - - /** - * Connection timeout - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * List of host Addresses, multiple hosts can be separated by comma. - */ - public fun hostAddressesList(hostAddressesList: String) { - it.property("hostAddressesList", hostAddressesList) - } - - /** - * Index Name - */ - public fun indexName(indexName: String) { - it.property("indexName", indexName) - } - - /** - * Operation - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Socket timeout - */ - public fun socketTimeout(socketTimeout: String) { - it.property("socketTimeout", socketTimeout) - } - - /** - * Socket timeout - */ - public fun socketTimeout(socketTimeout: Int) { - it.property("socketTimeout", socketTimeout.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Enabling Sniffer - */ - public fun enableSniffer(enableSniffer: String) { - it.property("enableSniffer", enableSniffer) - } - - /** - * Enabling Sniffer - */ - public fun enableSniffer(enableSniffer: Boolean) { - it.property("enableSniffer", enableSniffer.toString()) - } - - /** - * Rest Client of type org.elasticsearch.client.RestClient. This is only for advanced usage - */ - public fun restClient(restClient: String) { - it.property("restClient", restClient) - } - - /** - * Sniffer after failure delay (in millis) - */ - public fun sniffAfterFailureDelay(sniffAfterFailureDelay: String) { - it.property("sniffAfterFailureDelay", sniffAfterFailureDelay) - } - - /** - * Sniffer after failure delay (in millis) - */ - public fun sniffAfterFailureDelay(sniffAfterFailureDelay: Int) { - it.property("sniffAfterFailureDelay", sniffAfterFailureDelay.toString()) - } - - /** - * Sniffer interval (in millis) - */ - public fun snifferInterval(snifferInterval: String) { - it.property("snifferInterval", snifferInterval) - } - - /** - * Sniffer interval (in millis) - */ - public fun snifferInterval(snifferInterval: Int) { - it.property("snifferInterval", snifferInterval.toString()) - } - - /** - * Certificate Path - */ - public fun certificatePath(certificatePath: String) { - it.property("certificatePath", certificatePath) - } - - /** - * Password - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Username - */ - public fun user(user: String) { - it.property("user", user) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ElasticsearchUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ElasticsearchUriDsl.kt deleted file mode 100644 index 59fbd333c907c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ElasticsearchUriDsl.kt +++ /dev/null @@ -1,324 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send requests to ElasticSearch via Java Client API. - */ -public fun UriDsl.elasticsearch(i: ElasticsearchUriDsl.() -> Unit) { - ElasticsearchUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ElasticsearchUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("elasticsearch") - } - - private var clusterName: String = "" - - /** - * Name of the cluster - */ - public fun clusterName(clusterName: String) { - this.clusterName = clusterName - it.url("$clusterName") - } - - /** - * The time in ms to wait before connection will time out. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * The time in ms to wait before connection will time out. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * Disconnect after it finish calling the producer - */ - public fun disconnect(disconnect: String) { - it.property("disconnect", disconnect) - } - - /** - * Disconnect after it finish calling the producer - */ - public fun disconnect(disconnect: Boolean) { - it.property("disconnect", disconnect.toString()) - } - - /** - * Indicates whether the body of the message contains only documents. By default, it is set to - * false to be able to do the same requests as what the Document API supports (see - * https://www.elastic.co/guide/en/elasticsearch/reference/current/docs.html for more details). To - * ease the migration of routes based on the legacy component camel-elasticsearch-rest, you should - * consider enabling the mode, especially if your routes do update operations. - */ - public fun enableDocumentOnlyMode(enableDocumentOnlyMode: String) { - it.property("enableDocumentOnlyMode", enableDocumentOnlyMode) - } - - /** - * Indicates whether the body of the message contains only documents. By default, it is set to - * false to be able to do the same requests as what the Document API supports (see - * https://www.elastic.co/guide/en/elasticsearch/reference/current/docs.html for more details). To - * ease the migration of routes based on the legacy component camel-elasticsearch-rest, you should - * consider enabling the mode, especially if your routes do update operations. - */ - public fun enableDocumentOnlyMode(enableDocumentOnlyMode: Boolean) { - it.property("enableDocumentOnlyMode", enableDocumentOnlyMode.toString()) - } - - /** - * Starting index of the response. - */ - public fun from(from: String) { - it.property("from", from) - } - - /** - * Starting index of the response. - */ - public fun from(from: Int) { - it.property("from", from.toString()) - } - - /** - * Comma separated list with ip:port formatted remote transport addresses to use. - */ - public fun hostAddresses(hostAddresses: String) { - it.property("hostAddresses", hostAddresses) - } - - /** - * The name of the index to act against - */ - public fun indexName(indexName: String) { - it.property("indexName", indexName) - } - - /** - * The time in ms before retry - */ - public fun maxRetryTimeout(maxRetryTimeout: String) { - it.property("maxRetryTimeout", maxRetryTimeout) - } - - /** - * The time in ms before retry - */ - public fun maxRetryTimeout(maxRetryTimeout: Int) { - it.property("maxRetryTimeout", maxRetryTimeout.toString()) - } - - /** - * What operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Time in ms during which elasticsearch will keep search context alive - */ - public fun scrollKeepAliveMs(scrollKeepAliveMs: String) { - it.property("scrollKeepAliveMs", scrollKeepAliveMs) - } - - /** - * Time in ms during which elasticsearch will keep search context alive - */ - public fun scrollKeepAliveMs(scrollKeepAliveMs: Int) { - it.property("scrollKeepAliveMs", scrollKeepAliveMs.toString()) - } - - /** - * Size of the response. - */ - public fun size(size: String) { - it.property("size", size) - } - - /** - * Size of the response. - */ - public fun size(size: Int) { - it.property("size", size.toString()) - } - - /** - * The timeout in ms to wait before the socket will time out. - */ - public fun socketTimeout(socketTimeout: String) { - it.property("socketTimeout", socketTimeout) - } - - /** - * The timeout in ms to wait before the socket will time out. - */ - public fun socketTimeout(socketTimeout: Int) { - it.property("socketTimeout", socketTimeout.toString()) - } - - /** - * Enable scroll usage - */ - public fun useScroll(useScroll: String) { - it.property("useScroll", useScroll) - } - - /** - * Enable scroll usage - */ - public fun useScroll(useScroll: Boolean) { - it.property("useScroll", useScroll.toString()) - } - - /** - * Index creation waits for the write consistency number of shards to be available - */ - public fun waitForActiveShards(waitForActiveShards: String) { - it.property("waitForActiveShards", waitForActiveShards) - } - - /** - * Index creation waits for the write consistency number of shards to be available - */ - public fun waitForActiveShards(waitForActiveShards: Int) { - it.property("waitForActiveShards", waitForActiveShards.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The class to use when deserializing the documents. - */ - public fun documentClass(documentClass: String) { - it.property("documentClass", documentClass) - } - - /** - * Enable automatically discover nodes from a running Elasticsearch cluster. If this option is - * used in conjunction with Spring Boot, then it's managed by the Spring Boot configuration (see: - * Disable Sniffer in Spring Boot). - */ - public fun enableSniffer(enableSniffer: String) { - it.property("enableSniffer", enableSniffer) - } - - /** - * Enable automatically discover nodes from a running Elasticsearch cluster. If this option is - * used in conjunction with Spring Boot, then it's managed by the Spring Boot configuration (see: - * Disable Sniffer in Spring Boot). - */ - public fun enableSniffer(enableSniffer: Boolean) { - it.property("enableSniffer", enableSniffer.toString()) - } - - /** - * The delay of a sniff execution scheduled after a failure (in milliseconds) - */ - public fun sniffAfterFailureDelay(sniffAfterFailureDelay: String) { - it.property("sniffAfterFailureDelay", sniffAfterFailureDelay) - } - - /** - * The delay of a sniff execution scheduled after a failure (in milliseconds) - */ - public fun sniffAfterFailureDelay(sniffAfterFailureDelay: Int) { - it.property("sniffAfterFailureDelay", sniffAfterFailureDelay.toString()) - } - - /** - * The interval between consecutive ordinary sniff executions in milliseconds. Will be honoured - * when sniffOnFailure is disabled or when there are no failures between consecutive sniff executions - */ - public fun snifferInterval(snifferInterval: String) { - it.property("snifferInterval", snifferInterval) - } - - /** - * The interval between consecutive ordinary sniff executions in milliseconds. Will be honoured - * when sniffOnFailure is disabled or when there are no failures between consecutive sniff executions - */ - public fun snifferInterval(snifferInterval: Int) { - it.property("snifferInterval", snifferInterval.toString()) - } - - /** - * The certificate that can be used to access the ES Cluster. It can be loaded by default from - * classpath, but you can prefix with classpath:, file:, or http: to load the resource from different - * systems. - */ - public fun certificatePath(certificatePath: String) { - it.property("certificatePath", certificatePath) - } - - /** - * Enable SSL - */ - public fun enableSSL(enableSSL: String) { - it.property("enableSSL", enableSSL) - } - - /** - * Enable SSL - */ - public fun enableSSL(enableSSL: Boolean) { - it.property("enableSSL", enableSSL.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Etcd3UriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Etcd3UriDsl.kt deleted file mode 100644 index 2c585ed498a4b..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Etcd3UriDsl.kt +++ /dev/null @@ -1,306 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Get, set, delete or watch keys in etcd key-value store. - */ -public fun UriDsl.etcd3(i: Etcd3UriDsl.() -> Unit) { - Etcd3UriDsl(this).apply(i) -} - -@CamelDslMarker -public class Etcd3UriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("etcd3") - } - - private var path: String = "" - - /** - * The path the endpoint refers to - */ - public fun path(path: String) { - this.path = path - it.url("$path") - } - - /** - * Configure etcd server endpoints using the IPNameResolver. Multiple endpoints can be separated - * by comma. - */ - public fun endpoints(endpoints: String) { - it.property("endpoints", endpoints) - } - - /** - * Configure the charset to use for the keys. - */ - public fun keyCharset(keyCharset: String) { - it.property("keyCharset", keyCharset) - } - - /** - * Configure the namespace of keys used. / will be treated as no namespace. - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * To apply an action on all the key-value pairs whose key that starts with the target path. - */ - public fun prefix(prefix: String) { - it.property("prefix", prefix) - } - - /** - * To apply an action on all the key-value pairs whose key that starts with the target path. - */ - public fun prefix(prefix: Boolean) { - it.property("prefix", prefix.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * The index to watch from - */ - public fun fromIndex(fromIndex: String) { - it.property("fromIndex", fromIndex) - } - - /** - * The index to watch from - */ - public fun fromIndex(fromIndex: Int) { - it.property("fromIndex", fromIndex.toString()) - } - - /** - * Configure the charset to use for the values. - */ - public fun valueCharset(valueCharset: String) { - it.property("valueCharset", valueCharset) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Configure the headers to be added to auth request headers. - */ - public fun authHeaders(authHeaders: String) { - it.property("authHeaders", authHeaders) - } - - /** - * Configure the authority used to authenticate connections to servers. - */ - public fun authority(authority: String) { - it.property("authority", authority) - } - - /** - * Configure the connection timeout. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Configure the headers to be added to http request headers. - */ - public fun headers(headers: String) { - it.property("headers", headers) - } - - /** - * Configure the interval for gRPC keepalives. The current minimum allowed by gRPC is 10 seconds. - */ - public fun keepAliveTime(keepAliveTime: String) { - it.property("keepAliveTime", keepAliveTime) - } - - /** - * Configure the timeout for gRPC keepalives. - */ - public fun keepAliveTimeout(keepAliveTimeout: String) { - it.property("keepAliveTimeout", keepAliveTimeout) - } - - /** - * Configure etcd load balancer policy. - */ - public fun loadBalancerPolicy(loadBalancerPolicy: String) { - it.property("loadBalancerPolicy", loadBalancerPolicy) - } - - /** - * Configure the maximum message size allowed for a single gRPC frame. - */ - public fun maxInboundMessageSize(maxInboundMessageSize: String) { - it.property("maxInboundMessageSize", maxInboundMessageSize) - } - - /** - * Configure the maximum message size allowed for a single gRPC frame. - */ - public fun maxInboundMessageSize(maxInboundMessageSize: Int) { - it.property("maxInboundMessageSize", maxInboundMessageSize.toString()) - } - - /** - * Configure the delay between retries in milliseconds. - */ - public fun retryDelay(retryDelay: String) { - it.property("retryDelay", retryDelay) - } - - /** - * Configure the delay between retries in milliseconds. - */ - public fun retryDelay(retryDelay: Int) { - it.property("retryDelay", retryDelay.toString()) - } - - /** - * Configure the max backing off delay between retries in milliseconds. - */ - public fun retryMaxDelay(retryMaxDelay: String) { - it.property("retryMaxDelay", retryMaxDelay) - } - - /** - * Configure the max backing off delay between retries in milliseconds. - */ - public fun retryMaxDelay(retryMaxDelay: Int) { - it.property("retryMaxDelay", retryMaxDelay.toString()) - } - - /** - * Configure the retries max duration. - */ - public fun retryMaxDuration(retryMaxDuration: String) { - it.property("retryMaxDuration", retryMaxDuration) - } - - /** - * The path to look for service discovery. - */ - public fun servicePath(servicePath: String) { - it.property("servicePath", servicePath) - } - - /** - * Configure etcd auth password. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Configure SSL/TLS context to use instead of the system default. - */ - public fun sslContext(sslContext: String) { - it.property("sslContext", sslContext) - } - - /** - * Configure etcd auth user. - */ - public fun userName(userName: String) { - it.property("userName", userName) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ExecUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ExecUriDsl.kt deleted file mode 100644 index a176d3f045a50..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ExecUriDsl.kt +++ /dev/null @@ -1,156 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Execute commands on the underlying operating system. - */ -public fun UriDsl.exec(i: ExecUriDsl.() -> Unit) { - ExecUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ExecUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("exec") - } - - private var executable: String = "" - - /** - * Sets the executable to be executed. The executable must not be empty or null. - */ - public fun executable(executable: String) { - this.executable = executable - it.url("$executable") - } - - /** - * The arguments may be one or many whitespace-separated tokens. - */ - public fun args(args: String) { - it.property("args", args) - } - - /** - * A reference to a org.apache.commons.exec.ExecBinding in the Registry. - */ - public fun binding(binding: String) { - it.property("binding", binding) - } - - /** - * A reference to a org.apache.commons.exec.ExecCommandExecutor in the Registry that customizes - * the command execution. The default command executor utilizes the commons-exec library, which adds - * a shutdown hook for every executed command. - */ - public fun commandExecutor(commandExecutor: String) { - it.property("commandExecutor", commandExecutor) - } - - /** - * Logging level to be used for commands during execution. The default value is DEBUG. Possible - * values are TRACE, DEBUG, INFO, WARN, ERROR or OFF. (Values of ExecCommandLogLevelType enum) - */ - public fun commandLogLevel(commandLogLevel: String) { - it.property("commandLogLevel", commandLogLevel) - } - - /** - * The exit values of successful executions. If the process exits with another value, an exception - * is raised. Comma-separated list of exit values. And empty list (the default) sets no expected exit - * values and disables the check. - */ - public fun exitValues(exitValues: String) { - it.property("exitValues", exitValues) - } - - /** - * The name of a file, created by the executable, that should be considered as its output. If no - * outFile is set, the standard output (stdout) of the executable will be used instead. - */ - public fun outFile(outFile: String) { - it.property("outFile", outFile) - } - - /** - * The timeout, in milliseconds, after which the executable should be terminated. If execution has - * not completed within the timeout, the component will send a termination request. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * A boolean indicating that when stdout is empty, this component will populate the Camel Message - * Body with stderr. This behavior is disabled (false) by default. - */ - public fun useStderrOnEmptyStdout(useStderrOnEmptyStdout: String) { - it.property("useStderrOnEmptyStdout", useStderrOnEmptyStdout) - } - - /** - * A boolean indicating that when stdout is empty, this component will populate the Camel Message - * Body with stderr. This behavior is disabled (false) by default. - */ - public fun useStderrOnEmptyStdout(useStderrOnEmptyStdout: Boolean) { - it.property("useStderrOnEmptyStdout", useStderrOnEmptyStdout.toString()) - } - - /** - * The directory in which the command should be executed. If null, the working directory of the - * current process will be used. - */ - public fun workingDir(workingDir: String) { - it.property("workingDir", workingDir) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FhirUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FhirUriDsl.kt deleted file mode 100644 index 5f35bb01cd9e6..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FhirUriDsl.kt +++ /dev/null @@ -1,567 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Exchange information in the healthcare domain using the FHIR (Fast Healthcare Interoperability - * Resources) standard. - */ -public fun UriDsl.fhir(i: FhirUriDsl.() -> Unit) { - FhirUriDsl(this).apply(i) -} - -@CamelDslMarker -public class FhirUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("fhir") - } - - private var apiName: String = "" - - private var methodName: String = "" - - /** - * What kind of operation to perform - */ - public fun apiName(apiName: String) { - this.apiName = apiName - it.url("$apiName/$methodName") - } - - /** - * What sub operation to use for the selected operation - */ - public fun methodName(methodName: String) { - this.methodName = methodName - it.url("$apiName/$methodName") - } - - /** - * Encoding to use for all request - */ - public fun encoding(encoding: String) { - it.property("encoding", encoding) - } - - /** - * The FHIR Version to use - */ - public fun fhirVersion(fhirVersion: String) { - it.property("fhirVersion", fhirVersion) - } - - /** - * Sets the name of a parameter to be passed in the exchange In Body - */ - public fun inBody(inBody: String) { - it.property("inBody", inBody) - } - - /** - * Will log every requests and responses - */ - public fun log(log: String) { - it.property("log", log) - } - - /** - * Will log every requests and responses - */ - public fun log(log: Boolean) { - it.property("log", log.toString()) - } - - /** - * Pretty print all request - */ - public fun prettyPrint(prettyPrint: String) { - it.property("prettyPrint", prettyPrint) - } - - /** - * Pretty print all request - */ - public fun prettyPrint(prettyPrint: Boolean) { - it.property("prettyPrint", prettyPrint.toString()) - } - - /** - * The FHIR server base URL - */ - public fun serverUrl(serverUrl: String) { - it.property("serverUrl", serverUrl) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use the custom client - */ - public fun client(client: String) { - it.property("client", client) - } - - /** - * To use the custom client factory - */ - public fun clientFactory(clientFactory: String) { - it.property("clientFactory", clientFactory) - } - - /** - * Compresses outgoing (POST/PUT) contents to the GZIP format - */ - public fun compress(compress: String) { - it.property("compress", compress) - } - - /** - * Compresses outgoing (POST/PUT) contents to the GZIP format - */ - public fun compress(compress: Boolean) { - it.property("compress", compress.toString()) - } - - /** - * How long to try and establish the initial TCP connection (in ms) - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * How long to try and establish the initial TCP connection (in ms) - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * When this option is set, model classes will not be scanned for children until the child list - * for the given type is actually accessed. - */ - public fun deferModelScanning(deferModelScanning: String) { - it.property("deferModelScanning", deferModelScanning) - } - - /** - * When this option is set, model classes will not be scanned for children until the child list - * for the given type is actually accessed. - */ - public fun deferModelScanning(deferModelScanning: Boolean) { - it.property("deferModelScanning", deferModelScanning.toString()) - } - - /** - * FhirContext is an expensive object to create. To avoid creating multiple instances, it can be - * set directly. - */ - public fun fhirContext(fhirContext: String) { - it.property("fhirContext", fhirContext) - } - - /** - * Force conformance check - */ - public fun forceConformanceCheck(forceConformanceCheck: String) { - it.property("forceConformanceCheck", forceConformanceCheck) - } - - /** - * Force conformance check - */ - public fun forceConformanceCheck(forceConformanceCheck: Boolean) { - it.property("forceConformanceCheck", forceConformanceCheck.toString()) - } - - /** - * HTTP session cookie to add to every request - */ - public fun sessionCookie(sessionCookie: String) { - it.property("sessionCookie", sessionCookie) - } - - /** - * How long to block for individual read/write operations (in ms) - */ - public fun socketTimeout(socketTimeout: String) { - it.property("socketTimeout", socketTimeout) - } - - /** - * How long to block for individual read/write operations (in ms) - */ - public fun socketTimeout(socketTimeout: Int) { - it.property("socketTimeout", socketTimeout.toString()) - } - - /** - * Request that the server modify the response using the _summary param - */ - public fun summary(summary: String) { - it.property("summary", summary) - } - - /** - * When should Camel validate the FHIR Server's conformance statement - */ - public fun validationMode(validationMode: String) { - it.property("validationMode", validationMode) - } - - /** - * The proxy host - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * The proxy password - */ - public fun proxyPassword(proxyPassword: String) { - it.property("proxyPassword", proxyPassword) - } - - /** - * The proxy port - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * The proxy port - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * The proxy username - */ - public fun proxyUser(proxyUser: String) { - it.property("proxyUser", proxyUser) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * OAuth access token - */ - public fun accessToken(accessToken: String) { - it.property("accessToken", accessToken) - } - - /** - * Password to use for basic authentication - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Username to use for basic authentication - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FileUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FileUriDsl.kt deleted file mode 100644 index 8409c39e0a673..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FileUriDsl.kt +++ /dev/null @@ -1,1490 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Read and write files. - */ -public fun UriDsl.`file`(i: FileUriDsl.() -> Unit) { - FileUriDsl(this).apply(i) -} - -@CamelDslMarker -public class FileUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("file") - } - - private var directoryName: String = "" - - /** - * The starting directory - */ - public fun directoryName(directoryName: String) { - this.directoryName = directoryName - it.url("$directoryName") - } - - /** - * This option is used to specify the encoding of the file. You can use this on the consumer, to - * specify the encodings of the files, which allow Camel to know the charset it should load the file - * content in case the file content is being accessed. Likewise when writing a file, you can use this - * option to specify which charset to write the file as well. Do mind that when writing the file - * Camel may have to read the message content into memory to be able to convert the data into the - * configured charset, so do not use this if you have big messages. - */ - public fun charset(charset: String) { - it.property("charset", charset) - } - - /** - * Producer: If provided, then Camel will write a 2nd done file when the original file has been - * written. The done file will be empty. This option configures what file name to use. Either you can - * specify a fixed name. Or you can use dynamic placeholders. The done file will always be written in - * the same folder as the original file. Consumer: If provided, Camel will only consume files if a - * done file exists. This option configures what file name to use. Either you can specify a fixed - * name. Or you can use dynamic placeholders.The done file is always expected in the same folder as - * the original file. Only ${file.name} and ${file.name.next} is supported as dynamic placeholders. - */ - public fun doneFileName(doneFileName: String) { - it.property("doneFileName", doneFileName) - } - - /** - * Use Expression such as File Language to dynamically set the filename. For consumers, it's used - * as a filename filter. For producers, it's used to evaluate the filename to write. If an expression - * is set, it take precedence over the CamelFileName header. (Note: The header itself can also be an - * Expression). The expression options support both String and Expression types. If the expression is - * a String type, it is always evaluated using the File Language. If the expression is an Expression - * type, the specified Expression type is used - this allows you, for instance, to use OGNL - * expressions. For the consumer, you can use it to filter filenames, so you can for instance consume - * today's file using the File Language syntax: mydata-${date:now:yyyyMMdd}.txt. The producers - * support the CamelOverruleFileName header which takes precedence over any existing CamelFileName - * header; the CamelOverruleFileName is a header that is used only once, and makes it easier as this - * avoids to temporary store CamelFileName and have to restore it afterwards. - */ - public fun fileName(fileName: String) { - it.property("fileName", fileName) - } - - /** - * If true, the file will be deleted after it is processed successfully. - */ - public fun delete(delete: String) { - it.property("delete", delete) - } - - /** - * If true, the file will be deleted after it is processed successfully. - */ - public fun delete(delete: Boolean) { - it.property("delete", delete.toString()) - } - - /** - * Sets the move failure expression based on Simple language. For example, to move files into a - * .error subdirectory use: .error. Note: When moving the files to the fail location Camel will - * handle the error and will not pick up the file again. - */ - public fun moveFailed(moveFailed: String) { - it.property("moveFailed", moveFailed) - } - - /** - * If true, the file is not moved or deleted in any way. This option is good for readonly data, or - * for ETL type requirements. If noop=true, Camel will set idempotent=true as well, to avoid - * consuming the same files over and over again. - */ - public fun noop(noop: String) { - it.property("noop", noop) - } - - /** - * If true, the file is not moved or deleted in any way. This option is good for readonly data, or - * for ETL type requirements. If noop=true, Camel will set idempotent=true as well, to avoid - * consuming the same files over and over again. - */ - public fun noop(noop: Boolean) { - it.property("noop", noop.toString()) - } - - /** - * Expression (such as File Language) used to dynamically set the filename when moving it before - * processing. For example to move in-progress files into the order directory set this value to - * order. - */ - public fun preMove(preMove: String) { - it.property("preMove", preMove) - } - - /** - * When pre-sort is enabled then the consumer will sort the file and directory names during - * polling, that was retrieved from the file system. You may want to do this in case you need to - * operate on the files in a sorted order. The pre-sort is executed before the consumer starts to - * filter, and accept files to process by Camel. This option is default=false meaning disabled. - */ - public fun preSort(preSort: String) { - it.property("preSort", preSort) - } - - /** - * When pre-sort is enabled then the consumer will sort the file and directory names during - * polling, that was retrieved from the file system. You may want to do this in case you need to - * operate on the files in a sorted order. The pre-sort is executed before the consumer starts to - * filter, and accept files to process by Camel. This option is default=false meaning disabled. - */ - public fun preSort(preSort: Boolean) { - it.property("preSort", preSort.toString()) - } - - /** - * If a directory, will look for files in all the sub-directories as well. - */ - public fun recursive(recursive: String) { - it.property("recursive", recursive) - } - - /** - * If a directory, will look for files in all the sub-directories as well. - */ - public fun recursive(recursive: Boolean) { - it.property("recursive", recursive.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Similar to the startingDirectoryMustExist option, but this applies during polling (after - * starting the consumer). - */ - public fun directoryMustExist(directoryMustExist: String) { - it.property("directoryMustExist", directoryMustExist) - } - - /** - * Similar to the startingDirectoryMustExist option, but this applies during polling (after - * starting the consumer). - */ - public fun directoryMustExist(directoryMustExist: Boolean) { - it.property("directoryMustExist", directoryMustExist.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * To define which file attributes of interest. Like - * posix:permissions,posix:owner,basic:lastAccessTime, it supports basic wildcard like posix:, - * basic:lastAccessTime - */ - public fun extendedAttributes(extendedAttributes: String) { - it.property("extendedAttributes", extendedAttributes) - } - - /** - * Whether to accept hidden directories. Directories which names starts with dot are regarded as a - * hidden directory, and by default are not included. Set this option to true to include hidden - * directories in the file consumer. - */ - public fun includeHiddenDirs(includeHiddenDirs: String) { - it.property("includeHiddenDirs", includeHiddenDirs) - } - - /** - * Whether to accept hidden directories. Directories which names starts with dot are regarded as a - * hidden directory, and by default are not included. Set this option to true to include hidden - * directories in the file consumer. - */ - public fun includeHiddenDirs(includeHiddenDirs: Boolean) { - it.property("includeHiddenDirs", includeHiddenDirs.toString()) - } - - /** - * Whether to accept hidden files. Files which names starts with dot is regarded as a hidden file, - * and by default not included. Set this option to true to include hidden files in the file consumer. - */ - public fun includeHiddenFiles(includeHiddenFiles: String) { - it.property("includeHiddenFiles", includeHiddenFiles) - } - - /** - * Whether to accept hidden files. Files which names starts with dot is regarded as a hidden file, - * and by default not included. Set this option to true to include hidden files in the file consumer. - */ - public fun includeHiddenFiles(includeHiddenFiles: Boolean) { - it.property("includeHiddenFiles", includeHiddenFiles.toString()) - } - - /** - * A pluggable in-progress repository org.apache.camel.spi.IdempotentRepository. The in-progress - * repository is used to account the current in progress files being consumed. By default a memory - * based repository is used. - */ - public fun inProgressRepository(inProgressRepository: String) { - it.property("inProgressRepository", inProgressRepository) - } - - /** - * When consuming, a local work directory can be used to store the remote file content directly in - * local files, to avoid loading the content into memory. This is beneficial, if you consume a very - * big remote file and thus can conserve memory. - */ - public fun localWorkDirectory(localWorkDirectory: String) { - it.property("localWorkDirectory", localWorkDirectory) - } - - /** - * To use a custom org.apache.camel.spi.ExceptionHandler to handle any thrown exceptions that - * happens during the file on completion process where the consumer does either a commit or rollback. - * The default implementation will log any exception at WARN level and ignore. - */ - public fun onCompletionExceptionHandler(onCompletionExceptionHandler: String) { - it.property("onCompletionExceptionHandler", onCompletionExceptionHandler) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Whether to enable probing of the content type. If enable then the consumer uses - * Files#probeContentType(java.nio.file.Path) to determine the content-type of the file, and store - * that as a header with key Exchange#FILE_CONTENT_TYPE on the Message. - */ - public fun probeContentType(probeContentType: String) { - it.property("probeContentType", probeContentType) - } - - /** - * Whether to enable probing of the content type. If enable then the consumer uses - * Files#probeContentType(java.nio.file.Path) to determine the content-type of the file, and store - * that as a header with key Exchange#FILE_CONTENT_TYPE on the Message. - */ - public fun probeContentType(probeContentType: Boolean) { - it.property("probeContentType", probeContentType.toString()) - } - - /** - * A pluggable org.apache.camel.component.file.GenericFileProcessStrategy allowing you to - * implement your own readLock option or similar. Can also be used when special conditions must be - * met before a file can be consumed, such as a special ready file exists. If this option is set then - * the readLock option does not apply. - */ - public fun processStrategy(processStrategy: String) { - it.property("processStrategy", processStrategy) - } - - /** - * Whether the starting directory must exist. Mind that the autoCreate option is default enabled, - * which means the starting directory is normally auto created if it doesn't exist. You can disable - * autoCreate and enable this to ensure the starting directory must exist. Will throw an exception if - * the directory doesn't exist. - */ - public fun startingDirectoryMustExist(startingDirectoryMustExist: String) { - it.property("startingDirectoryMustExist", startingDirectoryMustExist) - } - - /** - * Whether the starting directory must exist. Mind that the autoCreate option is default enabled, - * which means the starting directory is normally auto created if it doesn't exist. You can disable - * autoCreate and enable this to ensure the starting directory must exist. Will throw an exception if - * the directory doesn't exist. - */ - public fun startingDirectoryMustExist(startingDirectoryMustExist: Boolean) { - it.property("startingDirectoryMustExist", startingDirectoryMustExist.toString()) - } - - /** - * Whether the starting directory has access permissions. Mind that the startingDirectoryMustExist - * parameter must be set to true to verify that the directory exists. Will throw an exception if the - * directory doesn't have read and write permissions. - */ - public fun startingDirectoryMustHaveAccess(startingDirectoryMustHaveAccess: String) { - it.property("startingDirectoryMustHaveAccess", startingDirectoryMustHaveAccess) - } - - /** - * Whether the starting directory has access permissions. Mind that the startingDirectoryMustExist - * parameter must be set to true to verify that the directory exists. Will throw an exception if the - * directory doesn't have read and write permissions. - */ - public fun startingDirectoryMustHaveAccess(startingDirectoryMustHaveAccess: Boolean) { - it.property("startingDirectoryMustHaveAccess", startingDirectoryMustHaveAccess.toString()) - } - - /** - * Used to append characters (text) after writing files. This can for example be used to add new - * lines or other separators when writing and appending new files or existing files. To specify - * new-line (slash-n or slash-r) or tab (slash-t) characters then escape with an extra slash, eg - * slash-slash-n. - */ - public fun appendChars(appendChars: String) { - it.property("appendChars", appendChars) - } - - /** - * If provided, then Camel will write a checksum file when the original file has been written. The - * checksum file will contain the checksum created with the provided algorithm for the original file. - * The checksum file will always be written in the same folder as the original file. - */ - public fun checksumFileAlgorithm(checksumFileAlgorithm: String) { - it.property("checksumFileAlgorithm", checksumFileAlgorithm) - } - - /** - * What to do if a file already exists with the same name. Override, which is the default, - * replaces the existing file. - Append - adds content to the existing file. - Fail - throws a - * GenericFileOperationException, indicating that there is already an existing file. - Ignore - - * silently ignores the problem and does not override the existing file, but assumes everything is - * okay. - Move - option requires to use the moveExisting option to be configured as well. The option - * eagerDeleteTargetFile can be used to control what to do if an moving the file, and there exists - * already an existing file, otherwise causing the move operation to fail. The Move option will move - * any existing files, before writing the target file. - TryRename is only applicable if tempFileName - * option is in use. This allows to try renaming the file from the temporary name to the actual name, - * without doing any exists check. This check may be faster on some file systems and especially FTP - * servers. - */ - public fun fileExist(fileExist: String) { - it.property("fileExist", fileExist) - } - - /** - * Flatten is used to flatten the file name path to strip any leading paths, so it's just the file - * name. This allows you to consume recursively into sub-directories, but when you eg write the files - * to another directory they will be written in a single directory. Setting this to true on the - * producer enforces that any file name in CamelFileName header will be stripped for any leading - * paths. - */ - public fun flatten(flatten: String) { - it.property("flatten", flatten) - } - - /** - * Flatten is used to flatten the file name path to strip any leading paths, so it's just the file - * name. This allows you to consume recursively into sub-directories, but when you eg write the files - * to another directory they will be written in a single directory. Setting this to true on the - * producer enforces that any file name in CamelFileName header will be stripped for any leading - * paths. - */ - public fun flatten(flatten: Boolean) { - it.property("flatten", flatten.toString()) - } - - /** - * Used for jailing (restricting) writing files to the starting directory (and sub) only. This is - * enabled by default to not allow Camel to write files to outside directories (to be more secured - * out of the box). You can turn this off to allow writing files to directories outside the starting - * directory, such as parent or root folders. - */ - public fun jailStartingDirectory(jailStartingDirectory: String) { - it.property("jailStartingDirectory", jailStartingDirectory) - } - - /** - * Used for jailing (restricting) writing files to the starting directory (and sub) only. This is - * enabled by default to not allow Camel to write files to outside directories (to be more secured - * out of the box). You can turn this off to allow writing files to directories outside the starting - * directory, such as parent or root folders. - */ - public fun jailStartingDirectory(jailStartingDirectory: Boolean) { - it.property("jailStartingDirectory", jailStartingDirectory.toString()) - } - - /** - * Expression (such as File Language) used to compute file name to use when fileExist=Move is - * configured. To move files into a backup subdirectory just enter backup. This option only supports - * the following File Language tokens: file:name, file:name.ext, file:name.noext, file:onlyname, - * file:onlyname.noext, file:ext, and file:parent. Notice the file:parent is not supported by the FTP - * component, as the FTP component can only move any existing files to a relative directory based on - * current dir as base. - */ - public fun moveExisting(moveExisting: String) { - it.property("moveExisting", moveExisting) - } - - /** - * The same as tempPrefix option but offering a more fine grained control on the naming of the - * temporary filename as it uses the File Language. The location for tempFilename is relative to the - * final file location in the option 'fileName', not the target directory in the base uri. For - * example if option fileName includes a directory prefix: dir/finalFilename then tempFileName is - * relative to that subdirectory dir. - */ - public fun tempFileName(tempFileName: String) { - it.property("tempFileName", tempFileName) - } - - /** - * This option is used to write the file using a temporary name and then, after the write is - * complete, rename it to the real name. Can be used to identify files being written and also avoid - * consumers (not using exclusive read locks) reading in progress files. Is often used by FTP when - * uploading big files. - */ - public fun tempPrefix(tempPrefix: String) { - it.property("tempPrefix", tempPrefix) - } - - /** - * Used to specify if a null body is allowed during file writing. If set to true then an empty - * file will be created, when set to false, and attempting to send a null body to the file component, - * a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist - * option is set to 'Override', then the file will be truncated, and if set to append the file will - * remain unchanged. - */ - public fun allowNullBody(allowNullBody: String) { - it.property("allowNullBody", allowNullBody) - } - - /** - * Used to specify if a null body is allowed during file writing. If set to true then an empty - * file will be created, when set to false, and attempting to send a null body to the file component, - * a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist - * option is set to 'Override', then the file will be truncated, and if set to append the file will - * remain unchanged. - */ - public fun allowNullBody(allowNullBody: Boolean) { - it.property("allowNullBody", allowNullBody.toString()) - } - - /** - * Specify the file permissions that are sent by the producer, the chmod value must be between 000 - * and 777; If there is a leading digit like in 0755, we will ignore it. - */ - public fun chmod(chmod: String) { - it.property("chmod", chmod) - } - - /** - * Specify the directory permissions used when the producer creates missing directories, the chmod - * value must be between 000 and 777; If there is a leading digit like in 0755, we will ignore it. - */ - public fun chmodDirectory(chmodDirectory: String) { - it.property("chmodDirectory", chmodDirectory) - } - - /** - * Whether or not to eagerly delete any existing target file. This option only applies when you - * use fileExists=Override and the tempFileName option as well. You can use this to disable (set it - * to false) deleting the target file before the temp file is written. For example you may write big - * files and want the target file to exists during the temp file is being written. This ensure the - * target file is only deleted until the very last moment, just before the temp file is being renamed - * to the target filename. This option is also used to control whether to delete any existing files - * when fileExist=Move is enabled, and an existing file exists. If this option - * copyAndDeleteOnRenameFails false, then an exception will be thrown if an existing file existed, if - * its true, then the existing file is deleted before the move operation. - */ - public fun eagerDeleteTargetFile(eagerDeleteTargetFile: String) { - it.property("eagerDeleteTargetFile", eagerDeleteTargetFile) - } - - /** - * Whether or not to eagerly delete any existing target file. This option only applies when you - * use fileExists=Override and the tempFileName option as well. You can use this to disable (set it - * to false) deleting the target file before the temp file is written. For example you may write big - * files and want the target file to exists during the temp file is being written. This ensure the - * target file is only deleted until the very last moment, just before the temp file is being renamed - * to the target filename. This option is also used to control whether to delete any existing files - * when fileExist=Move is enabled, and an existing file exists. If this option - * copyAndDeleteOnRenameFails false, then an exception will be thrown if an existing file existed, if - * its true, then the existing file is deleted before the move operation. - */ - public fun eagerDeleteTargetFile(eagerDeleteTargetFile: Boolean) { - it.property("eagerDeleteTargetFile", eagerDeleteTargetFile.toString()) - } - - /** - * Whether to force syncing, writes to the file system. You can turn this off if you do not want - * this level of guarantee, for example, if writing to logs / audit logs etc.; this would yield - * better performance. - */ - public fun forceWrites(forceWrites: String) { - it.property("forceWrites", forceWrites) - } - - /** - * Whether to force syncing, writes to the file system. You can turn this off if you do not want - * this level of guarantee, for example, if writing to logs / audit logs etc.; this would yield - * better performance. - */ - public fun forceWrites(forceWrites: Boolean) { - it.property("forceWrites", forceWrites.toString()) - } - - /** - * Will keep the last modified timestamp from the source file (if any). Will use the - * FileConstants.FILE_LAST_MODIFIED header to located the timestamp. This header can contain either a - * java.util.Date or long with the timestamp. If the timestamp exists and the option is enabled it - * will set this timestamp on the written file. Note: This option only applies to the file producer. - * You cannot use this option with any of the ftp producers. - */ - public fun keepLastModified(keepLastModified: String) { - it.property("keepLastModified", keepLastModified) - } - - /** - * Will keep the last modified timestamp from the source file (if any). Will use the - * FileConstants.FILE_LAST_MODIFIED header to located the timestamp. This header can contain either a - * java.util.Date or long with the timestamp. If the timestamp exists and the option is enabled it - * will set this timestamp on the written file. Note: This option only applies to the file producer. - * You cannot use this option with any of the ftp producers. - */ - public fun keepLastModified(keepLastModified: Boolean) { - it.property("keepLastModified", keepLastModified.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Strategy (Custom Strategy) used to move file with special naming token to use when - * fileExist=Move is configured. By default, there is an implementation used if no custom strategy is - * provided - */ - public fun moveExistingFileStrategy(moveExistingFileStrategy: String) { - it.property("moveExistingFileStrategy", moveExistingFileStrategy) - } - - /** - * Automatically create missing directories in the file's pathname. For the file consumer, that - * means creating the starting directory. For the file producer, it means the directory the files - * should be written to. - */ - public fun autoCreate(autoCreate: String) { - it.property("autoCreate", autoCreate) - } - - /** - * Automatically create missing directories in the file's pathname. For the file consumer, that - * means creating the starting directory. For the file producer, it means the directory the files - * should be written to. - */ - public fun autoCreate(autoCreate: Boolean) { - it.property("autoCreate", autoCreate.toString()) - } - - /** - * Buffer size in bytes used for writing files (or in case of FTP for downloading and uploading - * files). - */ - public fun bufferSize(bufferSize: String) { - it.property("bufferSize", bufferSize) - } - - /** - * Buffer size in bytes used for writing files (or in case of FTP for downloading and uploading - * files). - */ - public fun bufferSize(bufferSize: Int) { - it.property("bufferSize", bufferSize.toString()) - } - - /** - * Whether to fall back and do a copy and delete file, in case the file could not be renamed - * directly. This option is not available for the FTP component. - */ - public fun copyAndDeleteOnRenameFail(copyAndDeleteOnRenameFail: String) { - it.property("copyAndDeleteOnRenameFail", copyAndDeleteOnRenameFail) - } - - /** - * Whether to fall back and do a copy and delete file, in case the file could not be renamed - * directly. This option is not available for the FTP component. - */ - public fun copyAndDeleteOnRenameFail(copyAndDeleteOnRenameFail: Boolean) { - it.property("copyAndDeleteOnRenameFail", copyAndDeleteOnRenameFail.toString()) - } - - /** - * Perform rename operations using a copy and delete strategy. This is primarily used in - * environments where the regular rename operation is unreliable (e.g., across different file systems - * or networks). This option takes precedence over the copyAndDeleteOnRenameFail parameter that will - * automatically fall back to the copy and delete strategy, but only after additional delays. - */ - public fun renameUsingCopy(renameUsingCopy: String) { - it.property("renameUsingCopy", renameUsingCopy) - } - - /** - * Perform rename operations using a copy and delete strategy. This is primarily used in - * environments where the regular rename operation is unreliable (e.g., across different file systems - * or networks). This option takes precedence over the copyAndDeleteOnRenameFail parameter that will - * automatically fall back to the copy and delete strategy, but only after additional delays. - */ - public fun renameUsingCopy(renameUsingCopy: Boolean) { - it.property("renameUsingCopy", renameUsingCopy.toString()) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * Ant style filter exclusion. If both antInclude and antExclude are used, antExclude takes - * precedence over antInclude. Multiple exclusions may be specified in comma-delimited format. - */ - public fun antExclude(antExclude: String) { - it.property("antExclude", antExclude) - } - - /** - * Sets case sensitive flag on ant filter. - */ - public fun antFilterCaseSensitive(antFilterCaseSensitive: String) { - it.property("antFilterCaseSensitive", antFilterCaseSensitive) - } - - /** - * Sets case sensitive flag on ant filter. - */ - public fun antFilterCaseSensitive(antFilterCaseSensitive: Boolean) { - it.property("antFilterCaseSensitive", antFilterCaseSensitive.toString()) - } - - /** - * Ant style filter inclusion. Multiple inclusions may be specified in comma-delimited format. - */ - public fun antInclude(antInclude: String) { - it.property("antInclude", antInclude) - } - - /** - * Allows for controlling whether the limit from maxMessagesPerPoll is eager or not. If eager then - * the limit is during the scanning of files. Where as false would scan all files, and then perform - * sorting. Setting this option to false allows for sorting all files first, and then limit the poll. - * Mind that this requires a higher memory usage as all file details are in memory to perform the - * sorting. - */ - public fun eagerMaxMessagesPerPoll(eagerMaxMessagesPerPoll: String) { - it.property("eagerMaxMessagesPerPoll", eagerMaxMessagesPerPoll) - } - - /** - * Allows for controlling whether the limit from maxMessagesPerPoll is eager or not. If eager then - * the limit is during the scanning of files. Where as false would scan all files, and then perform - * sorting. Setting this option to false allows for sorting all files first, and then limit the poll. - * Mind that this requires a higher memory usage as all file details are in memory to perform the - * sorting. - */ - public fun eagerMaxMessagesPerPoll(eagerMaxMessagesPerPoll: Boolean) { - it.property("eagerMaxMessagesPerPoll", eagerMaxMessagesPerPoll.toString()) - } - - /** - * Is used to exclude files, if filename matches the regex pattern (matching is case - * in-sensitive). Notice if you use symbols such as plus sign and others you would need to configure - * this using the RAW() syntax if configuring this as an endpoint uri. See more details at - * configuring endpoint uris - */ - public fun exclude(exclude: String) { - it.property("exclude", exclude) - } - - /** - * Is used to exclude files matching file extension name (case insensitive). For example to - * exclude bak files, then use excludeExt=bak. Multiple extensions can be separated by comma, for - * example to exclude bak and dat files, use excludeExt=bak,dat. Note that the file extension - * includes all parts, for example having a file named mydata.tar.gz will have extension as tar.gz. - * For more flexibility then use the include/exclude options. - */ - public fun excludeExt(excludeExt: String) { - it.property("excludeExt", excludeExt) - } - - /** - * Pluggable filter as a org.apache.camel.component.file.GenericFileFilter class. Will skip files - * if filter returns false in its accept() method. - */ - public fun filter(filter: String) { - it.property("filter", filter) - } - - /** - * Filters the directory based on Simple language. For example to filter on current date, you can - * use a simple date pattern such as ${date:now:yyyMMdd} - */ - public fun filterDirectory(filterDirectory: String) { - it.property("filterDirectory", filterDirectory) - } - - /** - * Filters the file based on Simple language. For example to filter on file size, you can use - * ${file:size} 5000 - */ - public fun filterFile(filterFile: String) { - it.property("filterFile", filterFile) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotent(idempotent: String) { - it.property("idempotent", idempotent) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotent(idempotent: Boolean) { - it.property("idempotent", idempotent.toString()) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotentEager(idempotentEager: String) { - it.property("idempotentEager", idempotentEager) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotentEager(idempotentEager: Boolean) { - it.property("idempotentEager", idempotentEager.toString()) - } - - /** - * To use a custom idempotent key. By default the absolute path of the file is used. You can use - * the File Language, for example to use the file name and file size, you can do: - * idempotentKey=${file:name}-${file:size} - */ - public fun idempotentKey(idempotentKey: String) { - it.property("idempotentKey", idempotentKey) - } - - /** - * A pluggable repository org.apache.camel.spi.IdempotentRepository which by default use - * MemoryIdempotentRepository if none is specified and idempotent is true. - */ - public fun idempotentRepository(idempotentRepository: String) { - it.property("idempotentRepository", idempotentRepository) - } - - /** - * Is used to include files, if filename matches the regex pattern (matching is case - * in-sensitive). Notice if you use symbols such as plus sign and others you would need to configure - * this using the RAW() syntax if configuring this as an endpoint uri. See more details at - * configuring endpoint uris - */ - public fun include(include: String) { - it.property("include", include) - } - - /** - * Is used to include files matching file extension name (case insensitive). For example to - * include txt files, then use includeExt=txt. Multiple extensions can be separated by comma, for - * example to include txt and xml files, use includeExt=txt,xml. Note that the file extension - * includes all parts, for example having a file named mydata.tar.gz will have extension as tar.gz. - * For more flexibility then use the include/exclude options. - */ - public fun includeExt(includeExt: String) { - it.property("includeExt", includeExt) - } - - /** - * The maximum depth to traverse when recursively processing a directory. - */ - public fun maxDepth(maxDepth: String) { - it.property("maxDepth", maxDepth) - } - - /** - * The maximum depth to traverse when recursively processing a directory. - */ - public fun maxDepth(maxDepth: Int) { - it.property("maxDepth", maxDepth.toString()) - } - - /** - * To define a maximum messages to gather per poll. By default no maximum is set. Can be used to - * set a limit of e.g. 1000 to avoid when starting up the server that there are thousands of files. - * Set a value of 0 or negative to disabled it. Notice: If this option is in use then the File and - * FTP components will limit before any sorting. For example if you have 100000 files and use - * maxMessagesPerPoll=500, then only the first 500 files will be picked up, and then sorted. You can - * use the eagerMaxMessagesPerPoll option and set this to false to allow to scan all files first and - * then sort afterwards. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * To define a maximum messages to gather per poll. By default no maximum is set. Can be used to - * set a limit of e.g. 1000 to avoid when starting up the server that there are thousands of files. - * Set a value of 0 or negative to disabled it. Notice: If this option is in use then the File and - * FTP components will limit before any sorting. For example if you have 100000 files and use - * maxMessagesPerPoll=500, then only the first 500 files will be picked up, and then sorted. You can - * use the eagerMaxMessagesPerPoll option and set this to false to allow to scan all files first and - * then sort afterwards. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * The minimum depth to start processing when recursively processing a directory. Using minDepth=1 - * means the base directory. Using minDepth=2 means the first sub directory. - */ - public fun minDepth(minDepth: String) { - it.property("minDepth", minDepth) - } - - /** - * The minimum depth to start processing when recursively processing a directory. Using minDepth=1 - * means the base directory. Using minDepth=2 means the first sub directory. - */ - public fun minDepth(minDepth: Int) { - it.property("minDepth", minDepth.toString()) - } - - /** - * Expression (such as Simple Language) used to dynamically set the filename when moving it after - * processing. To move files into a .done subdirectory just enter .done. - */ - public fun move(move: String) { - it.property("move", move) - } - - /** - * Pluggable read-lock as a org.apache.camel.component.file.GenericFileExclusiveReadLockStrategy - * implementation. - */ - public fun exclusiveReadLockStrategy(exclusiveReadLockStrategy: String) { - it.property("exclusiveReadLockStrategy", exclusiveReadLockStrategy) - } - - /** - * Used by consumer, to only poll the files if it has exclusive read-lock on the file (i.e. the - * file is not in-progress or being written). Camel will wait until the file lock is granted. This - * option provides the build in strategies: - none - No read lock is in use - markerFile - Camel - * creates a marker file (fileName.camelLock) and then holds a lock on it. This option is not - * available for the FTP component - changed - Changed is using file length/modification timestamp to - * detect whether the file is currently being copied or not. Will at least use 1 sec to determine - * this, so this option cannot consume files as fast as the others, but can be more reliable as the - * JDK IO API cannot always determine whether a file is currently being used by another process. The - * option readLockCheckInterval can be used to set the check frequency. - fileLock - is for using - * java.nio.channels.FileLock. This option is not avail for Windows OS and the FTP component. This - * approach should be avoided when accessing a remote file system via a mount/share unless that file - * system supports distributed file locks. - rename - rename is for using a try to rename the file as - * a test if we can get exclusive read-lock. - idempotent - (only for file component) idempotent is - * for using a idempotentRepository as the read-lock. This allows to use read locks that supports - * clustering if the idempotent repository implementation supports that. - idempotent-changed - (only - * for file component) idempotent-changed is for using a idempotentRepository and changed as the - * combined read-lock. This allows to use read locks that supports clustering if the idempotent - * repository implementation supports that. - idempotent-rename - (only for file component) - * idempotent-rename is for using a idempotentRepository and rename as the combined read-lock. This - * allows to use read locks that supports clustering if the idempotent repository implementation - * supports that.Notice: The various read locks is not all suited to work in clustered mode, where - * concurrent consumers on different nodes is competing for the same files on a shared file system. - * The markerFile using a close to atomic operation to create the empty marker file, but its not - * guaranteed to work in a cluster. The fileLock may work better but then the file system need to - * support distributed file locks, and so on. Using the idempotent read lock can support clustering - * if the idempotent repository supports clustering, such as Hazelcast Component or Infinispan. - */ - public fun readLock(readLock: String) { - it.property("readLock", readLock) - } - - /** - * Interval in millis for the read-lock, if supported by the read lock. This interval is used for - * sleeping between attempts to acquire the read lock. For example when using the changed read lock, - * you can set a higher interval period to cater for slow writes. The default of 1 sec. may be too - * fast if the producer is very slow writing the file. Notice: For FTP the default - * readLockCheckInterval is 5000. The readLockTimeout value must be higher than - * readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or more times - * higher than the readLockCheckInterval. This is needed to ensure that ample time is allowed for the - * read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockCheckInterval(readLockCheckInterval: String) { - it.property("readLockCheckInterval", readLockCheckInterval) - } - - /** - * Interval in millis for the read-lock, if supported by the read lock. This interval is used for - * sleeping between attempts to acquire the read lock. For example when using the changed read lock, - * you can set a higher interval period to cater for slow writes. The default of 1 sec. may be too - * fast if the producer is very slow writing the file. Notice: For FTP the default - * readLockCheckInterval is 5000. The readLockTimeout value must be higher than - * readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or more times - * higher than the readLockCheckInterval. This is needed to ensure that ample time is allowed for the - * read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockCheckInterval(readLockCheckInterval: Int) { - it.property("readLockCheckInterval", readLockCheckInterval.toString()) - } - - /** - * Whether or not read lock with marker files should upon startup delete any orphan read lock - * files, which may have been left on the file system, if Camel was not properly shutdown (such as a - * JVM crash). If turning this option to false then any orphaned lock file will cause Camel to not - * attempt to pickup that file, this could also be due another node is concurrently reading files - * from the same shared directory. - */ - public fun readLockDeleteOrphanLockFiles(readLockDeleteOrphanLockFiles: String) { - it.property("readLockDeleteOrphanLockFiles", readLockDeleteOrphanLockFiles) - } - - /** - * Whether or not read lock with marker files should upon startup delete any orphan read lock - * files, which may have been left on the file system, if Camel was not properly shutdown (such as a - * JVM crash). If turning this option to false then any orphaned lock file will cause Camel to not - * attempt to pickup that file, this could also be due another node is concurrently reading files - * from the same shared directory. - */ - public fun readLockDeleteOrphanLockFiles(readLockDeleteOrphanLockFiles: Boolean) { - it.property("readLockDeleteOrphanLockFiles", readLockDeleteOrphanLockFiles.toString()) - } - - /** - * Whether the delayed release task should be synchronous or asynchronous. See more details at the - * readLockIdempotentReleaseDelay option. - */ - public fun readLockIdempotentReleaseAsync(readLockIdempotentReleaseAsync: String) { - it.property("readLockIdempotentReleaseAsync", readLockIdempotentReleaseAsync) - } - - /** - * Whether the delayed release task should be synchronous or asynchronous. See more details at the - * readLockIdempotentReleaseDelay option. - */ - public fun readLockIdempotentReleaseAsync(readLockIdempotentReleaseAsync: Boolean) { - it.property("readLockIdempotentReleaseAsync", readLockIdempotentReleaseAsync.toString()) - } - - /** - * The number of threads in the scheduled thread pool when using asynchronous release tasks. Using - * a default of 1 core threads should be sufficient in almost all use-cases, only set this to a - * higher value if either updating the idempotent repository is slow, or there are a lot of files to - * process. This option is not in-use if you use a shared thread pool by configuring the - * readLockIdempotentReleaseExecutorService option. See more details at the - * readLockIdempotentReleaseDelay option. - */ - public - fun readLockIdempotentReleaseAsyncPoolSize(readLockIdempotentReleaseAsyncPoolSize: String) { - it.property("readLockIdempotentReleaseAsyncPoolSize", readLockIdempotentReleaseAsyncPoolSize) - } - - /** - * The number of threads in the scheduled thread pool when using asynchronous release tasks. Using - * a default of 1 core threads should be sufficient in almost all use-cases, only set this to a - * higher value if either updating the idempotent repository is slow, or there are a lot of files to - * process. This option is not in-use if you use a shared thread pool by configuring the - * readLockIdempotentReleaseExecutorService option. See more details at the - * readLockIdempotentReleaseDelay option. - */ - public fun readLockIdempotentReleaseAsyncPoolSize(readLockIdempotentReleaseAsyncPoolSize: Int) { - it.property("readLockIdempotentReleaseAsyncPoolSize", - readLockIdempotentReleaseAsyncPoolSize.toString()) - } - - /** - * Whether to delay the release task for a period of millis. This can be used to delay the release - * tasks to expand the window when a file is regarded as read-locked, in an active/active cluster - * scenario with a shared idempotent repository, to ensure other nodes cannot potentially scan and - * acquire the same file, due to race-conditions. By expanding the time-window of the release tasks - * helps prevents these situations. Note delaying is only needed if you have configured - * readLockRemoveOnCommit to true. - */ - public fun readLockIdempotentReleaseDelay(readLockIdempotentReleaseDelay: String) { - it.property("readLockIdempotentReleaseDelay", readLockIdempotentReleaseDelay) - } - - /** - * Whether to delay the release task for a period of millis. This can be used to delay the release - * tasks to expand the window when a file is regarded as read-locked, in an active/active cluster - * scenario with a shared idempotent repository, to ensure other nodes cannot potentially scan and - * acquire the same file, due to race-conditions. By expanding the time-window of the release tasks - * helps prevents these situations. Note delaying is only needed if you have configured - * readLockRemoveOnCommit to true. - */ - public fun readLockIdempotentReleaseDelay(readLockIdempotentReleaseDelay: Int) { - it.property("readLockIdempotentReleaseDelay", readLockIdempotentReleaseDelay.toString()) - } - - /** - * To use a custom and shared thread pool for asynchronous release tasks. See more details at the - * readLockIdempotentReleaseDelay option. - */ - public - fun readLockIdempotentReleaseExecutorService(readLockIdempotentReleaseExecutorService: String) { - it.property("readLockIdempotentReleaseExecutorService", - readLockIdempotentReleaseExecutorService) - } - - /** - * Logging level used when a read lock could not be acquired. By default a DEBUG is logged. You - * can change this level, for example to OFF to not have any logging. This option is only applicable - * for readLock of types: changed, fileLock, idempotent, idempotent-changed, idempotent-rename, - * rename. - */ - public fun readLockLoggingLevel(readLockLoggingLevel: String) { - it.property("readLockLoggingLevel", readLockLoggingLevel) - } - - /** - * Whether to use marker file with the changed, rename, or exclusive read lock types. By default a - * marker file is used as well to guard against other processes picking up the same files. This - * behavior can be turned off by setting this option to false. For example if you do not want to - * write marker files to the file systems by the Camel application. - */ - public fun readLockMarkerFile(readLockMarkerFile: String) { - it.property("readLockMarkerFile", readLockMarkerFile) - } - - /** - * Whether to use marker file with the changed, rename, or exclusive read lock types. By default a - * marker file is used as well to guard against other processes picking up the same files. This - * behavior can be turned off by setting this option to false. For example if you do not want to - * write marker files to the file systems by the Camel application. - */ - public fun readLockMarkerFile(readLockMarkerFile: Boolean) { - it.property("readLockMarkerFile", readLockMarkerFile.toString()) - } - - /** - * This option is applied only for readLock=changed. It allows to specify a minimum age the file - * must be before attempting to acquire the read lock. For example use readLockMinAge=300s to require - * the file is at last 5 minutes old. This can speedup the changed read lock as it will only attempt - * to acquire files which are at least that given age. - */ - public fun readLockMinAge(readLockMinAge: String) { - it.property("readLockMinAge", readLockMinAge) - } - - /** - * This option is applied only for readLock=changed. It allows to specify a minimum age the file - * must be before attempting to acquire the read lock. For example use readLockMinAge=300s to require - * the file is at last 5 minutes old. This can speedup the changed read lock as it will only attempt - * to acquire files which are at least that given age. - */ - public fun readLockMinAge(readLockMinAge: Int) { - it.property("readLockMinAge", readLockMinAge.toString()) - } - - /** - * This option is applied only for readLock=changed. It allows you to configure a minimum file - * length. By default Camel expects the file to contain data, and thus the default value is 1. You - * can set this option to zero, to allow consuming zero-length files. - */ - public fun readLockMinLength(readLockMinLength: String) { - it.property("readLockMinLength", readLockMinLength) - } - - /** - * This option is applied only for readLock=changed. It allows you to configure a minimum file - * length. By default Camel expects the file to contain data, and thus the default value is 1. You - * can set this option to zero, to allow consuming zero-length files. - */ - public fun readLockMinLength(readLockMinLength: Int) { - it.property("readLockMinLength", readLockMinLength.toString()) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file is succeeded and a commit - * happens. By default the file is not removed which ensures that any race-condition do not occur so - * another active node may attempt to grab the file. Instead the idempotent repository may support - * eviction strategies that you can configure to evict the file name entry after X minutes - this - * ensures no problems with race conditions. See more details at the readLockIdempotentReleaseDelay - * option. - */ - public fun readLockRemoveOnCommit(readLockRemoveOnCommit: String) { - it.property("readLockRemoveOnCommit", readLockRemoveOnCommit) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file is succeeded and a commit - * happens. By default the file is not removed which ensures that any race-condition do not occur so - * another active node may attempt to grab the file. Instead the idempotent repository may support - * eviction strategies that you can configure to evict the file name entry after X minutes - this - * ensures no problems with race conditions. See more details at the readLockIdempotentReleaseDelay - * option. - */ - public fun readLockRemoveOnCommit(readLockRemoveOnCommit: Boolean) { - it.property("readLockRemoveOnCommit", readLockRemoveOnCommit.toString()) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file failed and a rollback - * happens. If this option is false, then the file name entry is confirmed (as if the file did a - * commit). - */ - public fun readLockRemoveOnRollback(readLockRemoveOnRollback: String) { - it.property("readLockRemoveOnRollback", readLockRemoveOnRollback) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file failed and a rollback - * happens. If this option is false, then the file name entry is confirmed (as if the file did a - * commit). - */ - public fun readLockRemoveOnRollback(readLockRemoveOnRollback: Boolean) { - it.property("readLockRemoveOnRollback", readLockRemoveOnRollback.toString()) - } - - /** - * Optional timeout in millis for the read-lock, if supported by the read-lock. If the read-lock - * could not be granted and the timeout triggered, then Camel will skip the file. At next poll Camel, - * will try the file again, and this time maybe the read-lock could be granted. Use a value of 0 or - * lower to indicate forever. Currently fileLock, changed and rename support the timeout. Notice: For - * FTP the default readLockTimeout value is 20000 instead of 10000. The readLockTimeout value must be - * higher than readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or - * more times higher than the readLockCheckInterval. This is needed to ensure that ample time is - * allowed for the read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockTimeout(readLockTimeout: String) { - it.property("readLockTimeout", readLockTimeout) - } - - /** - * Optional timeout in millis for the read-lock, if supported by the read-lock. If the read-lock - * could not be granted and the timeout triggered, then Camel will skip the file. At next poll Camel, - * will try the file again, and this time maybe the read-lock could be granted. Use a value of 0 or - * lower to indicate forever. Currently fileLock, changed and rename support the timeout. Notice: For - * FTP the default readLockTimeout value is 20000 instead of 10000. The readLockTimeout value must be - * higher than readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or - * more times higher than the readLockCheckInterval. This is needed to ensure that ample time is - * allowed for the read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockTimeout(readLockTimeout: Int) { - it.property("readLockTimeout", readLockTimeout.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * To shuffle the list of files (sort in random order) - */ - public fun shuffle(shuffle: String) { - it.property("shuffle", shuffle) - } - - /** - * To shuffle the list of files (sort in random order) - */ - public fun shuffle(shuffle: Boolean) { - it.property("shuffle", shuffle.toString()) - } - - /** - * Built-in sort by using the File Language. Supports nested sorts, so you can have a sort by file - * name and as a 2nd group sort by modified date. - */ - public fun sortBy(sortBy: String) { - it.property("sortBy", sortBy) - } - - /** - * Pluggable sorter as a java.util.Comparator class. - */ - public fun sorter(sorter: String) { - it.property("sorter", sorter) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FileWatchUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FileWatchUriDsl.kt deleted file mode 100644 index 0bb23ac9a73fd..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FileWatchUriDsl.kt +++ /dev/null @@ -1,216 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Get notified about file events in a directory using java.nio.file.WatchService. - */ -public fun UriDsl.`file-watch`(i: FileWatchUriDsl.() -> Unit) { - FileWatchUriDsl(this).apply(i) -} - -@CamelDslMarker -public class FileWatchUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("file-watch") - } - - private var path: String = "" - - /** - * Path of directory to consume events from. - */ - public fun path(path: String) { - this.path = path - it.url("$path") - } - - /** - * ANT style pattern to match files. The file is matched against path relative to endpoint path. - * Pattern must be also relative (not starting with slash) - */ - public fun antInclude(antInclude: String) { - it.property("antInclude", antInclude) - } - - /** - * Auto create directory if does not exist. - */ - public fun autoCreate(autoCreate: String) { - it.property("autoCreate", autoCreate) - } - - /** - * Auto create directory if does not exist. - */ - public fun autoCreate(autoCreate: Boolean) { - it.property("autoCreate", autoCreate.toString()) - } - - /** - * Comma separated list of events to watch. Possible values: CREATE,MODIFY,DELETE - */ - public fun events(events: String) { - it.property("events", events) - } - - /** - * Watch recursive in current and child directories (including newly created directories). - */ - public fun recursive(recursive: String) { - it.property("recursive", recursive) - } - - /** - * Watch recursive in current and child directories (including newly created directories). - */ - public fun recursive(recursive: Boolean) { - it.property("recursive", recursive.toString()) - } - - /** - * Enables or disables file hashing to detect duplicate events. If you disable this, you can get - * some events multiple times on some platforms and JDKs. Check java.nio.file.WatchService - * limitations for your target platform. - */ - public fun useFileHashing(useFileHashing: String) { - it.property("useFileHashing", useFileHashing) - } - - /** - * Enables or disables file hashing to detect duplicate events. If you disable this, you can get - * some events multiple times on some platforms and JDKs. Check java.nio.file.WatchService - * limitations for your target platform. - */ - public fun useFileHashing(useFileHashing: Boolean) { - it.property("useFileHashing", useFileHashing.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * The number of concurrent consumers. Increase this value, if your route is slow to prevent - * buffering in queue. - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * The number of concurrent consumers. Increase this value, if your route is slow to prevent - * buffering in queue. - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * Reference to io.methvin.watcher.hashing.FileHasher. This prevents emitting duplicate events on - * some platforms. For working with large files and if you dont need detect multiple modifications - * per second per file, use #lastModifiedTimeFileHasher. You can also provide custom implementation - * in registry. - */ - public fun fileHasher(fileHasher: String) { - it.property("fileHasher", fileHasher) - } - - /** - * The number of threads polling WatchService. Increase this value, if you see OVERFLOW messages - * in log. - */ - public fun pollThreads(pollThreads: String) { - it.property("pollThreads", pollThreads) - } - - /** - * The number of threads polling WatchService. Increase this value, if you see OVERFLOW messages - * in log. - */ - public fun pollThreads(pollThreads: Int) { - it.property("pollThreads", pollThreads.toString()) - } - - /** - * Maximum size of queue between WatchService and consumer. Unbounded by default. - */ - public fun queueSize(queueSize: String) { - it.property("queueSize", queueSize) - } - - /** - * Maximum size of queue between WatchService and consumer. Unbounded by default. - */ - public fun queueSize(queueSize: Int) { - it.property("queueSize", queueSize.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FlatpackUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FlatpackUriDsl.kt deleted file mode 100644 index fb6c1f0cd40c6..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FlatpackUriDsl.kt +++ /dev/null @@ -1,409 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Parse fixed width and delimited files using the FlatPack library. - */ -public fun UriDsl.flatpack(i: FlatpackUriDsl.() -> Unit) { - FlatpackUriDsl(this).apply(i) -} - -@CamelDslMarker -public class FlatpackUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("flatpack") - } - - private var type: String = "" - - private var resourceUri: String = "" - - /** - * Whether to use fixed or delimiter - */ - public fun type(type: String) { - this.type = type - it.url("$type:$resourceUri") - } - - /** - * URL for loading the flatpack mapping file from classpath or file system - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$type:$resourceUri") - } - - /** - * Allows for lines to be shorter than expected and ignores the extra characters - */ - public fun allowShortLines(allowShortLines: String) { - it.property("allowShortLines", allowShortLines) - } - - /** - * Allows for lines to be shorter than expected and ignores the extra characters - */ - public fun allowShortLines(allowShortLines: Boolean) { - it.property("allowShortLines", allowShortLines.toString()) - } - - /** - * The default character delimiter for delimited files. - */ - public fun delimiter(delimiter: String) { - it.property("delimiter", delimiter) - } - - /** - * Allows for lines to be longer than expected and ignores the extra characters - */ - public fun ignoreExtraColumns(ignoreExtraColumns: String) { - it.property("ignoreExtraColumns", ignoreExtraColumns) - } - - /** - * Allows for lines to be longer than expected and ignores the extra characters - */ - public fun ignoreExtraColumns(ignoreExtraColumns: Boolean) { - it.property("ignoreExtraColumns", ignoreExtraColumns.toString()) - } - - /** - * Whether the first line is ignored for delimited files (for the column headers). - */ - public fun ignoreFirstRecord(ignoreFirstRecord: String) { - it.property("ignoreFirstRecord", ignoreFirstRecord) - } - - /** - * Whether the first line is ignored for delimited files (for the column headers). - */ - public fun ignoreFirstRecord(ignoreFirstRecord: Boolean) { - it.property("ignoreFirstRecord", ignoreFirstRecord.toString()) - } - - /** - * Sets the Component to send each row as a separate exchange once parsed - */ - public fun splitRows(splitRows: String) { - it.property("splitRows", splitRows) - } - - /** - * Sets the Component to send each row as a separate exchange once parsed - */ - public fun splitRows(splitRows: Boolean) { - it.property("splitRows", splitRows.toString()) - } - - /** - * The text qualifier for delimited files. - */ - public fun textQualifier(textQualifier: String) { - it.property("textQualifier", textQualifier) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FlinkUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FlinkUriDsl.kt deleted file mode 100644 index ea78efd804f27..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FlinkUriDsl.kt +++ /dev/null @@ -1,118 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send DataSet jobs to an Apache Flink cluster. - */ -public fun UriDsl.flink(i: FlinkUriDsl.() -> Unit) { - FlinkUriDsl(this).apply(i) -} - -@CamelDslMarker -public class FlinkUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("flink") - } - - private var endpointType: String = "" - - /** - * Type of the endpoint (dataset, datastream). - */ - public fun endpointType(endpointType: String) { - this.endpointType = endpointType - it.url("$endpointType") - } - - /** - * Indicates if results should be collected or counted. - */ - public fun collect(collect: String) { - it.property("collect", collect) - } - - /** - * Indicates if results should be collected or counted. - */ - public fun collect(collect: Boolean) { - it.property("collect", collect.toString()) - } - - /** - * DataSet to compute against. - */ - public fun dataSet(dataSet: String) { - it.property("dataSet", dataSet) - } - - /** - * Function performing action against a DataSet. - */ - public fun dataSetCallback(dataSetCallback: String) { - it.property("dataSetCallback", dataSetCallback) - } - - /** - * DataStream to compute against. - */ - public fun dataStream(dataStream: String) { - it.property("dataStream", dataStream) - } - - /** - * Function performing action against a DataStream. - */ - public fun dataStreamCallback(dataStreamCallback: String) { - it.property("dataStreamCallback", dataStreamCallback) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FopUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FopUriDsl.kt deleted file mode 100644 index cc295b1e165c1..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FopUriDsl.kt +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Render messages into PDF and other output formats supported by Apache FOP. - */ -public fun UriDsl.fop(i: FopUriDsl.() -> Unit) { - FopUriDsl(this).apply(i) -} - -@CamelDslMarker -public class FopUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("fop") - } - - private var outputType: String = "" - - /** - * The primary output format is PDF but other output formats are also supported. - */ - public fun outputType(outputType: String) { - this.outputType = outputType - it.url("$outputType") - } - - /** - * Allows to use a custom configured or implementation of org.apache.fop.apps.FopFactory. - */ - public fun fopFactory(fopFactory: String) { - it.property("fopFactory", fopFactory) - } - - /** - * The location of a configuration file which can be loaded from classpath or file system. - */ - public fun userConfigURL(userConfigURL: String) { - it.property("userConfigURL", userConfigURL) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FreemarkerUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FreemarkerUriDsl.kt deleted file mode 100644 index 912da2c81cef5..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FreemarkerUriDsl.kt +++ /dev/null @@ -1,160 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Transform messages using FreeMarker templates. - */ -public fun UriDsl.freemarker(i: FreemarkerUriDsl.() -> Unit) { - FreemarkerUriDsl(this).apply(i) -} - -@CamelDslMarker -public class FreemarkerUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("freemarker") - } - - private var resourceUri: String = "" - - /** - * Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file - * and http loads the resource using these protocols (classpath is default). ref will lookup the - * resource in the registry. bean will call a method on a bean to be used as the resource. For bean - * you can specify the method name after dot, eg bean:myBean.myMethod. - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: String) { - it.property("allowContextMapAll", allowContextMapAll) - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: Boolean) { - it.property("allowContextMapAll", allowContextMapAll.toString()) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: String) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: Boolean) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader.toString()) - } - - /** - * Sets the Freemarker configuration to use - */ - public fun configuration(configuration: String) { - it.property("configuration", configuration) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * Sets the encoding to be used for loading the template file. - */ - public fun encoding(encoding: String) { - it.property("encoding", encoding) - } - - /** - * Number of seconds the loaded template resource will remain in the cache. - */ - public fun templateUpdateDelay(templateUpdateDelay: String) { - it.property("templateUpdateDelay", templateUpdateDelay) - } - - /** - * Number of seconds the loaded template resource will remain in the cache. - */ - public fun templateUpdateDelay(templateUpdateDelay: Int) { - it.property("templateUpdateDelay", templateUpdateDelay.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FtpUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FtpUriDsl.kt deleted file mode 100644 index 7ecdc4f3a73ae..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FtpUriDsl.kt +++ /dev/null @@ -1,1666 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Upload and download files to/from FTP servers. - */ -public fun UriDsl.ftp(i: FtpUriDsl.() -> Unit) { - FtpUriDsl(this).apply(i) -} - -@CamelDslMarker -public class FtpUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("ftp") - } - - private var host: String = "" - - private var port: String = "" - - private var directoryName: String = "" - - /** - * Hostname of the FTP server - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port/$directoryName") - } - - /** - * Port of the FTP server - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port/$directoryName") - } - - /** - * Port of the FTP server - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port/$directoryName") - } - - /** - * The starting directory - */ - public fun directoryName(directoryName: String) { - this.directoryName = directoryName - it.url("$host:$port/$directoryName") - } - - /** - * Specifies the file transfer mode, BINARY or ASCII. Default is ASCII (false). - */ - public fun binary(binary: String) { - it.property("binary", binary) - } - - /** - * Specifies the file transfer mode, BINARY or ASCII. Default is ASCII (false). - */ - public fun binary(binary: Boolean) { - it.property("binary", binary.toString()) - } - - /** - * This option is used to specify the encoding of the file. You can use this on the consumer, to - * specify the encodings of the files, which allow Camel to know the charset it should load the file - * content in case the file content is being accessed. Likewise when writing a file, you can use this - * option to specify which charset to write the file as well. Do mind that when writing the file - * Camel may have to read the message content into memory to be able to convert the data into the - * configured charset, so do not use this if you have big messages. - */ - public fun charset(charset: String) { - it.property("charset", charset) - } - - /** - * Whether or not to disconnect from remote FTP server right after use. Disconnect will only - * disconnect the current connection to the FTP server. If you have a consumer which you want to - * stop, then you need to stop the consumer/route instead. - */ - public fun disconnect(disconnect: String) { - it.property("disconnect", disconnect) - } - - /** - * Whether or not to disconnect from remote FTP server right after use. Disconnect will only - * disconnect the current connection to the FTP server. If you have a consumer which you want to - * stop, then you need to stop the consumer/route instead. - */ - public fun disconnect(disconnect: Boolean) { - it.property("disconnect", disconnect.toString()) - } - - /** - * Producer: If provided, then Camel will write a 2nd done file when the original file has been - * written. The done file will be empty. This option configures what file name to use. Either you can - * specify a fixed name. Or you can use dynamic placeholders. The done file will always be written in - * the same folder as the original file. Consumer: If provided, Camel will only consume files if a - * done file exists. This option configures what file name to use. Either you can specify a fixed - * name. Or you can use dynamic placeholders.The done file is always expected in the same folder as - * the original file. Only ${file.name} and ${file.name.next} is supported as dynamic placeholders. - */ - public fun doneFileName(doneFileName: String) { - it.property("doneFileName", doneFileName) - } - - /** - * Use Expression such as File Language to dynamically set the filename. For consumers, it's used - * as a filename filter. For producers, it's used to evaluate the filename to write. If an expression - * is set, it take precedence over the CamelFileName header. (Note: The header itself can also be an - * Expression). The expression options support both String and Expression types. If the expression is - * a String type, it is always evaluated using the File Language. If the expression is an Expression - * type, the specified Expression type is used - this allows you, for instance, to use OGNL - * expressions. For the consumer, you can use it to filter filenames, so you can for instance consume - * today's file using the File Language syntax: mydata-${date:now:yyyyMMdd}.txt. The producers - * support the CamelOverruleFileName header which takes precedence over any existing CamelFileName - * header; the CamelOverruleFileName is a header that is used only once, and makes it easier as this - * avoids to temporary store CamelFileName and have to restore it afterwards. - */ - public fun fileName(fileName: String) { - it.property("fileName", fileName) - } - - /** - * Sets passive mode connections. Default is active mode connections. - */ - public fun passiveMode(passiveMode: String) { - it.property("passiveMode", passiveMode) - } - - /** - * Sets passive mode connections. Default is active mode connections. - */ - public fun passiveMode(passiveMode: Boolean) { - it.property("passiveMode", passiveMode.toString()) - } - - /** - * Sets the path separator to be used. UNIX = Uses unix style path separator Windows = Uses - * windows style path separator Auto = (is default) Use existing path separator in file name - */ - public fun separator(separator: String) { - it.property("separator", separator) - } - - /** - * Configures the interval in seconds to use when logging the progress of upload and download - * operations that are in-flight. This is used for logging progress when operations take a longer - * time. - */ - public fun transferLoggingIntervalSeconds(transferLoggingIntervalSeconds: String) { - it.property("transferLoggingIntervalSeconds", transferLoggingIntervalSeconds) - } - - /** - * Configures the interval in seconds to use when logging the progress of upload and download - * operations that are in-flight. This is used for logging progress when operations take a longer - * time. - */ - public fun transferLoggingIntervalSeconds(transferLoggingIntervalSeconds: Int) { - it.property("transferLoggingIntervalSeconds", transferLoggingIntervalSeconds.toString()) - } - - /** - * Configure the logging level to use when logging the progress of upload and download operations. - */ - public fun transferLoggingLevel(transferLoggingLevel: String) { - it.property("transferLoggingLevel", transferLoggingLevel) - } - - /** - * Configures whether perform verbose (fine-grained) logging of the progress of upload and - * download operations. - */ - public fun transferLoggingVerbose(transferLoggingVerbose: String) { - it.property("transferLoggingVerbose", transferLoggingVerbose) - } - - /** - * Configures whether perform verbose (fine-grained) logging of the progress of upload and - * download operations. - */ - public fun transferLoggingVerbose(transferLoggingVerbose: Boolean) { - it.property("transferLoggingVerbose", transferLoggingVerbose.toString()) - } - - /** - * If set this option to be true, camel-ftp will use the list file directly to check if the file - * exists. Since some FTP server may not support to list the file directly, if the option is false, - * camel-ftp will use the old way to list the directory and check if the file exists. This option - * also influences readLock=changed to control whether it performs a fast check to update file - * information or not. This can be used to speed up the process if the FTP server has a lot of files. - */ - public fun fastExistsCheck(fastExistsCheck: String) { - it.property("fastExistsCheck", fastExistsCheck) - } - - /** - * If set this option to be true, camel-ftp will use the list file directly to check if the file - * exists. Since some FTP server may not support to list the file directly, if the option is false, - * camel-ftp will use the old way to list the directory and check if the file exists. This option - * also influences readLock=changed to control whether it performs a fast check to update file - * information or not. This can be used to speed up the process if the FTP server has a lot of files. - */ - public fun fastExistsCheck(fastExistsCheck: Boolean) { - it.property("fastExistsCheck", fastExistsCheck.toString()) - } - - /** - * If true, the file will be deleted after it is processed successfully. - */ - public fun delete(delete: String) { - it.property("delete", delete) - } - - /** - * If true, the file will be deleted after it is processed successfully. - */ - public fun delete(delete: Boolean) { - it.property("delete", delete.toString()) - } - - /** - * Sets the move failure expression based on Simple language. For example, to move files into a - * .error subdirectory use: .error. Note: When moving the files to the fail location Camel will - * handle the error and will not pick up the file again. - */ - public fun moveFailed(moveFailed: String) { - it.property("moveFailed", moveFailed) - } - - /** - * If true, the file is not moved or deleted in any way. This option is good for readonly data, or - * for ETL type requirements. If noop=true, Camel will set idempotent=true as well, to avoid - * consuming the same files over and over again. - */ - public fun noop(noop: String) { - it.property("noop", noop) - } - - /** - * If true, the file is not moved or deleted in any way. This option is good for readonly data, or - * for ETL type requirements. If noop=true, Camel will set idempotent=true as well, to avoid - * consuming the same files over and over again. - */ - public fun noop(noop: Boolean) { - it.property("noop", noop.toString()) - } - - /** - * Expression (such as File Language) used to dynamically set the filename when moving it before - * processing. For example to move in-progress files into the order directory set this value to - * order. - */ - public fun preMove(preMove: String) { - it.property("preMove", preMove) - } - - /** - * When pre-sort is enabled then the consumer will sort the file and directory names during - * polling, that was retrieved from the file system. You may want to do this in case you need to - * operate on the files in a sorted order. The pre-sort is executed before the consumer starts to - * filter, and accept files to process by Camel. This option is default=false meaning disabled. - */ - public fun preSort(preSort: String) { - it.property("preSort", preSort) - } - - /** - * When pre-sort is enabled then the consumer will sort the file and directory names during - * polling, that was retrieved from the file system. You may want to do this in case you need to - * operate on the files in a sorted order. The pre-sort is executed before the consumer starts to - * filter, and accept files to process by Camel. This option is default=false meaning disabled. - */ - public fun preSort(preSort: Boolean) { - it.property("preSort", preSort.toString()) - } - - /** - * If a directory, will look for files in all the sub-directories as well. - */ - public fun recursive(recursive: String) { - it.property("recursive", recursive) - } - - /** - * If a directory, will look for files in all the sub-directories as well. - */ - public fun recursive(recursive: Boolean) { - it.property("recursive", recursive.toString()) - } - - /** - * Configures whether resume download is enabled. This must be supported by the FTP server (almost - * all FTP servers support it). In addition, the options localWorkDirectory must be configured so - * downloaded files are stored in a local directory, and the option binary must be enabled, which is - * required to support resuming of downloads. - */ - public fun resumeDownload(resumeDownload: String) { - it.property("resumeDownload", resumeDownload) - } - - /** - * Configures whether resume download is enabled. This must be supported by the FTP server (almost - * all FTP servers support it). In addition, the options localWorkDirectory must be configured so - * downloaded files are stored in a local directory, and the option binary must be enabled, which is - * required to support resuming of downloads. - */ - public fun resumeDownload(resumeDownload: Boolean) { - it.property("resumeDownload", resumeDownload.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Sets the download method to use when not using a local working directory. If set to true, the - * remote files are streamed to the route as they are read. When set to false, the remote files are - * loaded into memory before being sent into the route. If enabling this option then you must set - * stepwise=false as both cannot be enabled at the same time. - */ - public fun streamDownload(streamDownload: String) { - it.property("streamDownload", streamDownload) - } - - /** - * Sets the download method to use when not using a local working directory. If set to true, the - * remote files are streamed to the route as they are read. When set to false, the remote files are - * loaded into memory before being sent into the route. If enabling this option then you must set - * stepwise=false as both cannot be enabled at the same time. - */ - public fun streamDownload(streamDownload: Boolean) { - it.property("streamDownload", streamDownload.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Whether the FTP consumer should download the file. If this option is set to false, then the - * message body will be null, but the consumer will still trigger a Camel Exchange that has details - * about the file such as file name, file size, etc. It's just that the file will not be downloaded. - */ - public fun download(download: String) { - it.property("download", download) - } - - /** - * Whether the FTP consumer should download the file. If this option is set to false, then the - * message body will be null, but the consumer will still trigger a Camel Exchange that has details - * about the file such as file name, file size, etc. It's just that the file will not be downloaded. - */ - public fun download(download: Boolean) { - it.property("download", download.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Allows you to set how the consumer will handle subfolders and files in the path if the - * directory parser results in with absolute paths. The reason for this is that some FTP servers may - * return file names with absolute paths, and if so, then the FTP component needs to handle this by - * converting the returned path into a relative path. - */ - public fun handleDirectoryParserAbsoluteResult(handleDirectoryParserAbsoluteResult: String) { - it.property("handleDirectoryParserAbsoluteResult", handleDirectoryParserAbsoluteResult) - } - - /** - * Allows you to set how the consumer will handle subfolders and files in the path if the - * directory parser results in with absolute paths. The reason for this is that some FTP servers may - * return file names with absolute paths, and if so, then the FTP component needs to handle this by - * converting the returned path into a relative path. - */ - public fun handleDirectoryParserAbsoluteResult(handleDirectoryParserAbsoluteResult: Boolean) { - it.property("handleDirectoryParserAbsoluteResult", - handleDirectoryParserAbsoluteResult.toString()) - } - - /** - * Whether to ignore when (trying to list files in directories or when downloading a file), which - * does not exist or due to permission error. By default when a directory or file does not exist or - * insufficient permission, then an exception is thrown. Setting this option to true allows to ignore - * that instead. - */ - public fun ignoreFileNotFoundOrPermissionError(ignoreFileNotFoundOrPermissionError: String) { - it.property("ignoreFileNotFoundOrPermissionError", ignoreFileNotFoundOrPermissionError) - } - - /** - * Whether to ignore when (trying to list files in directories or when downloading a file), which - * does not exist or due to permission error. By default when a directory or file does not exist or - * insufficient permission, then an exception is thrown. Setting this option to true allows to ignore - * that instead. - */ - public fun ignoreFileNotFoundOrPermissionError(ignoreFileNotFoundOrPermissionError: Boolean) { - it.property("ignoreFileNotFoundOrPermissionError", - ignoreFileNotFoundOrPermissionError.toString()) - } - - /** - * A pluggable in-progress repository org.apache.camel.spi.IdempotentRepository. The in-progress - * repository is used to account the current in progress files being consumed. By default a memory - * based repository is used. - */ - public fun inProgressRepository(inProgressRepository: String) { - it.property("inProgressRepository", inProgressRepository) - } - - /** - * When consuming, a local work directory can be used to store the remote file content directly in - * local files, to avoid loading the content into memory. This is beneficial, if you consume a very - * big remote file and thus can conserve memory. - */ - public fun localWorkDirectory(localWorkDirectory: String) { - it.property("localWorkDirectory", localWorkDirectory) - } - - /** - * To use a custom org.apache.camel.spi.ExceptionHandler to handle any thrown exceptions that - * happens during the file on completion process where the consumer does either a commit or rollback. - * The default implementation will log any exception at WARN level and ignore. - */ - public fun onCompletionExceptionHandler(onCompletionExceptionHandler: String) { - it.property("onCompletionExceptionHandler", onCompletionExceptionHandler) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * A pluggable org.apache.camel.component.file.GenericFileProcessStrategy allowing you to - * implement your own readLock option or similar. Can also be used when special conditions must be - * met before a file can be consumed, such as a special ready file exists. If this option is set then - * the readLock option does not apply. - */ - public fun processStrategy(processStrategy: String) { - it.property("processStrategy", processStrategy) - } - - /** - * Whether to allow using LIST command when downloading a file. Default is true. In some use cases - * you may want to download a specific file and are not allowed to use the LIST command, and - * therefore you can set this option to false. Notice when using this option, then the specific file - * to download does not include meta-data information such as file size, timestamp, permissions etc, - * because those information is only possible to retrieve when LIST command is in use. - */ - public fun useList(useList: String) { - it.property("useList", useList) - } - - /** - * Whether to allow using LIST command when downloading a file. Default is true. In some use cases - * you may want to download a specific file and are not allowed to use the LIST command, and - * therefore you can set this option to false. Notice when using this option, then the specific file - * to download does not include meta-data information such as file size, timestamp, permissions etc, - * because those information is only possible to retrieve when LIST command is in use. - */ - public fun useList(useList: Boolean) { - it.property("useList", useList.toString()) - } - - /** - * If provided, then Camel will write a checksum file when the original file has been written. The - * checksum file will contain the checksum created with the provided algorithm for the original file. - * The checksum file will always be written in the same folder as the original file. - */ - public fun checksumFileAlgorithm(checksumFileAlgorithm: String) { - it.property("checksumFileAlgorithm", checksumFileAlgorithm) - } - - /** - * What to do if a file already exists with the same name. Override, which is the default, - * replaces the existing file. - Append - adds content to the existing file. - Fail - throws a - * GenericFileOperationException, indicating that there is already an existing file. - Ignore - - * silently ignores the problem and does not override the existing file, but assumes everything is - * okay. - Move - option requires to use the moveExisting option to be configured as well. The option - * eagerDeleteTargetFile can be used to control what to do if an moving the file, and there exists - * already an existing file, otherwise causing the move operation to fail. The Move option will move - * any existing files, before writing the target file. - TryRename is only applicable if tempFileName - * option is in use. This allows to try renaming the file from the temporary name to the actual name, - * without doing any exists check. This check may be faster on some file systems and especially FTP - * servers. - */ - public fun fileExist(fileExist: String) { - it.property("fileExist", fileExist) - } - - /** - * Flatten is used to flatten the file name path to strip any leading paths, so it's just the file - * name. This allows you to consume recursively into sub-directories, but when you eg write the files - * to another directory they will be written in a single directory. Setting this to true on the - * producer enforces that any file name in CamelFileName header will be stripped for any leading - * paths. - */ - public fun flatten(flatten: String) { - it.property("flatten", flatten) - } - - /** - * Flatten is used to flatten the file name path to strip any leading paths, so it's just the file - * name. This allows you to consume recursively into sub-directories, but when you eg write the files - * to another directory they will be written in a single directory. Setting this to true on the - * producer enforces that any file name in CamelFileName header will be stripped for any leading - * paths. - */ - public fun flatten(flatten: Boolean) { - it.property("flatten", flatten.toString()) - } - - /** - * Used for jailing (restricting) writing files to the starting directory (and sub) only. This is - * enabled by default to not allow Camel to write files to outside directories (to be more secured - * out of the box). You can turn this off to allow writing files to directories outside the starting - * directory, such as parent or root folders. - */ - public fun jailStartingDirectory(jailStartingDirectory: String) { - it.property("jailStartingDirectory", jailStartingDirectory) - } - - /** - * Used for jailing (restricting) writing files to the starting directory (and sub) only. This is - * enabled by default to not allow Camel to write files to outside directories (to be more secured - * out of the box). You can turn this off to allow writing files to directories outside the starting - * directory, such as parent or root folders. - */ - public fun jailStartingDirectory(jailStartingDirectory: Boolean) { - it.property("jailStartingDirectory", jailStartingDirectory.toString()) - } - - /** - * Expression (such as File Language) used to compute file name to use when fileExist=Move is - * configured. To move files into a backup subdirectory just enter backup. This option only supports - * the following File Language tokens: file:name, file:name.ext, file:name.noext, file:onlyname, - * file:onlyname.noext, file:ext, and file:parent. Notice the file:parent is not supported by the FTP - * component, as the FTP component can only move any existing files to a relative directory based on - * current dir as base. - */ - public fun moveExisting(moveExisting: String) { - it.property("moveExisting", moveExisting) - } - - /** - * The same as tempPrefix option but offering a more fine grained control on the naming of the - * temporary filename as it uses the File Language. The location for tempFilename is relative to the - * final file location in the option 'fileName', not the target directory in the base uri. For - * example if option fileName includes a directory prefix: dir/finalFilename then tempFileName is - * relative to that subdirectory dir. - */ - public fun tempFileName(tempFileName: String) { - it.property("tempFileName", tempFileName) - } - - /** - * This option is used to write the file using a temporary name and then, after the write is - * complete, rename it to the real name. Can be used to identify files being written and also avoid - * consumers (not using exclusive read locks) reading in progress files. Is often used by FTP when - * uploading big files. - */ - public fun tempPrefix(tempPrefix: String) { - it.property("tempPrefix", tempPrefix) - } - - /** - * Used to specify if a null body is allowed during file writing. If set to true then an empty - * file will be created, when set to false, and attempting to send a null body to the file component, - * a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist - * option is set to 'Override', then the file will be truncated, and if set to append the file will - * remain unchanged. - */ - public fun allowNullBody(allowNullBody: String) { - it.property("allowNullBody", allowNullBody) - } - - /** - * Used to specify if a null body is allowed during file writing. If set to true then an empty - * file will be created, when set to false, and attempting to send a null body to the file component, - * a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist - * option is set to 'Override', then the file will be truncated, and if set to append the file will - * remain unchanged. - */ - public fun allowNullBody(allowNullBody: Boolean) { - it.property("allowNullBody", allowNullBody.toString()) - } - - /** - * Allows you to set chmod on the stored file. For example, chmod=640. - */ - public fun chmod(chmod: String) { - it.property("chmod", chmod) - } - - /** - * Whether or not to disconnect from remote FTP server right after a Batch upload is complete. - * disconnectOnBatchComplete will only disconnect the current connection to the FTP server. - */ - public fun disconnectOnBatchComplete(disconnectOnBatchComplete: String) { - it.property("disconnectOnBatchComplete", disconnectOnBatchComplete) - } - - /** - * Whether or not to disconnect from remote FTP server right after a Batch upload is complete. - * disconnectOnBatchComplete will only disconnect the current connection to the FTP server. - */ - public fun disconnectOnBatchComplete(disconnectOnBatchComplete: Boolean) { - it.property("disconnectOnBatchComplete", disconnectOnBatchComplete.toString()) - } - - /** - * Whether or not to eagerly delete any existing target file. This option only applies when you - * use fileExists=Override and the tempFileName option as well. You can use this to disable (set it - * to false) deleting the target file before the temp file is written. For example you may write big - * files and want the target file to exists during the temp file is being written. This ensure the - * target file is only deleted until the very last moment, just before the temp file is being renamed - * to the target filename. This option is also used to control whether to delete any existing files - * when fileExist=Move is enabled, and an existing file exists. If this option - * copyAndDeleteOnRenameFails false, then an exception will be thrown if an existing file existed, if - * its true, then the existing file is deleted before the move operation. - */ - public fun eagerDeleteTargetFile(eagerDeleteTargetFile: String) { - it.property("eagerDeleteTargetFile", eagerDeleteTargetFile) - } - - /** - * Whether or not to eagerly delete any existing target file. This option only applies when you - * use fileExists=Override and the tempFileName option as well. You can use this to disable (set it - * to false) deleting the target file before the temp file is written. For example you may write big - * files and want the target file to exists during the temp file is being written. This ensure the - * target file is only deleted until the very last moment, just before the temp file is being renamed - * to the target filename. This option is also used to control whether to delete any existing files - * when fileExist=Move is enabled, and an existing file exists. If this option - * copyAndDeleteOnRenameFails false, then an exception will be thrown if an existing file existed, if - * its true, then the existing file is deleted before the move operation. - */ - public fun eagerDeleteTargetFile(eagerDeleteTargetFile: Boolean) { - it.property("eagerDeleteTargetFile", eagerDeleteTargetFile.toString()) - } - - /** - * Will keep the last modified timestamp from the source file (if any). Will use the - * FileConstants.FILE_LAST_MODIFIED header to located the timestamp. This header can contain either a - * java.util.Date or long with the timestamp. If the timestamp exists and the option is enabled it - * will set this timestamp on the written file. Note: This option only applies to the file producer. - * You cannot use this option with any of the ftp producers. - */ - public fun keepLastModified(keepLastModified: String) { - it.property("keepLastModified", keepLastModified) - } - - /** - * Will keep the last modified timestamp from the source file (if any). Will use the - * FileConstants.FILE_LAST_MODIFIED header to located the timestamp. This header can contain either a - * java.util.Date or long with the timestamp. If the timestamp exists and the option is enabled it - * will set this timestamp on the written file. Note: This option only applies to the file producer. - * You cannot use this option with any of the ftp producers. - */ - public fun keepLastModified(keepLastModified: Boolean) { - it.property("keepLastModified", keepLastModified.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Strategy (Custom Strategy) used to move file with special naming token to use when - * fileExist=Move is configured. By default, there is an implementation used if no custom strategy is - * provided - */ - public fun moveExistingFileStrategy(moveExistingFileStrategy: String) { - it.property("moveExistingFileStrategy", moveExistingFileStrategy) - } - - /** - * Whether to send a noop command as a pre-write check before uploading files to the FTP server. - * This is enabled by default as a validation of the connection is still valid, which allows to - * silently re-connect to be able to upload the file. However if this causes problems, you can turn - * this option off. - */ - public fun sendNoop(sendNoop: String) { - it.property("sendNoop", sendNoop) - } - - /** - * Whether to send a noop command as a pre-write check before uploading files to the FTP server. - * This is enabled by default as a validation of the connection is still valid, which allows to - * silently re-connect to be able to upload the file. However if this causes problems, you can turn - * this option off. - */ - public fun sendNoop(sendNoop: Boolean) { - it.property("sendNoop", sendNoop.toString()) - } - - /** - * Set the client side port range in active mode. The syntax is: minPort-maxPort Both port numbers - * are inclusive, e.g., 10000-19999 to include all 1xxxx ports. - */ - public fun activePortRange(activePortRange: String) { - it.property("activePortRange", activePortRange) - } - - /** - * Automatically create missing directories in the file's pathname. For the file consumer, that - * means creating the starting directory. For the file producer, it means the directory the files - * should be written to. - */ - public fun autoCreate(autoCreate: String) { - it.property("autoCreate", autoCreate) - } - - /** - * Automatically create missing directories in the file's pathname. For the file consumer, that - * means creating the starting directory. For the file producer, it means the directory the files - * should be written to. - */ - public fun autoCreate(autoCreate: Boolean) { - it.property("autoCreate", autoCreate.toString()) - } - - /** - * Buffer size in bytes used for writing files (or in case of FTP for downloading and uploading - * files). - */ - public fun bufferSize(bufferSize: String) { - it.property("bufferSize", bufferSize) - } - - /** - * Buffer size in bytes used for writing files (or in case of FTP for downloading and uploading - * files). - */ - public fun bufferSize(bufferSize: Int) { - it.property("bufferSize", bufferSize.toString()) - } - - /** - * Sets the connect timeout for waiting for a connection to be established Used by both FTPClient - * and JSCH - */ - public fun connectTimeout(connectTimeout: String) { - it.property("connectTimeout", connectTimeout) - } - - /** - * To use a custom instance of FTPClient - */ - public fun ftpClient(ftpClient: String) { - it.property("ftpClient", ftpClient) - } - - /** - * To use a custom instance of FTPClientConfig to configure the FTP client the endpoint should - * use. - */ - public fun ftpClientConfig(ftpClientConfig: String) { - it.property("ftpClientConfig", ftpClientConfig) - } - - /** - * Used by FtpComponent to provide additional parameters for the FTPClientConfig - */ - public fun ftpClientConfigParameters(ftpClientConfigParameters: String) { - it.property("ftpClientConfigParameters", ftpClientConfigParameters) - } - - /** - * Used by FtpComponent to provide additional parameters for the FTPClient - */ - public fun ftpClientParameters(ftpClientParameters: String) { - it.property("ftpClientParameters", ftpClientParameters) - } - - /** - * Specifies the maximum reconnect attempts Camel performs when it tries to connect to the remote - * FTP server. Use 0 to disable this behavior. - */ - public fun maximumReconnectAttempts(maximumReconnectAttempts: String) { - it.property("maximumReconnectAttempts", maximumReconnectAttempts) - } - - /** - * Specifies the maximum reconnect attempts Camel performs when it tries to connect to the remote - * FTP server. Use 0 to disable this behavior. - */ - public fun maximumReconnectAttempts(maximumReconnectAttempts: Int) { - it.property("maximumReconnectAttempts", maximumReconnectAttempts.toString()) - } - - /** - * Delay in millis Camel will wait before performing a reconnect attempt. - */ - public fun reconnectDelay(reconnectDelay: String) { - it.property("reconnectDelay", reconnectDelay) - } - - /** - * Sets optional site command(s) to be executed after successful login. Multiple site commands can - * be separated using a new line character. - */ - public fun siteCommand(siteCommand: String) { - it.property("siteCommand", siteCommand) - } - - /** - * Sets the so timeout FTP and FTPS Is the SocketOptions.SO_TIMEOUT value in millis. Recommended - * option is to set this to 300000 so as not have a hanged connection. On SFTP this option is set as - * timeout on the JSCH Session instance. - */ - public fun soTimeout(soTimeout: String) { - it.property("soTimeout", soTimeout) - } - - /** - * Sets whether we should stepwise change directories while traversing file structures when - * downloading files, or as well when uploading a file to a directory. You can disable this if you - * for example are in a situation where you cannot change directory on the FTP server due security - * reasons. Stepwise cannot be used together with streamDownload. - */ - public fun stepwise(stepwise: String) { - it.property("stepwise", stepwise) - } - - /** - * Sets whether we should stepwise change directories while traversing file structures when - * downloading files, or as well when uploading a file to a directory. You can disable this if you - * for example are in a situation where you cannot change directory on the FTP server due security - * reasons. Stepwise cannot be used together with streamDownload. - */ - public fun stepwise(stepwise: Boolean) { - it.property("stepwise", stepwise.toString()) - } - - /** - * Should an exception be thrown if connection failed (exhausted)By default exception is not - * thrown and a WARN is logged. You can use this to enable exception being thrown and handle the - * thrown exception from the org.apache.camel.spi.PollingConsumerPollStrategy rollback method. - */ - public fun throwExceptionOnConnectFailed(throwExceptionOnConnectFailed: String) { - it.property("throwExceptionOnConnectFailed", throwExceptionOnConnectFailed) - } - - /** - * Should an exception be thrown if connection failed (exhausted)By default exception is not - * thrown and a WARN is logged. You can use this to enable exception being thrown and handle the - * thrown exception from the org.apache.camel.spi.PollingConsumerPollStrategy rollback method. - */ - public fun throwExceptionOnConnectFailed(throwExceptionOnConnectFailed: Boolean) { - it.property("throwExceptionOnConnectFailed", throwExceptionOnConnectFailed.toString()) - } - - /** - * Sets the data timeout for waiting for reply Used only by FTPClient - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Ant style filter exclusion. If both antInclude and antExclude are used, antExclude takes - * precedence over antInclude. Multiple exclusions may be specified in comma-delimited format. - */ - public fun antExclude(antExclude: String) { - it.property("antExclude", antExclude) - } - - /** - * Sets case sensitive flag on ant filter. - */ - public fun antFilterCaseSensitive(antFilterCaseSensitive: String) { - it.property("antFilterCaseSensitive", antFilterCaseSensitive) - } - - /** - * Sets case sensitive flag on ant filter. - */ - public fun antFilterCaseSensitive(antFilterCaseSensitive: Boolean) { - it.property("antFilterCaseSensitive", antFilterCaseSensitive.toString()) - } - - /** - * Ant style filter inclusion. Multiple inclusions may be specified in comma-delimited format. - */ - public fun antInclude(antInclude: String) { - it.property("antInclude", antInclude) - } - - /** - * Allows for controlling whether the limit from maxMessagesPerPoll is eager or not. If eager then - * the limit is during the scanning of files. Where as false would scan all files, and then perform - * sorting. Setting this option to false allows for sorting all files first, and then limit the poll. - * Mind that this requires a higher memory usage as all file details are in memory to perform the - * sorting. - */ - public fun eagerMaxMessagesPerPoll(eagerMaxMessagesPerPoll: String) { - it.property("eagerMaxMessagesPerPoll", eagerMaxMessagesPerPoll) - } - - /** - * Allows for controlling whether the limit from maxMessagesPerPoll is eager or not. If eager then - * the limit is during the scanning of files. Where as false would scan all files, and then perform - * sorting. Setting this option to false allows for sorting all files first, and then limit the poll. - * Mind that this requires a higher memory usage as all file details are in memory to perform the - * sorting. - */ - public fun eagerMaxMessagesPerPoll(eagerMaxMessagesPerPoll: Boolean) { - it.property("eagerMaxMessagesPerPoll", eagerMaxMessagesPerPoll.toString()) - } - - /** - * Is used to exclude files, if filename matches the regex pattern (matching is case - * in-sensitive). Notice if you use symbols such as plus sign and others you would need to configure - * this using the RAW() syntax if configuring this as an endpoint uri. See more details at - * configuring endpoint uris - */ - public fun exclude(exclude: String) { - it.property("exclude", exclude) - } - - /** - * Is used to exclude files matching file extension name (case insensitive). For example to - * exclude bak files, then use excludeExt=bak. Multiple extensions can be separated by comma, for - * example to exclude bak and dat files, use excludeExt=bak,dat. Note that the file extension - * includes all parts, for example having a file named mydata.tar.gz will have extension as tar.gz. - * For more flexibility then use the include/exclude options. - */ - public fun excludeExt(excludeExt: String) { - it.property("excludeExt", excludeExt) - } - - /** - * Pluggable filter as a org.apache.camel.component.file.GenericFileFilter class. Will skip files - * if filter returns false in its accept() method. - */ - public fun filter(filter: String) { - it.property("filter", filter) - } - - /** - * Filters the directory based on Simple language. For example to filter on current date, you can - * use a simple date pattern such as ${date:now:yyyMMdd} - */ - public fun filterDirectory(filterDirectory: String) { - it.property("filterDirectory", filterDirectory) - } - - /** - * Filters the file based on Simple language. For example to filter on file size, you can use - * ${file:size} 5000 - */ - public fun filterFile(filterFile: String) { - it.property("filterFile", filterFile) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotent(idempotent: String) { - it.property("idempotent", idempotent) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotent(idempotent: Boolean) { - it.property("idempotent", idempotent.toString()) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotentEager(idempotentEager: String) { - it.property("idempotentEager", idempotentEager) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotentEager(idempotentEager: Boolean) { - it.property("idempotentEager", idempotentEager.toString()) - } - - /** - * To use a custom idempotent key. By default the absolute path of the file is used. You can use - * the File Language, for example to use the file name and file size, you can do: - * idempotentKey=${file:name}-${file:size} - */ - public fun idempotentKey(idempotentKey: String) { - it.property("idempotentKey", idempotentKey) - } - - /** - * A pluggable repository org.apache.camel.spi.IdempotentRepository which by default use - * MemoryIdempotentRepository if none is specified and idempotent is true. - */ - public fun idempotentRepository(idempotentRepository: String) { - it.property("idempotentRepository", idempotentRepository) - } - - /** - * Is used to include files, if filename matches the regex pattern (matching is case - * in-sensitive). Notice if you use symbols such as plus sign and others you would need to configure - * this using the RAW() syntax if configuring this as an endpoint uri. See more details at - * configuring endpoint uris - */ - public fun include(include: String) { - it.property("include", include) - } - - /** - * Is used to include files matching file extension name (case insensitive). For example to - * include txt files, then use includeExt=txt. Multiple extensions can be separated by comma, for - * example to include txt and xml files, use includeExt=txt,xml. Note that the file extension - * includes all parts, for example having a file named mydata.tar.gz will have extension as tar.gz. - * For more flexibility then use the include/exclude options. - */ - public fun includeExt(includeExt: String) { - it.property("includeExt", includeExt) - } - - /** - * The maximum depth to traverse when recursively processing a directory. - */ - public fun maxDepth(maxDepth: String) { - it.property("maxDepth", maxDepth) - } - - /** - * The maximum depth to traverse when recursively processing a directory. - */ - public fun maxDepth(maxDepth: Int) { - it.property("maxDepth", maxDepth.toString()) - } - - /** - * To define a maximum messages to gather per poll. By default no maximum is set. Can be used to - * set a limit of e.g. 1000 to avoid when starting up the server that there are thousands of files. - * Set a value of 0 or negative to disabled it. Notice: If this option is in use then the File and - * FTP components will limit before any sorting. For example if you have 100000 files and use - * maxMessagesPerPoll=500, then only the first 500 files will be picked up, and then sorted. You can - * use the eagerMaxMessagesPerPoll option and set this to false to allow to scan all files first and - * then sort afterwards. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * To define a maximum messages to gather per poll. By default no maximum is set. Can be used to - * set a limit of e.g. 1000 to avoid when starting up the server that there are thousands of files. - * Set a value of 0 or negative to disabled it. Notice: If this option is in use then the File and - * FTP components will limit before any sorting. For example if you have 100000 files and use - * maxMessagesPerPoll=500, then only the first 500 files will be picked up, and then sorted. You can - * use the eagerMaxMessagesPerPoll option and set this to false to allow to scan all files first and - * then sort afterwards. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * The minimum depth to start processing when recursively processing a directory. Using minDepth=1 - * means the base directory. Using minDepth=2 means the first sub directory. - */ - public fun minDepth(minDepth: String) { - it.property("minDepth", minDepth) - } - - /** - * The minimum depth to start processing when recursively processing a directory. Using minDepth=1 - * means the base directory. Using minDepth=2 means the first sub directory. - */ - public fun minDepth(minDepth: Int) { - it.property("minDepth", minDepth.toString()) - } - - /** - * Expression (such as Simple Language) used to dynamically set the filename when moving it after - * processing. To move files into a .done subdirectory just enter .done. - */ - public fun move(move: String) { - it.property("move", move) - } - - /** - * Pluggable read-lock as a org.apache.camel.component.file.GenericFileExclusiveReadLockStrategy - * implementation. - */ - public fun exclusiveReadLockStrategy(exclusiveReadLockStrategy: String) { - it.property("exclusiveReadLockStrategy", exclusiveReadLockStrategy) - } - - /** - * Used by consumer, to only poll the files if it has exclusive read-lock on the file (i.e. the - * file is not in-progress or being written). Camel will wait until the file lock is granted. This - * option provides the build in strategies: - none - No read lock is in use - markerFile - Camel - * creates a marker file (fileName.camelLock) and then holds a lock on it. This option is not - * available for the FTP component - changed - Changed is using file length/modification timestamp to - * detect whether the file is currently being copied or not. Will at least use 1 sec to determine - * this, so this option cannot consume files as fast as the others, but can be more reliable as the - * JDK IO API cannot always determine whether a file is currently being used by another process. The - * option readLockCheckInterval can be used to set the check frequency. - fileLock - is for using - * java.nio.channels.FileLock. This option is not avail for Windows OS and the FTP component. This - * approach should be avoided when accessing a remote file system via a mount/share unless that file - * system supports distributed file locks. - rename - rename is for using a try to rename the file as - * a test if we can get exclusive read-lock. - idempotent - (only for file component) idempotent is - * for using a idempotentRepository as the read-lock. This allows to use read locks that supports - * clustering if the idempotent repository implementation supports that. - idempotent-changed - (only - * for file component) idempotent-changed is for using a idempotentRepository and changed as the - * combined read-lock. This allows to use read locks that supports clustering if the idempotent - * repository implementation supports that. - idempotent-rename - (only for file component) - * idempotent-rename is for using a idempotentRepository and rename as the combined read-lock. This - * allows to use read locks that supports clustering if the idempotent repository implementation - * supports that.Notice: The various read locks is not all suited to work in clustered mode, where - * concurrent consumers on different nodes is competing for the same files on a shared file system. - * The markerFile using a close to atomic operation to create the empty marker file, but its not - * guaranteed to work in a cluster. The fileLock may work better but then the file system need to - * support distributed file locks, and so on. Using the idempotent read lock can support clustering - * if the idempotent repository supports clustering, such as Hazelcast Component or Infinispan. - */ - public fun readLock(readLock: String) { - it.property("readLock", readLock) - } - - /** - * Interval in millis for the read-lock, if supported by the read lock. This interval is used for - * sleeping between attempts to acquire the read lock. For example when using the changed read lock, - * you can set a higher interval period to cater for slow writes. The default of 1 sec. may be too - * fast if the producer is very slow writing the file. Notice: For FTP the default - * readLockCheckInterval is 5000. The readLockTimeout value must be higher than - * readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or more times - * higher than the readLockCheckInterval. This is needed to ensure that ample time is allowed for the - * read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockCheckInterval(readLockCheckInterval: String) { - it.property("readLockCheckInterval", readLockCheckInterval) - } - - /** - * Interval in millis for the read-lock, if supported by the read lock. This interval is used for - * sleeping between attempts to acquire the read lock. For example when using the changed read lock, - * you can set a higher interval period to cater for slow writes. The default of 1 sec. may be too - * fast if the producer is very slow writing the file. Notice: For FTP the default - * readLockCheckInterval is 5000. The readLockTimeout value must be higher than - * readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or more times - * higher than the readLockCheckInterval. This is needed to ensure that ample time is allowed for the - * read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockCheckInterval(readLockCheckInterval: Int) { - it.property("readLockCheckInterval", readLockCheckInterval.toString()) - } - - /** - * Whether or not read lock with marker files should upon startup delete any orphan read lock - * files, which may have been left on the file system, if Camel was not properly shutdown (such as a - * JVM crash). If turning this option to false then any orphaned lock file will cause Camel to not - * attempt to pickup that file, this could also be due another node is concurrently reading files - * from the same shared directory. - */ - public fun readLockDeleteOrphanLockFiles(readLockDeleteOrphanLockFiles: String) { - it.property("readLockDeleteOrphanLockFiles", readLockDeleteOrphanLockFiles) - } - - /** - * Whether or not read lock with marker files should upon startup delete any orphan read lock - * files, which may have been left on the file system, if Camel was not properly shutdown (such as a - * JVM crash). If turning this option to false then any orphaned lock file will cause Camel to not - * attempt to pickup that file, this could also be due another node is concurrently reading files - * from the same shared directory. - */ - public fun readLockDeleteOrphanLockFiles(readLockDeleteOrphanLockFiles: Boolean) { - it.property("readLockDeleteOrphanLockFiles", readLockDeleteOrphanLockFiles.toString()) - } - - /** - * Logging level used when a read lock could not be acquired. By default a DEBUG is logged. You - * can change this level, for example to OFF to not have any logging. This option is only applicable - * for readLock of types: changed, fileLock, idempotent, idempotent-changed, idempotent-rename, - * rename. - */ - public fun readLockLoggingLevel(readLockLoggingLevel: String) { - it.property("readLockLoggingLevel", readLockLoggingLevel) - } - - /** - * Whether to use marker file with the changed, rename, or exclusive read lock types. By default a - * marker file is used as well to guard against other processes picking up the same files. This - * behavior can be turned off by setting this option to false. For example if you do not want to - * write marker files to the file systems by the Camel application. - */ - public fun readLockMarkerFile(readLockMarkerFile: String) { - it.property("readLockMarkerFile", readLockMarkerFile) - } - - /** - * Whether to use marker file with the changed, rename, or exclusive read lock types. By default a - * marker file is used as well to guard against other processes picking up the same files. This - * behavior can be turned off by setting this option to false. For example if you do not want to - * write marker files to the file systems by the Camel application. - */ - public fun readLockMarkerFile(readLockMarkerFile: Boolean) { - it.property("readLockMarkerFile", readLockMarkerFile.toString()) - } - - /** - * This option is applied only for readLock=changed. It allows to specify a minimum age the file - * must be before attempting to acquire the read lock. For example use readLockMinAge=300s to require - * the file is at last 5 minutes old. This can speedup the changed read lock as it will only attempt - * to acquire files which are at least that given age. - */ - public fun readLockMinAge(readLockMinAge: String) { - it.property("readLockMinAge", readLockMinAge) - } - - /** - * This option is applied only for readLock=changed. It allows to specify a minimum age the file - * must be before attempting to acquire the read lock. For example use readLockMinAge=300s to require - * the file is at last 5 minutes old. This can speedup the changed read lock as it will only attempt - * to acquire files which are at least that given age. - */ - public fun readLockMinAge(readLockMinAge: Int) { - it.property("readLockMinAge", readLockMinAge.toString()) - } - - /** - * This option is applied only for readLock=changed. It allows you to configure a minimum file - * length. By default Camel expects the file to contain data, and thus the default value is 1. You - * can set this option to zero, to allow consuming zero-length files. - */ - public fun readLockMinLength(readLockMinLength: String) { - it.property("readLockMinLength", readLockMinLength) - } - - /** - * This option is applied only for readLock=changed. It allows you to configure a minimum file - * length. By default Camel expects the file to contain data, and thus the default value is 1. You - * can set this option to zero, to allow consuming zero-length files. - */ - public fun readLockMinLength(readLockMinLength: Int) { - it.property("readLockMinLength", readLockMinLength.toString()) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file is succeeded and a commit - * happens. By default the file is not removed which ensures that any race-condition do not occur so - * another active node may attempt to grab the file. Instead the idempotent repository may support - * eviction strategies that you can configure to evict the file name entry after X minutes - this - * ensures no problems with race conditions. See more details at the readLockIdempotentReleaseDelay - * option. - */ - public fun readLockRemoveOnCommit(readLockRemoveOnCommit: String) { - it.property("readLockRemoveOnCommit", readLockRemoveOnCommit) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file is succeeded and a commit - * happens. By default the file is not removed which ensures that any race-condition do not occur so - * another active node may attempt to grab the file. Instead the idempotent repository may support - * eviction strategies that you can configure to evict the file name entry after X minutes - this - * ensures no problems with race conditions. See more details at the readLockIdempotentReleaseDelay - * option. - */ - public fun readLockRemoveOnCommit(readLockRemoveOnCommit: Boolean) { - it.property("readLockRemoveOnCommit", readLockRemoveOnCommit.toString()) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file failed and a rollback - * happens. If this option is false, then the file name entry is confirmed (as if the file did a - * commit). - */ - public fun readLockRemoveOnRollback(readLockRemoveOnRollback: String) { - it.property("readLockRemoveOnRollback", readLockRemoveOnRollback) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file failed and a rollback - * happens. If this option is false, then the file name entry is confirmed (as if the file did a - * commit). - */ - public fun readLockRemoveOnRollback(readLockRemoveOnRollback: Boolean) { - it.property("readLockRemoveOnRollback", readLockRemoveOnRollback.toString()) - } - - /** - * Optional timeout in millis for the read-lock, if supported by the read-lock. If the read-lock - * could not be granted and the timeout triggered, then Camel will skip the file. At next poll Camel, - * will try the file again, and this time maybe the read-lock could be granted. Use a value of 0 or - * lower to indicate forever. Currently fileLock, changed and rename support the timeout. Notice: For - * FTP the default readLockTimeout value is 20000 instead of 10000. The readLockTimeout value must be - * higher than readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or - * more times higher than the readLockCheckInterval. This is needed to ensure that ample time is - * allowed for the read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockTimeout(readLockTimeout: String) { - it.property("readLockTimeout", readLockTimeout) - } - - /** - * Optional timeout in millis for the read-lock, if supported by the read-lock. If the read-lock - * could not be granted and the timeout triggered, then Camel will skip the file. At next poll Camel, - * will try the file again, and this time maybe the read-lock could be granted. Use a value of 0 or - * lower to indicate forever. Currently fileLock, changed and rename support the timeout. Notice: For - * FTP the default readLockTimeout value is 20000 instead of 10000. The readLockTimeout value must be - * higher than readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or - * more times higher than the readLockCheckInterval. This is needed to ensure that ample time is - * allowed for the read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockTimeout(readLockTimeout: Int) { - it.property("readLockTimeout", readLockTimeout.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Account to use for login - */ - public fun account(account: String) { - it.property("account", account) - } - - /** - * Password to use for login - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Username to use for login - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * To shuffle the list of files (sort in random order) - */ - public fun shuffle(shuffle: String) { - it.property("shuffle", shuffle) - } - - /** - * To shuffle the list of files (sort in random order) - */ - public fun shuffle(shuffle: Boolean) { - it.property("shuffle", shuffle.toString()) - } - - /** - * Built-in sort by using the File Language. Supports nested sorts, so you can have a sort by file - * name and as a 2nd group sort by modified date. - */ - public fun sortBy(sortBy: String) { - it.property("sortBy", sortBy) - } - - /** - * Pluggable sorter as a java.util.Comparator class. - */ - public fun sorter(sorter: String) { - it.property("sorter", sorter) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FtpsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FtpsUriDsl.kt deleted file mode 100644 index b7fdbdca618cc..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/FtpsUriDsl.kt +++ /dev/null @@ -1,1748 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Upload and download files to/from FTP servers supporting the FTPS protocol. - */ -public fun UriDsl.ftps(i: FtpsUriDsl.() -> Unit) { - FtpsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class FtpsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("ftps") - } - - private var host: String = "" - - private var port: String = "" - - private var directoryName: String = "" - - /** - * Hostname of the FTP server - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port/$directoryName") - } - - /** - * Port of the FTP server - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port/$directoryName") - } - - /** - * Port of the FTP server - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port/$directoryName") - } - - /** - * The starting directory - */ - public fun directoryName(directoryName: String) { - this.directoryName = directoryName - it.url("$host:$port/$directoryName") - } - - /** - * Specifies the file transfer mode, BINARY or ASCII. Default is ASCII (false). - */ - public fun binary(binary: String) { - it.property("binary", binary) - } - - /** - * Specifies the file transfer mode, BINARY or ASCII. Default is ASCII (false). - */ - public fun binary(binary: Boolean) { - it.property("binary", binary.toString()) - } - - /** - * This option is used to specify the encoding of the file. You can use this on the consumer, to - * specify the encodings of the files, which allow Camel to know the charset it should load the file - * content in case the file content is being accessed. Likewise when writing a file, you can use this - * option to specify which charset to write the file as well. Do mind that when writing the file - * Camel may have to read the message content into memory to be able to convert the data into the - * configured charset, so do not use this if you have big messages. - */ - public fun charset(charset: String) { - it.property("charset", charset) - } - - /** - * Whether or not to disconnect from remote FTP server right after use. Disconnect will only - * disconnect the current connection to the FTP server. If you have a consumer which you want to - * stop, then you need to stop the consumer/route instead. - */ - public fun disconnect(disconnect: String) { - it.property("disconnect", disconnect) - } - - /** - * Whether or not to disconnect from remote FTP server right after use. Disconnect will only - * disconnect the current connection to the FTP server. If you have a consumer which you want to - * stop, then you need to stop the consumer/route instead. - */ - public fun disconnect(disconnect: Boolean) { - it.property("disconnect", disconnect.toString()) - } - - /** - * Producer: If provided, then Camel will write a 2nd done file when the original file has been - * written. The done file will be empty. This option configures what file name to use. Either you can - * specify a fixed name. Or you can use dynamic placeholders. The done file will always be written in - * the same folder as the original file. Consumer: If provided, Camel will only consume files if a - * done file exists. This option configures what file name to use. Either you can specify a fixed - * name. Or you can use dynamic placeholders.The done file is always expected in the same folder as - * the original file. Only ${file.name} and ${file.name.next} is supported as dynamic placeholders. - */ - public fun doneFileName(doneFileName: String) { - it.property("doneFileName", doneFileName) - } - - /** - * Use Expression such as File Language to dynamically set the filename. For consumers, it's used - * as a filename filter. For producers, it's used to evaluate the filename to write. If an expression - * is set, it take precedence over the CamelFileName header. (Note: The header itself can also be an - * Expression). The expression options support both String and Expression types. If the expression is - * a String type, it is always evaluated using the File Language. If the expression is an Expression - * type, the specified Expression type is used - this allows you, for instance, to use OGNL - * expressions. For the consumer, you can use it to filter filenames, so you can for instance consume - * today's file using the File Language syntax: mydata-${date:now:yyyyMMdd}.txt. The producers - * support the CamelOverruleFileName header which takes precedence over any existing CamelFileName - * header; the CamelOverruleFileName is a header that is used only once, and makes it easier as this - * avoids to temporary store CamelFileName and have to restore it afterwards. - */ - public fun fileName(fileName: String) { - it.property("fileName", fileName) - } - - /** - * Sets passive mode connections. Default is active mode connections. - */ - public fun passiveMode(passiveMode: String) { - it.property("passiveMode", passiveMode) - } - - /** - * Sets passive mode connections. Default is active mode connections. - */ - public fun passiveMode(passiveMode: Boolean) { - it.property("passiveMode", passiveMode.toString()) - } - - /** - * Sets the path separator to be used. UNIX = Uses unix style path separator Windows = Uses - * windows style path separator Auto = (is default) Use existing path separator in file name - */ - public fun separator(separator: String) { - it.property("separator", separator) - } - - /** - * Configures the interval in seconds to use when logging the progress of upload and download - * operations that are in-flight. This is used for logging progress when operations take a longer - * time. - */ - public fun transferLoggingIntervalSeconds(transferLoggingIntervalSeconds: String) { - it.property("transferLoggingIntervalSeconds", transferLoggingIntervalSeconds) - } - - /** - * Configures the interval in seconds to use when logging the progress of upload and download - * operations that are in-flight. This is used for logging progress when operations take a longer - * time. - */ - public fun transferLoggingIntervalSeconds(transferLoggingIntervalSeconds: Int) { - it.property("transferLoggingIntervalSeconds", transferLoggingIntervalSeconds.toString()) - } - - /** - * Configure the logging level to use when logging the progress of upload and download operations. - */ - public fun transferLoggingLevel(transferLoggingLevel: String) { - it.property("transferLoggingLevel", transferLoggingLevel) - } - - /** - * Configures whether perform verbose (fine-grained) logging of the progress of upload and - * download operations. - */ - public fun transferLoggingVerbose(transferLoggingVerbose: String) { - it.property("transferLoggingVerbose", transferLoggingVerbose) - } - - /** - * Configures whether perform verbose (fine-grained) logging of the progress of upload and - * download operations. - */ - public fun transferLoggingVerbose(transferLoggingVerbose: Boolean) { - it.property("transferLoggingVerbose", transferLoggingVerbose.toString()) - } - - /** - * If set this option to be true, camel-ftp will use the list file directly to check if the file - * exists. Since some FTP server may not support to list the file directly, if the option is false, - * camel-ftp will use the old way to list the directory and check if the file exists. This option - * also influences readLock=changed to control whether it performs a fast check to update file - * information or not. This can be used to speed up the process if the FTP server has a lot of files. - */ - public fun fastExistsCheck(fastExistsCheck: String) { - it.property("fastExistsCheck", fastExistsCheck) - } - - /** - * If set this option to be true, camel-ftp will use the list file directly to check if the file - * exists. Since some FTP server may not support to list the file directly, if the option is false, - * camel-ftp will use the old way to list the directory and check if the file exists. This option - * also influences readLock=changed to control whether it performs a fast check to update file - * information or not. This can be used to speed up the process if the FTP server has a lot of files. - */ - public fun fastExistsCheck(fastExistsCheck: Boolean) { - it.property("fastExistsCheck", fastExistsCheck.toString()) - } - - /** - * If true, the file will be deleted after it is processed successfully. - */ - public fun delete(delete: String) { - it.property("delete", delete) - } - - /** - * If true, the file will be deleted after it is processed successfully. - */ - public fun delete(delete: Boolean) { - it.property("delete", delete.toString()) - } - - /** - * Sets the move failure expression based on Simple language. For example, to move files into a - * .error subdirectory use: .error. Note: When moving the files to the fail location Camel will - * handle the error and will not pick up the file again. - */ - public fun moveFailed(moveFailed: String) { - it.property("moveFailed", moveFailed) - } - - /** - * If true, the file is not moved or deleted in any way. This option is good for readonly data, or - * for ETL type requirements. If noop=true, Camel will set idempotent=true as well, to avoid - * consuming the same files over and over again. - */ - public fun noop(noop: String) { - it.property("noop", noop) - } - - /** - * If true, the file is not moved or deleted in any way. This option is good for readonly data, or - * for ETL type requirements. If noop=true, Camel will set idempotent=true as well, to avoid - * consuming the same files over and over again. - */ - public fun noop(noop: Boolean) { - it.property("noop", noop.toString()) - } - - /** - * Expression (such as File Language) used to dynamically set the filename when moving it before - * processing. For example to move in-progress files into the order directory set this value to - * order. - */ - public fun preMove(preMove: String) { - it.property("preMove", preMove) - } - - /** - * When pre-sort is enabled then the consumer will sort the file and directory names during - * polling, that was retrieved from the file system. You may want to do this in case you need to - * operate on the files in a sorted order. The pre-sort is executed before the consumer starts to - * filter, and accept files to process by Camel. This option is default=false meaning disabled. - */ - public fun preSort(preSort: String) { - it.property("preSort", preSort) - } - - /** - * When pre-sort is enabled then the consumer will sort the file and directory names during - * polling, that was retrieved from the file system. You may want to do this in case you need to - * operate on the files in a sorted order. The pre-sort is executed before the consumer starts to - * filter, and accept files to process by Camel. This option is default=false meaning disabled. - */ - public fun preSort(preSort: Boolean) { - it.property("preSort", preSort.toString()) - } - - /** - * If a directory, will look for files in all the sub-directories as well. - */ - public fun recursive(recursive: String) { - it.property("recursive", recursive) - } - - /** - * If a directory, will look for files in all the sub-directories as well. - */ - public fun recursive(recursive: Boolean) { - it.property("recursive", recursive.toString()) - } - - /** - * Configures whether resume download is enabled. This must be supported by the FTP server (almost - * all FTP servers support it). In addition, the options localWorkDirectory must be configured so - * downloaded files are stored in a local directory, and the option binary must be enabled, which is - * required to support resuming of downloads. - */ - public fun resumeDownload(resumeDownload: String) { - it.property("resumeDownload", resumeDownload) - } - - /** - * Configures whether resume download is enabled. This must be supported by the FTP server (almost - * all FTP servers support it). In addition, the options localWorkDirectory must be configured so - * downloaded files are stored in a local directory, and the option binary must be enabled, which is - * required to support resuming of downloads. - */ - public fun resumeDownload(resumeDownload: Boolean) { - it.property("resumeDownload", resumeDownload.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Sets the download method to use when not using a local working directory. If set to true, the - * remote files are streamed to the route as they are read. When set to false, the remote files are - * loaded into memory before being sent into the route. If enabling this option then you must set - * stepwise=false as both cannot be enabled at the same time. - */ - public fun streamDownload(streamDownload: String) { - it.property("streamDownload", streamDownload) - } - - /** - * Sets the download method to use when not using a local working directory. If set to true, the - * remote files are streamed to the route as they are read. When set to false, the remote files are - * loaded into memory before being sent into the route. If enabling this option then you must set - * stepwise=false as both cannot be enabled at the same time. - */ - public fun streamDownload(streamDownload: Boolean) { - it.property("streamDownload", streamDownload.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Whether the FTP consumer should download the file. If this option is set to false, then the - * message body will be null, but the consumer will still trigger a Camel Exchange that has details - * about the file such as file name, file size, etc. It's just that the file will not be downloaded. - */ - public fun download(download: String) { - it.property("download", download) - } - - /** - * Whether the FTP consumer should download the file. If this option is set to false, then the - * message body will be null, but the consumer will still trigger a Camel Exchange that has details - * about the file such as file name, file size, etc. It's just that the file will not be downloaded. - */ - public fun download(download: Boolean) { - it.property("download", download.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Allows you to set how the consumer will handle subfolders and files in the path if the - * directory parser results in with absolute paths. The reason for this is that some FTP servers may - * return file names with absolute paths, and if so, then the FTP component needs to handle this by - * converting the returned path into a relative path. - */ - public fun handleDirectoryParserAbsoluteResult(handleDirectoryParserAbsoluteResult: String) { - it.property("handleDirectoryParserAbsoluteResult", handleDirectoryParserAbsoluteResult) - } - - /** - * Allows you to set how the consumer will handle subfolders and files in the path if the - * directory parser results in with absolute paths. The reason for this is that some FTP servers may - * return file names with absolute paths, and if so, then the FTP component needs to handle this by - * converting the returned path into a relative path. - */ - public fun handleDirectoryParserAbsoluteResult(handleDirectoryParserAbsoluteResult: Boolean) { - it.property("handleDirectoryParserAbsoluteResult", - handleDirectoryParserAbsoluteResult.toString()) - } - - /** - * Whether to ignore when (trying to list files in directories or when downloading a file), which - * does not exist or due to permission error. By default when a directory or file does not exist or - * insufficient permission, then an exception is thrown. Setting this option to true allows to ignore - * that instead. - */ - public fun ignoreFileNotFoundOrPermissionError(ignoreFileNotFoundOrPermissionError: String) { - it.property("ignoreFileNotFoundOrPermissionError", ignoreFileNotFoundOrPermissionError) - } - - /** - * Whether to ignore when (trying to list files in directories or when downloading a file), which - * does not exist or due to permission error. By default when a directory or file does not exist or - * insufficient permission, then an exception is thrown. Setting this option to true allows to ignore - * that instead. - */ - public fun ignoreFileNotFoundOrPermissionError(ignoreFileNotFoundOrPermissionError: Boolean) { - it.property("ignoreFileNotFoundOrPermissionError", - ignoreFileNotFoundOrPermissionError.toString()) - } - - /** - * A pluggable in-progress repository org.apache.camel.spi.IdempotentRepository. The in-progress - * repository is used to account the current in progress files being consumed. By default a memory - * based repository is used. - */ - public fun inProgressRepository(inProgressRepository: String) { - it.property("inProgressRepository", inProgressRepository) - } - - /** - * When consuming, a local work directory can be used to store the remote file content directly in - * local files, to avoid loading the content into memory. This is beneficial, if you consume a very - * big remote file and thus can conserve memory. - */ - public fun localWorkDirectory(localWorkDirectory: String) { - it.property("localWorkDirectory", localWorkDirectory) - } - - /** - * To use a custom org.apache.camel.spi.ExceptionHandler to handle any thrown exceptions that - * happens during the file on completion process where the consumer does either a commit or rollback. - * The default implementation will log any exception at WARN level and ignore. - */ - public fun onCompletionExceptionHandler(onCompletionExceptionHandler: String) { - it.property("onCompletionExceptionHandler", onCompletionExceptionHandler) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * A pluggable org.apache.camel.component.file.GenericFileProcessStrategy allowing you to - * implement your own readLock option or similar. Can also be used when special conditions must be - * met before a file can be consumed, such as a special ready file exists. If this option is set then - * the readLock option does not apply. - */ - public fun processStrategy(processStrategy: String) { - it.property("processStrategy", processStrategy) - } - - /** - * Whether to allow using LIST command when downloading a file. Default is true. In some use cases - * you may want to download a specific file and are not allowed to use the LIST command, and - * therefore you can set this option to false. Notice when using this option, then the specific file - * to download does not include meta-data information such as file size, timestamp, permissions etc, - * because those information is only possible to retrieve when LIST command is in use. - */ - public fun useList(useList: String) { - it.property("useList", useList) - } - - /** - * Whether to allow using LIST command when downloading a file. Default is true. In some use cases - * you may want to download a specific file and are not allowed to use the LIST command, and - * therefore you can set this option to false. Notice when using this option, then the specific file - * to download does not include meta-data information such as file size, timestamp, permissions etc, - * because those information is only possible to retrieve when LIST command is in use. - */ - public fun useList(useList: Boolean) { - it.property("useList", useList.toString()) - } - - /** - * If provided, then Camel will write a checksum file when the original file has been written. The - * checksum file will contain the checksum created with the provided algorithm for the original file. - * The checksum file will always be written in the same folder as the original file. - */ - public fun checksumFileAlgorithm(checksumFileAlgorithm: String) { - it.property("checksumFileAlgorithm", checksumFileAlgorithm) - } - - /** - * What to do if a file already exists with the same name. Override, which is the default, - * replaces the existing file. - Append - adds content to the existing file. - Fail - throws a - * GenericFileOperationException, indicating that there is already an existing file. - Ignore - - * silently ignores the problem and does not override the existing file, but assumes everything is - * okay. - Move - option requires to use the moveExisting option to be configured as well. The option - * eagerDeleteTargetFile can be used to control what to do if an moving the file, and there exists - * already an existing file, otherwise causing the move operation to fail. The Move option will move - * any existing files, before writing the target file. - TryRename is only applicable if tempFileName - * option is in use. This allows to try renaming the file from the temporary name to the actual name, - * without doing any exists check. This check may be faster on some file systems and especially FTP - * servers. - */ - public fun fileExist(fileExist: String) { - it.property("fileExist", fileExist) - } - - /** - * Flatten is used to flatten the file name path to strip any leading paths, so it's just the file - * name. This allows you to consume recursively into sub-directories, but when you eg write the files - * to another directory they will be written in a single directory. Setting this to true on the - * producer enforces that any file name in CamelFileName header will be stripped for any leading - * paths. - */ - public fun flatten(flatten: String) { - it.property("flatten", flatten) - } - - /** - * Flatten is used to flatten the file name path to strip any leading paths, so it's just the file - * name. This allows you to consume recursively into sub-directories, but when you eg write the files - * to another directory they will be written in a single directory. Setting this to true on the - * producer enforces that any file name in CamelFileName header will be stripped for any leading - * paths. - */ - public fun flatten(flatten: Boolean) { - it.property("flatten", flatten.toString()) - } - - /** - * Used for jailing (restricting) writing files to the starting directory (and sub) only. This is - * enabled by default to not allow Camel to write files to outside directories (to be more secured - * out of the box). You can turn this off to allow writing files to directories outside the starting - * directory, such as parent or root folders. - */ - public fun jailStartingDirectory(jailStartingDirectory: String) { - it.property("jailStartingDirectory", jailStartingDirectory) - } - - /** - * Used for jailing (restricting) writing files to the starting directory (and sub) only. This is - * enabled by default to not allow Camel to write files to outside directories (to be more secured - * out of the box). You can turn this off to allow writing files to directories outside the starting - * directory, such as parent or root folders. - */ - public fun jailStartingDirectory(jailStartingDirectory: Boolean) { - it.property("jailStartingDirectory", jailStartingDirectory.toString()) - } - - /** - * Expression (such as File Language) used to compute file name to use when fileExist=Move is - * configured. To move files into a backup subdirectory just enter backup. This option only supports - * the following File Language tokens: file:name, file:name.ext, file:name.noext, file:onlyname, - * file:onlyname.noext, file:ext, and file:parent. Notice the file:parent is not supported by the FTP - * component, as the FTP component can only move any existing files to a relative directory based on - * current dir as base. - */ - public fun moveExisting(moveExisting: String) { - it.property("moveExisting", moveExisting) - } - - /** - * The same as tempPrefix option but offering a more fine grained control on the naming of the - * temporary filename as it uses the File Language. The location for tempFilename is relative to the - * final file location in the option 'fileName', not the target directory in the base uri. For - * example if option fileName includes a directory prefix: dir/finalFilename then tempFileName is - * relative to that subdirectory dir. - */ - public fun tempFileName(tempFileName: String) { - it.property("tempFileName", tempFileName) - } - - /** - * This option is used to write the file using a temporary name and then, after the write is - * complete, rename it to the real name. Can be used to identify files being written and also avoid - * consumers (not using exclusive read locks) reading in progress files. Is often used by FTP when - * uploading big files. - */ - public fun tempPrefix(tempPrefix: String) { - it.property("tempPrefix", tempPrefix) - } - - /** - * Used to specify if a null body is allowed during file writing. If set to true then an empty - * file will be created, when set to false, and attempting to send a null body to the file component, - * a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist - * option is set to 'Override', then the file will be truncated, and if set to append the file will - * remain unchanged. - */ - public fun allowNullBody(allowNullBody: String) { - it.property("allowNullBody", allowNullBody) - } - - /** - * Used to specify if a null body is allowed during file writing. If set to true then an empty - * file will be created, when set to false, and attempting to send a null body to the file component, - * a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist - * option is set to 'Override', then the file will be truncated, and if set to append the file will - * remain unchanged. - */ - public fun allowNullBody(allowNullBody: Boolean) { - it.property("allowNullBody", allowNullBody.toString()) - } - - /** - * Allows you to set chmod on the stored file. For example, chmod=640. - */ - public fun chmod(chmod: String) { - it.property("chmod", chmod) - } - - /** - * Whether or not to disconnect from remote FTP server right after a Batch upload is complete. - * disconnectOnBatchComplete will only disconnect the current connection to the FTP server. - */ - public fun disconnectOnBatchComplete(disconnectOnBatchComplete: String) { - it.property("disconnectOnBatchComplete", disconnectOnBatchComplete) - } - - /** - * Whether or not to disconnect from remote FTP server right after a Batch upload is complete. - * disconnectOnBatchComplete will only disconnect the current connection to the FTP server. - */ - public fun disconnectOnBatchComplete(disconnectOnBatchComplete: Boolean) { - it.property("disconnectOnBatchComplete", disconnectOnBatchComplete.toString()) - } - - /** - * Whether or not to eagerly delete any existing target file. This option only applies when you - * use fileExists=Override and the tempFileName option as well. You can use this to disable (set it - * to false) deleting the target file before the temp file is written. For example you may write big - * files and want the target file to exists during the temp file is being written. This ensure the - * target file is only deleted until the very last moment, just before the temp file is being renamed - * to the target filename. This option is also used to control whether to delete any existing files - * when fileExist=Move is enabled, and an existing file exists. If this option - * copyAndDeleteOnRenameFails false, then an exception will be thrown if an existing file existed, if - * its true, then the existing file is deleted before the move operation. - */ - public fun eagerDeleteTargetFile(eagerDeleteTargetFile: String) { - it.property("eagerDeleteTargetFile", eagerDeleteTargetFile) - } - - /** - * Whether or not to eagerly delete any existing target file. This option only applies when you - * use fileExists=Override and the tempFileName option as well. You can use this to disable (set it - * to false) deleting the target file before the temp file is written. For example you may write big - * files and want the target file to exists during the temp file is being written. This ensure the - * target file is only deleted until the very last moment, just before the temp file is being renamed - * to the target filename. This option is also used to control whether to delete any existing files - * when fileExist=Move is enabled, and an existing file exists. If this option - * copyAndDeleteOnRenameFails false, then an exception will be thrown if an existing file existed, if - * its true, then the existing file is deleted before the move operation. - */ - public fun eagerDeleteTargetFile(eagerDeleteTargetFile: Boolean) { - it.property("eagerDeleteTargetFile", eagerDeleteTargetFile.toString()) - } - - /** - * Will keep the last modified timestamp from the source file (if any). Will use the - * FileConstants.FILE_LAST_MODIFIED header to located the timestamp. This header can contain either a - * java.util.Date or long with the timestamp. If the timestamp exists and the option is enabled it - * will set this timestamp on the written file. Note: This option only applies to the file producer. - * You cannot use this option with any of the ftp producers. - */ - public fun keepLastModified(keepLastModified: String) { - it.property("keepLastModified", keepLastModified) - } - - /** - * Will keep the last modified timestamp from the source file (if any). Will use the - * FileConstants.FILE_LAST_MODIFIED header to located the timestamp. This header can contain either a - * java.util.Date or long with the timestamp. If the timestamp exists and the option is enabled it - * will set this timestamp on the written file. Note: This option only applies to the file producer. - * You cannot use this option with any of the ftp producers. - */ - public fun keepLastModified(keepLastModified: Boolean) { - it.property("keepLastModified", keepLastModified.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Strategy (Custom Strategy) used to move file with special naming token to use when - * fileExist=Move is configured. By default, there is an implementation used if no custom strategy is - * provided - */ - public fun moveExistingFileStrategy(moveExistingFileStrategy: String) { - it.property("moveExistingFileStrategy", moveExistingFileStrategy) - } - - /** - * Whether to send a noop command as a pre-write check before uploading files to the FTP server. - * This is enabled by default as a validation of the connection is still valid, which allows to - * silently re-connect to be able to upload the file. However if this causes problems, you can turn - * this option off. - */ - public fun sendNoop(sendNoop: String) { - it.property("sendNoop", sendNoop) - } - - /** - * Whether to send a noop command as a pre-write check before uploading files to the FTP server. - * This is enabled by default as a validation of the connection is still valid, which allows to - * silently re-connect to be able to upload the file. However if this causes problems, you can turn - * this option off. - */ - public fun sendNoop(sendNoop: Boolean) { - it.property("sendNoop", sendNoop.toString()) - } - - /** - * Set the client side port range in active mode. The syntax is: minPort-maxPort Both port numbers - * are inclusive, e.g., 10000-19999 to include all 1xxxx ports. - */ - public fun activePortRange(activePortRange: String) { - it.property("activePortRange", activePortRange) - } - - /** - * Automatically create missing directories in the file's pathname. For the file consumer, that - * means creating the starting directory. For the file producer, it means the directory the files - * should be written to. - */ - public fun autoCreate(autoCreate: String) { - it.property("autoCreate", autoCreate) - } - - /** - * Automatically create missing directories in the file's pathname. For the file consumer, that - * means creating the starting directory. For the file producer, it means the directory the files - * should be written to. - */ - public fun autoCreate(autoCreate: Boolean) { - it.property("autoCreate", autoCreate.toString()) - } - - /** - * Buffer size in bytes used for writing files (or in case of FTP for downloading and uploading - * files). - */ - public fun bufferSize(bufferSize: String) { - it.property("bufferSize", bufferSize) - } - - /** - * Buffer size in bytes used for writing files (or in case of FTP for downloading and uploading - * files). - */ - public fun bufferSize(bufferSize: Int) { - it.property("bufferSize", bufferSize.toString()) - } - - /** - * Sets the connect timeout for waiting for a connection to be established Used by both FTPClient - * and JSCH - */ - public fun connectTimeout(connectTimeout: String) { - it.property("connectTimeout", connectTimeout) - } - - /** - * To use a custom instance of FTPClient - */ - public fun ftpClient(ftpClient: String) { - it.property("ftpClient", ftpClient) - } - - /** - * To use a custom instance of FTPClientConfig to configure the FTP client the endpoint should - * use. - */ - public fun ftpClientConfig(ftpClientConfig: String) { - it.property("ftpClientConfig", ftpClientConfig) - } - - /** - * Used by FtpComponent to provide additional parameters for the FTPClientConfig - */ - public fun ftpClientConfigParameters(ftpClientConfigParameters: String) { - it.property("ftpClientConfigParameters", ftpClientConfigParameters) - } - - /** - * Used by FtpComponent to provide additional parameters for the FTPClient - */ - public fun ftpClientParameters(ftpClientParameters: String) { - it.property("ftpClientParameters", ftpClientParameters) - } - - /** - * Specifies the maximum reconnect attempts Camel performs when it tries to connect to the remote - * FTP server. Use 0 to disable this behavior. - */ - public fun maximumReconnectAttempts(maximumReconnectAttempts: String) { - it.property("maximumReconnectAttempts", maximumReconnectAttempts) - } - - /** - * Specifies the maximum reconnect attempts Camel performs when it tries to connect to the remote - * FTP server. Use 0 to disable this behavior. - */ - public fun maximumReconnectAttempts(maximumReconnectAttempts: Int) { - it.property("maximumReconnectAttempts", maximumReconnectAttempts.toString()) - } - - /** - * Delay in millis Camel will wait before performing a reconnect attempt. - */ - public fun reconnectDelay(reconnectDelay: String) { - it.property("reconnectDelay", reconnectDelay) - } - - /** - * Sets optional site command(s) to be executed after successful login. Multiple site commands can - * be separated using a new line character. - */ - public fun siteCommand(siteCommand: String) { - it.property("siteCommand", siteCommand) - } - - /** - * Sets the so timeout FTP and FTPS Is the SocketOptions.SO_TIMEOUT value in millis. Recommended - * option is to set this to 300000 so as not have a hanged connection. On SFTP this option is set as - * timeout on the JSCH Session instance. - */ - public fun soTimeout(soTimeout: String) { - it.property("soTimeout", soTimeout) - } - - /** - * Sets whether we should stepwise change directories while traversing file structures when - * downloading files, or as well when uploading a file to a directory. You can disable this if you - * for example are in a situation where you cannot change directory on the FTP server due security - * reasons. Stepwise cannot be used together with streamDownload. - */ - public fun stepwise(stepwise: String) { - it.property("stepwise", stepwise) - } - - /** - * Sets whether we should stepwise change directories while traversing file structures when - * downloading files, or as well when uploading a file to a directory. You can disable this if you - * for example are in a situation where you cannot change directory on the FTP server due security - * reasons. Stepwise cannot be used together with streamDownload. - */ - public fun stepwise(stepwise: Boolean) { - it.property("stepwise", stepwise.toString()) - } - - /** - * Should an exception be thrown if connection failed (exhausted)By default exception is not - * thrown and a WARN is logged. You can use this to enable exception being thrown and handle the - * thrown exception from the org.apache.camel.spi.PollingConsumerPollStrategy rollback method. - */ - public fun throwExceptionOnConnectFailed(throwExceptionOnConnectFailed: String) { - it.property("throwExceptionOnConnectFailed", throwExceptionOnConnectFailed) - } - - /** - * Should an exception be thrown if connection failed (exhausted)By default exception is not - * thrown and a WARN is logged. You can use this to enable exception being thrown and handle the - * thrown exception from the org.apache.camel.spi.PollingConsumerPollStrategy rollback method. - */ - public fun throwExceptionOnConnectFailed(throwExceptionOnConnectFailed: Boolean) { - it.property("throwExceptionOnConnectFailed", throwExceptionOnConnectFailed.toString()) - } - - /** - * Sets the data timeout for waiting for reply Used only by FTPClient - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Ant style filter exclusion. If both antInclude and antExclude are used, antExclude takes - * precedence over antInclude. Multiple exclusions may be specified in comma-delimited format. - */ - public fun antExclude(antExclude: String) { - it.property("antExclude", antExclude) - } - - /** - * Sets case sensitive flag on ant filter. - */ - public fun antFilterCaseSensitive(antFilterCaseSensitive: String) { - it.property("antFilterCaseSensitive", antFilterCaseSensitive) - } - - /** - * Sets case sensitive flag on ant filter. - */ - public fun antFilterCaseSensitive(antFilterCaseSensitive: Boolean) { - it.property("antFilterCaseSensitive", antFilterCaseSensitive.toString()) - } - - /** - * Ant style filter inclusion. Multiple inclusions may be specified in comma-delimited format. - */ - public fun antInclude(antInclude: String) { - it.property("antInclude", antInclude) - } - - /** - * Allows for controlling whether the limit from maxMessagesPerPoll is eager or not. If eager then - * the limit is during the scanning of files. Where as false would scan all files, and then perform - * sorting. Setting this option to false allows for sorting all files first, and then limit the poll. - * Mind that this requires a higher memory usage as all file details are in memory to perform the - * sorting. - */ - public fun eagerMaxMessagesPerPoll(eagerMaxMessagesPerPoll: String) { - it.property("eagerMaxMessagesPerPoll", eagerMaxMessagesPerPoll) - } - - /** - * Allows for controlling whether the limit from maxMessagesPerPoll is eager or not. If eager then - * the limit is during the scanning of files. Where as false would scan all files, and then perform - * sorting. Setting this option to false allows for sorting all files first, and then limit the poll. - * Mind that this requires a higher memory usage as all file details are in memory to perform the - * sorting. - */ - public fun eagerMaxMessagesPerPoll(eagerMaxMessagesPerPoll: Boolean) { - it.property("eagerMaxMessagesPerPoll", eagerMaxMessagesPerPoll.toString()) - } - - /** - * Is used to exclude files, if filename matches the regex pattern (matching is case - * in-sensitive). Notice if you use symbols such as plus sign and others you would need to configure - * this using the RAW() syntax if configuring this as an endpoint uri. See more details at - * configuring endpoint uris - */ - public fun exclude(exclude: String) { - it.property("exclude", exclude) - } - - /** - * Is used to exclude files matching file extension name (case insensitive). For example to - * exclude bak files, then use excludeExt=bak. Multiple extensions can be separated by comma, for - * example to exclude bak and dat files, use excludeExt=bak,dat. Note that the file extension - * includes all parts, for example having a file named mydata.tar.gz will have extension as tar.gz. - * For more flexibility then use the include/exclude options. - */ - public fun excludeExt(excludeExt: String) { - it.property("excludeExt", excludeExt) - } - - /** - * Pluggable filter as a org.apache.camel.component.file.GenericFileFilter class. Will skip files - * if filter returns false in its accept() method. - */ - public fun filter(filter: String) { - it.property("filter", filter) - } - - /** - * Filters the directory based on Simple language. For example to filter on current date, you can - * use a simple date pattern such as ${date:now:yyyMMdd} - */ - public fun filterDirectory(filterDirectory: String) { - it.property("filterDirectory", filterDirectory) - } - - /** - * Filters the file based on Simple language. For example to filter on file size, you can use - * ${file:size} 5000 - */ - public fun filterFile(filterFile: String) { - it.property("filterFile", filterFile) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotent(idempotent: String) { - it.property("idempotent", idempotent) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotent(idempotent: Boolean) { - it.property("idempotent", idempotent.toString()) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotentEager(idempotentEager: String) { - it.property("idempotentEager", idempotentEager) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotentEager(idempotentEager: Boolean) { - it.property("idempotentEager", idempotentEager.toString()) - } - - /** - * To use a custom idempotent key. By default the absolute path of the file is used. You can use - * the File Language, for example to use the file name and file size, you can do: - * idempotentKey=${file:name}-${file:size} - */ - public fun idempotentKey(idempotentKey: String) { - it.property("idempotentKey", idempotentKey) - } - - /** - * A pluggable repository org.apache.camel.spi.IdempotentRepository which by default use - * MemoryIdempotentRepository if none is specified and idempotent is true. - */ - public fun idempotentRepository(idempotentRepository: String) { - it.property("idempotentRepository", idempotentRepository) - } - - /** - * Is used to include files, if filename matches the regex pattern (matching is case - * in-sensitive). Notice if you use symbols such as plus sign and others you would need to configure - * this using the RAW() syntax if configuring this as an endpoint uri. See more details at - * configuring endpoint uris - */ - public fun include(include: String) { - it.property("include", include) - } - - /** - * Is used to include files matching file extension name (case insensitive). For example to - * include txt files, then use includeExt=txt. Multiple extensions can be separated by comma, for - * example to include txt and xml files, use includeExt=txt,xml. Note that the file extension - * includes all parts, for example having a file named mydata.tar.gz will have extension as tar.gz. - * For more flexibility then use the include/exclude options. - */ - public fun includeExt(includeExt: String) { - it.property("includeExt", includeExt) - } - - /** - * The maximum depth to traverse when recursively processing a directory. - */ - public fun maxDepth(maxDepth: String) { - it.property("maxDepth", maxDepth) - } - - /** - * The maximum depth to traverse when recursively processing a directory. - */ - public fun maxDepth(maxDepth: Int) { - it.property("maxDepth", maxDepth.toString()) - } - - /** - * To define a maximum messages to gather per poll. By default no maximum is set. Can be used to - * set a limit of e.g. 1000 to avoid when starting up the server that there are thousands of files. - * Set a value of 0 or negative to disabled it. Notice: If this option is in use then the File and - * FTP components will limit before any sorting. For example if you have 100000 files and use - * maxMessagesPerPoll=500, then only the first 500 files will be picked up, and then sorted. You can - * use the eagerMaxMessagesPerPoll option and set this to false to allow to scan all files first and - * then sort afterwards. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * To define a maximum messages to gather per poll. By default no maximum is set. Can be used to - * set a limit of e.g. 1000 to avoid when starting up the server that there are thousands of files. - * Set a value of 0 or negative to disabled it. Notice: If this option is in use then the File and - * FTP components will limit before any sorting. For example if you have 100000 files and use - * maxMessagesPerPoll=500, then only the first 500 files will be picked up, and then sorted. You can - * use the eagerMaxMessagesPerPoll option and set this to false to allow to scan all files first and - * then sort afterwards. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * The minimum depth to start processing when recursively processing a directory. Using minDepth=1 - * means the base directory. Using minDepth=2 means the first sub directory. - */ - public fun minDepth(minDepth: String) { - it.property("minDepth", minDepth) - } - - /** - * The minimum depth to start processing when recursively processing a directory. Using minDepth=1 - * means the base directory. Using minDepth=2 means the first sub directory. - */ - public fun minDepth(minDepth: Int) { - it.property("minDepth", minDepth.toString()) - } - - /** - * Expression (such as Simple Language) used to dynamically set the filename when moving it after - * processing. To move files into a .done subdirectory just enter .done. - */ - public fun move(move: String) { - it.property("move", move) - } - - /** - * Pluggable read-lock as a org.apache.camel.component.file.GenericFileExclusiveReadLockStrategy - * implementation. - */ - public fun exclusiveReadLockStrategy(exclusiveReadLockStrategy: String) { - it.property("exclusiveReadLockStrategy", exclusiveReadLockStrategy) - } - - /** - * Used by consumer, to only poll the files if it has exclusive read-lock on the file (i.e. the - * file is not in-progress or being written). Camel will wait until the file lock is granted. This - * option provides the build in strategies: - none - No read lock is in use - markerFile - Camel - * creates a marker file (fileName.camelLock) and then holds a lock on it. This option is not - * available for the FTP component - changed - Changed is using file length/modification timestamp to - * detect whether the file is currently being copied or not. Will at least use 1 sec to determine - * this, so this option cannot consume files as fast as the others, but can be more reliable as the - * JDK IO API cannot always determine whether a file is currently being used by another process. The - * option readLockCheckInterval can be used to set the check frequency. - fileLock - is for using - * java.nio.channels.FileLock. This option is not avail for Windows OS and the FTP component. This - * approach should be avoided when accessing a remote file system via a mount/share unless that file - * system supports distributed file locks. - rename - rename is for using a try to rename the file as - * a test if we can get exclusive read-lock. - idempotent - (only for file component) idempotent is - * for using a idempotentRepository as the read-lock. This allows to use read locks that supports - * clustering if the idempotent repository implementation supports that. - idempotent-changed - (only - * for file component) idempotent-changed is for using a idempotentRepository and changed as the - * combined read-lock. This allows to use read locks that supports clustering if the idempotent - * repository implementation supports that. - idempotent-rename - (only for file component) - * idempotent-rename is for using a idempotentRepository and rename as the combined read-lock. This - * allows to use read locks that supports clustering if the idempotent repository implementation - * supports that.Notice: The various read locks is not all suited to work in clustered mode, where - * concurrent consumers on different nodes is competing for the same files on a shared file system. - * The markerFile using a close to atomic operation to create the empty marker file, but its not - * guaranteed to work in a cluster. The fileLock may work better but then the file system need to - * support distributed file locks, and so on. Using the idempotent read lock can support clustering - * if the idempotent repository supports clustering, such as Hazelcast Component or Infinispan. - */ - public fun readLock(readLock: String) { - it.property("readLock", readLock) - } - - /** - * Interval in millis for the read-lock, if supported by the read lock. This interval is used for - * sleeping between attempts to acquire the read lock. For example when using the changed read lock, - * you can set a higher interval period to cater for slow writes. The default of 1 sec. may be too - * fast if the producer is very slow writing the file. Notice: For FTP the default - * readLockCheckInterval is 5000. The readLockTimeout value must be higher than - * readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or more times - * higher than the readLockCheckInterval. This is needed to ensure that ample time is allowed for the - * read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockCheckInterval(readLockCheckInterval: String) { - it.property("readLockCheckInterval", readLockCheckInterval) - } - - /** - * Interval in millis for the read-lock, if supported by the read lock. This interval is used for - * sleeping between attempts to acquire the read lock. For example when using the changed read lock, - * you can set a higher interval period to cater for slow writes. The default of 1 sec. may be too - * fast if the producer is very slow writing the file. Notice: For FTP the default - * readLockCheckInterval is 5000. The readLockTimeout value must be higher than - * readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or more times - * higher than the readLockCheckInterval. This is needed to ensure that ample time is allowed for the - * read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockCheckInterval(readLockCheckInterval: Int) { - it.property("readLockCheckInterval", readLockCheckInterval.toString()) - } - - /** - * Whether or not read lock with marker files should upon startup delete any orphan read lock - * files, which may have been left on the file system, if Camel was not properly shutdown (such as a - * JVM crash). If turning this option to false then any orphaned lock file will cause Camel to not - * attempt to pickup that file, this could also be due another node is concurrently reading files - * from the same shared directory. - */ - public fun readLockDeleteOrphanLockFiles(readLockDeleteOrphanLockFiles: String) { - it.property("readLockDeleteOrphanLockFiles", readLockDeleteOrphanLockFiles) - } - - /** - * Whether or not read lock with marker files should upon startup delete any orphan read lock - * files, which may have been left on the file system, if Camel was not properly shutdown (such as a - * JVM crash). If turning this option to false then any orphaned lock file will cause Camel to not - * attempt to pickup that file, this could also be due another node is concurrently reading files - * from the same shared directory. - */ - public fun readLockDeleteOrphanLockFiles(readLockDeleteOrphanLockFiles: Boolean) { - it.property("readLockDeleteOrphanLockFiles", readLockDeleteOrphanLockFiles.toString()) - } - - /** - * Logging level used when a read lock could not be acquired. By default a DEBUG is logged. You - * can change this level, for example to OFF to not have any logging. This option is only applicable - * for readLock of types: changed, fileLock, idempotent, idempotent-changed, idempotent-rename, - * rename. - */ - public fun readLockLoggingLevel(readLockLoggingLevel: String) { - it.property("readLockLoggingLevel", readLockLoggingLevel) - } - - /** - * Whether to use marker file with the changed, rename, or exclusive read lock types. By default a - * marker file is used as well to guard against other processes picking up the same files. This - * behavior can be turned off by setting this option to false. For example if you do not want to - * write marker files to the file systems by the Camel application. - */ - public fun readLockMarkerFile(readLockMarkerFile: String) { - it.property("readLockMarkerFile", readLockMarkerFile) - } - - /** - * Whether to use marker file with the changed, rename, or exclusive read lock types. By default a - * marker file is used as well to guard against other processes picking up the same files. This - * behavior can be turned off by setting this option to false. For example if you do not want to - * write marker files to the file systems by the Camel application. - */ - public fun readLockMarkerFile(readLockMarkerFile: Boolean) { - it.property("readLockMarkerFile", readLockMarkerFile.toString()) - } - - /** - * This option is applied only for readLock=changed. It allows to specify a minimum age the file - * must be before attempting to acquire the read lock. For example use readLockMinAge=300s to require - * the file is at last 5 minutes old. This can speedup the changed read lock as it will only attempt - * to acquire files which are at least that given age. - */ - public fun readLockMinAge(readLockMinAge: String) { - it.property("readLockMinAge", readLockMinAge) - } - - /** - * This option is applied only for readLock=changed. It allows to specify a minimum age the file - * must be before attempting to acquire the read lock. For example use readLockMinAge=300s to require - * the file is at last 5 minutes old. This can speedup the changed read lock as it will only attempt - * to acquire files which are at least that given age. - */ - public fun readLockMinAge(readLockMinAge: Int) { - it.property("readLockMinAge", readLockMinAge.toString()) - } - - /** - * This option is applied only for readLock=changed. It allows you to configure a minimum file - * length. By default Camel expects the file to contain data, and thus the default value is 1. You - * can set this option to zero, to allow consuming zero-length files. - */ - public fun readLockMinLength(readLockMinLength: String) { - it.property("readLockMinLength", readLockMinLength) - } - - /** - * This option is applied only for readLock=changed. It allows you to configure a minimum file - * length. By default Camel expects the file to contain data, and thus the default value is 1. You - * can set this option to zero, to allow consuming zero-length files. - */ - public fun readLockMinLength(readLockMinLength: Int) { - it.property("readLockMinLength", readLockMinLength.toString()) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file is succeeded and a commit - * happens. By default the file is not removed which ensures that any race-condition do not occur so - * another active node may attempt to grab the file. Instead the idempotent repository may support - * eviction strategies that you can configure to evict the file name entry after X minutes - this - * ensures no problems with race conditions. See more details at the readLockIdempotentReleaseDelay - * option. - */ - public fun readLockRemoveOnCommit(readLockRemoveOnCommit: String) { - it.property("readLockRemoveOnCommit", readLockRemoveOnCommit) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file is succeeded and a commit - * happens. By default the file is not removed which ensures that any race-condition do not occur so - * another active node may attempt to grab the file. Instead the idempotent repository may support - * eviction strategies that you can configure to evict the file name entry after X minutes - this - * ensures no problems with race conditions. See more details at the readLockIdempotentReleaseDelay - * option. - */ - public fun readLockRemoveOnCommit(readLockRemoveOnCommit: Boolean) { - it.property("readLockRemoveOnCommit", readLockRemoveOnCommit.toString()) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file failed and a rollback - * happens. If this option is false, then the file name entry is confirmed (as if the file did a - * commit). - */ - public fun readLockRemoveOnRollback(readLockRemoveOnRollback: String) { - it.property("readLockRemoveOnRollback", readLockRemoveOnRollback) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file failed and a rollback - * happens. If this option is false, then the file name entry is confirmed (as if the file did a - * commit). - */ - public fun readLockRemoveOnRollback(readLockRemoveOnRollback: Boolean) { - it.property("readLockRemoveOnRollback", readLockRemoveOnRollback.toString()) - } - - /** - * Optional timeout in millis for the read-lock, if supported by the read-lock. If the read-lock - * could not be granted and the timeout triggered, then Camel will skip the file. At next poll Camel, - * will try the file again, and this time maybe the read-lock could be granted. Use a value of 0 or - * lower to indicate forever. Currently fileLock, changed and rename support the timeout. Notice: For - * FTP the default readLockTimeout value is 20000 instead of 10000. The readLockTimeout value must be - * higher than readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or - * more times higher than the readLockCheckInterval. This is needed to ensure that ample time is - * allowed for the read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockTimeout(readLockTimeout: String) { - it.property("readLockTimeout", readLockTimeout) - } - - /** - * Optional timeout in millis for the read-lock, if supported by the read-lock. If the read-lock - * could not be granted and the timeout triggered, then Camel will skip the file. At next poll Camel, - * will try the file again, and this time maybe the read-lock could be granted. Use a value of 0 or - * lower to indicate forever. Currently fileLock, changed and rename support the timeout. Notice: For - * FTP the default readLockTimeout value is 20000 instead of 10000. The readLockTimeout value must be - * higher than readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or - * more times higher than the readLockCheckInterval. This is needed to ensure that ample time is - * allowed for the read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockTimeout(readLockTimeout: Int) { - it.property("readLockTimeout", readLockTimeout.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Account to use for login - */ - public fun account(account: String) { - it.property("account", account) - } - - /** - * Use this option to disable default options when using secure data channel. This allows you to - * be in full control what the execPbsz and execProt setting should be used. Default is false - */ - public fun disableSecureDataChannelDefaults(disableSecureDataChannelDefaults: String) { - it.property("disableSecureDataChannelDefaults", disableSecureDataChannelDefaults) - } - - /** - * Use this option to disable default options when using secure data channel. This allows you to - * be in full control what the execPbsz and execProt setting should be used. Default is false - */ - public fun disableSecureDataChannelDefaults(disableSecureDataChannelDefaults: Boolean) { - it.property("disableSecureDataChannelDefaults", disableSecureDataChannelDefaults.toString()) - } - - /** - * When using secure data channel you can set the exec protection buffer size - */ - public fun execPbsz(execPbsz: String) { - it.property("execPbsz", execPbsz) - } - - /** - * When using secure data channel you can set the exec protection buffer size - */ - public fun execPbsz(execPbsz: Int) { - it.property("execPbsz", execPbsz.toString()) - } - - /** - * The exec protection level PROT command. C - Clear S - Safe(SSL protocol only) E - - * Confidential(SSL protocol only) P - Private - */ - public fun execProt(execProt: String) { - it.property("execProt", execProt) - } - - /** - * Set the key store parameters - */ - public fun ftpClientKeyStoreParameters(ftpClientKeyStoreParameters: String) { - it.property("ftpClientKeyStoreParameters", ftpClientKeyStoreParameters) - } - - /** - * Set the trust store parameters - */ - public fun ftpClientTrustStoreParameters(ftpClientTrustStoreParameters: String) { - it.property("ftpClientTrustStoreParameters", ftpClientTrustStoreParameters) - } - - /** - * Set the security mode (Implicit/Explicit). true - Implicit Mode / False - Explicit Mode - */ - public fun implicit(implicit: String) { - it.property("implicit", implicit) - } - - /** - * Set the security mode (Implicit/Explicit). true - Implicit Mode / False - Explicit Mode - */ - public fun implicit(implicit: Boolean) { - it.property("implicit", implicit.toString()) - } - - /** - * Password to use for login - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Set the underlying security protocol. - */ - public fun securityProtocol(securityProtocol: String) { - it.property("securityProtocol", securityProtocol) - } - - /** - * Gets the JSSE configuration that overrides any settings in - * FtpsEndpoint#ftpClientKeyStoreParameters, ftpClientTrustStoreParameters, and - * FtpsConfiguration#getSecurityProtocol(). - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * Username to use for login - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * To shuffle the list of files (sort in random order) - */ - public fun shuffle(shuffle: String) { - it.property("shuffle", shuffle) - } - - /** - * To shuffle the list of files (sort in random order) - */ - public fun shuffle(shuffle: Boolean) { - it.property("shuffle", shuffle.toString()) - } - - /** - * Built-in sort by using the File Language. Supports nested sorts, so you can have a sort by file - * name and as a 2nd group sort by modified date. - */ - public fun sortBy(sortBy: String) { - it.property("sortBy", sortBy) - } - - /** - * Pluggable sorter as a java.util.Comparator class. - */ - public fun sorter(sorter: String) { - it.property("sorter", sorter) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GeocoderUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GeocoderUriDsl.kt deleted file mode 100644 index d0e384761a8ee..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GeocoderUriDsl.kt +++ /dev/null @@ -1,199 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Find geocodes (latitude and longitude) for a given address or the other way round. - */ -public fun UriDsl.geocoder(i: GeocoderUriDsl.() -> Unit) { - GeocoderUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GeocoderUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("geocoder") - } - - private var address: String = "" - - private var latlng: String = "" - - /** - * The geo address which should be prefixed with address: - */ - public fun address(address: String) { - this.address = address - it.url("$address:$latlng") - } - - /** - * The geo latitude and longitude which should be prefixed with latlng: - */ - public fun latlng(latlng: String) { - this.latlng = latlng - it.url("$address:$latlng") - } - - /** - * Whether to only enrich the Exchange with headers, and leave the body as-is. - */ - public fun headersOnly(headersOnly: String) { - it.property("headersOnly", headersOnly) - } - - /** - * Whether to only enrich the Exchange with headers, and leave the body as-is. - */ - public fun headersOnly(headersOnly: Boolean) { - it.property("headersOnly", headersOnly.toString()) - } - - /** - * The language to use. - */ - public fun language(language: String) { - it.property("language", language) - } - - /** - * URL to the geocoder server. Mandatory for Nominatim server. - */ - public fun serverUrl(serverUrl: String) { - it.property("serverUrl", serverUrl) - } - - /** - * Type of GeoCoding server. Supported Nominatim and Google. - */ - public fun type(type: String) { - it.property("type", type) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Proxy Authentication Domain to access Google GeoCoding server. - */ - public fun proxyAuthDomain(proxyAuthDomain: String) { - it.property("proxyAuthDomain", proxyAuthDomain) - } - - /** - * Proxy Authentication Host to access Google GeoCoding server. - */ - public fun proxyAuthHost(proxyAuthHost: String) { - it.property("proxyAuthHost", proxyAuthHost) - } - - /** - * Authentication Method to Google GeoCoding server. - */ - public fun proxyAuthMethod(proxyAuthMethod: String) { - it.property("proxyAuthMethod", proxyAuthMethod) - } - - /** - * Proxy Password to access GeoCoding server. - */ - public fun proxyAuthPassword(proxyAuthPassword: String) { - it.property("proxyAuthPassword", proxyAuthPassword) - } - - /** - * Proxy Username to access GeoCoding server. - */ - public fun proxyAuthUsername(proxyAuthUsername: String) { - it.property("proxyAuthUsername", proxyAuthUsername) - } - - /** - * Proxy Host to access GeoCoding server. - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * Proxy Port to access GeoCoding server. - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * Proxy Port to access GeoCoding server. - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * API Key to access Google. Mandatory for Google GeoCoding server. - */ - public fun apiKey(apiKey: String) { - it.property("apiKey", apiKey) - } - - /** - * Client ID to access Google GeoCoding server. - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * Client Key to access Google GeoCoding server. - */ - public fun clientKey(clientKey: String) { - it.property("clientKey", clientKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GitUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GitUriDsl.kt deleted file mode 100644 index 2052d33f37931..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GitUriDsl.kt +++ /dev/null @@ -1,207 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on git repositories. - */ -public fun UriDsl.git(i: GitUriDsl.() -> Unit) { - GitUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GitUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("git") - } - - private var localPath: String = "" - - /** - * Local repository path - */ - public fun localPath(localPath: String) { - this.localPath = localPath - it.url("$localPath") - } - - /** - * The branch name to work on - */ - public fun branchName(branchName: String) { - it.property("branchName", branchName) - } - - /** - * The consumer type - */ - public fun type(type: String) { - it.property("type", type) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * The flag to manage empty git commits - */ - public fun allowEmpty(allowEmpty: String) { - it.property("allowEmpty", allowEmpty) - } - - /** - * The flag to manage empty git commits - */ - public fun allowEmpty(allowEmpty: Boolean) { - it.property("allowEmpty", allowEmpty.toString()) - } - - /** - * The operation to do on the repository - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Remote repository password - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * The remote repository name to use in particular operation like pull - */ - public fun remoteName(remoteName: String) { - it.property("remoteName", remoteName) - } - - /** - * The remote repository path - */ - public fun remotePath(remotePath: String) { - it.property("remotePath", remotePath) - } - - /** - * The tag name to work on - */ - public fun tagName(tagName: String) { - it.property("tagName", tagName) - } - - /** - * Name of target branch in merge operation. If not supplied will try to use init.defaultBranch - * git configs. If not configured will use default value - */ - public fun targetBranchName(targetBranchName: String) { - it.property("targetBranchName", targetBranchName) - } - - /** - * Remote repository username - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * A String with path to a .gitconfig file - */ - public fun gitConfigFile(gitConfigFile: String) { - it.property("gitConfigFile", gitConfigFile) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GithubUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GithubUriDsl.kt deleted file mode 100644 index 7644ba3ec0fd0..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GithubUriDsl.kt +++ /dev/null @@ -1,397 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Interact with the GitHub API. - */ -public fun UriDsl.github(i: GithubUriDsl.() -> Unit) { - GithubUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GithubUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("github") - } - - private var type: String = "" - - private var branchName: String = "" - - /** - * What git operation to execute - */ - public fun type(type: String) { - this.type = type - it.url("$type/$branchName") - } - - /** - * Name of branch - */ - public fun branchName(branchName: String) { - this.branchName = branchName - it.url("$type/$branchName") - } - - /** - * GitHub repository name - */ - public fun repoName(repoName: String) { - it.property("repoName", repoName) - } - - /** - * GitHub repository owner (organization) - */ - public fun repoOwner(repoOwner: String) { - it.property("repoOwner", repoOwner) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * The starting sha to use for polling commits with the commit consumer. The value can either be a - * sha for the sha to start from, or use beginning to start from the beginning, or last to start from - * the last commit. - */ - public fun startingSha(startingSha: String) { - it.property("startingSha", startingSha) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To specify a custom strategy that configures how the EventsConsumer fetches events. - */ - public fun eventFetchStrategy(eventFetchStrategy: String) { - it.property("eventFetchStrategy", eventFetchStrategy) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * To use the given encoding when getting a git commit file - */ - public fun encoding(encoding: String) { - it.property("encoding", encoding) - } - - /** - * To set git commit status state - */ - public fun state(state: String) { - it.property("state", state) - } - - /** - * To set git commit status target url - */ - public fun targetUrl(targetUrl: String) { - it.property("targetUrl", targetUrl) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * GitHub OAuth token. Must be configured on either component or endpoint. - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleBigquerySqlUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleBigquerySqlUriDsl.kt deleted file mode 100644 index 7ddfda3914738..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleBigquerySqlUriDsl.kt +++ /dev/null @@ -1,102 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Access Google Cloud BigQuery service using SQL queries. - */ -public fun UriDsl.`google-bigquery-sql`(i: GoogleBigquerySqlUriDsl.() -> Unit) { - GoogleBigquerySqlUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GoogleBigquerySqlUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("google-bigquery-sql") - } - - private var projectId: String = "" - - private var queryString: String = "" - - /** - * Google Cloud Project Id - */ - public fun projectId(projectId: String) { - this.projectId = projectId - it.url("$projectId:$queryString") - } - - /** - * BigQuery standard SQL query - */ - public fun queryString(queryString: String) { - this.queryString = queryString - it.url("$projectId:$queryString") - } - - /** - * ConnectionFactory to obtain connection to Bigquery Service. If not provided the default one - * will be used - */ - public fun connectionFactory(connectionFactory: String) { - it.property("connectionFactory", connectionFactory) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Service account key in json format to authenticate an application as a service account to - * google cloud platform - */ - public fun serviceAccountKey(serviceAccountKey: String) { - it.property("serviceAccountKey", serviceAccountKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleBigqueryUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleBigqueryUriDsl.kt deleted file mode 100644 index 4cb06fb99dfcb..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleBigqueryUriDsl.kt +++ /dev/null @@ -1,119 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Google BigQuery data warehouse for analytics. - */ -public fun UriDsl.`google-bigquery`(i: GoogleBigqueryUriDsl.() -> Unit) { - GoogleBigqueryUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GoogleBigqueryUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("google-bigquery") - } - - private var projectId: String = "" - - private var datasetId: String = "" - - private var tableId: String = "" - - /** - * Google Cloud Project Id - */ - public fun projectId(projectId: String) { - this.projectId = projectId - it.url("$projectId:$datasetId:$tableId") - } - - /** - * BigQuery Dataset Id - */ - public fun datasetId(datasetId: String) { - this.datasetId = datasetId - it.url("$projectId:$datasetId:$tableId") - } - - /** - * BigQuery table id - */ - public fun tableId(tableId: String) { - this.tableId = tableId - it.url("$projectId:$datasetId:$tableId") - } - - /** - * ConnectionFactory to obtain connection to Bigquery Service. If not provided the default one - * will be used - */ - public fun connectionFactory(connectionFactory: String) { - it.property("connectionFactory", connectionFactory) - } - - /** - * Field name to use as insert id - */ - public fun useAsInsertId(useAsInsertId: String) { - it.property("useAsInsertId", useAsInsertId) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Service account key in json format to authenticate an application as a service account to - * google cloud platform - */ - public fun serviceAccountKey(serviceAccountKey: String) { - it.property("serviceAccountKey", serviceAccountKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleCalendarStreamUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleCalendarStreamUriDsl.kt deleted file mode 100644 index 0b54974f09cb3..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleCalendarStreamUriDsl.kt +++ /dev/null @@ -1,459 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Poll for changes in a Google Calendar. - */ -public fun UriDsl.`google-calendar-stream`(i: GoogleCalendarStreamUriDsl.() -> Unit) { - GoogleCalendarStreamUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GoogleCalendarStreamUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("google-calendar-stream") - } - - private var index: String = "" - - /** - * Specifies an index for the endpoint - */ - public fun index(index: String) { - this.index = index - it.url("$index") - } - - /** - * Google Calendar application name. Example would be camel-google-calendar/1.0 - */ - public fun applicationName(applicationName: String) { - it.property("applicationName", applicationName) - } - - /** - * The calendarId to be used - */ - public fun calendarId(calendarId: String) { - it.property("calendarId", calendarId) - } - - /** - * Client ID of the calendar application - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * Take into account the lastUpdate of the last event polled as start date for the next poll - */ - public fun considerLastUpdate(considerLastUpdate: String) { - it.property("considerLastUpdate", considerLastUpdate) - } - - /** - * Take into account the lastUpdate of the last event polled as start date for the next poll - */ - public fun considerLastUpdate(considerLastUpdate: Boolean) { - it.property("considerLastUpdate", considerLastUpdate.toString()) - } - - /** - * Consume events in the selected calendar from now on - */ - public fun consumeFromNow(consumeFromNow: String) { - it.property("consumeFromNow", consumeFromNow) - } - - /** - * Consume events in the selected calendar from now on - */ - public fun consumeFromNow(consumeFromNow: Boolean) { - it.property("consumeFromNow", consumeFromNow.toString()) - } - - /** - * Delegate for wide-domain service account - */ - public fun `delegate`(`delegate`: String) { - it.property("delegate", delegate) - } - - /** - * Max results to be returned - */ - public fun maxResults(maxResults: String) { - it.property("maxResults", maxResults) - } - - /** - * Max results to be returned - */ - public fun maxResults(maxResults: Int) { - it.property("maxResults", maxResults.toString()) - } - - /** - * The query to execute on calendar - */ - public fun query(query: String) { - it.property("query", query) - } - - /** - * Specifies the level of permissions you want a calendar application to have to a user account. - * See https://developers.google.com/calendar/auth for more info. - */ - public fun scopes(scopes: String) { - it.property("scopes", scopes) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Sync events, see https://developers.google.com/calendar/v3/sync Note: not compatible with: - * 'query' and 'considerLastUpdate' parameters - */ - public fun syncFlow(syncFlow: String) { - it.property("syncFlow", syncFlow) - } - - /** - * Sync events, see https://developers.google.com/calendar/v3/sync Note: not compatible with: - * 'query' and 'considerLastUpdate' parameters - */ - public fun syncFlow(syncFlow: Boolean) { - it.property("syncFlow", syncFlow.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * OAuth 2 access token. This typically expires after an hour so refreshToken is recommended for - * long term usage. - */ - public fun accessToken(accessToken: String) { - it.property("accessToken", accessToken) - } - - /** - * Client secret of the calendar application - */ - public fun clientSecret(clientSecret: String) { - it.property("clientSecret", clientSecret) - } - - /** - * The emailAddress of the Google Service Account. - */ - public fun emailAddress(emailAddress: String) { - it.property("emailAddress", emailAddress) - } - - /** - * The name of the p12 file which has the private key to use with the Google Service Account. - */ - public fun p12FileName(p12FileName: String) { - it.property("p12FileName", p12FileName) - } - - /** - * OAuth 2 refresh token. Using this, the Google Calendar component can obtain a new accessToken - * whenever the current one expires - a necessity if the application is long-lived. - */ - public fun refreshToken(refreshToken: String) { - it.property("refreshToken", refreshToken) - } - - /** - * Service account key in json format to authenticate an application as a service account. Accept - * base64 adding the prefix base64: - */ - public fun serviceAccountKey(serviceAccountKey: String) { - it.property("serviceAccountKey", serviceAccountKey) - } - - /** - * The email address of the user the application is trying to impersonate in the service account - * flow. - */ - public fun user(user: String) { - it.property("user", user) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleCalendarUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleCalendarUriDsl.kt deleted file mode 100644 index 0f410e9bf55fc..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleCalendarUriDsl.kt +++ /dev/null @@ -1,429 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform various operations on a Google Calendar. - */ -public fun UriDsl.`google-calendar`(i: GoogleCalendarUriDsl.() -> Unit) { - GoogleCalendarUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GoogleCalendarUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("google-calendar") - } - - private var apiName: String = "" - - private var methodName: String = "" - - /** - * What kind of operation to perform - */ - public fun apiName(apiName: String) { - this.apiName = apiName - it.url("$apiName/$methodName") - } - - /** - * What sub operation to use for the selected operation - */ - public fun methodName(methodName: String) { - this.methodName = methodName - it.url("$apiName/$methodName") - } - - /** - * Google calendar application name. Example would be camel-google-calendar/1.0 - */ - public fun applicationName(applicationName: String) { - it.property("applicationName", applicationName) - } - - /** - * Client ID of the calendar application - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * Delegate for wide-domain service account - */ - public fun `delegate`(`delegate`: String) { - it.property("delegate", delegate) - } - - /** - * Sets the name of a parameter to be passed in the exchange In Body - */ - public fun inBody(inBody: String) { - it.property("inBody", inBody) - } - - /** - * Specifies the level of permissions you want a calendar application to have to a user account. - * You can separate multiple scopes by comma. See - * https://developers.google.com/google-apps/calendar/auth for more info. - */ - public fun scopes(scopes: String) { - it.property("scopes", scopes) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * OAuth 2 access token. This typically expires after an hour so refreshToken is recommended for - * long term usage. - */ - public fun accessToken(accessToken: String) { - it.property("accessToken", accessToken) - } - - /** - * Client secret of the calendar application - */ - public fun clientSecret(clientSecret: String) { - it.property("clientSecret", clientSecret) - } - - /** - * The emailAddress of the Google Service Account. - */ - public fun emailAddress(emailAddress: String) { - it.property("emailAddress", emailAddress) - } - - /** - * The name of the p12 file which has the private key to use with the Google Service Account. - */ - public fun p12FileName(p12FileName: String) { - it.property("p12FileName", p12FileName) - } - - /** - * OAuth 2 refresh token. Using this, the Google Calendar component can obtain a new accessToken - * whenever the current one expires - a necessity if the application is long-lived. - */ - public fun refreshToken(refreshToken: String) { - it.property("refreshToken", refreshToken) - } - - /** - * Service account key in json format to authenticate an application as a service account. Accept - * base64 adding the prefix base64: - */ - public fun serviceAccountKey(serviceAccountKey: String) { - it.property("serviceAccountKey", serviceAccountKey) - } - - /** - * The email address of the user the application is trying to impersonate in the service account - * flow - */ - public fun user(user: String) { - it.property("user", user) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleDriveUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleDriveUriDsl.kt deleted file mode 100644 index af2c3deed1735..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleDriveUriDsl.kt +++ /dev/null @@ -1,414 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage files in Google Drive. - */ -public fun UriDsl.`google-drive`(i: GoogleDriveUriDsl.() -> Unit) { - GoogleDriveUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GoogleDriveUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("google-drive") - } - - private var apiName: String = "" - - private var methodName: String = "" - - /** - * What kind of operation to perform - */ - public fun apiName(apiName: String) { - this.apiName = apiName - it.url("$apiName/$methodName") - } - - /** - * What sub operation to use for the selected operation - */ - public fun methodName(methodName: String) { - this.methodName = methodName - it.url("$apiName/$methodName") - } - - /** - * Google drive application name. Example would be camel-google-drive/1.0 - */ - public fun applicationName(applicationName: String) { - it.property("applicationName", applicationName) - } - - /** - * To use the GoogleCalendarClientFactory as factory for creating the client. Will by default use - * BatchGoogleDriveClientFactory - */ - public fun clientFactory(clientFactory: String) { - it.property("clientFactory", clientFactory) - } - - /** - * Client ID of the drive application - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * Delegate for wide-domain service account - */ - public fun `delegate`(`delegate`: String) { - it.property("delegate", delegate) - } - - /** - * Sets the name of a parameter to be passed in the exchange In Body - */ - public fun inBody(inBody: String) { - it.property("inBody", inBody) - } - - /** - * Specifies the level of permissions you want a drive application to have to a user account. See - * https://developers.google.com/drive/web/scopes for more info. - */ - public fun scopes(scopes: String) { - it.property("scopes", scopes) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * OAuth 2 access token. This typically expires after an hour so refreshToken is recommended for - * long term usage. - */ - public fun accessToken(accessToken: String) { - it.property("accessToken", accessToken) - } - - /** - * Client secret of the drive application - */ - public fun clientSecret(clientSecret: String) { - it.property("clientSecret", clientSecret) - } - - /** - * OAuth 2 refresh token. Using this, the Google Calendar component can obtain a new accessToken - * whenever the current one expires - a necessity if the application is long-lived. - */ - public fun refreshToken(refreshToken: String) { - it.property("refreshToken", refreshToken) - } - - /** - * Service account key in json format to authenticate an application as a service account. Accept - * base64 adding the prefix base64: - */ - public fun serviceAccountKey(serviceAccountKey: String) { - it.property("serviceAccountKey", serviceAccountKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleFunctionsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleFunctionsUriDsl.kt deleted file mode 100644 index ecb852fbb975a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleFunctionsUriDsl.kt +++ /dev/null @@ -1,125 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage and invoke Google Cloud Functions - */ -public fun UriDsl.`google-functions`(i: GoogleFunctionsUriDsl.() -> Unit) { - GoogleFunctionsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GoogleFunctionsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("google-functions") - } - - private var functionName: String = "" - - /** - * The user-defined name of the function - */ - public fun functionName(functionName: String) { - this.functionName = functionName - it.url("$functionName") - } - - /** - * Service account key to authenticate an application as a service account - */ - public fun serviceAccountKey(serviceAccountKey: String) { - it.property("serviceAccountKey", serviceAccountKey) - } - - /** - * The Google Cloud Location (Region) where the Function is located - */ - public fun location(location: String) { - it.property("location", location) - } - - /** - * The operation to perform on the producer. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Specifies if the request is a pojo request - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * Specifies if the request is a pojo request - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * The Google Cloud Project name where the Function is located - */ - public fun project(project: String) { - it.property("project", project) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The client to use during service invocation. - */ - public fun client(client: String) { - it.property("client", client) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleMailStreamUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleMailStreamUriDsl.kt deleted file mode 100644 index 136e8bd6896a9..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleMailStreamUriDsl.kt +++ /dev/null @@ -1,421 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Poll for incoming messages in Google Mail. - */ -public fun UriDsl.`google-mail-stream`(i: GoogleMailStreamUriDsl.() -> Unit) { - GoogleMailStreamUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GoogleMailStreamUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("google-mail-stream") - } - - private var index: String = "" - - /** - * Currently not in use - */ - public fun index(index: String) { - this.index = index - it.url("$index") - } - - /** - * Google mail application name. Example would be camel-google-mail/1.0 - */ - public fun applicationName(applicationName: String) { - it.property("applicationName", applicationName) - } - - /** - * Client ID of the mail application - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * Delegate for wide-domain service account - */ - public fun `delegate`(`delegate`: String) { - it.property("delegate", delegate) - } - - /** - * Comma separated list of labels to take into account - */ - public fun labels(labels: String) { - it.property("labels", labels) - } - - /** - * Mark the message as read once it has been consumed - */ - public fun markAsRead(markAsRead: String) { - it.property("markAsRead", markAsRead) - } - - /** - * Mark the message as read once it has been consumed - */ - public fun markAsRead(markAsRead: Boolean) { - it.property("markAsRead", markAsRead.toString()) - } - - /** - * Max results to be returned - */ - public fun maxResults(maxResults: String) { - it.property("maxResults", maxResults) - } - - /** - * Max results to be returned - */ - public fun maxResults(maxResults: Int) { - it.property("maxResults", maxResults.toString()) - } - - /** - * The query to execute on gmail box - */ - public fun query(query: String) { - it.property("query", query) - } - - /** - * Whether to store the entire email message in an RFC 2822 formatted and base64url encoded string - * (in JSon format), in the Camel message body. - */ - public fun raw(raw: String) { - it.property("raw", raw) - } - - /** - * Whether to store the entire email message in an RFC 2822 formatted and base64url encoded string - * (in JSon format), in the Camel message body. - */ - public fun raw(raw: Boolean) { - it.property("raw", raw.toString()) - } - - /** - * GMail scopes - */ - public fun scopes(scopes: String) { - it.property("scopes", scopes) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * OAuth 2 access token. This typically expires after an hour so refreshToken is recommended for - * long term usage. - */ - public fun accessToken(accessToken: String) { - it.property("accessToken", accessToken) - } - - /** - * Client secret of the mail application - */ - public fun clientSecret(clientSecret: String) { - it.property("clientSecret", clientSecret) - } - - /** - * OAuth 2 refresh token. Using this, the Google Calendar component can obtain a new accessToken - * whenever the current one expires - a necessity if the application is long-lived. - */ - public fun refreshToken(refreshToken: String) { - it.property("refreshToken", refreshToken) - } - - /** - * Sets .json file with credentials for Service account - */ - public fun serviceAccountKey(serviceAccountKey: String) { - it.property("serviceAccountKey", serviceAccountKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleMailUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleMailUriDsl.kt deleted file mode 100644 index c48c8ae757149..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleMailUriDsl.kt +++ /dev/null @@ -1,405 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage messages in Google Mail. - */ -public fun UriDsl.`google-mail`(i: GoogleMailUriDsl.() -> Unit) { - GoogleMailUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GoogleMailUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("google-mail") - } - - private var apiName: String = "" - - private var methodName: String = "" - - /** - * What kind of operation to perform - */ - public fun apiName(apiName: String) { - this.apiName = apiName - it.url("$apiName/$methodName") - } - - /** - * What sub operation to use for the selected operation - */ - public fun methodName(methodName: String) { - this.methodName = methodName - it.url("$apiName/$methodName") - } - - /** - * Google mail application name. Example would be camel-google-mail/1.0 - */ - public fun applicationName(applicationName: String) { - it.property("applicationName", applicationName) - } - - /** - * Client ID of the mail application - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * Delegate for wide-domain service account - */ - public fun `delegate`(`delegate`: String) { - it.property("delegate", delegate) - } - - /** - * Sets the name of a parameter to be passed in the exchange In Body - */ - public fun inBody(inBody: String) { - it.property("inBody", inBody) - } - - /** - * GMail scopes - */ - public fun scopes(scopes: String) { - it.property("scopes", scopes) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * OAuth 2 access token. This typically expires after an hour so refreshToken is recommended for - * long term usage. - */ - public fun accessToken(accessToken: String) { - it.property("accessToken", accessToken) - } - - /** - * Client secret of the mail application - */ - public fun clientSecret(clientSecret: String) { - it.property("clientSecret", clientSecret) - } - - /** - * OAuth 2 refresh token. Using this, the Google Calendar component can obtain a new accessToken - * whenever the current one expires - a necessity if the application is long-lived. - */ - public fun refreshToken(refreshToken: String) { - it.property("refreshToken", refreshToken) - } - - /** - * Service account key in json format to authenticate an application as a service account. Accept - * base64 adding the prefix base64: - */ - public fun serviceAccountKey(serviceAccountKey: String) { - it.property("serviceAccountKey", serviceAccountKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GooglePubsubLiteUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GooglePubsubLiteUriDsl.kt deleted file mode 100644 index 422b7edc350b8..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GooglePubsubLiteUriDsl.kt +++ /dev/null @@ -1,233 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from Google Cloud Platform PubSub Lite Service. - */ -public fun UriDsl.`google-pubsub-lite`(i: GooglePubsubLiteUriDsl.() -> Unit) { - GooglePubsubLiteUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GooglePubsubLiteUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("google-pubsub-lite") - } - - private var projectId: String = "" - - private var location: String = "" - - private var destinationName: String = "" - - /** - * The Google Cloud PubSub Lite Project Id - */ - public fun projectId(projectId: String) { - this.projectId = projectId - it.url("$projectId:$location:$destinationName") - } - - /** - * The Google Cloud PubSub Lite Project Id - */ - public fun projectId(projectId: Int) { - this.projectId = projectId.toString() - it.url("$projectId:$location:$destinationName") - } - - /** - * The Google Cloud PubSub Lite location - */ - public fun location(location: String) { - this.location = location - it.url("$projectId:$location:$destinationName") - } - - /** - * The Destination Name. For the consumer this will be the subscription name, while for the - * producer this will be the topic name. - */ - public fun destinationName(destinationName: String) { - this.destinationName = destinationName - it.url("$projectId:$location:$destinationName") - } - - /** - * Logger ID to use when a match to the parent route required - */ - public fun loggerId(loggerId: String) { - it.property("loggerId", loggerId) - } - - /** - * AUTO = exchange gets ack'ed/nack'ed on completion. NONE = downstream process has to ack/nack - * explicitly - */ - public fun ackMode(ackMode: String) { - it.property("ackMode", ackMode) - } - - /** - * The number of parallel streams consuming from the subscription - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * The number of parallel streams consuming from the subscription - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * Set the maximum period a message ack deadline will be extended. Value in seconds - */ - public fun maxAckExtensionPeriod(maxAckExtensionPeriod: String) { - it.property("maxAckExtensionPeriod", maxAckExtensionPeriod) - } - - /** - * Set the maximum period a message ack deadline will be extended. Value in seconds - */ - public fun maxAckExtensionPeriod(maxAckExtensionPeriod: Int) { - it.property("maxAckExtensionPeriod", maxAckExtensionPeriod.toString()) - } - - /** - * The max number of messages to receive from the server in a single API call - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * The max number of messages to receive from the server in a single API call - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Pub/Sub endpoint to use. Required when using message ordering, and ensures that messages are - * received in order even when multiple publishers are used - */ - public fun pubsubEndpoint(pubsubEndpoint: String) { - it.property("pubsubEndpoint", pubsubEndpoint) - } - - /** - * A custom GooglePubsubLiteSerializer to use for serializing message payloads in the producer - */ - public fun serializer(serializer: String) { - it.property("serializer", serializer) - } - - /** - * The Service account key that can be used as credentials for the PubSub publisher/subscriber. It - * can be loaded by default from classpath, but you can prefix with classpath:, file:, or http: to - * load the resource from different systems. - */ - public fun serviceAccountKey(serviceAccountKey: String) { - it.property("serviceAccountKey", serviceAccountKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GooglePubsubUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GooglePubsubUriDsl.kt deleted file mode 100644 index e20ae21ba4485..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GooglePubsubUriDsl.kt +++ /dev/null @@ -1,259 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from Google Cloud Platform PubSub Service. - */ -public fun UriDsl.`google-pubsub`(i: GooglePubsubUriDsl.() -> Unit) { - GooglePubsubUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GooglePubsubUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("google-pubsub") - } - - private var projectId: String = "" - - private var destinationName: String = "" - - /** - * The Google Cloud PubSub Project Id - */ - public fun projectId(projectId: String) { - this.projectId = projectId - it.url("$projectId:$destinationName") - } - - /** - * The Destination Name. For the consumer this will be the subscription name, while for the - * producer this will be the topic name. - */ - public fun destinationName(destinationName: String) { - this.destinationName = destinationName - it.url("$projectId:$destinationName") - } - - /** - * Use Credentials when interacting with PubSub service (no authentication is required when using - * emulator). - */ - public fun authenticate(authenticate: String) { - it.property("authenticate", authenticate) - } - - /** - * Use Credentials when interacting with PubSub service (no authentication is required when using - * emulator). - */ - public fun authenticate(authenticate: Boolean) { - it.property("authenticate", authenticate.toString()) - } - - /** - * Logger ID to use when a match to the parent route required - */ - public fun loggerId(loggerId: String) { - it.property("loggerId", loggerId) - } - - /** - * The Service account key that can be used as credentials for the PubSub publisher/subscriber. It - * can be loaded by default from classpath, but you can prefix with classpath:, file:, or http: to - * load the resource from different systems. - */ - public fun serviceAccountKey(serviceAccountKey: String) { - it.property("serviceAccountKey", serviceAccountKey) - } - - /** - * AUTO = exchange gets ack'ed/nack'ed on completion. NONE = downstream process has to ack/nack - * explicitly - */ - public fun ackMode(ackMode: String) { - it.property("ackMode", ackMode) - } - - /** - * The number of parallel streams consuming from the subscription - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * The number of parallel streams consuming from the subscription - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * Set the maximum period a message ack deadline will be extended. Value in seconds - */ - public fun maxAckExtensionPeriod(maxAckExtensionPeriod: String) { - it.property("maxAckExtensionPeriod", maxAckExtensionPeriod) - } - - /** - * Set the maximum period a message ack deadline will be extended. Value in seconds - */ - public fun maxAckExtensionPeriod(maxAckExtensionPeriod: Int) { - it.property("maxAckExtensionPeriod", maxAckExtensionPeriod.toString()) - } - - /** - * The max number of messages to receive from the server in a single API call - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * The max number of messages to receive from the server in a single API call - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * Synchronously pull batches of messages - */ - public fun synchronousPull(synchronousPull: String) { - it.property("synchronousPull", synchronousPull) - } - - /** - * Synchronously pull batches of messages - */ - public fun synchronousPull(synchronousPull: Boolean) { - it.property("synchronousPull", synchronousPull.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Should message ordering be enabled - */ - public fun messageOrderingEnabled(messageOrderingEnabled: String) { - it.property("messageOrderingEnabled", messageOrderingEnabled) - } - - /** - * Should message ordering be enabled - */ - public fun messageOrderingEnabled(messageOrderingEnabled: Boolean) { - it.property("messageOrderingEnabled", messageOrderingEnabled.toString()) - } - - /** - * Pub/Sub endpoint to use. Required when using message ordering, and ensures that messages are - * received in order even when multiple publishers are used - */ - public fun pubsubEndpoint(pubsubEndpoint: String) { - it.property("pubsubEndpoint", pubsubEndpoint) - } - - /** - * A custom GooglePubsubSerializer to use for serializing message payloads in the producer - */ - public fun serializer(serializer: String) { - it.property("serializer", serializer) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleSecretManagerUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleSecretManagerUriDsl.kt deleted file mode 100644 index 9c79d2cc711a7..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleSecretManagerUriDsl.kt +++ /dev/null @@ -1,111 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage Google Secret Manager Secrets - */ -public fun UriDsl.`google-secret-manager`(i: GoogleSecretManagerUriDsl.() -> Unit) { - GoogleSecretManagerUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GoogleSecretManagerUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("google-secret-manager") - } - - private var project: String = "" - - /** - * The Google Cloud Project Id name related to the Secret Manager - */ - public fun project(project: String) { - this.project = project - it.url("$project") - } - - /** - * Service account key to authenticate an application as a service account - */ - public fun serviceAccountKey(serviceAccountKey: String) { - it.property("serviceAccountKey", serviceAccountKey) - } - - /** - * The operation to perform on the producer. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Specifies if the request is a pojo request - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * Specifies if the request is a pojo request - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The client to use during service invocation. - */ - public fun client(client: String) { - it.property("client", client) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleSheetsStreamUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleSheetsStreamUriDsl.kt deleted file mode 100644 index ee61aa7c0c5f2..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleSheetsStreamUriDsl.kt +++ /dev/null @@ -1,433 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Poll for changes in Google Sheets. - */ -public fun UriDsl.`google-sheets-stream`(i: GoogleSheetsStreamUriDsl.() -> Unit) { - GoogleSheetsStreamUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GoogleSheetsStreamUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("google-sheets-stream") - } - - private var spreadsheetId: String = "" - - /** - * Specifies the spreadsheet identifier that is used to identify the target to obtain. - */ - public fun spreadsheetId(spreadsheetId: String) { - this.spreadsheetId = spreadsheetId - it.url("$spreadsheetId") - } - - /** - * Google Sheets application name. Example would be camel-google-sheets/1.0 - */ - public fun applicationName(applicationName: String) { - it.property("applicationName", applicationName) - } - - /** - * Client ID of the sheets application - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * Delegate for wide-domain service account - */ - public fun `delegate`(`delegate`: String) { - it.property("delegate", delegate) - } - - /** - * True if grid data should be returned. - */ - public fun includeGridData(includeGridData: String) { - it.property("includeGridData", includeGridData) - } - - /** - * True if grid data should be returned. - */ - public fun includeGridData(includeGridData: Boolean) { - it.property("includeGridData", includeGridData.toString()) - } - - /** - * Specifies the major dimension that results should use.. - */ - public fun majorDimension(majorDimension: String) { - it.property("majorDimension", majorDimension) - } - - /** - * Specify the maximum number of returned results. This will limit the number of rows in a - * returned value range data set or the number of returned value ranges in a batch request. - */ - public fun maxResults(maxResults: String) { - it.property("maxResults", maxResults) - } - - /** - * Specify the maximum number of returned results. This will limit the number of rows in a - * returned value range data set or the number of returned value ranges in a batch request. - */ - public fun maxResults(maxResults: Int) { - it.property("maxResults", maxResults.toString()) - } - - /** - * Specifies the range of rows and columns in a sheet to get data from. - */ - public fun range(range: String) { - it.property("range", range) - } - - /** - * Specifies the level of permissions you want a sheets application to have to a user account. See - * https://developers.google.com/identity/protocols/googlescopes for more info. - */ - public fun scopes(scopes: String) { - it.property("scopes", scopes) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * True if value range result should be split into rows or columns to process each of them - * individually. When true each row or column is represented with a separate exchange in batch - * processing. Otherwise value range object is used as exchange junk size. - */ - public fun splitResults(splitResults: String) { - it.property("splitResults", splitResults) - } - - /** - * True if value range result should be split into rows or columns to process each of them - * individually. When true each row or column is represented with a separate exchange in batch - * processing. Otherwise value range object is used as exchange junk size. - */ - public fun splitResults(splitResults: Boolean) { - it.property("splitResults", splitResults.toString()) - } - - /** - * Determines how values should be rendered in the output. - */ - public fun valueRenderOption(valueRenderOption: String) { - it.property("valueRenderOption", valueRenderOption) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * OAuth 2 access token. This typically expires after an hour so refreshToken is recommended for - * long term usage. - */ - public fun accessToken(accessToken: String) { - it.property("accessToken", accessToken) - } - - /** - * Client secret of the sheets application - */ - public fun clientSecret(clientSecret: String) { - it.property("clientSecret", clientSecret) - } - - /** - * OAuth 2 refresh token. Using this, the Google Sheets component can obtain a new accessToken - * whenever the current one expires - a necessity if the application is long-lived. - */ - public fun refreshToken(refreshToken: String) { - it.property("refreshToken", refreshToken) - } - - /** - * Sets .json file with credentials for Service account - */ - public fun serviceAccountKey(serviceAccountKey: String) { - it.property("serviceAccountKey", serviceAccountKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleSheetsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleSheetsUriDsl.kt deleted file mode 100644 index e129aed2b69d6..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleSheetsUriDsl.kt +++ /dev/null @@ -1,424 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage spreadsheets in Google Sheets. - */ -public fun UriDsl.`google-sheets`(i: GoogleSheetsUriDsl.() -> Unit) { - GoogleSheetsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GoogleSheetsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("google-sheets") - } - - private var apiName: String = "" - - private var methodName: String = "" - - /** - * What kind of operation to perform - */ - public fun apiName(apiName: String) { - this.apiName = apiName - it.url("$apiName/$methodName") - } - - /** - * What sub operation to use for the selected operation - */ - public fun methodName(methodName: String) { - this.methodName = methodName - it.url("$apiName/$methodName") - } - - /** - * Google Sheets application name. Example would be camel-google-sheets/1.0 - */ - public fun applicationName(applicationName: String) { - it.property("applicationName", applicationName) - } - - /** - * Client ID of the sheets application - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * Delegate for wide-domain service account - */ - public fun `delegate`(`delegate`: String) { - it.property("delegate", delegate) - } - - /** - * Sets the name of a parameter to be passed in the exchange In Body - */ - public fun inBody(inBody: String) { - it.property("inBody", inBody) - } - - /** - * Specifies the level of permissions you want a sheets application to have to a user account. See - * https://developers.google.com/identity/protocols/googlescopes for more info. Multiple scopes can - * be separated by comma. - */ - public fun scopes(scopes: String) { - it.property("scopes", scopes) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * When consumer return an array or collection this will generate one exchange per element, and - * their routes will be executed once for each exchange. Set this value to false to use a single - * exchange for the entire list or array. - */ - public fun splitResult(splitResult: String) { - it.property("splitResult", splitResult) - } - - /** - * When consumer return an array or collection this will generate one exchange per element, and - * their routes will be executed once for each exchange. Set this value to false to use a single - * exchange for the entire list or array. - */ - public fun splitResult(splitResult: Boolean) { - it.property("splitResult", splitResult.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * OAuth 2 access token. This typically expires after an hour so refreshToken is recommended for - * long term usage. - */ - public fun accessToken(accessToken: String) { - it.property("accessToken", accessToken) - } - - /** - * Client secret of the sheets application - */ - public fun clientSecret(clientSecret: String) { - it.property("clientSecret", clientSecret) - } - - /** - * OAuth 2 refresh token. Using this, the Google Sheets component can obtain a new accessToken - * whenever the current one expires - a necessity if the application is long-lived. - */ - public fun refreshToken(refreshToken: String) { - it.property("refreshToken", refreshToken) - } - - /** - * Sets .json file with credentials for Service account - */ - public fun serviceAccountKey(serviceAccountKey: String) { - it.property("serviceAccountKey", serviceAccountKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleStorageUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleStorageUriDsl.kt deleted file mode 100644 index d4981a2538c2d..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GoogleStorageUriDsl.kt +++ /dev/null @@ -1,482 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Store and retrieve objects from Google Cloud Storage Service using the google-cloud-storage - * library. - */ -public fun UriDsl.`google-storage`(i: GoogleStorageUriDsl.() -> Unit) { - GoogleStorageUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GoogleStorageUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("google-storage") - } - - private var bucketName: String = "" - - /** - * Bucket name or ARN - */ - public fun bucketName(bucketName: String) { - this.bucketName = bucketName - it.url("$bucketName") - } - - /** - * Setting the autocreation of the bucket bucketName. - */ - public fun autoCreateBucket(autoCreateBucket: String) { - it.property("autoCreateBucket", autoCreateBucket) - } - - /** - * Setting the autocreation of the bucket bucketName. - */ - public fun autoCreateBucket(autoCreateBucket: Boolean) { - it.property("autoCreateBucket", autoCreateBucket.toString()) - } - - /** - * The Service account key that can be used as credentials for the Storage client. It can be - * loaded by default from classpath, but you can prefix with classpath:, file:, or http: to load the - * resource from different systems. - */ - public fun serviceAccountKey(serviceAccountKey: String) { - it.property("serviceAccountKey", serviceAccountKey) - } - - /** - * The Cloud Storage class to use when creating the new buckets - */ - public fun storageClass(storageClass: String) { - it.property("storageClass", storageClass) - } - - /** - * The storage client - */ - public fun storageClient(storageClient: String) { - it.property("storageClient", storageClient) - } - - /** - * The Cloud Storage location to use when creating the new buckets - */ - public fun storageLocation(storageLocation: String) { - it.property("storageLocation", storageLocation) - } - - /** - * Delete objects from the bucket after they have been retrieved. The delete is only performed if - * the Exchange is committed. If a rollback occurs, the object is not deleted. If this option is - * false, then the same objects will be retrieve over and over again on the polls. - */ - public fun deleteAfterRead(deleteAfterRead: String) { - it.property("deleteAfterRead", deleteAfterRead) - } - - /** - * Delete objects from the bucket after they have been retrieved. The delete is only performed if - * the Exchange is committed. If a rollback occurs, the object is not deleted. If this option is - * false, then the same objects will be retrieve over and over again on the polls. - */ - public fun deleteAfterRead(deleteAfterRead: Boolean) { - it.property("deleteAfterRead", deleteAfterRead.toString()) - } - - /** - * Define the destination bucket where an object must be moved when moveAfterRead is set to true. - */ - public fun destinationBucket(destinationBucket: String) { - it.property("destinationBucket", destinationBucket) - } - - /** - * The folder or filename to use when downloading the blob. By default, this specifies the folder - * name, and the name of the file is the blob name. For example, setting this to mydownload will be - * the same as setting mydownload/${file:name}. You can use dynamic expressions for fine-grained - * control. For example, you can specify ${date:now:yyyyMMdd}/${file:name} to store the blob in sub - * folders based on today's day. Only ${file:name} and ${file:name.noext} is supported as dynamic - * tokens for the blob name. - */ - public fun downloadFileName(downloadFileName: String) { - it.property("downloadFileName", downloadFileName) - } - - /** - * A regular expression to include only blobs with name matching it. - */ - public fun filter(filter: String) { - it.property("filter", filter) - } - - /** - * If it is true, the Object exchange will be consumed and put into the body. If false the Object - * stream will be put raw into the body and the headers will be set with the object metadata. - */ - public fun includeBody(includeBody: String) { - it.property("includeBody", includeBody) - } - - /** - * If it is true, the Object exchange will be consumed and put into the body. If false the Object - * stream will be put raw into the body and the headers will be set with the object metadata. - */ - public fun includeBody(includeBody: Boolean) { - it.property("includeBody", includeBody.toString()) - } - - /** - * If it is true, the folders/directories will be consumed. If it is false, they will be ignored, - * and Exchanges will not be created for those - */ - public fun includeFolders(includeFolders: String) { - it.property("includeFolders", includeFolders) - } - - /** - * If it is true, the folders/directories will be consumed. If it is false, they will be ignored, - * and Exchanges will not be created for those - */ - public fun includeFolders(includeFolders: Boolean) { - it.property("includeFolders", includeFolders.toString()) - } - - /** - * Move objects from the origin bucket to a different bucket after they have been retrieved. To - * accomplish the operation the destinationBucket option must be set. The copy bucket operation is - * only performed if the Exchange is committed. If a rollback occurs, the object is not moved. - */ - public fun moveAfterRead(moveAfterRead: String) { - it.property("moveAfterRead", moveAfterRead) - } - - /** - * Move objects from the origin bucket to a different bucket after they have been retrieved. To - * accomplish the operation the destinationBucket option must be set. The copy bucket operation is - * only performed if the Exchange is committed. If a rollback occurs, the object is not moved. - */ - public fun moveAfterRead(moveAfterRead: Boolean) { - it.property("moveAfterRead", moveAfterRead.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * The Object name inside the bucket - */ - public fun objectName(objectName: String) { - it.property("objectName", objectName) - } - - /** - * Set the operation for the producer - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GrapeUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GrapeUriDsl.kt deleted file mode 100644 index b14d468aba037..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GrapeUriDsl.kt +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Fetch, load and manage additional jars dynamically after Camel Context was started. - */ -public fun UriDsl.grape(i: GrapeUriDsl.() -> Unit) { - GrapeUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GrapeUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("grape") - } - - private var defaultCoordinates: String = "" - - /** - * Maven coordinates to use as default to grab if the message body is empty. - */ - public fun defaultCoordinates(defaultCoordinates: String) { - this.defaultCoordinates = defaultCoordinates - it.url("$defaultCoordinates") - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GraphqlUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GraphqlUriDsl.kt deleted file mode 100644 index 514fb2714ac2c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GraphqlUriDsl.kt +++ /dev/null @@ -1,153 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send GraphQL queries and mutations to external systems. - */ -public fun UriDsl.graphql(i: GraphqlUriDsl.() -> Unit) { - GraphqlUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GraphqlUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("graphql") - } - - private var httpUri: String = "" - - /** - * The GraphQL server URI. - */ - public fun httpUri(httpUri: String) { - this.httpUri = httpUri - it.url("$httpUri") - } - - /** - * The query or mutation name. - */ - public fun operationName(operationName: String) { - it.property("operationName", operationName) - } - - /** - * The proxy host in the format hostname:port. - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * The query text. - */ - public fun query(query: String) { - it.property("query", query) - } - - /** - * The query file name located in the classpath. - */ - public fun queryFile(queryFile: String) { - it.property("queryFile", queryFile) - } - - /** - * The name of a header containing the GraphQL query. - */ - public fun queryHeader(queryHeader: String) { - it.property("queryHeader", queryHeader) - } - - /** - * The JsonObject instance containing the operation variables. - */ - public fun variables(variables: String) { - it.property("variables", variables) - } - - /** - * The name of a header containing a JsonObject instance containing the operation variables. - */ - public fun variablesHeader(variablesHeader: String) { - it.property("variablesHeader", variablesHeader) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The access token sent in the Authorization header. - */ - public fun accessToken(accessToken: String) { - it.property("accessToken", accessToken) - } - - /** - * The JWT Authorization type. Default is Bearer. - */ - public fun jwtAuthorizationType(jwtAuthorizationType: String) { - it.property("jwtAuthorizationType", jwtAuthorizationType) - } - - /** - * The password for Basic authentication. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * The username for Basic authentication. - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GrpcUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GrpcUriDsl.kt deleted file mode 100644 index 0d8d54437afe5..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GrpcUriDsl.kt +++ /dev/null @@ -1,635 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Expose gRPC endpoints and access external gRPC endpoints. - */ -public fun UriDsl.grpc(i: GrpcUriDsl.() -> Unit) { - GrpcUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GrpcUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("grpc") - } - - private var host: String = "" - - private var port: String = "" - - private var service: String = "" - - /** - * The gRPC server host name. This is localhost or 0.0.0.0 when being a consumer or remote server - * host name when using producer. - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port/$service") - } - - /** - * The gRPC local or remote server port - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port/$service") - } - - /** - * The gRPC local or remote server port - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port/$service") - } - - /** - * Fully qualified service name from the protocol buffer descriptor file (package dot service - * definition name) - */ - public fun service(service: String) { - this.service = service - it.url("$host:$port/$service") - } - - /** - * The HTTP/2 flow control window size (MiB) - */ - public fun flowControlWindow(flowControlWindow: String) { - it.property("flowControlWindow", flowControlWindow) - } - - /** - * The HTTP/2 flow control window size (MiB) - */ - public fun flowControlWindow(flowControlWindow: Int) { - it.property("flowControlWindow", flowControlWindow.toString()) - } - - /** - * The maximum message size allowed to be received/sent (MiB) - */ - public fun maxMessageSize(maxMessageSize: String) { - it.property("maxMessageSize", maxMessageSize) - } - - /** - * The maximum message size allowed to be received/sent (MiB) - */ - public fun maxMessageSize(maxMessageSize: Int) { - it.property("maxMessageSize", maxMessageSize.toString()) - } - - /** - * Setting the autoDiscoverServerInterceptors mechanism, if true, the component will look for a - * ServerInterceptor instance in the registry automatically otherwise it will skip that checking. - */ - public fun autoDiscoverServerInterceptors(autoDiscoverServerInterceptors: String) { - it.property("autoDiscoverServerInterceptors", autoDiscoverServerInterceptors) - } - - /** - * Setting the autoDiscoverServerInterceptors mechanism, if true, the component will look for a - * ServerInterceptor instance in the registry automatically otherwise it will skip that checking. - */ - public fun autoDiscoverServerInterceptors(autoDiscoverServerInterceptors: Boolean) { - it.property("autoDiscoverServerInterceptors", autoDiscoverServerInterceptors.toString()) - } - - /** - * This option specifies the top-level strategy for processing service requests and responses in - * streaming mode. If an aggregation strategy is selected, all requests will be accumulated in the - * list, then transferred to the flow, and the accumulated responses will be sent to the sender. If a - * propagation strategy is selected, request is sent to the stream, and the response will be - * immediately sent back to the sender. If a delegation strategy is selected, request is sent to the - * stream, but no response generated under the assumption that all necessary responses will be sent - * at another part of route. Delegation strategy always comes with routeControlledStreamObserver=true - * to be able to achieve the assumption. - */ - public fun consumerStrategy(consumerStrategy: String) { - it.property("consumerStrategy", consumerStrategy) - } - - /** - * Determines if onCompleted events should be pushed to the Camel route. - */ - public fun forwardOnCompleted(forwardOnCompleted: String) { - it.property("forwardOnCompleted", forwardOnCompleted) - } - - /** - * Determines if onCompleted events should be pushed to the Camel route. - */ - public fun forwardOnCompleted(forwardOnCompleted: Boolean) { - it.property("forwardOnCompleted", forwardOnCompleted.toString()) - } - - /** - * Determines if onError events should be pushed to the Camel route. Exceptions will be set as - * message body. - */ - public fun forwardOnError(forwardOnError: String) { - it.property("forwardOnError", forwardOnError) - } - - /** - * Determines if onError events should be pushed to the Camel route. Exceptions will be set as - * message body. - */ - public fun forwardOnError(forwardOnError: Boolean) { - it.property("forwardOnError", forwardOnError.toString()) - } - - /** - * Sets the initial flow control window in bytes. - */ - public fun initialFlowControlWindow(initialFlowControlWindow: String) { - it.property("initialFlowControlWindow", initialFlowControlWindow) - } - - /** - * Sets the initial flow control window in bytes. - */ - public fun initialFlowControlWindow(initialFlowControlWindow: Int) { - it.property("initialFlowControlWindow", initialFlowControlWindow.toString()) - } - - /** - * Sets a custom keepalive time in milliseconds, the delay time for sending next keepalive ping. A - * value of Long.MAX_VALUE or a value greater or equal to NettyServerBuilder.AS_LARGE_AS_INFINITE - * will disable keepalive. - */ - public fun keepAliveTime(keepAliveTime: String) { - it.property("keepAliveTime", keepAliveTime) - } - - /** - * Sets a custom keepalive time in milliseconds, the delay time for sending next keepalive ping. A - * value of Long.MAX_VALUE or a value greater or equal to NettyServerBuilder.AS_LARGE_AS_INFINITE - * will disable keepalive. - */ - public fun keepAliveTime(keepAliveTime: Int) { - it.property("keepAliveTime", keepAliveTime.toString()) - } - - /** - * Sets a custom keepalive timeout in milliseconds, the timeout for keepalive ping requests. - */ - public fun keepAliveTimeout(keepAliveTimeout: String) { - it.property("keepAliveTimeout", keepAliveTimeout) - } - - /** - * Sets a custom keepalive timeout in milliseconds, the timeout for keepalive ping requests. - */ - public fun keepAliveTimeout(keepAliveTimeout: Int) { - it.property("keepAliveTimeout", keepAliveTimeout.toString()) - } - - /** - * The maximum number of concurrent calls permitted for each incoming server connection. Defaults - * to no limit. - */ - public fun maxConcurrentCallsPerConnection(maxConcurrentCallsPerConnection: String) { - it.property("maxConcurrentCallsPerConnection", maxConcurrentCallsPerConnection) - } - - /** - * The maximum number of concurrent calls permitted for each incoming server connection. Defaults - * to no limit. - */ - public fun maxConcurrentCallsPerConnection(maxConcurrentCallsPerConnection: Int) { - it.property("maxConcurrentCallsPerConnection", maxConcurrentCallsPerConnection.toString()) - } - - /** - * Sets a custom max connection age in milliseconds. Connections lasting longer than which will be - * gracefully terminated. A random jitter of /-10% will be added to the value. A value of - * Long.MAX_VALUE (the default) or a value greater or equal to - * NettyServerBuilder.AS_LARGE_AS_INFINITE will disable max connection age. - */ - public fun maxConnectionAge(maxConnectionAge: String) { - it.property("maxConnectionAge", maxConnectionAge) - } - - /** - * Sets a custom max connection age in milliseconds. Connections lasting longer than which will be - * gracefully terminated. A random jitter of /-10% will be added to the value. A value of - * Long.MAX_VALUE (the default) or a value greater or equal to - * NettyServerBuilder.AS_LARGE_AS_INFINITE will disable max connection age. - */ - public fun maxConnectionAge(maxConnectionAge: Int) { - it.property("maxConnectionAge", maxConnectionAge.toString()) - } - - /** - * Sets a custom grace time in milliseconds for the graceful connection termination. A value of - * Long.MAX_VALUE (the default) or a value greater or equal to - * NettyServerBuilder.AS_LARGE_AS_INFINITE is considered infinite. - */ - public fun maxConnectionAgeGrace(maxConnectionAgeGrace: String) { - it.property("maxConnectionAgeGrace", maxConnectionAgeGrace) - } - - /** - * Sets a custom grace time in milliseconds for the graceful connection termination. A value of - * Long.MAX_VALUE (the default) or a value greater or equal to - * NettyServerBuilder.AS_LARGE_AS_INFINITE is considered infinite. - */ - public fun maxConnectionAgeGrace(maxConnectionAgeGrace: Int) { - it.property("maxConnectionAgeGrace", maxConnectionAgeGrace.toString()) - } - - /** - * Sets a custom max connection idle time in milliseconds. Connection being idle for longer than - * which will be gracefully terminated. A value of Long.MAX_VALUE (the default) or a value greater or - * equal to NettyServerBuilder.AS_LARGE_AS_INFINITE will disable max connection idle - */ - public fun maxConnectionIdle(maxConnectionIdle: String) { - it.property("maxConnectionIdle", maxConnectionIdle) - } - - /** - * Sets a custom max connection idle time in milliseconds. Connection being idle for longer than - * which will be gracefully terminated. A value of Long.MAX_VALUE (the default) or a value greater or - * equal to NettyServerBuilder.AS_LARGE_AS_INFINITE will disable max connection idle - */ - public fun maxConnectionIdle(maxConnectionIdle: Int) { - it.property("maxConnectionIdle", maxConnectionIdle.toString()) - } - - /** - * Sets the maximum size of metadata allowed to be received. The default is 8 KiB. - */ - public fun maxInboundMetadataSize(maxInboundMetadataSize: String) { - it.property("maxInboundMetadataSize", maxInboundMetadataSize) - } - - /** - * Sets the maximum size of metadata allowed to be received. The default is 8 KiB. - */ - public fun maxInboundMetadataSize(maxInboundMetadataSize: Int) { - it.property("maxInboundMetadataSize", maxInboundMetadataSize.toString()) - } - - /** - * Limits the rate of incoming RST_STREAM frames per connection to maxRstFramesPerWindow per - * maxRstPeriodSeconds. This option MUST be used in conjunction with maxRstPeriodSeconds for it to be - * effective. - */ - public fun maxRstFramesPerWindow(maxRstFramesPerWindow: String) { - it.property("maxRstFramesPerWindow", maxRstFramesPerWindow) - } - - /** - * Limits the rate of incoming RST_STREAM frames per connection to maxRstFramesPerWindow per - * maxRstPeriodSeconds. This option MUST be used in conjunction with maxRstPeriodSeconds for it to be - * effective. - */ - public fun maxRstFramesPerWindow(maxRstFramesPerWindow: Int) { - it.property("maxRstFramesPerWindow", maxRstFramesPerWindow.toString()) - } - - /** - * Limits the rate of incoming RST_STREAM frames per maxRstPeriodSeconds. This option MUST be used - * in conjunction with maxRstFramesPerWindow for it to be effective. - */ - public fun maxRstPeriodSeconds(maxRstPeriodSeconds: String) { - it.property("maxRstPeriodSeconds", maxRstPeriodSeconds) - } - - /** - * Limits the rate of incoming RST_STREAM frames per maxRstPeriodSeconds. This option MUST be used - * in conjunction with maxRstFramesPerWindow for it to be effective. - */ - public fun maxRstPeriodSeconds(maxRstPeriodSeconds: Int) { - it.property("maxRstPeriodSeconds", maxRstPeriodSeconds.toString()) - } - - /** - * Sets the most aggressive keep-alive time in milliseconds that clients are permitted to - * configure. The server will try to detect clients exceeding this rate and will forcefully close the - * connection. - */ - public fun permitKeepAliveTime(permitKeepAliveTime: String) { - it.property("permitKeepAliveTime", permitKeepAliveTime) - } - - /** - * Sets the most aggressive keep-alive time in milliseconds that clients are permitted to - * configure. The server will try to detect clients exceeding this rate and will forcefully close the - * connection. - */ - public fun permitKeepAliveTime(permitKeepAliveTime: Int) { - it.property("permitKeepAliveTime", permitKeepAliveTime.toString()) - } - - /** - * Sets whether to allow clients to send keep-alive HTTP/ 2 PINGs even if there are no outstanding - * RPCs on the connection. - */ - public fun permitKeepAliveWithoutCalls(permitKeepAliveWithoutCalls: String) { - it.property("permitKeepAliveWithoutCalls", permitKeepAliveWithoutCalls) - } - - /** - * Sets whether to allow clients to send keep-alive HTTP/ 2 PINGs even if there are no outstanding - * RPCs on the connection. - */ - public fun permitKeepAliveWithoutCalls(permitKeepAliveWithoutCalls: Boolean) { - it.property("permitKeepAliveWithoutCalls", permitKeepAliveWithoutCalls.toString()) - } - - /** - * Lets the route to take control over stream observer. If this value is set to true, then the - * response observer of gRPC call will be set with the name GrpcConstants.GRPC_RESPONSE_OBSERVER in - * the Exchange object. Please note that the stream observer's onNext(), onError(), onCompleted() - * methods should be called in the route. - */ - public fun routeControlledStreamObserver(routeControlledStreamObserver: String) { - it.property("routeControlledStreamObserver", routeControlledStreamObserver) - } - - /** - * Lets the route to take control over stream observer. If this value is set to true, then the - * response observer of gRPC call will be set with the name GrpcConstants.GRPC_RESPONSE_OBSERVER in - * the Exchange object. Please note that the stream observer's onNext(), onError(), onCompleted() - * methods should be called in the route. - */ - public fun routeControlledStreamObserver(routeControlledStreamObserver: Boolean) { - it.property("routeControlledStreamObserver", routeControlledStreamObserver.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Setting the autoDiscoverClientInterceptors mechanism, if true, the component will look for a - * ClientInterceptor instance in the registry automatically otherwise it will skip that checking. - */ - public fun autoDiscoverClientInterceptors(autoDiscoverClientInterceptors: String) { - it.property("autoDiscoverClientInterceptors", autoDiscoverClientInterceptors) - } - - /** - * Setting the autoDiscoverClientInterceptors mechanism, if true, the component will look for a - * ClientInterceptor instance in the registry automatically otherwise it will skip that checking. - */ - public fun autoDiscoverClientInterceptors(autoDiscoverClientInterceptors: Boolean) { - it.property("autoDiscoverClientInterceptors", autoDiscoverClientInterceptors.toString()) - } - - /** - * Copies exchange properties from original exchange to all exchanges created for route defined by - * streamRepliesTo. - */ - public fun inheritExchangePropertiesForReplies(inheritExchangePropertiesForReplies: String) { - it.property("inheritExchangePropertiesForReplies", inheritExchangePropertiesForReplies) - } - - /** - * Copies exchange properties from original exchange to all exchanges created for route defined by - * streamRepliesTo. - */ - public fun inheritExchangePropertiesForReplies(inheritExchangePropertiesForReplies: Boolean) { - it.property("inheritExchangePropertiesForReplies", - inheritExchangePropertiesForReplies.toString()) - } - - /** - * gRPC method name - */ - public fun method(method: String) { - it.property("method", method) - } - - /** - * The mode used to communicate with a remote gRPC server. In SIMPLE mode a single exchange is - * translated into a remote procedure call. In STREAMING mode all exchanges will be sent within the - * same request (input and output of the recipient gRPC service must be of type 'stream'). - */ - public fun producerStrategy(producerStrategy: String) { - it.property("producerStrategy", producerStrategy) - } - - /** - * When using STREAMING client mode, it indicates the endpoint where responses should be - * forwarded. - */ - public fun streamRepliesTo(streamRepliesTo: String) { - it.property("streamRepliesTo", streamRepliesTo) - } - - /** - * Expects that exchange property GrpcConstants.GRPC_RESPONSE_OBSERVER is set. Takes its value and - * calls onNext, onError and onComplete on that StreamObserver. All other gRPC parameters are - * ignored. - */ - public fun toRouteControlledStreamObserver(toRouteControlledStreamObserver: String) { - it.property("toRouteControlledStreamObserver", toRouteControlledStreamObserver) - } - - /** - * Expects that exchange property GrpcConstants.GRPC_RESPONSE_OBSERVER is set. Takes its value and - * calls onNext, onError and onComplete on that StreamObserver. All other gRPC parameters are - * ignored. - */ - public fun toRouteControlledStreamObserver(toRouteControlledStreamObserver: Boolean) { - it.property("toRouteControlledStreamObserver", toRouteControlledStreamObserver.toString()) - } - - /** - * The user agent header passed to the server - */ - public fun userAgent(userAgent: String) { - it.property("userAgent", userAgent) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * Authentication method type in advance to the SSL/TLS negotiation - */ - public fun authenticationType(authenticationType: String) { - it.property("authenticationType", authenticationType) - } - - /** - * JSON Web Token sign algorithm - */ - public fun jwtAlgorithm(jwtAlgorithm: String) { - it.property("jwtAlgorithm", jwtAlgorithm) - } - - /** - * JSON Web Token issuer - */ - public fun jwtIssuer(jwtIssuer: String) { - it.property("jwtIssuer", jwtIssuer) - } - - /** - * JSON Web Token secret - */ - public fun jwtSecret(jwtSecret: String) { - it.property("jwtSecret", jwtSecret) - } - - /** - * JSON Web Token subject - */ - public fun jwtSubject(jwtSubject: String) { - it.property("jwtSubject", jwtSubject) - } - - /** - * The X.509 certificate chain file resource in PEM format link - */ - public fun keyCertChainResource(keyCertChainResource: String) { - it.property("keyCertChainResource", keyCertChainResource) - } - - /** - * The PKCS#8 private key file password - */ - public fun keyPassword(keyPassword: String) { - it.property("keyPassword", keyPassword) - } - - /** - * The PKCS#8 private key file resource in PEM format link - */ - public fun keyResource(keyResource: String) { - it.property("keyResource", keyResource) - } - - /** - * Identifies the security negotiation type used for HTTP/2 communication - */ - public fun negotiationType(negotiationType: String) { - it.property("negotiationType", negotiationType) - } - - /** - * Service Account key file in JSON format resource link supported by the Google Cloud SDK - */ - public fun serviceAccountResource(serviceAccountResource: String) { - it.property("serviceAccountResource", serviceAccountResource) - } - - /** - * The trusted certificates collection file resource in PEM format for verifying the remote - * endpoint's certificate - */ - public fun trustCertCollectionResource(trustCertCollectionResource: String) { - it.property("trustCertCollectionResource", trustCertCollectionResource) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GuavaEventbusUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GuavaEventbusUriDsl.kt deleted file mode 100644 index 86b199eed8dd7..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/GuavaEventbusUriDsl.kt +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from Guava EventBus. - */ -public fun UriDsl.`guava-eventbus`(i: GuavaEventbusUriDsl.() -> Unit) { - GuavaEventbusUriDsl(this).apply(i) -} - -@CamelDslMarker -public class GuavaEventbusUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("guava-eventbus") - } - - private var eventBusRef: String = "" - - /** - * To lookup the Guava EventBus from the registry with the given name - */ - public fun eventBusRef(eventBusRef: String) { - this.eventBusRef = eventBusRef - it.url("$eventBusRef") - } - - /** - * If used on the consumer side of the route, will filter events received from the EventBus to the - * instances of the class and superclasses of eventClass. Null value of this option is equal to - * setting it to the java.lang.Object i.e. the consumer will capture all messages incoming to the - * event bus. This option cannot be used together with listenerInterface option. - */ - public fun eventClass(eventClass: String) { - it.property("eventClass", eventClass) - } - - /** - * The interface with method(s) marked with the Subscribe annotation. Dynamic proxy will be - * created over the interface so it could be registered as the EventBus listener. Particularly useful - * when creating multi-event listeners and for handling DeadEvent properly. This option cannot be - * used together with eventClass option. - */ - public fun listenerInterface(listenerInterface: String) { - it.property("listenerInterface", listenerInterface) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HashicorpVaultUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HashicorpVaultUriDsl.kt deleted file mode 100644 index e23a78550a294..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HashicorpVaultUriDsl.kt +++ /dev/null @@ -1,125 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage secrets in Hashicorp Vault Service - */ -public fun UriDsl.`hashicorp-vault`(i: HashicorpVaultUriDsl.() -> Unit) { - HashicorpVaultUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HashicorpVaultUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hashicorp-vault") - } - - private var secretsEngine: String = "" - - /** - * Vault Name to be used - */ - public fun secretsEngine(secretsEngine: String) { - this.secretsEngine = secretsEngine - it.url("$secretsEngine") - } - - /** - * Hashicorp Vault instance host to be used - */ - public fun host(host: String) { - it.property("host", host) - } - - /** - * Operation to be performed - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Hashicorp Vault instance port to be used - */ - public fun port(port: String) { - it.property("port", port) - } - - /** - * Hashicorp Vault instance scheme to be used - */ - public fun scheme(scheme: String) { - it.property("scheme", scheme) - } - - /** - * Hashicorp Vault instance secret Path to be used - */ - public fun secretPath(secretPath: String) { - it.property("secretPath", secretPath) - } - - /** - * Instance of Vault template - */ - public fun vaultTemplate(vaultTemplate: String) { - it.property("vaultTemplate", vaultTemplate) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Token to be used - */ - public fun token(token: String) { - it.property("token", token) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastAtomicvalueUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastAtomicvalueUriDsl.kt deleted file mode 100644 index cc298f4cd6a70..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastAtomicvalueUriDsl.kt +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Increment, decrement, set, etc. Hazelcast atomic number (a grid wide number). - */ -public fun UriDsl.`hazelcast-atomicvalue`(i: HazelcastAtomicvalueUriDsl.() -> Unit) { - HazelcastAtomicvalueUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HazelcastAtomicvalueUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hazelcast-atomicvalue") - } - - private var cacheName: String = "" - - /** - * The name of the cache - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * To specify a default operation to use, if no operation header has been provided. - */ - public fun defaultOperation(defaultOperation: String) { - it.property("defaultOperation", defaultOperation) - } - - /** - * Hazelcast configuration file. - */ - public fun hazelcastConfigUri(hazelcastConfigUri: String) { - it.property("hazelcastConfigUri", hazelcastConfigUri) - } - - /** - * The hazelcast instance reference which can be used for hazelcast endpoint. - */ - public fun hazelcastInstance(hazelcastInstance: String) { - it.property("hazelcastInstance", hazelcastInstance) - } - - /** - * The hazelcast instance reference name which can be used for hazelcast endpoint. If you don't - * specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast - * instance. - */ - public fun hazelcastInstanceName(hazelcastInstanceName: String) { - it.property("hazelcastInstanceName", hazelcastInstanceName) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastInstanceUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastInstanceUriDsl.kt deleted file mode 100644 index 522ce7ca07883..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastInstanceUriDsl.kt +++ /dev/null @@ -1,128 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Consume join/leave events of a cache instance in a Hazelcast cluster. - */ -public fun UriDsl.`hazelcast-instance`(i: HazelcastInstanceUriDsl.() -> Unit) { - HazelcastInstanceUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HazelcastInstanceUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hazelcast-instance") - } - - private var cacheName: String = "" - - /** - * The name of the cache - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * To specify a default operation to use, if no operation header has been provided. - */ - public fun defaultOperation(defaultOperation: String) { - it.property("defaultOperation", defaultOperation) - } - - /** - * Hazelcast configuration file. - */ - public fun hazelcastConfigUri(hazelcastConfigUri: String) { - it.property("hazelcastConfigUri", hazelcastConfigUri) - } - - /** - * The hazelcast instance reference which can be used for hazelcast endpoint. - */ - public fun hazelcastInstance(hazelcastInstance: String) { - it.property("hazelcastInstance", hazelcastInstance) - } - - /** - * The hazelcast instance reference name which can be used for hazelcast endpoint. If you don't - * specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast - * instance. - */ - public fun hazelcastInstanceName(hazelcastInstanceName: String) { - it.property("hazelcastInstanceName", hazelcastInstanceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastListUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastListUriDsl.kt deleted file mode 100644 index b76fb8d627345..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastListUriDsl.kt +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Hazelcast distributed list. - */ -public fun UriDsl.`hazelcast-list`(i: HazelcastListUriDsl.() -> Unit) { - HazelcastListUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HazelcastListUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hazelcast-list") - } - - private var cacheName: String = "" - - /** - * The name of the cache - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * To specify a default operation to use, if no operation header has been provided. - */ - public fun defaultOperation(defaultOperation: String) { - it.property("defaultOperation", defaultOperation) - } - - /** - * Hazelcast configuration file. - */ - public fun hazelcastConfigUri(hazelcastConfigUri: String) { - it.property("hazelcastConfigUri", hazelcastConfigUri) - } - - /** - * The hazelcast instance reference which can be used for hazelcast endpoint. - */ - public fun hazelcastInstance(hazelcastInstance: String) { - it.property("hazelcastInstance", hazelcastInstance) - } - - /** - * The hazelcast instance reference name which can be used for hazelcast endpoint. If you don't - * specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast - * instance. - */ - public fun hazelcastInstanceName(hazelcastInstanceName: String) { - it.property("hazelcastInstanceName", hazelcastInstanceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastMapUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastMapUriDsl.kt deleted file mode 100644 index e848ff73ace47..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastMapUriDsl.kt +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Hazelcast distributed map. - */ -public fun UriDsl.`hazelcast-map`(i: HazelcastMapUriDsl.() -> Unit) { - HazelcastMapUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HazelcastMapUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hazelcast-map") - } - - private var cacheName: String = "" - - /** - * The name of the cache - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * To specify a default operation to use, if no operation header has been provided. - */ - public fun defaultOperation(defaultOperation: String) { - it.property("defaultOperation", defaultOperation) - } - - /** - * Hazelcast configuration file. - */ - public fun hazelcastConfigUri(hazelcastConfigUri: String) { - it.property("hazelcastConfigUri", hazelcastConfigUri) - } - - /** - * The hazelcast instance reference which can be used for hazelcast endpoint. - */ - public fun hazelcastInstance(hazelcastInstance: String) { - it.property("hazelcastInstance", hazelcastInstance) - } - - /** - * The hazelcast instance reference name which can be used for hazelcast endpoint. If you don't - * specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast - * instance. - */ - public fun hazelcastInstanceName(hazelcastInstanceName: String) { - it.property("hazelcastInstanceName", hazelcastInstanceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastMultimapUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastMultimapUriDsl.kt deleted file mode 100644 index a59f10b84e855..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastMultimapUriDsl.kt +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Hazelcast distributed multimap. - */ -public fun UriDsl.`hazelcast-multimap`(i: HazelcastMultimapUriDsl.() -> Unit) { - HazelcastMultimapUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HazelcastMultimapUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hazelcast-multimap") - } - - private var cacheName: String = "" - - /** - * The name of the cache - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * To specify a default operation to use, if no operation header has been provided. - */ - public fun defaultOperation(defaultOperation: String) { - it.property("defaultOperation", defaultOperation) - } - - /** - * Hazelcast configuration file. - */ - public fun hazelcastConfigUri(hazelcastConfigUri: String) { - it.property("hazelcastConfigUri", hazelcastConfigUri) - } - - /** - * The hazelcast instance reference which can be used for hazelcast endpoint. - */ - public fun hazelcastInstance(hazelcastInstance: String) { - it.property("hazelcastInstance", hazelcastInstance) - } - - /** - * The hazelcast instance reference name which can be used for hazelcast endpoint. If you don't - * specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast - * instance. - */ - public fun hazelcastInstanceName(hazelcastInstanceName: String) { - it.property("hazelcastInstanceName", hazelcastInstanceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastQueueUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastQueueUriDsl.kt deleted file mode 100644 index 427026fbd43d2..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastQueueUriDsl.kt +++ /dev/null @@ -1,188 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Hazelcast distributed queue. - */ -public fun UriDsl.`hazelcast-queue`(i: HazelcastQueueUriDsl.() -> Unit) { - HazelcastQueueUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HazelcastQueueUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hazelcast-queue") - } - - private var cacheName: String = "" - - /** - * The name of the cache - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * To specify a default operation to use, if no operation header has been provided. - */ - public fun defaultOperation(defaultOperation: String) { - it.property("defaultOperation", defaultOperation) - } - - /** - * Hazelcast configuration file. - */ - public fun hazelcastConfigUri(hazelcastConfigUri: String) { - it.property("hazelcastConfigUri", hazelcastConfigUri) - } - - /** - * The hazelcast instance reference which can be used for hazelcast endpoint. - */ - public fun hazelcastInstance(hazelcastInstance: String) { - it.property("hazelcastInstance", hazelcastInstance) - } - - /** - * The hazelcast instance reference name which can be used for hazelcast endpoint. If you don't - * specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast - * instance. - */ - public fun hazelcastInstanceName(hazelcastInstanceName: String) { - it.property("hazelcastInstanceName", hazelcastInstanceName) - } - - /** - * Define the polling timeout of the Queue consumer in Poll mode - */ - public fun pollingTimeout(pollingTimeout: String) { - it.property("pollingTimeout", pollingTimeout) - } - - /** - * Define the polling timeout of the Queue consumer in Poll mode - */ - public fun pollingTimeout(pollingTimeout: Int) { - it.property("pollingTimeout", pollingTimeout.toString()) - } - - /** - * Define the Pool size for Queue Consumer Executor - */ - public fun poolSize(poolSize: String) { - it.property("poolSize", poolSize) - } - - /** - * Define the Pool size for Queue Consumer Executor - */ - public fun poolSize(poolSize: Int) { - it.property("poolSize", poolSize.toString()) - } - - /** - * Define the Queue Consumer mode: Listen or Poll - */ - public fun queueConsumerMode(queueConsumerMode: String) { - it.property("queueConsumerMode", queueConsumerMode) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastReplicatedmapUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastReplicatedmapUriDsl.kt deleted file mode 100644 index 26fe843b28609..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastReplicatedmapUriDsl.kt +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Hazelcast replicated map. - */ -public fun UriDsl.`hazelcast-replicatedmap`(i: HazelcastReplicatedmapUriDsl.() -> Unit) { - HazelcastReplicatedmapUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HazelcastReplicatedmapUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hazelcast-replicatedmap") - } - - private var cacheName: String = "" - - /** - * The name of the cache - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * To specify a default operation to use, if no operation header has been provided. - */ - public fun defaultOperation(defaultOperation: String) { - it.property("defaultOperation", defaultOperation) - } - - /** - * Hazelcast configuration file. - */ - public fun hazelcastConfigUri(hazelcastConfigUri: String) { - it.property("hazelcastConfigUri", hazelcastConfigUri) - } - - /** - * The hazelcast instance reference which can be used for hazelcast endpoint. - */ - public fun hazelcastInstance(hazelcastInstance: String) { - it.property("hazelcastInstance", hazelcastInstance) - } - - /** - * The hazelcast instance reference name which can be used for hazelcast endpoint. If you don't - * specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast - * instance. - */ - public fun hazelcastInstanceName(hazelcastInstanceName: String) { - it.property("hazelcastInstanceName", hazelcastInstanceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastRingbufferUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastRingbufferUriDsl.kt deleted file mode 100644 index 043eea28727a3..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastRingbufferUriDsl.kt +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Hazelcast distributed ringbuffer. - */ -public fun UriDsl.`hazelcast-ringbuffer`(i: HazelcastRingbufferUriDsl.() -> Unit) { - HazelcastRingbufferUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HazelcastRingbufferUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hazelcast-ringbuffer") - } - - private var cacheName: String = "" - - /** - * The name of the cache - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * To specify a default operation to use, if no operation header has been provided. - */ - public fun defaultOperation(defaultOperation: String) { - it.property("defaultOperation", defaultOperation) - } - - /** - * Hazelcast configuration file. - */ - public fun hazelcastConfigUri(hazelcastConfigUri: String) { - it.property("hazelcastConfigUri", hazelcastConfigUri) - } - - /** - * The hazelcast instance reference which can be used for hazelcast endpoint. - */ - public fun hazelcastInstance(hazelcastInstance: String) { - it.property("hazelcastInstance", hazelcastInstance) - } - - /** - * The hazelcast instance reference name which can be used for hazelcast endpoint. If you don't - * specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast - * instance. - */ - public fun hazelcastInstanceName(hazelcastInstanceName: String) { - it.property("hazelcastInstanceName", hazelcastInstanceName) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastSedaUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastSedaUriDsl.kt deleted file mode 100644 index f32d588665e76..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastSedaUriDsl.kt +++ /dev/null @@ -1,232 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Asynchronously send/receive Exchanges between Camel routes running on potentially distinct - * JVMs/hosts backed by Hazelcast BlockingQueue. - */ -public fun UriDsl.`hazelcast-seda`(i: HazelcastSedaUriDsl.() -> Unit) { - HazelcastSedaUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HazelcastSedaUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hazelcast-seda") - } - - private var cacheName: String = "" - - /** - * The name of the cache - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * To specify a default operation to use, if no operation header has been provided. - */ - public fun defaultOperation(defaultOperation: String) { - it.property("defaultOperation", defaultOperation) - } - - /** - * Hazelcast configuration file. - */ - public fun hazelcastConfigUri(hazelcastConfigUri: String) { - it.property("hazelcastConfigUri", hazelcastConfigUri) - } - - /** - * The hazelcast instance reference which can be used for hazelcast endpoint. - */ - public fun hazelcastInstance(hazelcastInstance: String) { - it.property("hazelcastInstance", hazelcastInstance) - } - - /** - * The hazelcast instance reference name which can be used for hazelcast endpoint. If you don't - * specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast - * instance. - */ - public fun hazelcastInstanceName(hazelcastInstanceName: String) { - it.property("hazelcastInstanceName", hazelcastInstanceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use concurrent consumers polling from the SEDA queue. - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * To use concurrent consumers polling from the SEDA queue. - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * Milliseconds before consumer continues polling after an error has occurred. - */ - public fun onErrorDelay(onErrorDelay: String) { - it.property("onErrorDelay", onErrorDelay) - } - - /** - * Milliseconds before consumer continues polling after an error has occurred. - */ - public fun onErrorDelay(onErrorDelay: Int) { - it.property("onErrorDelay", onErrorDelay.toString()) - } - - /** - * The timeout used when consuming from the SEDA queue. When a timeout occurs, the consumer can - * check whether it is allowed to continue running. Setting a lower value allows the consumer to - * react more quickly upon shutdown. - */ - public fun pollTimeout(pollTimeout: String) { - it.property("pollTimeout", pollTimeout) - } - - /** - * The timeout used when consuming from the SEDA queue. When a timeout occurs, the consumer can - * check whether it is allowed to continue running. Setting a lower value allows the consumer to - * react more quickly upon shutdown. - */ - public fun pollTimeout(pollTimeout: Int) { - it.property("pollTimeout", pollTimeout.toString()) - } - - /** - * If set to true then the consumer runs in transaction mode, where the messages in the seda queue - * will only be removed if the transaction commits, which happens when the processing is complete. - */ - public fun transacted(transacted: String) { - it.property("transacted", transacted) - } - - /** - * If set to true then the consumer runs in transaction mode, where the messages in the seda queue - * will only be removed if the transaction commits, which happens when the processing is complete. - */ - public fun transacted(transacted: Boolean) { - it.property("transacted", transacted.toString()) - } - - /** - * If set to true the whole Exchange will be transfered. If header or body contains not - * serializable objects, they will be skipped. - */ - public fun transferExchange(transferExchange: String) { - it.property("transferExchange", transferExchange) - } - - /** - * If set to true the whole Exchange will be transfered. If header or body contains not - * serializable objects, they will be skipped. - */ - public fun transferExchange(transferExchange: Boolean) { - it.property("transferExchange", transferExchange.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastSetUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastSetUriDsl.kt deleted file mode 100644 index 0f565aa5d9670..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastSetUriDsl.kt +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Hazelcast distributed set. - */ -public fun UriDsl.`hazelcast-set`(i: HazelcastSetUriDsl.() -> Unit) { - HazelcastSetUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HazelcastSetUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hazelcast-set") - } - - private var cacheName: String = "" - - /** - * The name of the cache - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * To specify a default operation to use, if no operation header has been provided. - */ - public fun defaultOperation(defaultOperation: String) { - it.property("defaultOperation", defaultOperation) - } - - /** - * Hazelcast configuration file. - */ - public fun hazelcastConfigUri(hazelcastConfigUri: String) { - it.property("hazelcastConfigUri", hazelcastConfigUri) - } - - /** - * The hazelcast instance reference which can be used for hazelcast endpoint. - */ - public fun hazelcastInstance(hazelcastInstance: String) { - it.property("hazelcastInstance", hazelcastInstance) - } - - /** - * The hazelcast instance reference name which can be used for hazelcast endpoint. If you don't - * specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast - * instance. - */ - public fun hazelcastInstanceName(hazelcastInstanceName: String) { - it.property("hazelcastInstanceName", hazelcastInstanceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastTopicUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastTopicUriDsl.kt deleted file mode 100644 index 97d4bfe720533..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HazelcastTopicUriDsl.kt +++ /dev/null @@ -1,166 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from Hazelcast distributed topic. - */ -public fun UriDsl.`hazelcast-topic`(i: HazelcastTopicUriDsl.() -> Unit) { - HazelcastTopicUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HazelcastTopicUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hazelcast-topic") - } - - private var cacheName: String = "" - - /** - * The name of the cache - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * To specify a default operation to use, if no operation header has been provided. - */ - public fun defaultOperation(defaultOperation: String) { - it.property("defaultOperation", defaultOperation) - } - - /** - * Hazelcast configuration file. - */ - public fun hazelcastConfigUri(hazelcastConfigUri: String) { - it.property("hazelcastConfigUri", hazelcastConfigUri) - } - - /** - * The hazelcast instance reference which can be used for hazelcast endpoint. - */ - public fun hazelcastInstance(hazelcastInstance: String) { - it.property("hazelcastInstance", hazelcastInstance) - } - - /** - * The hazelcast instance reference name which can be used for hazelcast endpoint. If you don't - * specify the instance reference, camel use the default hazelcast instance from the camel-hazelcast - * instance. - */ - public fun hazelcastInstanceName(hazelcastInstanceName: String) { - it.property("hazelcastInstanceName", hazelcastInstanceName) - } - - /** - * Define if the endpoint will use a reliable Topic struct or not. - */ - public fun reliable(reliable: String) { - it.property("reliable", reliable) - } - - /** - * Define if the endpoint will use a reliable Topic struct or not. - */ - public fun reliable(reliable: Boolean) { - it.property("reliable", reliable.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HttpUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HttpUriDsl.kt deleted file mode 100644 index 17616904b2ff0..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HttpUriDsl.kt +++ /dev/null @@ -1,651 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send requests to external HTTP servers using Apache HTTP Client 5.x. - */ -public fun UriDsl.http(i: HttpUriDsl.() -> Unit) { - HttpUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HttpUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("http") - } - - private var httpUri: String = "" - - /** - * The url of the HTTP endpoint to call. - */ - public fun httpUri(httpUri: String) { - this.httpUri = httpUri - it.url("//$httpUri") - } - - /** - * Determines whether or not the raw input stream is cached or not. The Camel consumer - * (camel-servlet, camel-jetty etc.) will by default cache the input stream to support reading it - * multiple times to ensure it Camel can retrieve all data from the stream. However you can set this - * option to true when you for example need to access the raw stream, such as streaming it directly - * to a file or other persistent store. DefaultHttpBinding will copy the request input stream into a - * stream cache and put it into message body if this option is false to support reading the stream - * multiple times. If you use Servlet to bridge/proxy an endpoint then consider enabling this option - * to improve performance, in case you do not need to read the message payload multiple times. The - * producer (camel-http) will by default cache the response body stream. If setting this option to - * true, then the producers will not cache the response body stream but use the response stream as-is - * (the stream can only be read once) as the message body. - */ - public fun disableStreamCache(disableStreamCache: String) { - it.property("disableStreamCache", disableStreamCache) - } - - /** - * Determines whether or not the raw input stream is cached or not. The Camel consumer - * (camel-servlet, camel-jetty etc.) will by default cache the input stream to support reading it - * multiple times to ensure it Camel can retrieve all data from the stream. However you can set this - * option to true when you for example need to access the raw stream, such as streaming it directly - * to a file or other persistent store. DefaultHttpBinding will copy the request input stream into a - * stream cache and put it into message body if this option is false to support reading the stream - * multiple times. If you use Servlet to bridge/proxy an endpoint then consider enabling this option - * to improve performance, in case you do not need to read the message payload multiple times. The - * producer (camel-http) will by default cache the response body stream. If setting this option to - * true, then the producers will not cache the response body stream but use the response stream as-is - * (the stream can only be read once) as the message body. - */ - public fun disableStreamCache(disableStreamCache: Boolean) { - it.property("disableStreamCache", disableStreamCache.toString()) - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * If the option is true, HttpProducer will ignore the Exchange.HTTP_URI header, and use the - * endpoint's URI for request. You may also set the option throwExceptionOnFailure to be false to let - * the HttpProducer send all the fault response back. - */ - public fun bridgeEndpoint(bridgeEndpoint: String) { - it.property("bridgeEndpoint", bridgeEndpoint) - } - - /** - * If the option is true, HttpProducer will ignore the Exchange.HTTP_URI header, and use the - * endpoint's URI for request. You may also set the option throwExceptionOnFailure to be false to let - * the HttpProducer send all the fault response back. - */ - public fun bridgeEndpoint(bridgeEndpoint: Boolean) { - it.property("bridgeEndpoint", bridgeEndpoint.toString()) - } - - /** - * Specifies whether a Connection Close header must be added to HTTP Request. By default - * connectionClose is false. - */ - public fun connectionClose(connectionClose: String) { - it.property("connectionClose", connectionClose) - } - - /** - * Specifies whether a Connection Close header must be added to HTTP Request. By default - * connectionClose is false. - */ - public fun connectionClose(connectionClose: Boolean) { - it.property("connectionClose", connectionClose.toString()) - } - - /** - * Configure the HTTP method to use. The HttpMethod header cannot override this option if set. - */ - public fun httpMethod(httpMethod: String) { - it.property("httpMethod", httpMethod) - } - - /** - * Whether to skip mapping all the Camel headers as HTTP request headers. If there are no data - * from Camel headers needed to be included in the HTTP request then this can avoid parsing overhead - * with many object allocations for the JVM garbage collector. - */ - public fun skipRequestHeaders(skipRequestHeaders: String) { - it.property("skipRequestHeaders", skipRequestHeaders) - } - - /** - * Whether to skip mapping all the Camel headers as HTTP request headers. If there are no data - * from Camel headers needed to be included in the HTTP request then this can avoid parsing overhead - * with many object allocations for the JVM garbage collector. - */ - public fun skipRequestHeaders(skipRequestHeaders: Boolean) { - it.property("skipRequestHeaders", skipRequestHeaders.toString()) - } - - /** - * Whether to skip mapping all the HTTP response headers to Camel headers. If there are no data - * needed from HTTP headers then this can avoid parsing overhead with many object allocations for the - * JVM garbage collector. - */ - public fun skipResponseHeaders(skipResponseHeaders: String) { - it.property("skipResponseHeaders", skipResponseHeaders) - } - - /** - * Whether to skip mapping all the HTTP response headers to Camel headers. If there are no data - * needed from HTTP headers then this can avoid parsing overhead with many object allocations for the - * JVM garbage collector. - */ - public fun skipResponseHeaders(skipResponseHeaders: Boolean) { - it.property("skipResponseHeaders", skipResponseHeaders.toString()) - } - - /** - * Option to disable throwing the HttpOperationFailedException in case of failed responses from - * the remote server. This allows you to get all responses regardless of the HTTP status code. - */ - public fun throwExceptionOnFailure(throwExceptionOnFailure: String) { - it.property("throwExceptionOnFailure", throwExceptionOnFailure) - } - - /** - * Option to disable throwing the HttpOperationFailedException in case of failed responses from - * the remote server. This allows you to get all responses regardless of the HTTP status code. - */ - public fun throwExceptionOnFailure(throwExceptionOnFailure: Boolean) { - it.property("throwExceptionOnFailure", throwExceptionOnFailure.toString()) - } - - /** - * Whether to clear expired cookies before sending the HTTP request. This ensures the cookies - * store does not keep growing by adding new cookies which is newer removed when they are expired. If - * the component has disabled cookie management then this option is disabled too. - */ - public fun clearExpiredCookies(clearExpiredCookies: String) { - it.property("clearExpiredCookies", clearExpiredCookies) - } - - /** - * Whether to clear expired cookies before sending the HTTP request. This ensures the cookies - * store does not keep growing by adding new cookies which is newer removed when they are expired. If - * the component has disabled cookie management then this option is disabled too. - */ - public fun clearExpiredCookies(clearExpiredCookies: Boolean) { - it.property("clearExpiredCookies", clearExpiredCookies.toString()) - } - - /** - * Configure a cookie handler to maintain a HTTP session - */ - public fun cookieHandler(cookieHandler: String) { - it.property("cookieHandler", cookieHandler) - } - - /** - * To use a custom CookieStore. By default the BasicCookieStore is used which is an in-memory only - * cookie store. Notice if bridgeEndpoint=true then the cookie store is forced to be a noop cookie - * store as cookie shouldn't be stored as we are just bridging (eg acting as a proxy). If a - * cookieHandler is set then the cookie store is also forced to be a noop cookie store as cookie - * handling is then performed by the cookieHandler. - */ - public fun cookieStore(cookieStore: String) { - it.property("cookieStore", cookieStore) - } - - /** - * If this option is true then IN exchange headers will be copied to OUT exchange headers - * according to copy strategy. Setting this to false, allows to only include the headers from the - * HTTP response (not propagating IN headers). - */ - public fun copyHeaders(copyHeaders: String) { - it.property("copyHeaders", copyHeaders) - } - - /** - * If this option is true then IN exchange headers will be copied to OUT exchange headers - * according to copy strategy. Setting this to false, allows to only include the headers from the - * HTTP response (not propagating IN headers). - */ - public fun copyHeaders(copyHeaders: Boolean) { - it.property("copyHeaders", copyHeaders.toString()) - } - - /** - * To use custom host header for producer. When not set in query will be ignored. When set will - * override host header derived from url. - */ - public fun customHostHeader(customHostHeader: String) { - it.property("customHostHeader", customHostHeader) - } - - /** - * Whether the HTTP DELETE should include the message body or not. By default HTTP DELETE do not - * include any HTTP body. However in some rare cases users may need to be able to include the message - * body. - */ - public fun deleteWithBody(deleteWithBody: String) { - it.property("deleteWithBody", deleteWithBody) - } - - /** - * Whether the HTTP DELETE should include the message body or not. By default HTTP DELETE do not - * include any HTTP body. However in some rare cases users may need to be able to include the message - * body. - */ - public fun deleteWithBody(deleteWithBody: Boolean) { - it.property("deleteWithBody", deleteWithBody.toString()) - } - - /** - * Whether to the HTTP request should follow redirects. By default the HTTP request does not - * follow redirects - */ - public fun followRedirects(followRedirects: String) { - it.property("followRedirects", followRedirects) - } - - /** - * Whether to the HTTP request should follow redirects. By default the HTTP request does not - * follow redirects - */ - public fun followRedirects(followRedirects: Boolean) { - it.property("followRedirects", followRedirects.toString()) - } - - /** - * Whether the HTTP GET should include the message body or not. By default HTTP GET do not include - * any HTTP body. However in some rare cases users may need to be able to include the message body. - */ - public fun getWithBody(getWithBody: String) { - it.property("getWithBody", getWithBody) - } - - /** - * Whether the HTTP GET should include the message body or not. By default HTTP GET do not include - * any HTTP body. However in some rare cases users may need to be able to include the message body. - */ - public fun getWithBody(getWithBody: Boolean) { - it.property("getWithBody", getWithBody.toString()) - } - - /** - * If this option is true, The http producer won't read response body and cache the input stream - */ - public fun ignoreResponseBody(ignoreResponseBody: String) { - it.property("ignoreResponseBody", ignoreResponseBody) - } - - /** - * If this option is true, The http producer won't read response body and cache the input stream - */ - public fun ignoreResponseBody(ignoreResponseBody: Boolean) { - it.property("ignoreResponseBody", ignoreResponseBody.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The status codes which are considered a success response. The values are inclusive. Multiple - * ranges can be defined, separated by comma, e.g. 200-204,209,301-304. Each range must be a single - * number or from-to with the dash included. - */ - public fun okStatusCodeRange(okStatusCodeRange: String) { - it.property("okStatusCodeRange", okStatusCodeRange) - } - - /** - * If the option is true, HttpProducer will set the Host header to the value contained in the - * current exchange Host header, useful in reverse proxy applications where you want the Host header - * received by the downstream server to reflect the URL called by the upstream client, this allows - * applications which use the Host header to generate accurate URL's for a proxied service - */ - public fun preserveHostHeader(preserveHostHeader: String) { - it.property("preserveHostHeader", preserveHostHeader) - } - - /** - * If the option is true, HttpProducer will set the Host header to the value contained in the - * current exchange Host header, useful in reverse proxy applications where you want the Host header - * received by the downstream server to reflect the URL called by the upstream client, this allows - * applications which use the Host header to generate accurate URL's for a proxied service - */ - public fun preserveHostHeader(preserveHostHeader: Boolean) { - it.property("preserveHostHeader", preserveHostHeader.toString()) - } - - /** - * To set a custom HTTP User-Agent request header - */ - public fun userAgent(userAgent: String) { - it.property("userAgent", userAgent) - } - - /** - * Provide access to the http client request parameters used on new RequestConfig instances used - * by producers or consumers of this endpoint. - */ - public fun clientBuilder(clientBuilder: String) { - it.property("clientBuilder", clientBuilder) - } - - /** - * To use a custom HttpClientConnectionManager to manage connections - */ - public fun clientConnectionManager(clientConnectionManager: String) { - it.property("clientConnectionManager", clientConnectionManager) - } - - /** - * The maximum number of connections per route. - */ - public fun connectionsPerRoute(connectionsPerRoute: String) { - it.property("connectionsPerRoute", connectionsPerRoute) - } - - /** - * The maximum number of connections per route. - */ - public fun connectionsPerRoute(connectionsPerRoute: Int) { - it.property("connectionsPerRoute", connectionsPerRoute.toString()) - } - - /** - * Sets a custom HttpClient to be used by the producer - */ - public fun httpClient(httpClient: String) { - it.property("httpClient", httpClient) - } - - /** - * Register a custom configuration strategy for new HttpClient instances created by producers or - * consumers such as to configure authentication mechanisms etc. - */ - public fun httpClientConfigurer(httpClientConfigurer: String) { - it.property("httpClientConfigurer", httpClientConfigurer) - } - - /** - * To configure the HttpClient using the key/values from the Map. - */ - public fun httpClientOptions(httpClientOptions: String) { - it.property("httpClientOptions", httpClientOptions) - } - - /** - * To configure the connection and the socket using the key/values from the Map. - */ - public fun httpConnectionOptions(httpConnectionOptions: String) { - it.property("httpConnectionOptions", httpConnectionOptions) - } - - /** - * To use a custom HttpContext instance - */ - public fun httpContext(httpContext: String) { - it.property("httpContext", httpContext) - } - - /** - * The maximum number of connections. - */ - public fun maxTotalConnections(maxTotalConnections: String) { - it.property("maxTotalConnections", maxTotalConnections) - } - - /** - * The maximum number of connections. - */ - public fun maxTotalConnections(maxTotalConnections: Int) { - it.property("maxTotalConnections", maxTotalConnections.toString()) - } - - /** - * To use System Properties as fallback for configuration - */ - public fun useSystemProperties(useSystemProperties: String) { - it.property("useSystemProperties", useSystemProperties) - } - - /** - * To use System Properties as fallback for configuration - */ - public fun useSystemProperties(useSystemProperties: Boolean) { - it.property("useSystemProperties", useSystemProperties.toString()) - } - - /** - * Proxy authentication domain to use with NTML - */ - public fun proxyAuthDomain(proxyAuthDomain: String) { - it.property("proxyAuthDomain", proxyAuthDomain) - } - - /** - * Proxy authentication host - */ - public fun proxyAuthHost(proxyAuthHost: String) { - it.property("proxyAuthHost", proxyAuthHost) - } - - /** - * Proxy authentication method to use - */ - public fun proxyAuthMethod(proxyAuthMethod: String) { - it.property("proxyAuthMethod", proxyAuthMethod) - } - - /** - * Proxy authentication domain (workstation name) to use with NTML - */ - public fun proxyAuthNtHost(proxyAuthNtHost: String) { - it.property("proxyAuthNtHost", proxyAuthNtHost) - } - - /** - * Proxy authentication password - */ - public fun proxyAuthPassword(proxyAuthPassword: String) { - it.property("proxyAuthPassword", proxyAuthPassword) - } - - /** - * Proxy authentication port - */ - public fun proxyAuthPort(proxyAuthPort: String) { - it.property("proxyAuthPort", proxyAuthPort) - } - - /** - * Proxy authentication port - */ - public fun proxyAuthPort(proxyAuthPort: Int) { - it.property("proxyAuthPort", proxyAuthPort.toString()) - } - - /** - * Proxy authentication scheme to use - */ - public fun proxyAuthScheme(proxyAuthScheme: String) { - it.property("proxyAuthScheme", proxyAuthScheme) - } - - /** - * Proxy authentication username - */ - public fun proxyAuthUsername(proxyAuthUsername: String) { - it.property("proxyAuthUsername", proxyAuthUsername) - } - - /** - * Proxy hostname to use - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * Proxy port to use - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * Proxy port to use - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * Authentication domain to use with NTML - */ - public fun authDomain(authDomain: String) { - it.property("authDomain", authDomain) - } - - /** - * If this option is true, camel-http sends preemptive basic authentication to the server. - */ - public fun authenticationPreemptive(authenticationPreemptive: String) { - it.property("authenticationPreemptive", authenticationPreemptive) - } - - /** - * If this option is true, camel-http sends preemptive basic authentication to the server. - */ - public fun authenticationPreemptive(authenticationPreemptive: Boolean) { - it.property("authenticationPreemptive", authenticationPreemptive.toString()) - } - - /** - * Authentication host to use with NTML - */ - public fun authHost(authHost: String) { - it.property("authHost", authHost) - } - - /** - * Authentication methods allowed to use as a comma separated list of values Basic, Digest or - * NTLM. - */ - public fun authMethod(authMethod: String) { - it.property("authMethod", authMethod) - } - - /** - * Which authentication method to prioritize to use, either as Basic, Digest or NTLM. - */ - public fun authMethodPriority(authMethodPriority: String) { - it.property("authMethodPriority", authMethodPriority) - } - - /** - * Authentication password - */ - public fun authPassword(authPassword: String) { - it.property("authPassword", authPassword) - } - - /** - * Authentication username - */ - public fun authUsername(authUsername: String) { - it.property("authUsername", authUsername) - } - - /** - * OAuth2 client id - */ - public fun oauth2ClientId(oauth2ClientId: String) { - it.property("oauth2ClientId", oauth2ClientId) - } - - /** - * OAuth2 client secret - */ - public fun oauth2ClientSecret(oauth2ClientSecret: String) { - it.property("oauth2ClientSecret", oauth2ClientSecret) - } - - /** - * OAuth2 scope - */ - public fun oauth2Scope(oauth2Scope: String) { - it.property("oauth2Scope", oauth2Scope) - } - - /** - * OAuth2 Token endpoint - */ - public fun oauth2TokenEndpoint(oauth2TokenEndpoint: String) { - it.property("oauth2TokenEndpoint", oauth2TokenEndpoint) - } - - /** - * To configure security using SSLContextParameters. Important: Only one instance of - * org.apache.camel.util.jsse.SSLContextParameters is supported per HttpComponent. If you need to use - * 2 or more different instances, you need to define a new HttpComponent per instance you need. - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * To use a custom X509HostnameVerifier such as DefaultHostnameVerifier or NoopHostnameVerifier - */ - public fun x509HostnameVerifier(x509HostnameVerifier: String) { - it.property("x509HostnameVerifier", x509HostnameVerifier) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudDmsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudDmsUriDsl.kt deleted file mode 100644 index b943f92c2db6b..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudDmsUriDsl.kt +++ /dev/null @@ -1,312 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * To integrate with a fully managed, high-performance message queuing service on Huawei Cloud - */ -public fun UriDsl.`hwcloud-dms`(i: HwcloudDmsUriDsl.() -> Unit) { - HwcloudDmsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HwcloudDmsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hwcloud-dms") - } - - private var operation: String = "" - - /** - * Operation to be performed - */ - public fun operation(operation: String) { - this.operation = operation - it.url("$operation") - } - - /** - * Access key for the cloud user - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * The username of a RabbitMQ instance. This option is mandatory when creating a RabbitMQ - * instance. - */ - public fun accessUser(accessUser: String) { - it.property("accessUser", accessUser) - } - - /** - * The ID of an available zone. This option is mandatory when creating an instance and it cannot - * be an empty array. - */ - public fun availableZones(availableZones: String) { - it.property("availableZones", availableZones) - } - - /** - * DMS url. Carries higher precedence than region parameter based client initialization - */ - public fun endpoint(endpoint: String) { - it.property("endpoint", endpoint) - } - - /** - * The message engine. Either kafka or rabbitmq. If the parameter is not specified, all instances - * will be queried - */ - public fun engine(engine: String) { - it.property("engine", engine) - } - - /** - * The version of the message engine. This option is mandatory when creating an instance. - */ - public fun engineVersion(engineVersion: String) { - it.property("engineVersion", engineVersion) - } - - /** - * Ignore SSL verification - */ - public fun ignoreSslVerification(ignoreSslVerification: String) { - it.property("ignoreSslVerification", ignoreSslVerification) - } - - /** - * Ignore SSL verification - */ - public fun ignoreSslVerification(ignoreSslVerification: Boolean) { - it.property("ignoreSslVerification", ignoreSslVerification.toString()) - } - - /** - * The id of the instance. This option is mandatory when deleting or querying an instance - */ - public fun instanceId(instanceId: String) { - it.property("instanceId", instanceId) - } - - /** - * The password for logging in to the Kafka Manager. This option is mandatory when creating a - * Kafka instance. - */ - public fun kafkaManagerPassword(kafkaManagerPassword: String) { - it.property("kafkaManagerPassword", kafkaManagerPassword) - } - - /** - * The username for logging in to the Kafka Manager. This option is mandatory when creating a - * Kafka instance. - */ - public fun kafkaManagerUser(kafkaManagerUser: String) { - it.property("kafkaManagerUser", kafkaManagerUser) - } - - /** - * The name of the instance for creating and updating an instance. This option is mandatory when - * creating an instance - */ - public fun name(name: String) { - it.property("name", name) - } - - /** - * The maximum number of partitions in a Kafka instance. This option is mandatory when creating a - * Kafka instance. - */ - public fun partitionNum(partitionNum: String) { - it.property("partitionNum", partitionNum) - } - - /** - * The maximum number of partitions in a Kafka instance. This option is mandatory when creating a - * Kafka instance. - */ - public fun partitionNum(partitionNum: Int) { - it.property("partitionNum", partitionNum.toString()) - } - - /** - * The password of a RabbitMQ instance. This option is mandatory when creating a RabbitMQ - * instance. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * The product ID. This option is mandatory when creating an instance. - */ - public fun productId(productId: String) { - it.property("productId", productId) - } - - /** - * Cloud project ID - */ - public fun projectId(projectId: String) { - it.property("projectId", projectId) - } - - /** - * Proxy server ip/hostname - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * Proxy authentication password - */ - public fun proxyPassword(proxyPassword: String) { - it.property("proxyPassword", proxyPassword) - } - - /** - * Proxy server port - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * Proxy server port - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * Proxy authentication user - */ - public fun proxyUser(proxyUser: String) { - it.property("proxyUser", proxyUser) - } - - /** - * DMS service region - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Secret key for the cloud user - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * The security group which the instance belongs to. This option is mandatory when creating an - * instance. - */ - public fun securityGroupId(securityGroupId: String) { - it.property("securityGroupId", securityGroupId) - } - - /** - * Configuration object for cloud service authentication - */ - public fun serviceKeys(serviceKeys: String) { - it.property("serviceKeys", serviceKeys) - } - - /** - * The baseline bandwidth of a Kafka instance. This option is mandatory when creating a Kafka - * instance. - */ - public fun specification(specification: String) { - it.property("specification", specification) - } - - /** - * The message storage space. This option is mandatory when creating an instance. - */ - public fun storageSpace(storageSpace: String) { - it.property("storageSpace", storageSpace) - } - - /** - * The message storage space. This option is mandatory when creating an instance. - */ - public fun storageSpace(storageSpace: Int) { - it.property("storageSpace", storageSpace.toString()) - } - - /** - * The storage I/O specification. This option is mandatory when creating an instance. - */ - public fun storageSpecCode(storageSpecCode: String) { - it.property("storageSpecCode", storageSpecCode) - } - - /** - * The subnet ID. This option is mandatory when creating an instance. - */ - public fun subnetId(subnetId: String) { - it.property("subnetId", subnetId) - } - - /** - * The VPC ID. This option is mandatory when creating an instance. - */ - public fun vpcId(vpcId: String) { - it.property("vpcId", vpcId) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudFrsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudFrsUriDsl.kt deleted file mode 100644 index 6167fe5626034..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudFrsUriDsl.kt +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Face Recognition Service (FRS) is an intelligent service that uses computers to process, analyze, - * and understand facial images based on human facial features. - */ -public fun UriDsl.`hwcloud-frs`(i: HwcloudFrsUriDsl.() -> Unit) { - HwcloudFrsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HwcloudFrsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hwcloud-frs") - } - - private var operation: String = "" - - /** - * Name of Face Recognition operation to perform, including faceDetection, faceVerification and - * faceLiveDetection - */ - public fun operation(operation: String) { - this.operation = operation - it.url("$operation") - } - - /** - * Access key for the cloud user - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * This param is mandatory when the operation is faceLiveDetection, indicating the action code - * sequence list. Actions are separated by commas (,). Currently, the following actions are - * supported: 1: Shake the head to the left. 2: Shake the head to the right. 3: Nod the head. 4: - * Mouth movement. - */ - public fun actions(actions: String) { - it.property("actions", actions) - } - - /** - * This param can be used when the operation is faceLiveDetection, indicating the action time - * array. The length of the array is the same as the number of actions. Each item contains the start - * time and end time of the action in the corresponding sequence. The unit is the milliseconds from - * the video start time. - */ - public fun actionTimes(actionTimes: String) { - it.property("actionTimes", actionTimes) - } - - /** - * This param can be used when operation is faceVerification, indicating the Base64 character - * string converted from the other image. It needs to be configured if imageBase64 is set. The image - * size cannot exceed 10 MB. The image resolution of the narrow sides must be greater than 15 pixels, - * and that of the wide sides cannot exceed 4096 pixels. The supported image formats include JPG, - * PNG, and BMP. - */ - public fun anotherImageBase64(anotherImageBase64: String) { - it.property("anotherImageBase64", anotherImageBase64) - } - - /** - * This param can be used when operation is faceVerification, indicating the local file path of - * the other image. It needs to be configured if imageFilePath is set. Image size cannot exceed 8 MB, - * and it is recommended that the image size be less than 1 MB. - */ - public fun anotherImageFilePath(anotherImageFilePath: String) { - it.property("anotherImageFilePath", anotherImageFilePath) - } - - /** - * This param can be used when operation is faceVerification, indicating the URL of the other - * image. It needs to be configured if imageUrl is set. The options are as follows: 1.HTTP/HTTPS URLs - * on the public network 2.OBS URLs. To use OBS data, authorization is required, including service - * authorization, temporary authorization, and anonymous public authorization. For details, see - * Configuring the Access Permission of OBS. - */ - public fun anotherImageUrl(anotherImageUrl: String) { - it.property("anotherImageUrl", anotherImageUrl) - } - - /** - * Fully qualified Face Recognition service url. Carries higher precedence than region based - * configuration. - */ - public fun endpoint(endpoint: String) { - it.property("endpoint", endpoint) - } - - /** - * This param can be used when operation is faceDetection or faceVerification, indicating the - * Base64 character string converted from an image. Any one of imageBase64, imageUrl and - * imageFilePath needs to be set, and the priority is imageBase64 imageUrl imageFilePath. The Image - * size cannot exceed 10 MB. The image resolution of the narrow sides must be greater than 15 pixels, - * and that of the wide sides cannot exceed 4096 pixels. The supported image formats include JPG, - * PNG, and BMP. - */ - public fun imageBase64(imageBase64: String) { - it.property("imageBase64", imageBase64) - } - - /** - * This param can be used when operation is faceDetection or faceVerification, indicating the - * local image file path. Any one of imageBase64, imageUrl and imageFilePath needs to be set, and the - * priority is imageBase64 imageUrl imageFilePath. Image size cannot exceed 8 MB, and it is - * recommended that the image size be less than 1 MB. - */ - public fun imageFilePath(imageFilePath: String) { - it.property("imageFilePath", imageFilePath) - } - - /** - * This param can be used when operation is faceDetection or faceVerification, indicating the URL - * of an image. Any one of imageBase64, imageUrl and imageFilePath needs to be set, and the priority - * is imageBase64 imageUrl imageFilePath. The options are as follows: 1.HTTP/HTTPS URLs on the public - * network 2.OBS URLs. To use OBS data, authorization is required, including service authorization, - * temporary authorization, and anonymous public authorization. For details, see Configuring the - * Access Permission of OBS. - */ - public fun imageUrl(imageUrl: String) { - it.property("imageUrl", imageUrl) - } - - /** - * Cloud project ID - */ - public fun projectId(projectId: String) { - it.property("projectId", projectId) - } - - /** - * Proxy server ip/hostname - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * Proxy authentication password - */ - public fun proxyPassword(proxyPassword: String) { - it.property("proxyPassword", proxyPassword) - } - - /** - * Proxy server port - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * Proxy server port - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * Proxy authentication user - */ - public fun proxyUser(proxyUser: String) { - it.property("proxyUser", proxyUser) - } - - /** - * Face Recognition service region. Currently only cn-north-1 and cn-north-4 are supported. This - * is lower precedence than endpoint based configuration. - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Secret key for the cloud user - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Configuration object for cloud service authentication - */ - public fun serviceKeys(serviceKeys: String) { - it.property("serviceKeys", serviceKeys) - } - - /** - * This param can be used when operation is faceLiveDetection, indicating the Base64 character - * string converted from a video. Any one of videoBase64, videoUrl and videoFilePath needs to be set, - * and the priority is videoBase64 videoUrl videoFilePath. Requirements are as follows: 1.The video - * size after Base64 encoding cannot exceed 8 MB. It is recommended that the video file be compressed - * to 200 KB to 2 MB on the client. 2.The video duration must be 1 to 15 seconds. 3.The recommended - * frame rate is 10 fps to 30 fps. 4.The encapsulation format can be MP4, AVI, FLV, WEBM, ASF, or - * MOV. 5.The video encoding format can be H.261, H.263, H.264, HEVC, VC-1, VP8, VP9, or WMV3. - */ - public fun videoBase64(videoBase64: String) { - it.property("videoBase64", videoBase64) - } - - /** - * This param can be used when operation is faceLiveDetection, indicating the local video file - * path. Any one of videoBase64, videoUrl and videoFilePath needs to be set, and the priority is - * videoBase64 videoUrl videoFilePath. The video requirements are as follows: 1.The size of a video - * file cannot exceed 8 MB. It is recommended that the video file be compressed to 200 KB to 2 MB on - * the client. 2.The video duration must be 1 to 15 seconds. 3.The recommended frame rate is 10 fps - * to 30 fps. 4.The encapsulation format can be MP4, AVI, FLV, WEBM, ASF, or MOV. 5.The video - * encoding format can be H.261, H.263, H.264, HEVC, VC-1, VP8, VP9, or WMV3. - */ - public fun videoFilePath(videoFilePath: String) { - it.property("videoFilePath", videoFilePath) - } - - /** - * This param can be used when operation is faceLiveDetection, indicating the URL of a video. Any - * one of videoBase64, videoUrl and videoFilePath needs to be set, and the priority is videoBase64 - * videoUrl videoFilePath. Currently, only the URL of an OBS bucket on HUAWEI CLOUD is supported and - * FRS must have the permission to read data in the OBS bucket. For details about how to enable the - * read permission, see Service Authorization. The video requirements are as follows: 1.The video - * size after Base64 encoding cannot exceed 8 MB. 2.The video duration must be 1 to 15 seconds. 3.The - * recommended frame rate is 10 fps to 30 fps. 4.The encapsulation format can be MP4, AVI, FLV, WEBM, - * ASF, or MOV. 5.The video encoding format can be H.261, H.263, H.264, HEVC, VC-1, VP8, VP9, or - * WMV3. - */ - public fun videoUrl(videoUrl: String) { - it.property("videoUrl", videoUrl) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Ignore SSL verification - */ - public fun ignoreSslVerification(ignoreSslVerification: String) { - it.property("ignoreSslVerification", ignoreSslVerification) - } - - /** - * Ignore SSL verification - */ - public fun ignoreSslVerification(ignoreSslVerification: Boolean) { - it.property("ignoreSslVerification", ignoreSslVerification.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudFunctiongraphUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudFunctiongraphUriDsl.kt deleted file mode 100644 index 4d31f9be29e2e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudFunctiongraphUriDsl.kt +++ /dev/null @@ -1,182 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * To call serverless functions on Huawei Cloud - */ -public fun UriDsl.`hwcloud-functiongraph`(i: HwcloudFunctiongraphUriDsl.() -> Unit) { - HwcloudFunctiongraphUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HwcloudFunctiongraphUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hwcloud-functiongraph") - } - - private var operation: String = "" - - /** - * Operation to be performed - */ - public fun operation(operation: String) { - this.operation = operation - it.url("$operation") - } - - /** - * FunctionGraph url. Carries higher precedence than region parameter based client initialization - */ - public fun endpoint(endpoint: String) { - it.property("endpoint", endpoint) - } - - /** - * Name of the function to invoke - */ - public fun functionName(functionName: String) { - it.property("functionName", functionName) - } - - /** - * Functions that can be logically grouped together - */ - public fun functionPackage(functionPackage: String) { - it.property("functionPackage", functionPackage) - } - - /** - * Cloud project ID - */ - public fun projectId(projectId: String) { - it.property("projectId", projectId) - } - - /** - * FunctionGraph service region. This is lower precedence than endpoint based configuration - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Configuration object for cloud service authentication - */ - public fun serviceKeys(serviceKeys: String) { - it.property("serviceKeys", serviceKeys) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Proxy server ip/hostname - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * Proxy authentication password - */ - public fun proxyPassword(proxyPassword: String) { - it.property("proxyPassword", proxyPassword) - } - - /** - * Proxy server port - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * Proxy server port - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * Proxy authentication user - */ - public fun proxyUser(proxyUser: String) { - it.property("proxyUser", proxyUser) - } - - /** - * Access key for the cloud user - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Ignore SSL verification - */ - public fun ignoreSslVerification(ignoreSslVerification: String) { - it.property("ignoreSslVerification", ignoreSslVerification) - } - - /** - * Ignore SSL verification - */ - public fun ignoreSslVerification(ignoreSslVerification: Boolean) { - it.property("ignoreSslVerification", ignoreSslVerification.toString()) - } - - /** - * Secret key for the cloud user - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudIamUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudIamUriDsl.kt deleted file mode 100644 index 04cbe0935b087..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudIamUriDsl.kt +++ /dev/null @@ -1,168 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * To securely manage users on Huawei Cloud - */ -public fun UriDsl.`hwcloud-iam`(i: HwcloudIamUriDsl.() -> Unit) { - HwcloudIamUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HwcloudIamUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hwcloud-iam") - } - - private var operation: String = "" - - /** - * Operation to be performed - */ - public fun operation(operation: String) { - this.operation = operation - it.url("$operation") - } - - /** - * Access key for the cloud user - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Group ID to perform operation with - */ - public fun groupId(groupId: String) { - it.property("groupId", groupId) - } - - /** - * Ignore SSL verification - */ - public fun ignoreSslVerification(ignoreSslVerification: String) { - it.property("ignoreSslVerification", ignoreSslVerification) - } - - /** - * Ignore SSL verification - */ - public fun ignoreSslVerification(ignoreSslVerification: Boolean) { - it.property("ignoreSslVerification", ignoreSslVerification.toString()) - } - - /** - * Proxy server ip/hostname - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * Proxy authentication password - */ - public fun proxyPassword(proxyPassword: String) { - it.property("proxyPassword", proxyPassword) - } - - /** - * Proxy server port - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * Proxy server port - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * Proxy authentication user - */ - public fun proxyUser(proxyUser: String) { - it.property("proxyUser", proxyUser) - } - - /** - * IAM service region - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Secret key for the cloud user - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Configuration object for cloud service authentication - */ - public fun serviceKeys(serviceKeys: String) { - it.property("serviceKeys", serviceKeys) - } - - /** - * User ID to perform operation with - */ - public fun userId(userId: String) { - it.property("userId", userId) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudImagerecognitionUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudImagerecognitionUriDsl.kt deleted file mode 100644 index fb0c98b99a0d4..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudImagerecognitionUriDsl.kt +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Double -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * To identify objects, scenes, and concepts in images on Huawei Cloud - */ -public fun UriDsl.`hwcloud-imagerecognition`(i: HwcloudImagerecognitionUriDsl.() -> Unit) { - HwcloudImagerecognitionUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HwcloudImagerecognitionUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hwcloud-imagerecognition") - } - - private var operation: String = "" - - /** - * Name of Image Recognition operation to perform, including celebrityRecognition and - * tagRecognition - */ - public fun operation(operation: String) { - this.operation = operation - it.url("$operation") - } - - /** - * Access key for the cloud user - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Fully qualified Image Recognition service url. Carries higher precedence than region based - * configuration. - */ - public fun endpoint(endpoint: String) { - it.property("endpoint", endpoint) - } - - /** - * Indicates the Base64 character string converted from the image. The size cannot exceed 10 MB. - * The image resolution of the narrow sides must be greater than 15 pixels, and that of the wide - * sides cannot exceed 4096 pixels.The supported image formats include JPG, PNG, and BMP. Configure - * either this parameter or imageUrl, and this one carries higher precedence than imageUrl. - */ - public fun imageContent(imageContent: String) { - it.property("imageContent", imageContent) - } - - /** - * Indicates the URL of an image. The options are as follows: HTTP/HTTPS URLs on the public - * network OBS URLs. To use OBS data, authorization is required, including service authorization, - * temporary authorization, and anonymous public authorization. For details, see Configuring the - * Access Permission of OBS. Configure either this parameter or imageContent, and this one carries - * lower precedence than imageContent. - */ - public fun imageUrl(imageUrl: String) { - it.property("imageUrl", imageUrl) - } - - /** - * Cloud project ID - */ - public fun projectId(projectId: String) { - it.property("projectId", projectId) - } - - /** - * Proxy server ip/hostname - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * Proxy authentication password - */ - public fun proxyPassword(proxyPassword: String) { - it.property("proxyPassword", proxyPassword) - } - - /** - * Proxy server port - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * Proxy server port - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * Proxy authentication user - */ - public fun proxyUser(proxyUser: String) { - it.property("proxyUser", proxyUser) - } - - /** - * Image Recognition service region. Currently only cn-north-1 and cn-north-4 are supported. This - * is lower precedence than endpoint based configuration. - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Secret key for the cloud user - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Configuration object for cloud service authentication - */ - public fun serviceKeys(serviceKeys: String) { - it.property("serviceKeys", serviceKeys) - } - - /** - * Indicates the language of the returned tags when the operation is tagRecognition, including zh - * and en. - */ - public fun tagLanguage(tagLanguage: String) { - it.property("tagLanguage", tagLanguage) - } - - /** - * Indicates the maximum number of the returned tags when the operation is tagRecognition. - */ - public fun tagLimit(tagLimit: String) { - it.property("tagLimit", tagLimit) - } - - /** - * Indicates the maximum number of the returned tags when the operation is tagRecognition. - */ - public fun tagLimit(tagLimit: Int) { - it.property("tagLimit", tagLimit.toString()) - } - - /** - * Indicates the threshold of confidence. When the operation is tagRecognition, this parameter - * ranges from 0 to 100. Tags whose confidence score is lower than the threshold will not be - * returned. The default value is 60. When the operation is celebrityRecognition, this parameter - * ranges from 0 to 1. Labels whose confidence score is lower than the threshold will not be - * returned. The default value is 0.48. - */ - public fun threshold(threshold: String) { - it.property("threshold", threshold) - } - - /** - * Indicates the threshold of confidence. When the operation is tagRecognition, this parameter - * ranges from 0 to 100. Tags whose confidence score is lower than the threshold will not be - * returned. The default value is 60. When the operation is celebrityRecognition, this parameter - * ranges from 0 to 1. Labels whose confidence score is lower than the threshold will not be - * returned. The default value is 0.48. - */ - public fun threshold(threshold: Double) { - it.property("threshold", threshold.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Ignore SSL verification - */ - public fun ignoreSslVerification(ignoreSslVerification: String) { - it.property("ignoreSslVerification", ignoreSslVerification) - } - - /** - * Ignore SSL verification - */ - public fun ignoreSslVerification(ignoreSslVerification: Boolean) { - it.property("ignoreSslVerification", ignoreSslVerification.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudObsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudObsUriDsl.kt deleted file mode 100644 index 530ca0e7816bb..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudObsUriDsl.kt +++ /dev/null @@ -1,522 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * To provide stable, secure, efficient, and easy-to-use cloud storage service on Huawei Cloud - */ -public fun UriDsl.`hwcloud-obs`(i: HwcloudObsUriDsl.() -> Unit) { - HwcloudObsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HwcloudObsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hwcloud-obs") - } - - private var operation: String = "" - - /** - * Operation to be performed - */ - public fun operation(operation: String) { - this.operation = operation - it.url("$operation") - } - - /** - * Name of bucket to perform operation on - */ - public fun bucketName(bucketName: String) { - it.property("bucketName", bucketName) - } - - /** - * OBS url. Carries higher precedence than region parameter based client initialization - */ - public fun endpoint(endpoint: String) { - it.property("endpoint", endpoint) - } - - /** - * Name of object to perform operation with - */ - public fun objectName(objectName: String) { - it.property("objectName", objectName) - } - - /** - * OBS service region. This is lower precedence than endpoint based configuration - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Determines if objects should be deleted after it has been retrieved - */ - public fun deleteAfterRead(deleteAfterRead: String) { - it.property("deleteAfterRead", deleteAfterRead) - } - - /** - * Determines if objects should be deleted after it has been retrieved - */ - public fun deleteAfterRead(deleteAfterRead: Boolean) { - it.property("deleteAfterRead", deleteAfterRead.toString()) - } - - /** - * The character used for grouping object names - */ - public fun delimiter(delimiter: String) { - it.property("delimiter", delimiter) - } - - /** - * Name of destination bucket where objects will be moved when moveAfterRead is set to true - */ - public fun destinationBucket(destinationBucket: String) { - it.property("destinationBucket", destinationBucket) - } - - /** - * Get the object from the bucket with the given file name - */ - public fun fileName(fileName: String) { - it.property("fileName", fileName) - } - - /** - * If true, objects in folders will be consumed. Otherwise, they will be ignored and no Exchanges - * will be created for them - */ - public fun includeFolders(includeFolders: String) { - it.property("includeFolders", includeFolders) - } - - /** - * If true, objects in folders will be consumed. Otherwise, they will be ignored and no Exchanges - * will be created for them - */ - public fun includeFolders(includeFolders: Boolean) { - it.property("includeFolders", includeFolders.toString()) - } - - /** - * The maximum number of messages to poll at each polling - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * The maximum number of messages to poll at each polling - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * Determines whether objects should be moved to a different bucket after they have been - * retrieved. The destinationBucket option must also be set for this option to work. - */ - public fun moveAfterRead(moveAfterRead: String) { - it.property("moveAfterRead", moveAfterRead) - } - - /** - * Determines whether objects should be moved to a different bucket after they have been - * retrieved. The destinationBucket option must also be set for this option to work. - */ - public fun moveAfterRead(moveAfterRead: Boolean) { - it.property("moveAfterRead", moveAfterRead.toString()) - } - - /** - * The object name prefix used for filtering objects to be listed - */ - public fun prefix(prefix: String) { - it.property("prefix", prefix) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Location of bucket when creating a new bucket - */ - public fun bucketLocation(bucketLocation: String) { - it.property("bucketLocation", bucketLocation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Proxy server ip/hostname - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * Proxy authentication password - */ - public fun proxyPassword(proxyPassword: String) { - it.property("proxyPassword", proxyPassword) - } - - /** - * Proxy server port - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * Proxy server port - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * Proxy authentication user - */ - public fun proxyUser(proxyUser: String) { - it.property("proxyUser", proxyUser) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Access key for the cloud user - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Ignore SSL verification - */ - public fun ignoreSslVerification(ignoreSslVerification: String) { - it.property("ignoreSslVerification", ignoreSslVerification) - } - - /** - * Ignore SSL verification - */ - public fun ignoreSslVerification(ignoreSslVerification: Boolean) { - it.property("ignoreSslVerification", ignoreSslVerification.toString()) - } - - /** - * Secret key for the cloud user - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Configuration object for cloud service authentication - */ - public fun serviceKeys(serviceKeys: String) { - it.property("serviceKeys", serviceKeys) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudSmnUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudSmnUriDsl.kt deleted file mode 100644 index d1ef1090d3982..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/HwcloudSmnUriDsl.kt +++ /dev/null @@ -1,190 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * To broadcast messages and connect cloud services through notifications on Huawei Cloud - */ -public fun UriDsl.`hwcloud-smn`(i: HwcloudSmnUriDsl.() -> Unit) { - HwcloudSmnUriDsl(this).apply(i) -} - -@CamelDslMarker -public class HwcloudSmnUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("hwcloud-smn") - } - - private var smnService: String = "" - - /** - * Name of SMN service to invoke - */ - public fun smnService(smnService: String) { - this.smnService = smnService - it.url("$smnService") - } - - /** - * Access key for the cloud user - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Fully qualified smn service url. Carries higher precedence than region parameter based client - * initialization - */ - public fun endpoint(endpoint: String) { - it.property("endpoint", endpoint) - } - - /** - * Ignore SSL verification - */ - public fun ignoreSslVerification(ignoreSslVerification: String) { - it.property("ignoreSslVerification", ignoreSslVerification) - } - - /** - * Ignore SSL verification - */ - public fun ignoreSslVerification(ignoreSslVerification: Boolean) { - it.property("ignoreSslVerification", ignoreSslVerification.toString()) - } - - /** - * TTL for published message - */ - public fun messageTtl(messageTtl: String) { - it.property("messageTtl", messageTtl) - } - - /** - * TTL for published message - */ - public fun messageTtl(messageTtl: Int) { - it.property("messageTtl", messageTtl.toString()) - } - - /** - * Name of operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Cloud project ID - */ - public fun projectId(projectId: String) { - it.property("projectId", projectId) - } - - /** - * Proxy server ip/hostname - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * Proxy authentication password - */ - public fun proxyPassword(proxyPassword: String) { - it.property("proxyPassword", proxyPassword) - } - - /** - * Proxy server port - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * Proxy server port - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * Proxy authentication user - */ - public fun proxyUser(proxyUser: String) { - it.property("proxyUser", proxyUser) - } - - /** - * SMN service region. This is lower precedence than endpoint based configuration - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Secret key for the cloud user - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Configuration object for cloud service authentication - */ - public fun serviceKeys(serviceKeys: String) { - it.property("serviceKeys", serviceKeys) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Iec60870ClientUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Iec60870ClientUriDsl.kt deleted file mode 100644 index db175e7c6fdbb..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Iec60870ClientUriDsl.kt +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * IEC 60870 supervisory control and data acquisition (SCADA) client using NeoSCADA implementation. - */ -public fun UriDsl.`iec60870-client`(i: Iec60870ClientUriDsl.() -> Unit) { - Iec60870ClientUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Iec60870ClientUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("iec60870-client") - } - - private var uriPath: String = "" - - /** - * The object information address - */ - public fun uriPath(uriPath: String) { - this.uriPath = uriPath - it.url("$uriPath") - } - - /** - * Data module options - */ - public fun dataModuleOptions(dataModuleOptions: String) { - it.property("dataModuleOptions", dataModuleOptions) - } - - /** - * Protocol options - */ - public fun protocolOptions(protocolOptions: String) { - it.property("protocolOptions", protocolOptions) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Parameter W - Acknowledgment window. - */ - public fun acknowledgeWindow(acknowledgeWindow: String) { - it.property("acknowledgeWindow", acknowledgeWindow) - } - - /** - * Parameter W - Acknowledgment window. - */ - public fun acknowledgeWindow(acknowledgeWindow: Int) { - it.property("acknowledgeWindow", acknowledgeWindow.toString()) - } - - /** - * The common ASDU address size. May be either SIZE_1 or SIZE_2. - */ - public fun adsuAddressType(adsuAddressType: String) { - it.property("adsuAddressType", adsuAddressType) - } - - /** - * The cause of transmission type. May be either SIZE_1 or SIZE_2. - */ - public fun causeOfTransmissionType(causeOfTransmissionType: String) { - it.property("causeOfTransmissionType", causeOfTransmissionType) - } - - /** - * The information address size. May be either SIZE_1, SIZE_2 or SIZE_3. - */ - public fun informationObjectAddressType(informationObjectAddressType: String) { - it.property("informationObjectAddressType", informationObjectAddressType) - } - - /** - * Parameter K - Maximum number of un-acknowledged messages. - */ - public fun maxUnacknowledged(maxUnacknowledged: String) { - it.property("maxUnacknowledged", maxUnacknowledged) - } - - /** - * Parameter K - Maximum number of un-acknowledged messages. - */ - public fun maxUnacknowledged(maxUnacknowledged: Int) { - it.property("maxUnacknowledged", maxUnacknowledged.toString()) - } - - /** - * Timeout T1 in milliseconds. - */ - public fun timeout1(timeout1: String) { - it.property("timeout1", timeout1) - } - - /** - * Timeout T1 in milliseconds. - */ - public fun timeout1(timeout1: Int) { - it.property("timeout1", timeout1.toString()) - } - - /** - * Timeout T2 in milliseconds. - */ - public fun timeout2(timeout2: String) { - it.property("timeout2", timeout2) - } - - /** - * Timeout T2 in milliseconds. - */ - public fun timeout2(timeout2: Int) { - it.property("timeout2", timeout2.toString()) - } - - /** - * Timeout T3 in milliseconds. - */ - public fun timeout3(timeout3: String) { - it.property("timeout3", timeout3) - } - - /** - * Timeout T3 in milliseconds. - */ - public fun timeout3(timeout3: Int) { - it.property("timeout3", timeout3.toString()) - } - - /** - * Whether to include the source address - */ - public fun causeSourceAddress(causeSourceAddress: String) { - it.property("causeSourceAddress", causeSourceAddress) - } - - /** - * Whether to include the source address - */ - public fun causeSourceAddress(causeSourceAddress: Int) { - it.property("causeSourceAddress", causeSourceAddress.toString()) - } - - /** - * Timeout in millis to wait for client to establish a connected connection. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Timeout in millis to wait for client to establish a connected connection. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * Whether background scan transmissions should be ignored. - */ - public fun ignoreBackgroundScan(ignoreBackgroundScan: String) { - it.property("ignoreBackgroundScan", ignoreBackgroundScan) - } - - /** - * Whether background scan transmissions should be ignored. - */ - public fun ignoreBackgroundScan(ignoreBackgroundScan: Boolean) { - it.property("ignoreBackgroundScan", ignoreBackgroundScan.toString()) - } - - /** - * Whether to ignore or respect DST - */ - public fun ignoreDaylightSavingTime(ignoreDaylightSavingTime: String) { - it.property("ignoreDaylightSavingTime", ignoreDaylightSavingTime) - } - - /** - * Whether to ignore or respect DST - */ - public fun ignoreDaylightSavingTime(ignoreDaylightSavingTime: Boolean) { - it.property("ignoreDaylightSavingTime", ignoreDaylightSavingTime.toString()) - } - - /** - * The timezone to use. May be any Java time zone string - */ - public fun timeZone(timeZone: String) { - it.property("timeZone", timeZone) - } - - /** - * An identifier grouping connection instances - */ - public fun connectionId(connectionId: String) { - it.property("connectionId", connectionId) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Iec60870ServerUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Iec60870ServerUriDsl.kt deleted file mode 100644 index e458206517ab9..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Iec60870ServerUriDsl.kt +++ /dev/null @@ -1,312 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * IEC 60870 supervisory control and data acquisition (SCADA) server using NeoSCADA implementation. - */ -public fun UriDsl.`iec60870-server`(i: Iec60870ServerUriDsl.() -> Unit) { - Iec60870ServerUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Iec60870ServerUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("iec60870-server") - } - - private var uriPath: String = "" - - /** - * The object information address - */ - public fun uriPath(uriPath: String) { - this.uriPath = uriPath - it.url("$uriPath") - } - - /** - * Data module options - */ - public fun dataModuleOptions(dataModuleOptions: String) { - it.property("dataModuleOptions", dataModuleOptions) - } - - /** - * Filter out all requests which don't have the execute bit set - */ - public fun filterNonExecute(filterNonExecute: String) { - it.property("filterNonExecute", filterNonExecute) - } - - /** - * Filter out all requests which don't have the execute bit set - */ - public fun filterNonExecute(filterNonExecute: Boolean) { - it.property("filterNonExecute", filterNonExecute.toString()) - } - - /** - * Protocol options - */ - public fun protocolOptions(protocolOptions: String) { - it.property("protocolOptions", protocolOptions) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Parameter W - Acknowledgment window. - */ - public fun acknowledgeWindow(acknowledgeWindow: String) { - it.property("acknowledgeWindow", acknowledgeWindow) - } - - /** - * Parameter W - Acknowledgment window. - */ - public fun acknowledgeWindow(acknowledgeWindow: Int) { - it.property("acknowledgeWindow", acknowledgeWindow.toString()) - } - - /** - * The common ASDU address size. May be either SIZE_1 or SIZE_2. - */ - public fun adsuAddressType(adsuAddressType: String) { - it.property("adsuAddressType", adsuAddressType) - } - - /** - * The cause of transmission type. May be either SIZE_1 or SIZE_2. - */ - public fun causeOfTransmissionType(causeOfTransmissionType: String) { - it.property("causeOfTransmissionType", causeOfTransmissionType) - } - - /** - * The information address size. May be either SIZE_1, SIZE_2 or SIZE_3. - */ - public fun informationObjectAddressType(informationObjectAddressType: String) { - it.property("informationObjectAddressType", informationObjectAddressType) - } - - /** - * Parameter K - Maximum number of un-acknowledged messages. - */ - public fun maxUnacknowledged(maxUnacknowledged: String) { - it.property("maxUnacknowledged", maxUnacknowledged) - } - - /** - * Parameter K - Maximum number of un-acknowledged messages. - */ - public fun maxUnacknowledged(maxUnacknowledged: Int) { - it.property("maxUnacknowledged", maxUnacknowledged.toString()) - } - - /** - * Timeout T1 in milliseconds. - */ - public fun timeout1(timeout1: String) { - it.property("timeout1", timeout1) - } - - /** - * Timeout T1 in milliseconds. - */ - public fun timeout1(timeout1: Int) { - it.property("timeout1", timeout1.toString()) - } - - /** - * Timeout T2 in milliseconds. - */ - public fun timeout2(timeout2: String) { - it.property("timeout2", timeout2) - } - - /** - * Timeout T2 in milliseconds. - */ - public fun timeout2(timeout2: Int) { - it.property("timeout2", timeout2.toString()) - } - - /** - * Timeout T3 in milliseconds. - */ - public fun timeout3(timeout3: String) { - it.property("timeout3", timeout3) - } - - /** - * Timeout T3 in milliseconds. - */ - public fun timeout3(timeout3: Int) { - it.property("timeout3", timeout3.toString()) - } - - /** - * Whether to include the source address - */ - public fun causeSourceAddress(causeSourceAddress: String) { - it.property("causeSourceAddress", causeSourceAddress) - } - - /** - * Whether to include the source address - */ - public fun causeSourceAddress(causeSourceAddress: Int) { - it.property("causeSourceAddress", causeSourceAddress.toString()) - } - - /** - * Timeout in millis to wait for client to establish a connected connection. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Timeout in millis to wait for client to establish a connected connection. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * Whether background scan transmissions should be ignored. - */ - public fun ignoreBackgroundScan(ignoreBackgroundScan: String) { - it.property("ignoreBackgroundScan", ignoreBackgroundScan) - } - - /** - * Whether background scan transmissions should be ignored. - */ - public fun ignoreBackgroundScan(ignoreBackgroundScan: Boolean) { - it.property("ignoreBackgroundScan", ignoreBackgroundScan.toString()) - } - - /** - * Whether to ignore or respect DST - */ - public fun ignoreDaylightSavingTime(ignoreDaylightSavingTime: String) { - it.property("ignoreDaylightSavingTime", ignoreDaylightSavingTime) - } - - /** - * Whether to ignore or respect DST - */ - public fun ignoreDaylightSavingTime(ignoreDaylightSavingTime: Boolean) { - it.property("ignoreDaylightSavingTime", ignoreDaylightSavingTime.toString()) - } - - /** - * The timezone to use. May be any Java time zone string - */ - public fun timeZone(timeZone: String) { - it.property("timeZone", timeZone) - } - - /** - * An identifier grouping connection instances - */ - public fun connectionId(connectionId: String) { - it.property("connectionId", connectionId) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteCacheUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteCacheUriDsl.kt deleted file mode 100644 index a57275f0c64aa..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteCacheUriDsl.kt +++ /dev/null @@ -1,280 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform cache operations on an Ignite cache or consume changes from a continuous query. - */ -public fun UriDsl.`ignite-cache`(i: IgniteCacheUriDsl.() -> Unit) { - IgniteCacheUriDsl(this).apply(i) -} - -@CamelDslMarker -public class IgniteCacheUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("ignite-cache") - } - - private var cacheName: String = "" - - /** - * The cache name. - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * Sets whether to propagate the incoming body if the return type of the underlying Ignite - * operation is void. - */ - public fun propagateIncomingBodyIfNoReturnValue(propagateIncomingBodyIfNoReturnValue: String) { - it.property("propagateIncomingBodyIfNoReturnValue", propagateIncomingBodyIfNoReturnValue) - } - - /** - * Sets whether to propagate the incoming body if the return type of the underlying Ignite - * operation is void. - */ - public fun propagateIncomingBodyIfNoReturnValue(propagateIncomingBodyIfNoReturnValue: Boolean) { - it.property("propagateIncomingBodyIfNoReturnValue", - propagateIncomingBodyIfNoReturnValue.toString()) - } - - /** - * Sets whether to treat Collections as cache objects or as Collections of items to - * insert/update/compute, etc. - */ - public fun treatCollectionsAsCacheObjects(treatCollectionsAsCacheObjects: String) { - it.property("treatCollectionsAsCacheObjects", treatCollectionsAsCacheObjects) - } - - /** - * Sets whether to treat Collections as cache objects or as Collections of items to - * insert/update/compute, etc. - */ - public fun treatCollectionsAsCacheObjects(treatCollectionsAsCacheObjects: Boolean) { - it.property("treatCollectionsAsCacheObjects", treatCollectionsAsCacheObjects.toString()) - } - - /** - * Whether auto unsubscribe is enabled in the Continuous Query Consumer. Default value notice: - * ContinuousQuery.DFLT_AUTO_UNSUBSCRIBE - */ - public fun autoUnsubscribe(autoUnsubscribe: String) { - it.property("autoUnsubscribe", autoUnsubscribe) - } - - /** - * Whether auto unsubscribe is enabled in the Continuous Query Consumer. Default value notice: - * ContinuousQuery.DFLT_AUTO_UNSUBSCRIBE - */ - public fun autoUnsubscribe(autoUnsubscribe: Boolean) { - it.property("autoUnsubscribe", autoUnsubscribe.toString()) - } - - /** - * Whether to process existing results that match the query. Used on initialization of the - * Continuous Query Consumer. - */ - public fun fireExistingQueryResults(fireExistingQueryResults: String) { - it.property("fireExistingQueryResults", fireExistingQueryResults) - } - - /** - * Whether to process existing results that match the query. Used on initialization of the - * Continuous Query Consumer. - */ - public fun fireExistingQueryResults(fireExistingQueryResults: Boolean) { - it.property("fireExistingQueryResults", fireExistingQueryResults.toString()) - } - - /** - * Whether to pack each update in an individual Exchange, even if multiple updates are received in - * one batch. Only used by the Continuous Query Consumer. - */ - public fun oneExchangePerUpdate(oneExchangePerUpdate: String) { - it.property("oneExchangePerUpdate", oneExchangePerUpdate) - } - - /** - * Whether to pack each update in an individual Exchange, even if multiple updates are received in - * one batch. Only used by the Continuous Query Consumer. - */ - public fun oneExchangePerUpdate(oneExchangePerUpdate: Boolean) { - it.property("oneExchangePerUpdate", oneExchangePerUpdate.toString()) - } - - /** - * The page size. Only used by the Continuous Query Consumer. Default value notice: - * ContinuousQuery.DFLT_PAGE_SIZE - */ - public fun pageSize(pageSize: String) { - it.property("pageSize", pageSize) - } - - /** - * The page size. Only used by the Continuous Query Consumer. Default value notice: - * ContinuousQuery.DFLT_PAGE_SIZE - */ - public fun pageSize(pageSize: Int) { - it.property("pageSize", pageSize.toString()) - } - - /** - * The Query to execute, only needed for operations that require it, and for the Continuous Query - * Consumer. - */ - public fun query(query: String) { - it.property("query", query) - } - - /** - * The remote filter, only used by the Continuous Query Consumer. - */ - public fun remoteFilter(remoteFilter: String) { - it.property("remoteFilter", remoteFilter) - } - - /** - * The time interval for the Continuous Query Consumer. Default value notice: - * ContinuousQuery.DFLT_TIME_INTERVAL - */ - public fun timeInterval(timeInterval: String) { - it.property("timeInterval", timeInterval) - } - - /** - * The time interval for the Continuous Query Consumer. Default value notice: - * ContinuousQuery.DFLT_TIME_INTERVAL - */ - public fun timeInterval(timeInterval: Int) { - it.property("timeInterval", timeInterval.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * The CachePeekMode, only needed for operations that require it (IgniteCacheOperation#SIZE). - */ - public fun cachePeekMode(cachePeekMode: String) { - it.property("cachePeekMode", cachePeekMode) - } - - /** - * Whether to fail the initialization if the cache doesn't exist. - */ - public fun failIfInexistentCache(failIfInexistentCache: String) { - it.property("failIfInexistentCache", failIfInexistentCache) - } - - /** - * Whether to fail the initialization if the cache doesn't exist. - */ - public fun failIfInexistentCache(failIfInexistentCache: Boolean) { - it.property("failIfInexistentCache", failIfInexistentCache.toString()) - } - - /** - * The cache operation to invoke. Possible values: GET, PUT, REMOVE, SIZE, REBALANCE, QUERY, - * CLEAR. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteComputeUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteComputeUriDsl.kt deleted file mode 100644 index 28bfc8f29047c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteComputeUriDsl.kt +++ /dev/null @@ -1,156 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Run compute operations on an Ignite cluster. - */ -public fun UriDsl.`ignite-compute`(i: IgniteComputeUriDsl.() -> Unit) { - IgniteComputeUriDsl(this).apply(i) -} - -@CamelDslMarker -public class IgniteComputeUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("ignite-compute") - } - - private var endpointId: String = "" - - /** - * The endpoint ID (not used). - */ - public fun endpointId(endpointId: String) { - this.endpointId = endpointId - it.url("$endpointId") - } - - /** - * An expression that returns the Cluster Group for the IgniteCompute instance. - */ - public fun clusterGroupExpression(clusterGroupExpression: String) { - it.property("clusterGroupExpression", clusterGroupExpression) - } - - /** - * The name of the compute job, which will be set via IgniteCompute#withName(String). - */ - public fun computeName(computeName: String) { - it.property("computeName", computeName) - } - - /** - * The compute operation to perform. Possible values: CALL, BROADCAST, APPLY, EXECUTE, RUN, - * AFFINITY_CALL, AFFINITY_RUN. The component expects different payload types depending on the - * operation. - */ - public fun executionType(executionType: String) { - it.property("executionType", executionType) - } - - /** - * Sets whether to propagate the incoming body if the return type of the underlying Ignite - * operation is void. - */ - public fun propagateIncomingBodyIfNoReturnValue(propagateIncomingBodyIfNoReturnValue: String) { - it.property("propagateIncomingBodyIfNoReturnValue", propagateIncomingBodyIfNoReturnValue) - } - - /** - * Sets whether to propagate the incoming body if the return type of the underlying Ignite - * operation is void. - */ - public fun propagateIncomingBodyIfNoReturnValue(propagateIncomingBodyIfNoReturnValue: Boolean) { - it.property("propagateIncomingBodyIfNoReturnValue", - propagateIncomingBodyIfNoReturnValue.toString()) - } - - /** - * The task name, only applicable if using the IgniteComputeExecutionType#EXECUTE execution type. - */ - public fun taskName(taskName: String) { - it.property("taskName", taskName) - } - - /** - * The timeout interval for triggered jobs, in milliseconds, which will be set via - * IgniteCompute#withTimeout(long). - */ - public fun timeoutMillis(timeoutMillis: String) { - it.property("timeoutMillis", timeoutMillis) - } - - /** - * The timeout interval for triggered jobs, in milliseconds, which will be set via - * IgniteCompute#withTimeout(long). - */ - public fun timeoutMillis(timeoutMillis: Int) { - it.property("timeoutMillis", timeoutMillis.toString()) - } - - /** - * Sets whether to treat Collections as cache objects or as Collections of items to - * insert/update/compute, etc. - */ - public fun treatCollectionsAsCacheObjects(treatCollectionsAsCacheObjects: String) { - it.property("treatCollectionsAsCacheObjects", treatCollectionsAsCacheObjects) - } - - /** - * Sets whether to treat Collections as cache objects or as Collections of items to - * insert/update/compute, etc. - */ - public fun treatCollectionsAsCacheObjects(treatCollectionsAsCacheObjects: Boolean) { - it.property("treatCollectionsAsCacheObjects", treatCollectionsAsCacheObjects.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteEventsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteEventsUriDsl.kt deleted file mode 100644 index 9c1b72dadaca6..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteEventsUriDsl.kt +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Receive events from an Ignite cluster by creating a local event listener. - */ -public fun UriDsl.`ignite-events`(i: IgniteEventsUriDsl.() -> Unit) { - IgniteEventsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class IgniteEventsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("ignite-events") - } - - private var endpointId: String = "" - - /** - * The endpoint ID (not used). - */ - public fun endpointId(endpointId: String) { - this.endpointId = endpointId - it.url("$endpointId") - } - - /** - * The cluster group expression. - */ - public fun clusterGroupExpression(clusterGroupExpression: String) { - it.property("clusterGroupExpression", clusterGroupExpression) - } - - /** - * The event types to subscribe to as a comma-separated string of event constants as defined in - * EventType. For example: EVT_CACHE_ENTRY_CREATED,EVT_CACHE_OBJECT_REMOVED,EVT_IGFS_DIR_CREATED. - */ - public fun events(events: String) { - it.property("events", events) - } - - /** - * Sets whether to propagate the incoming body if the return type of the underlying Ignite - * operation is void. - */ - public fun propagateIncomingBodyIfNoReturnValue(propagateIncomingBodyIfNoReturnValue: String) { - it.property("propagateIncomingBodyIfNoReturnValue", propagateIncomingBodyIfNoReturnValue) - } - - /** - * Sets whether to propagate the incoming body if the return type of the underlying Ignite - * operation is void. - */ - public fun propagateIncomingBodyIfNoReturnValue(propagateIncomingBodyIfNoReturnValue: Boolean) { - it.property("propagateIncomingBodyIfNoReturnValue", - propagateIncomingBodyIfNoReturnValue.toString()) - } - - /** - * Sets whether to treat Collections as cache objects or as Collections of items to - * insert/update/compute, etc. - */ - public fun treatCollectionsAsCacheObjects(treatCollectionsAsCacheObjects: String) { - it.property("treatCollectionsAsCacheObjects", treatCollectionsAsCacheObjects) - } - - /** - * Sets whether to treat Collections as cache objects or as Collections of items to - * insert/update/compute, etc. - */ - public fun treatCollectionsAsCacheObjects(treatCollectionsAsCacheObjects: Boolean) { - it.property("treatCollectionsAsCacheObjects", treatCollectionsAsCacheObjects.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteIdgenUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteIdgenUriDsl.kt deleted file mode 100644 index 6f675a99fe2b9..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteIdgenUriDsl.kt +++ /dev/null @@ -1,147 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Interact with Ignite Atomic Sequences and ID Generators . - */ -public fun UriDsl.`ignite-idgen`(i: IgniteIdgenUriDsl.() -> Unit) { - IgniteIdgenUriDsl(this).apply(i) -} - -@CamelDslMarker -public class IgniteIdgenUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("ignite-idgen") - } - - private var name: String = "" - - /** - * The sequence name. - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * The batch size. - */ - public fun batchSize(batchSize: String) { - it.property("batchSize", batchSize) - } - - /** - * The batch size. - */ - public fun batchSize(batchSize: Int) { - it.property("batchSize", batchSize.toString()) - } - - /** - * The initial value. - */ - public fun initialValue(initialValue: String) { - it.property("initialValue", initialValue) - } - - /** - * The initial value. - */ - public fun initialValue(initialValue: Int) { - it.property("initialValue", initialValue.toString()) - } - - /** - * The operation to invoke on the Ignite ID Generator. Superseded by the - * IgniteConstants.IGNITE_IDGEN_OPERATION header in the IN message. Possible values: ADD_AND_GET, - * GET, GET_AND_ADD, GET_AND_INCREMENT, INCREMENT_AND_GET. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Sets whether to propagate the incoming body if the return type of the underlying Ignite - * operation is void. - */ - public fun propagateIncomingBodyIfNoReturnValue(propagateIncomingBodyIfNoReturnValue: String) { - it.property("propagateIncomingBodyIfNoReturnValue", propagateIncomingBodyIfNoReturnValue) - } - - /** - * Sets whether to propagate the incoming body if the return type of the underlying Ignite - * operation is void. - */ - public fun propagateIncomingBodyIfNoReturnValue(propagateIncomingBodyIfNoReturnValue: Boolean) { - it.property("propagateIncomingBodyIfNoReturnValue", - propagateIncomingBodyIfNoReturnValue.toString()) - } - - /** - * Sets whether to treat Collections as cache objects or as Collections of items to - * insert/update/compute, etc. - */ - public fun treatCollectionsAsCacheObjects(treatCollectionsAsCacheObjects: String) { - it.property("treatCollectionsAsCacheObjects", treatCollectionsAsCacheObjects) - } - - /** - * Sets whether to treat Collections as cache objects or as Collections of items to - * insert/update/compute, etc. - */ - public fun treatCollectionsAsCacheObjects(treatCollectionsAsCacheObjects: Boolean) { - it.property("treatCollectionsAsCacheObjects", treatCollectionsAsCacheObjects.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteMessagingUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteMessagingUriDsl.kt deleted file mode 100644 index 669cde715da4c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteMessagingUriDsl.kt +++ /dev/null @@ -1,184 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages from an Ignite topic. - */ -public fun UriDsl.`ignite-messaging`(i: IgniteMessagingUriDsl.() -> Unit) { - IgniteMessagingUriDsl(this).apply(i) -} - -@CamelDslMarker -public class IgniteMessagingUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("ignite-messaging") - } - - private var topic: String = "" - - /** - * The topic name. - */ - public fun topic(topic: String) { - this.topic = topic - it.url("$topic") - } - - /** - * Sets whether to propagate the incoming body if the return type of the underlying Ignite - * operation is void. - */ - public fun propagateIncomingBodyIfNoReturnValue(propagateIncomingBodyIfNoReturnValue: String) { - it.property("propagateIncomingBodyIfNoReturnValue", propagateIncomingBodyIfNoReturnValue) - } - - /** - * Sets whether to propagate the incoming body if the return type of the underlying Ignite - * operation is void. - */ - public fun propagateIncomingBodyIfNoReturnValue(propagateIncomingBodyIfNoReturnValue: Boolean) { - it.property("propagateIncomingBodyIfNoReturnValue", - propagateIncomingBodyIfNoReturnValue.toString()) - } - - /** - * Sets whether to treat Collections as cache objects or as Collections of items to - * insert/update/compute, etc. - */ - public fun treatCollectionsAsCacheObjects(treatCollectionsAsCacheObjects: String) { - it.property("treatCollectionsAsCacheObjects", treatCollectionsAsCacheObjects) - } - - /** - * Sets whether to treat Collections as cache objects or as Collections of items to - * insert/update/compute, etc. - */ - public fun treatCollectionsAsCacheObjects(treatCollectionsAsCacheObjects: Boolean) { - it.property("treatCollectionsAsCacheObjects", treatCollectionsAsCacheObjects.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * The cluster group expression. - */ - public fun clusterGroupExpression(clusterGroupExpression: String) { - it.property("clusterGroupExpression", clusterGroupExpression) - } - - /** - * The send mode to use. Possible values: UNORDERED, ORDERED. - */ - public fun sendMode(sendMode: String) { - it.property("sendMode", sendMode) - } - - /** - * The timeout for the send operation when using ordered messages. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * The timeout for the send operation when using ordered messages. - */ - public fun timeout(timeout: Int) { - it.property("timeout", timeout.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteQueueUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteQueueUriDsl.kt deleted file mode 100644 index ea4b0586cc607..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteQueueUriDsl.kt +++ /dev/null @@ -1,155 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Interact with Ignite Queue data structures. - */ -public fun UriDsl.`ignite-queue`(i: IgniteQueueUriDsl.() -> Unit) { - IgniteQueueUriDsl(this).apply(i) -} - -@CamelDslMarker -public class IgniteQueueUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("ignite-queue") - } - - private var name: String = "" - - /** - * The queue name. - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * The queue capacity. Default: non-bounded. - */ - public fun capacity(capacity: String) { - it.property("capacity", capacity) - } - - /** - * The queue capacity. Default: non-bounded. - */ - public fun capacity(capacity: Int) { - it.property("capacity", capacity.toString()) - } - - /** - * The collection configuration. Default: empty configuration. You can also conveniently set inner - * properties by using configuration.xyz=123 options. - */ - public fun configuration(configuration: String) { - it.property("configuration", configuration) - } - - /** - * The operation to invoke on the Ignite Queue. Superseded by the - * IgniteConstants.IGNITE_QUEUE_OPERATION header in the IN message. Possible values: CONTAINS, ADD, - * SIZE, REMOVE, ITERATOR, CLEAR, RETAIN_ALL, ARRAY, DRAIN, ELEMENT, PEEK, OFFER, POLL, TAKE, PUT. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Sets whether to propagate the incoming body if the return type of the underlying Ignite - * operation is void. - */ - public fun propagateIncomingBodyIfNoReturnValue(propagateIncomingBodyIfNoReturnValue: String) { - it.property("propagateIncomingBodyIfNoReturnValue", propagateIncomingBodyIfNoReturnValue) - } - - /** - * Sets whether to propagate the incoming body if the return type of the underlying Ignite - * operation is void. - */ - public fun propagateIncomingBodyIfNoReturnValue(propagateIncomingBodyIfNoReturnValue: Boolean) { - it.property("propagateIncomingBodyIfNoReturnValue", - propagateIncomingBodyIfNoReturnValue.toString()) - } - - /** - * The queue timeout in milliseconds. Default: no timeout. - */ - public fun timeoutMillis(timeoutMillis: String) { - it.property("timeoutMillis", timeoutMillis) - } - - /** - * The queue timeout in milliseconds. Default: no timeout. - */ - public fun timeoutMillis(timeoutMillis: Int) { - it.property("timeoutMillis", timeoutMillis.toString()) - } - - /** - * Sets whether to treat Collections as cache objects or as Collections of items to - * insert/update/compute, etc. - */ - public fun treatCollectionsAsCacheObjects(treatCollectionsAsCacheObjects: String) { - it.property("treatCollectionsAsCacheObjects", treatCollectionsAsCacheObjects) - } - - /** - * Sets whether to treat Collections as cache objects or as Collections of items to - * insert/update/compute, etc. - */ - public fun treatCollectionsAsCacheObjects(treatCollectionsAsCacheObjects: Boolean) { - it.property("treatCollectionsAsCacheObjects", treatCollectionsAsCacheObjects.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteSetUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteSetUriDsl.kt deleted file mode 100644 index ce6067dbdd51e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IgniteSetUriDsl.kt +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Interact with Ignite Set data structures. - */ -public fun UriDsl.`ignite-set`(i: IgniteSetUriDsl.() -> Unit) { - IgniteSetUriDsl(this).apply(i) -} - -@CamelDslMarker -public class IgniteSetUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("ignite-set") - } - - private var name: String = "" - - /** - * The set name. - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * The collection configuration. Default: empty configuration. You can also conveniently set inner - * properties by using configuration.xyz=123 options. - */ - public fun configuration(configuration: String) { - it.property("configuration", configuration) - } - - /** - * The operation to invoke on the Ignite Set. Superseded by the - * IgniteConstants.IGNITE_SETS_OPERATION header in the IN message. Possible values: CONTAINS, ADD, - * SIZE, REMOVE, ITERATOR, CLEAR, RETAIN_ALL, ARRAY.The set operation to perform. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Sets whether to propagate the incoming body if the return type of the underlying Ignite - * operation is void. - */ - public fun propagateIncomingBodyIfNoReturnValue(propagateIncomingBodyIfNoReturnValue: String) { - it.property("propagateIncomingBodyIfNoReturnValue", propagateIncomingBodyIfNoReturnValue) - } - - /** - * Sets whether to propagate the incoming body if the return type of the underlying Ignite - * operation is void. - */ - public fun propagateIncomingBodyIfNoReturnValue(propagateIncomingBodyIfNoReturnValue: Boolean) { - it.property("propagateIncomingBodyIfNoReturnValue", - propagateIncomingBodyIfNoReturnValue.toString()) - } - - /** - * Sets whether to treat Collections as cache objects or as Collections of items to - * insert/update/compute, etc. - */ - public fun treatCollectionsAsCacheObjects(treatCollectionsAsCacheObjects: String) { - it.property("treatCollectionsAsCacheObjects", treatCollectionsAsCacheObjects) - } - - /** - * Sets whether to treat Collections as cache objects or as Collections of items to - * insert/update/compute, etc. - */ - public fun treatCollectionsAsCacheObjects(treatCollectionsAsCacheObjects: Boolean) { - it.property("treatCollectionsAsCacheObjects", treatCollectionsAsCacheObjects.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ImapUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ImapUriDsl.kt deleted file mode 100644 index 3a3d88380fe34..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ImapUriDsl.kt +++ /dev/null @@ -1,917 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive emails using imap, pop3 and smtp protocols. - */ -public fun UriDsl.imap(i: ImapUriDsl.() -> Unit) { - ImapUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ImapUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("imap") - } - - private var host: String = "" - - private var port: String = "" - - /** - * The mail server host name - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port") - } - - /** - * The port number of the mail server - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port") - } - - /** - * The port number of the mail server - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port") - } - - /** - * Whether the consumer should close the folder after polling. Setting this option to false and - * having disconnect=false as well, then the consumer keeps the folder open between polls. - */ - public fun closeFolder(closeFolder: String) { - it.property("closeFolder", closeFolder) - } - - /** - * Whether the consumer should close the folder after polling. Setting this option to false and - * having disconnect=false as well, then the consumer keeps the folder open between polls. - */ - public fun closeFolder(closeFolder: Boolean) { - it.property("closeFolder", closeFolder.toString()) - } - - /** - * After processing a mail message, it can be copied to a mail folder with the given name. You can - * override this configuration value with a header with the key copyTo, allowing you to copy messages - * to folder names configured at runtime. - */ - public fun copyTo(copyTo: String) { - it.property("copyTo", copyTo) - } - - /** - * If set to true, the MimeUtility.decodeText method will be used to decode the filename. This is - * similar to setting JVM system property mail.mime.encodefilename. - */ - public fun decodeFilename(decodeFilename: String) { - it.property("decodeFilename", decodeFilename) - } - - /** - * If set to true, the MimeUtility.decodeText method will be used to decode the filename. This is - * similar to setting JVM system property mail.mime.encodefilename. - */ - public fun decodeFilename(decodeFilename: Boolean) { - it.property("decodeFilename", decodeFilename.toString()) - } - - /** - * Deletes the messages after they have been processed. This is done by setting the DELETED flag - * on the mail message. If false, the SEEN flag is set instead. You can override this configuration - * option by setting a header with the key delete to determine if the mail should be deleted or not. - */ - public fun delete(delete: String) { - it.property("delete", delete) - } - - /** - * Deletes the messages after they have been processed. This is done by setting the DELETED flag - * on the mail message. If false, the SEEN flag is set instead. You can override this configuration - * option by setting a header with the key delete to determine if the mail should be deleted or not. - */ - public fun delete(delete: Boolean) { - it.property("delete", delete.toString()) - } - - /** - * Whether the consumer should disconnect after polling. If enabled, this forces Camel to connect - * on each poll. - */ - public fun disconnect(disconnect: String) { - it.property("disconnect", disconnect) - } - - /** - * Whether the consumer should disconnect after polling. If enabled, this forces Camel to connect - * on each poll. - */ - public fun disconnect(disconnect: Boolean) { - it.property("disconnect", disconnect.toString()) - } - - /** - * If the mail consumer cannot retrieve a given mail message, then this option allows handling the - * caused exception by the consumer's error handler. By enabling the bridge error handler on the - * consumer, then the Camel routing error handler can handle the exception instead. The default - * behavior would be the consumer throws an exception and no mails from the batch would be able to be - * routed by Camel. - */ - public fun handleFailedMessage(handleFailedMessage: String) { - it.property("handleFailedMessage", handleFailedMessage) - } - - /** - * If the mail consumer cannot retrieve a given mail message, then this option allows handling the - * caused exception by the consumer's error handler. By enabling the bridge error handler on the - * consumer, then the Camel routing error handler can handle the exception instead. The default - * behavior would be the consumer throws an exception and no mails from the batch would be able to be - * routed by Camel. - */ - public fun handleFailedMessage(handleFailedMessage: Boolean) { - it.property("handleFailedMessage", handleFailedMessage.toString()) - } - - /** - * Specifies the maximum number of messages to gather per poll. By default, no maximum is set. Can - * be used to set a limit of e.g. 1000 to avoid downloading thousands of files when the server starts - * up. Set a value of 0 or negative to disable this option. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * Specifies the maximum number of messages to gather per poll. By default, no maximum is set. Can - * be used to set a limit of e.g. 1000 to avoid downloading thousands of files when the server starts - * up. Set a value of 0 or negative to disable this option. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * This option enables transparent MIME decoding and unfolding for mail headers. - */ - public fun mimeDecodeHeaders(mimeDecodeHeaders: String) { - it.property("mimeDecodeHeaders", mimeDecodeHeaders) - } - - /** - * This option enables transparent MIME decoding and unfolding for mail headers. - */ - public fun mimeDecodeHeaders(mimeDecodeHeaders: Boolean) { - it.property("mimeDecodeHeaders", mimeDecodeHeaders.toString()) - } - - /** - * After processing a mail message, it can be moved to a mail folder with the given name. You can - * override this configuration value with a header with the key moveTo, allowing you to move messages - * to folder names configured at runtime. - */ - public fun moveTo(moveTo: String) { - it.property("moveTo", moveTo) - } - - /** - * Will mark the jakarta.mail.Message as peeked before processing the mail message. This applies - * to IMAPMessage messages types only. By using peek, the mail will not be eagerly marked as SEEN on - * the mail server, which allows us to roll back the mail message if there is a processing error in - * Camel. - */ - public fun peek(peek: String) { - it.property("peek", peek) - } - - /** - * Will mark the jakarta.mail.Message as peeked before processing the mail message. This applies - * to IMAPMessage messages types only. By using peek, the mail will not be eagerly marked as SEEN on - * the mail server, which allows us to roll back the mail message if there is a processing error in - * Camel. - */ - public fun peek(peek: Boolean) { - it.property("peek", peek.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * If the mail consumer cannot retrieve a given mail message, then this option allows skipping the - * message and move on to retrieve the next mail message. The default behavior would be the consumer - * throws an exception and no mails from the batch would be able to be routed by Camel. - */ - public fun skipFailedMessage(skipFailedMessage: String) { - it.property("skipFailedMessage", skipFailedMessage) - } - - /** - * If the mail consumer cannot retrieve a given mail message, then this option allows skipping the - * message and move on to retrieve the next mail message. The default behavior would be the consumer - * throws an exception and no mails from the batch would be able to be routed by Camel. - */ - public fun skipFailedMessage(skipFailedMessage: Boolean) { - it.property("skipFailedMessage", skipFailedMessage.toString()) - } - - /** - * Whether to limit by unseen mails only. - */ - public fun unseen(unseen: String) { - it.property("unseen", unseen) - } - - /** - * Whether to limit by unseen mails only. - */ - public fun unseen(unseen: Boolean) { - it.property("unseen", unseen.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Whether to fail processing the mail if the mail message contains attachments with duplicate - * file names. If set to false, then the duplicate attachment is skipped and a WARN is logged. If set - * to true, then an exception is thrown failing to process the mail message. - */ - public fun failOnDuplicateFileAttachment(failOnDuplicateFileAttachment: String) { - it.property("failOnDuplicateFileAttachment", failOnDuplicateFileAttachment) - } - - /** - * Whether to fail processing the mail if the mail message contains attachments with duplicate - * file names. If set to false, then the duplicate attachment is skipped and a WARN is logged. If set - * to true, then an exception is thrown failing to process the mail message. - */ - public fun failOnDuplicateFileAttachment(failOnDuplicateFileAttachment: Boolean) { - it.property("failOnDuplicateFileAttachment", failOnDuplicateFileAttachment.toString()) - } - - /** - * Sets the maximum number of messages to consume during a poll. This can be used to avoid - * overloading a mail server, if a mailbox folder contains a lot of messages. The default value of -1 - * means no fetch size and all messages will be consumed. Setting the value to 0 is a special corner - * case, where Camel will not consume any messages at all. - */ - public fun fetchSize(fetchSize: String) { - it.property("fetchSize", fetchSize) - } - - /** - * Sets the maximum number of messages to consume during a poll. This can be used to avoid - * overloading a mail server, if a mailbox folder contains a lot of messages. The default value of -1 - * means no fetch size and all messages will be consumed. Setting the value to 0 is a special corner - * case, where Camel will not consume any messages at all. - */ - public fun fetchSize(fetchSize: Int) { - it.property("fetchSize", fetchSize.toString()) - } - - /** - * The folder to poll. - */ - public fun folderName(folderName: String) { - it.property("folderName", folderName) - } - - /** - * Set this to 'uuid' to set a UUID for the filename of the attachment if no filename was set - */ - public fun generateMissingAttachmentNames(generateMissingAttachmentNames: String) { - it.property("generateMissingAttachmentNames", generateMissingAttachmentNames) - } - - /** - * Set the strategy to handle duplicate filenames of attachments never: attachments that have a - * filename which is already present in the attachments will be ignored unless - * failOnDuplicateFileAttachment is set to true. uuidPrefix: this will prefix the duplicate - * attachment filenames each with an uuid and underscore (uuid_filename.fileextension). uuidSuffix: - * this will suffix the duplicate attachment filenames each with an underscore and uuid - * (filename_uuid.fileextension). - */ - public fun handleDuplicateAttachmentNames(handleDuplicateAttachmentNames: String) { - it.property("handleDuplicateAttachmentNames", handleDuplicateAttachmentNames) - } - - /** - * A pluggable MailUidGenerator that allows to use custom logic to generate UUID of the mail - * message. - */ - public fun mailUidGenerator(mailUidGenerator: String) { - it.property("mailUidGenerator", mailUidGenerator) - } - - /** - * Specifies whether Camel should map the received mail message to Camel body/headers/attachments. - * If set to true, the body of the mail message is mapped to the body of the Camel IN message, the - * mail headers are mapped to IN headers, and the attachments to Camel IN attachment message. If this - * option is set to false, then the IN message contains a raw jakarta.mail.Message. You can retrieve - * this raw message by calling exchange.getIn().getBody(jakarta.mail.Message.class). - */ - public fun mapMailMessage(mapMailMessage: String) { - it.property("mapMailMessage", mapMailMessage) - } - - /** - * Specifies whether Camel should map the received mail message to Camel body/headers/attachments. - * If set to true, the body of the mail message is mapped to the body of the Camel IN message, the - * mail headers are mapped to IN headers, and the attachments to Camel IN attachment message. If this - * option is set to false, then the IN message contains a raw jakarta.mail.Message. You can retrieve - * this raw message by calling exchange.getIn().getBody(jakarta.mail.Message.class). - */ - public fun mapMailMessage(mapMailMessage: Boolean) { - it.property("mapMailMessage", mapMailMessage.toString()) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Refers to an MailBoxPostProcessAction for doing post processing tasks on the mailbox once the - * normal processing ended. - */ - public fun postProcessAction(postProcessAction: String) { - it.property("postProcessAction", postProcessAction) - } - - /** - * Sets the BCC email address. Separate multiple email addresses with comma. - */ - public fun bcc(bcc: String) { - it.property("bcc", bcc) - } - - /** - * Sets the CC email address. Separate multiple email addresses with comma. - */ - public fun cc(cc: String) { - it.property("cc", cc) - } - - /** - * The from email address - */ - public fun from(from: String) { - it.property("from", from) - } - - /** - * The Reply-To recipients (the receivers of the response mail). Separate multiple email addresses - * with a comma. - */ - public fun replyTo(replyTo: String) { - it.property("replyTo", replyTo) - } - - /** - * The Subject of the message being sent. Note: Setting the subject in the header takes precedence - * over this option. - */ - public fun subject(subject: String) { - it.property("subject", subject) - } - - /** - * Sets the destination email address. Separate multiple email addresses with comma. - */ - public fun to(to: String) { - it.property("to", to) - } - - /** - * To use a custom org.apache.camel.component.mail.JavaMailSender for sending emails. - */ - public fun javaMailSender(javaMailSender: String) { - it.property("javaMailSender", javaMailSender) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Sets additional java mail properties, that will append/override any default properties that are - * set based on all the other options. This is useful if you need to add some special options but - * want to keep the others as is. - */ - public fun additionalJavaMailProperties(additionalJavaMailProperties: String) { - it.property("additionalJavaMailProperties", additionalJavaMailProperties) - } - - /** - * Specifies the key to an IN message header that contains an alternative email body. For example, - * if you send emails in text/html format and want to provide an alternative mail body for non-HTML - * email clients, set the alternative mail body with this key as a header. - */ - public fun alternativeBodyHeader(alternativeBodyHeader: String) { - it.property("alternativeBodyHeader", alternativeBodyHeader) - } - - /** - * To use a custom AttachmentsContentTransferEncodingResolver to resolve what - * content-type-encoding to use for attachments. - */ - public - fun attachmentsContentTransferEncodingResolver(attachmentsContentTransferEncodingResolver: String) { - it.property("attachmentsContentTransferEncodingResolver", - attachmentsContentTransferEncodingResolver) - } - - /** - * The authenticator for login. If set then the password and username are ignored. It can be used - * for tokens which can expire and therefore must be read dynamically. - */ - public fun authenticator(authenticator: String) { - it.property("authenticator", authenticator) - } - - /** - * Sets the binding used to convert from a Camel message to and from a Mail message - */ - public fun binding(binding: String) { - it.property("binding", binding) - } - - /** - * The connection timeout in milliseconds. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * The connection timeout in milliseconds. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The mail message content type. Use text/html for HTML mails. - */ - public fun contentType(contentType: String) { - it.property("contentType", contentType) - } - - /** - * Resolver to determine Content-Type for file attachments. - */ - public fun contentTypeResolver(contentTypeResolver: String) { - it.property("contentTypeResolver", contentTypeResolver) - } - - /** - * Enable debug mode on the underlying mail framework. The SUN Mail framework logs the debug - * messages to System.out by default. - */ - public fun debugMode(debugMode: String) { - it.property("debugMode", debugMode) - } - - /** - * Enable debug mode on the underlying mail framework. The SUN Mail framework logs the debug - * messages to System.out by default. - */ - public fun debugMode(debugMode: Boolean) { - it.property("debugMode", debugMode.toString()) - } - - /** - * To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter headers. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * Option to let Camel ignore unsupported charset in the local JVM when sending mails. If the - * charset is unsupported, then charset=XXX (where XXX represents the unsupported charset) is removed - * from the content-type, and it relies on the platform default instead. - */ - public fun ignoreUnsupportedCharset(ignoreUnsupportedCharset: String) { - it.property("ignoreUnsupportedCharset", ignoreUnsupportedCharset) - } - - /** - * Option to let Camel ignore unsupported charset in the local JVM when sending mails. If the - * charset is unsupported, then charset=XXX (where XXX represents the unsupported charset) is removed - * from the content-type, and it relies on the platform default instead. - */ - public fun ignoreUnsupportedCharset(ignoreUnsupportedCharset: Boolean) { - it.property("ignoreUnsupportedCharset", ignoreUnsupportedCharset.toString()) - } - - /** - * Option to let Camel ignore unsupported charset in the local JVM when sending mails. If the - * charset is unsupported, then charset=XXX (where XXX represents the unsupported charset) is removed - * from the content-type, and it relies on the platform default instead. - */ - public fun ignoreUriScheme(ignoreUriScheme: String) { - it.property("ignoreUriScheme", ignoreUriScheme) - } - - /** - * Option to let Camel ignore unsupported charset in the local JVM when sending mails. If the - * charset is unsupported, then charset=XXX (where XXX represents the unsupported charset) is removed - * from the content-type, and it relies on the platform default instead. - */ - public fun ignoreUriScheme(ignoreUriScheme: Boolean) { - it.property("ignoreUriScheme", ignoreUriScheme.toString()) - } - - /** - * Sets the java mail options. Will clear any default properties and only use the properties - * provided for this method. - */ - public fun javaMailProperties(javaMailProperties: String) { - it.property("javaMailProperties", javaMailProperties) - } - - /** - * Specifies the mail session that camel should use for all mail interactions. Useful in scenarios - * where mail sessions are created and managed by some other resource, such as a JavaEE container. - * When using a custom mail session, then the hostname and port from the mail session will be used - * (if configured on the session). - */ - public fun session(session: String) { - it.property("session", session) - } - - /** - * Whether to use disposition inline or attachment. - */ - public fun useInlineAttachments(useInlineAttachments: String) { - it.property("useInlineAttachments", useInlineAttachments) - } - - /** - * Whether to use disposition inline or attachment. - */ - public fun useInlineAttachments(useInlineAttachments: Boolean) { - it.property("useInlineAttachments", useInlineAttachments.toString()) - } - - /** - * A pluggable repository org.apache.camel.spi.IdempotentRepository which allows to cluster - * consuming from the same mailbox, and let the repository coordinate whether a mail message is valid - * for the consumer to process. By default no repository is in use. - */ - public fun idempotentRepository(idempotentRepository: String) { - it.property("idempotentRepository", idempotentRepository) - } - - /** - * When using idempotent repository, then when the mail message has been successfully processed - * and is committed, should the message id be removed from the idempotent repository (default) or be - * kept in the repository. By default its assumed the message id is unique and has no value to be - * kept in the repository, because the mail message will be marked as seen/moved or deleted to - * prevent it from being consumed again. And therefore having the message id stored in the idempotent - * repository has little value. However this option allows to store the message id, for whatever - * reason you may have. - */ - public fun idempotentRepositoryRemoveOnCommit(idempotentRepositoryRemoveOnCommit: String) { - it.property("idempotentRepositoryRemoveOnCommit", idempotentRepositoryRemoveOnCommit) - } - - /** - * When using idempotent repository, then when the mail message has been successfully processed - * and is committed, should the message id be removed from the idempotent repository (default) or be - * kept in the repository. By default its assumed the message id is unique and has no value to be - * kept in the repository, because the mail message will be marked as seen/moved or deleted to - * prevent it from being consumed again. And therefore having the message id stored in the idempotent - * repository has little value. However this option allows to store the message id, for whatever - * reason you may have. - */ - public fun idempotentRepositoryRemoveOnCommit(idempotentRepositoryRemoveOnCommit: Boolean) { - it.property("idempotentRepositoryRemoveOnCommit", idempotentRepositoryRemoveOnCommit.toString()) - } - - /** - * Refers to a jakarta.mail.search.SearchTerm which allows to filter mails based on search - * criteria such as subject, body, from, sent after a certain date etc. - */ - public fun searchTerm(searchTerm: String) { - it.property("searchTerm", searchTerm) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * The password for login. See also setAuthenticator(MailAuthenticator). - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * To configure security using SSLContextParameters. - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * The username for login. See also setAuthenticator(MailAuthenticator). - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * Sorting order for messages. Only natively supported for IMAP. Emulated to some degree when - * using POP3 or when IMAP server does not have the SORT capability. - */ - public fun sortTerm(sortTerm: String) { - it.property("sortTerm", sortTerm) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/InfinispanEmbeddedUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/InfinispanEmbeddedUriDsl.kt deleted file mode 100644 index 42feb97f1a8c2..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/InfinispanEmbeddedUriDsl.kt +++ /dev/null @@ -1,259 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Read and write from/to Infinispan distributed key/value store and data grid. - */ -public fun UriDsl.`infinispan-embedded`(i: InfinispanEmbeddedUriDsl.() -> Unit) { - InfinispanEmbeddedUriDsl(this).apply(i) -} - -@CamelDslMarker -public class InfinispanEmbeddedUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("infinispan-embedded") - } - - private var cacheName: String = "" - - /** - * The name of the cache to use. Use current to use the existing cache name from the currently - * configured cached manager. Or use default for the default cache manager name. - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * Specifies the query builder. - */ - public fun queryBuilder(queryBuilder: String) { - it.property("queryBuilder", queryBuilder) - } - - /** - * If true, the listener will be installed for the entire cluster - */ - public fun clusteredListener(clusteredListener: String) { - it.property("clusteredListener", clusteredListener) - } - - /** - * If true, the listener will be installed for the entire cluster - */ - public fun clusteredListener(clusteredListener: Boolean) { - it.property("clusteredListener", clusteredListener.toString()) - } - - /** - * Returns the custom listener in use, if provided - */ - public fun customListener(customListener: String) { - it.property("customListener", customListener) - } - - /** - * Specifies the set of event types to register by the consumer.Multiple event can be separated by - * comma. The possible event types are: CACHE_ENTRY_ACTIVATED, CACHE_ENTRY_PASSIVATED, - * CACHE_ENTRY_VISITED, CACHE_ENTRY_LOADED, CACHE_ENTRY_EVICTED, CACHE_ENTRY_CREATED, - * CACHE_ENTRY_REMOVED, CACHE_ENTRY_MODIFIED, TRANSACTION_COMPLETED, TRANSACTION_REGISTERED, - * CACHE_ENTRY_INVALIDATED, CACHE_ENTRY_EXPIRED, DATA_REHASHED, TOPOLOGY_CHANGED, - * PARTITION_STATUS_CHANGED, PERSISTENCE_AVAILABILITY_CHANGED - */ - public fun eventTypes(eventTypes: String) { - it.property("eventTypes", eventTypes) - } - - /** - * If true, the consumer will receive notifications synchronously - */ - public fun sync(sync: String) { - it.property("sync", sync) - } - - /** - * If true, the consumer will receive notifications synchronously - */ - public fun sync(sync: Boolean) { - it.property("sync", sync.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Set a specific default value for some producer operations - */ - public fun defaultValue(defaultValue: String) { - it.property("defaultValue", defaultValue) - } - - /** - * Set a specific key for producer operations - */ - public fun key(key: String) { - it.property("key", key) - } - - /** - * Set a specific old value for some producer operations - */ - public fun oldValue(oldValue: String) { - it.property("oldValue", oldValue) - } - - /** - * The operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set a specific value for producer operations - */ - public fun `value`(`value`: String) { - it.property("value", value) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Specifies the cache Container to connect - */ - public fun cacheContainer(cacheContainer: String) { - it.property("cacheContainer", cacheContainer) - } - - /** - * The CacheContainer configuration. Used if the cacheContainer is not defined. - */ - public fun cacheContainerConfiguration(cacheContainerConfiguration: String) { - it.property("cacheContainerConfiguration", cacheContainerConfiguration) - } - - /** - * An implementation specific URI for the CacheManager - */ - public fun configurationUri(configurationUri: String) { - it.property("configurationUri", configurationUri) - } - - /** - * A comma separated list of org.infinispan.context.Flag to be applied by default on each cache - * invocation - */ - public fun flags(flags: String) { - it.property("flags", flags) - } - - /** - * Set a specific remappingFunction to use in a compute operation. - */ - public fun remappingFunction(remappingFunction: String) { - it.property("remappingFunction", remappingFunction) - } - - /** - * Store the operation result in a header instead of the message body. By default, resultHeader == - * null and the query result is stored in the message body, any existing content in the message body - * is discarded. If resultHeader is set, the value is used as the name of the header to store the - * query result and the original message body is preserved. This value can be overridden by an in - * message header named: CamelInfinispanOperationResultHeader - */ - public fun resultHeader(resultHeader: String) { - it.property("resultHeader", resultHeader) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/InfinispanUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/InfinispanUriDsl.kt deleted file mode 100644 index 5a271dad79e0e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/InfinispanUriDsl.kt +++ /dev/null @@ -1,292 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Read and write from/to Infinispan distributed key/value store and data grid. - */ -public fun UriDsl.infinispan(i: InfinispanUriDsl.() -> Unit) { - InfinispanUriDsl(this).apply(i) -} - -@CamelDslMarker -public class InfinispanUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("infinispan") - } - - private var cacheName: String = "" - - /** - * The name of the cache to use. Use current to use the existing cache name from the currently - * configured cached manager. Or use default for the default cache manager name. - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * Specifies the host of the cache on Infinispan instance. Multiple hosts can be separated by - * semicolon. - */ - public fun hosts(hosts: String) { - it.property("hosts", hosts) - } - - /** - * Specifies the query builder. - */ - public fun queryBuilder(queryBuilder: String) { - it.property("queryBuilder", queryBuilder) - } - - /** - * Returns the custom listener in use, if provided - */ - public fun customListener(customListener: String) { - it.property("customListener", customListener) - } - - /** - * Specifies the set of event types to register by the consumer.Multiple event can be separated by - * comma. The possible event types are: CLIENT_CACHE_ENTRY_CREATED, CLIENT_CACHE_ENTRY_MODIFIED, - * CLIENT_CACHE_ENTRY_REMOVED, CLIENT_CACHE_ENTRY_EXPIRED, CLIENT_CACHE_FAILOVER - */ - public fun eventTypes(eventTypes: String) { - it.property("eventTypes", eventTypes) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Set a specific default value for some producer operations - */ - public fun defaultValue(defaultValue: String) { - it.property("defaultValue", defaultValue) - } - - /** - * Set a specific key for producer operations - */ - public fun key(key: String) { - it.property("key", key) - } - - /** - * Set a specific old value for some producer operations - */ - public fun oldValue(oldValue: String) { - it.property("oldValue", oldValue) - } - - /** - * The operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Set a specific value for producer operations - */ - public fun `value`(`value`: String) { - it.property("value", value) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Specifies the cache Container to connect - */ - public fun cacheContainer(cacheContainer: String) { - it.property("cacheContainer", cacheContainer) - } - - /** - * The CacheContainer configuration. Used if the cacheContainer is not defined. - */ - public fun cacheContainerConfiguration(cacheContainerConfiguration: String) { - it.property("cacheContainerConfiguration", cacheContainerConfiguration) - } - - /** - * Implementation specific properties for the CacheManager - */ - public fun configurationProperties(configurationProperties: String) { - it.property("configurationProperties", configurationProperties) - } - - /** - * An implementation specific URI for the CacheManager - */ - public fun configurationUri(configurationUri: String) { - it.property("configurationUri", configurationUri) - } - - /** - * A comma separated list of org.infinispan.client.hotrod.Flag to be applied by default on each - * cache invocation. - */ - public fun flags(flags: String) { - it.property("flags", flags) - } - - /** - * Set a specific remappingFunction to use in a compute operation. - */ - public fun remappingFunction(remappingFunction: String) { - it.property("remappingFunction", remappingFunction) - } - - /** - * Store the operation result in a header instead of the message body. By default, resultHeader == - * null and the query result is stored in the message body, any existing content in the message body - * is discarded. If resultHeader is set, the value is used as the name of the header to store the - * query result and the original message body is preserved. This value can be overridden by an in - * message header named: CamelInfinispanOperationResultHeader - */ - public fun resultHeader(resultHeader: String) { - it.property("resultHeader", resultHeader) - } - - /** - * Define the password to access the infinispan instance - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define the SASL Mechanism to access the infinispan instance - */ - public fun saslMechanism(saslMechanism: String) { - it.property("saslMechanism", saslMechanism) - } - - /** - * Define if we are connecting to a secured Infinispan instance - */ - public fun secure(secure: String) { - it.property("secure", secure) - } - - /** - * Define if we are connecting to a secured Infinispan instance - */ - public fun secure(secure: Boolean) { - it.property("secure", secure.toString()) - } - - /** - * Define the security realm to access the infinispan instance - */ - public fun securityRealm(securityRealm: String) { - it.property("securityRealm", securityRealm) - } - - /** - * Define the security server name to access the infinispan instance - */ - public fun securityServerName(securityServerName: String) { - it.property("securityServerName", securityServerName) - } - - /** - * Define the username to access the infinispan instance - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Influxdb2UriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Influxdb2UriDsl.kt deleted file mode 100644 index e386ee106c4e7..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Influxdb2UriDsl.kt +++ /dev/null @@ -1,139 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Interact with InfluxDB v2, a time series database. - */ -public fun UriDsl.influxdb2(i: Influxdb2UriDsl.() -> Unit) { - Influxdb2UriDsl(this).apply(i) -} - -@CamelDslMarker -public class Influxdb2UriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("influxdb2") - } - - private var connectionBean: String = "" - - /** - * Connection to the Influx database, of class com.influxdb.client.InfluxDBClient.class. - */ - public fun connectionBean(connectionBean: String) { - this.connectionBean = connectionBean - it.url("$connectionBean") - } - - /** - * Define if we want to auto create the bucket if it's not present. - */ - public fun autoCreateBucket(autoCreateBucket: String) { - it.property("autoCreateBucket", autoCreateBucket) - } - - /** - * Define if we want to auto create the bucket if it's not present. - */ - public fun autoCreateBucket(autoCreateBucket: Boolean) { - it.property("autoCreateBucket", autoCreateBucket.toString()) - } - - /** - * Define if we want to auto create the organization if it's not present. - */ - public fun autoCreateOrg(autoCreateOrg: String) { - it.property("autoCreateOrg", autoCreateOrg) - } - - /** - * Define if we want to auto create the organization if it's not present. - */ - public fun autoCreateOrg(autoCreateOrg: Boolean) { - it.property("autoCreateOrg", autoCreateOrg.toString()) - } - - /** - * The name of the bucket where the time series will be stored. - */ - public fun bucket(bucket: String) { - it.property("bucket", bucket) - } - - /** - * Define if this operation is an insert of ping. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * The name of the organization where the time series will be stored. - */ - public fun org(org: String) { - it.property("org", org) - } - - /** - * Define the retention policy to the data created by the endpoint. - */ - public fun retentionPolicy(retentionPolicy: String) { - it.property("retentionPolicy", retentionPolicy) - } - - /** - * The format or precision of time series timestamps. - */ - public fun writePrecision(writePrecision: String) { - it.property("writePrecision", writePrecision) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/InfluxdbUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/InfluxdbUriDsl.kt deleted file mode 100644 index e6ed680c3e125..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/InfluxdbUriDsl.kt +++ /dev/null @@ -1,146 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Interact with InfluxDB v1, a time series database. - */ -public fun UriDsl.influxdb(i: InfluxdbUriDsl.() -> Unit) { - InfluxdbUriDsl(this).apply(i) -} - -@CamelDslMarker -public class InfluxdbUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("influxdb") - } - - private var connectionBean: String = "" - - /** - * Connection to the influx database, of class InfluxDB.class - */ - public fun connectionBean(connectionBean: String) { - this.connectionBean = connectionBean - it.url("$connectionBean") - } - - /** - * Define if we want to auto create the database if it's not present - */ - public fun autoCreateDatabase(autoCreateDatabase: String) { - it.property("autoCreateDatabase", autoCreateDatabase) - } - - /** - * Define if we want to auto create the database if it's not present - */ - public fun autoCreateDatabase(autoCreateDatabase: Boolean) { - it.property("autoCreateDatabase", autoCreateDatabase.toString()) - } - - /** - * Define if this operation is a batch operation or not - */ - public fun batch(batch: String) { - it.property("batch", batch) - } - - /** - * Define if this operation is a batch operation or not - */ - public fun batch(batch: Boolean) { - it.property("batch", batch.toString()) - } - - /** - * Define if we want to check the database existence while starting the endpoint - */ - public fun checkDatabaseExistence(checkDatabaseExistence: String) { - it.property("checkDatabaseExistence", checkDatabaseExistence) - } - - /** - * Define if we want to check the database existence while starting the endpoint - */ - public fun checkDatabaseExistence(checkDatabaseExistence: Boolean) { - it.property("checkDatabaseExistence", checkDatabaseExistence.toString()) - } - - /** - * The name of the database where the time series will be stored - */ - public fun databaseName(databaseName: String) { - it.property("databaseName", databaseName) - } - - /** - * Define if this operation is an insert or a query - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Define the query in case of operation query - */ - public fun query(query: String) { - it.property("query", query) - } - - /** - * The string that defines the retention policy to the data created by the endpoint - */ - public fun retentionPolicy(retentionPolicy: String) { - it.property("retentionPolicy", retentionPolicy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IrcUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IrcUriDsl.kt deleted file mode 100644 index 76dbd7dab067e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IrcUriDsl.kt +++ /dev/null @@ -1,407 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from and IRC chat. - */ -public fun UriDsl.irc(i: IrcUriDsl.() -> Unit) { - IrcUriDsl(this).apply(i) -} - -@CamelDslMarker -public class IrcUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("irc") - } - - private var hostname: String = "" - - private var port: String = "" - - /** - * Hostname for the IRC chat server - */ - public fun hostname(hostname: String) { - this.hostname = hostname - it.url("$hostname:$port") - } - - /** - * Port number for the IRC chat server. If no port is configured then a default port of either - * 6667, 6668 or 6669 is used. - */ - public fun port(port: String) { - this.port = port - it.url("$hostname:$port") - } - - /** - * Port number for the IRC chat server. If no port is configured then a default port of either - * 6667, 6668 or 6669 is used. - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$hostname:$port") - } - - /** - * Whether to auto re-join when being kicked - */ - public fun autoRejoin(autoRejoin: String) { - it.property("autoRejoin", autoRejoin) - } - - /** - * Whether to auto re-join when being kicked - */ - public fun autoRejoin(autoRejoin: Boolean) { - it.property("autoRejoin", autoRejoin.toString()) - } - - /** - * Comma separated list of IRC channels. - */ - public fun channels(channels: String) { - it.property("channels", channels) - } - - /** - * Delay in milliseconds before sending commands after the connection is established. - */ - public fun commandTimeout(commandTimeout: String) { - it.property("commandTimeout", commandTimeout) - } - - /** - * Delay in milliseconds before sending commands after the connection is established. - */ - public fun commandTimeout(commandTimeout: Int) { - it.property("commandTimeout", commandTimeout.toString()) - } - - /** - * Comma separated list of keys for channels. - */ - public fun keys(keys: String) { - it.property("keys", keys) - } - - /** - * Sends NAMES command to channel after joining it. onReply has to be true in order to process the - * result which will have the header value irc.num = '353'. - */ - public fun namesOnJoin(namesOnJoin: String) { - it.property("namesOnJoin", namesOnJoin) - } - - /** - * Sends NAMES command to channel after joining it. onReply has to be true in order to process the - * result which will have the header value irc.num = '353'. - */ - public fun namesOnJoin(namesOnJoin: Boolean) { - it.property("namesOnJoin", namesOnJoin.toString()) - } - - /** - * The nickname used in chat. - */ - public fun nickname(nickname: String) { - it.property("nickname", nickname) - } - - /** - * Use persistent messages. - */ - public fun persistent(persistent: String) { - it.property("persistent", persistent) - } - - /** - * Use persistent messages. - */ - public fun persistent(persistent: Boolean) { - it.property("persistent", persistent.toString()) - } - - /** - * The IRC user's actual name. - */ - public fun realname(realname: String) { - it.property("realname", realname) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Whether or not the server supports color codes. - */ - public fun colors(colors: String) { - it.property("colors", colors) - } - - /** - * Whether or not the server supports color codes. - */ - public fun colors(colors: Boolean) { - it.property("colors", colors.toString()) - } - - /** - * Handle user join events. - */ - public fun onJoin(onJoin: String) { - it.property("onJoin", onJoin) - } - - /** - * Handle user join events. - */ - public fun onJoin(onJoin: Boolean) { - it.property("onJoin", onJoin.toString()) - } - - /** - * Handle kick events. - */ - public fun onKick(onKick: String) { - it.property("onKick", onKick) - } - - /** - * Handle kick events. - */ - public fun onKick(onKick: Boolean) { - it.property("onKick", onKick.toString()) - } - - /** - * Handle mode change events. - */ - public fun onMode(onMode: String) { - it.property("onMode", onMode) - } - - /** - * Handle mode change events. - */ - public fun onMode(onMode: Boolean) { - it.property("onMode", onMode.toString()) - } - - /** - * Handle nickname change events. - */ - public fun onNick(onNick: String) { - it.property("onNick", onNick) - } - - /** - * Handle nickname change events. - */ - public fun onNick(onNick: Boolean) { - it.property("onNick", onNick.toString()) - } - - /** - * Handle user part events. - */ - public fun onPart(onPart: String) { - it.property("onPart", onPart) - } - - /** - * Handle user part events. - */ - public fun onPart(onPart: Boolean) { - it.property("onPart", onPart.toString()) - } - - /** - * Handle private message events. - */ - public fun onPrivmsg(onPrivmsg: String) { - it.property("onPrivmsg", onPrivmsg) - } - - /** - * Handle private message events. - */ - public fun onPrivmsg(onPrivmsg: Boolean) { - it.property("onPrivmsg", onPrivmsg.toString()) - } - - /** - * Handle user quit events. - */ - public fun onQuit(onQuit: String) { - it.property("onQuit", onQuit) - } - - /** - * Handle user quit events. - */ - public fun onQuit(onQuit: Boolean) { - it.property("onQuit", onQuit.toString()) - } - - /** - * Whether or not to handle general responses to commands or informational messages. - */ - public fun onReply(onReply: String) { - it.property("onReply", onReply) - } - - /** - * Whether or not to handle general responses to commands or informational messages. - */ - public fun onReply(onReply: Boolean) { - it.property("onReply", onReply.toString()) - } - - /** - * Handle topic change events. - */ - public fun onTopic(onTopic: String) { - it.property("onTopic", onTopic) - } - - /** - * Handle topic change events. - */ - public fun onTopic(onTopic: Boolean) { - it.property("onTopic", onTopic.toString()) - } - - /** - * Your IRC server nickname password. - */ - public fun nickPassword(nickPassword: String) { - it.property("nickPassword", nickPassword) - } - - /** - * The IRC server password. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Used for configuring security using SSL. Reference to a - * org.apache.camel.support.jsse.SSLContextParameters in the Registry. This reference overrides any - * configured SSLContextParameters at the component level. Note that this setting overrides the - * trustManager option. - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * The trust manager used to verify the SSL server's certificate. - */ - public fun trustManager(trustManager: String) { - it.property("trustManager", trustManager) - } - - /** - * The IRC server user name. - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IronmqUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IronmqUriDsl.kt deleted file mode 100644 index d17fed3c9c09e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/IronmqUriDsl.kt +++ /dev/null @@ -1,469 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from IronMQ an elastic and durable hosted message queue as a - * service. - */ -public fun UriDsl.ironmq(i: IronmqUriDsl.() -> Unit) { - IronmqUriDsl(this).apply(i) -} - -@CamelDslMarker -public class IronmqUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("ironmq") - } - - private var queueName: String = "" - - /** - * The name of the IronMQ queue - */ - public fun queueName(queueName: String) { - this.queueName = queueName - it.url("$queueName") - } - - /** - * IronMq Cloud url. Urls for public clusters: https://mq-aws-us-east-1-1.iron.io (US) and - * https://mq-aws-eu-west-1-1.iron.io (EU) - */ - public fun ironMQCloud(ironMQCloud: String) { - it.property("ironMQCloud", ironMQCloud) - } - - /** - * Should message headers be preserved when publishing messages. This will add the Camel headers - * to the Iron MQ message as a json payload with a header list, and a message body. Useful when Camel - * is both consumer and producer. - */ - public fun preserveHeaders(preserveHeaders: String) { - it.property("preserveHeaders", preserveHeaders) - } - - /** - * Should message headers be preserved when publishing messages. This will add the Camel headers - * to the Iron MQ message as a json payload with a header list, and a message body. Useful when Camel - * is both consumer and producer. - */ - public fun preserveHeaders(preserveHeaders: Boolean) { - it.property("preserveHeaders", preserveHeaders.toString()) - } - - /** - * IronMQ projectId - */ - public fun projectId(projectId: String) { - it.property("projectId", projectId) - } - - /** - * Should messages be deleted in one batch. This will limit the number of api requests since - * messages are deleted in one request, instead of one per exchange. If enabled care should be taken - * that the consumer is idempotent when processing exchanges. - */ - public fun batchDelete(batchDelete: String) { - it.property("batchDelete", batchDelete) - } - - /** - * Should messages be deleted in one batch. This will limit the number of api requests since - * messages are deleted in one request, instead of one per exchange. If enabled care should be taken - * that the consumer is idempotent when processing exchanges. - */ - public fun batchDelete(batchDelete: Boolean) { - it.property("batchDelete", batchDelete.toString()) - } - - /** - * The number of concurrent consumers. - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * The number of concurrent consumers. - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * Number of messages to poll per call. Maximum is 100. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * Number of messages to poll per call. Maximum is 100. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * After timeout (in seconds), item will be placed back onto the queue. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * After timeout (in seconds), item will be placed back onto the queue. - */ - public fun timeout(timeout: Int) { - it.property("timeout", timeout.toString()) - } - - /** - * Time in seconds to wait for a message to become available. This enables long polling. Default - * is 0 (does not wait), maximum is 30. - */ - public fun wait(wait: String) { - it.property("wait", wait) - } - - /** - * Time in seconds to wait for a message to become available. This enables long polling. Default - * is 0 (does not wait), maximum is 30. - */ - public fun wait(wait: Int) { - it.property("wait", wait.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * The item will not be available on the queue until this many seconds have passed. Default is 0 - * seconds. - */ - public fun visibilityDelay(visibilityDelay: String) { - it.property("visibilityDelay", visibilityDelay) - } - - /** - * The item will not be available on the queue until this many seconds have passed. Default is 0 - * seconds. - */ - public fun visibilityDelay(visibilityDelay: Int) { - it.property("visibilityDelay", visibilityDelay.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Reference to a io.iron.ironmq.Client in the Registry. - */ - public fun client(client: String) { - it.property("client", client) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * IronMQ token - */ - public fun token(token: String) { - it.property("token", token) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JcacheUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JcacheUriDsl.kt deleted file mode 100644 index a9b4eb1cc2450..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JcacheUriDsl.kt +++ /dev/null @@ -1,323 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform caching operations against JSR107/JCache. - */ -public fun UriDsl.jcache(i: JcacheUriDsl.() -> Unit) { - JcacheUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JcacheUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jcache") - } - - private var cacheName: String = "" - - /** - * The name of the cache - */ - public fun cacheName(cacheName: String) { - this.cacheName = cacheName - it.url("$cacheName") - } - - /** - * The Properties for the javax.cache.spi.CachingProvider to create the CacheManager - */ - public fun cacheConfigurationProperties(cacheConfigurationProperties: String) { - it.property("cacheConfigurationProperties", cacheConfigurationProperties) - } - - /** - * The fully qualified class name of the javax.cache.spi.CachingProvider - */ - public fun cachingProvider(cachingProvider: String) { - it.property("cachingProvider", cachingProvider) - } - - /** - * An implementation specific URI for the CacheManager - */ - public fun configurationUri(configurationUri: String) { - it.property("configurationUri", configurationUri) - } - - /** - * Whether management gathering is enabled - */ - public fun managementEnabled(managementEnabled: String) { - it.property("managementEnabled", managementEnabled) - } - - /** - * Whether management gathering is enabled - */ - public fun managementEnabled(managementEnabled: Boolean) { - it.property("managementEnabled", managementEnabled.toString()) - } - - /** - * If read-through caching should be used - */ - public fun readThrough(readThrough: String) { - it.property("readThrough", readThrough) - } - - /** - * If read-through caching should be used - */ - public fun readThrough(readThrough: Boolean) { - it.property("readThrough", readThrough.toString()) - } - - /** - * Whether statistics gathering is enabled - */ - public fun statisticsEnabled(statisticsEnabled: String) { - it.property("statisticsEnabled", statisticsEnabled) - } - - /** - * Whether statistics gathering is enabled - */ - public fun statisticsEnabled(statisticsEnabled: Boolean) { - it.property("statisticsEnabled", statisticsEnabled.toString()) - } - - /** - * If cache should use store-by-value or store-by-reference semantics - */ - public fun storeByValue(storeByValue: String) { - it.property("storeByValue", storeByValue) - } - - /** - * If cache should use store-by-value or store-by-reference semantics - */ - public fun storeByValue(storeByValue: Boolean) { - it.property("storeByValue", storeByValue.toString()) - } - - /** - * If write-through caching should be used - */ - public fun writeThrough(writeThrough: String) { - it.property("writeThrough", writeThrough) - } - - /** - * If write-through caching should be used - */ - public fun writeThrough(writeThrough: Boolean) { - it.property("writeThrough", writeThrough.toString()) - } - - /** - * Events a consumer should filter (multiple events can be separated by comma). If using - * filteredEvents option, then eventFilters one will be ignored - */ - public fun filteredEvents(filteredEvents: String) { - it.property("filteredEvents", filteredEvents) - } - - /** - * if the old value is required for events - */ - public fun oldValueRequired(oldValueRequired: String) { - it.property("oldValueRequired", oldValueRequired) - } - - /** - * if the old value is required for events - */ - public fun oldValueRequired(oldValueRequired: Boolean) { - it.property("oldValueRequired", oldValueRequired.toString()) - } - - /** - * if the event listener should block the thread causing the event - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * if the event listener should block the thread causing the event - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * The CacheEntryEventFilter. If using eventFilters option, then filteredEvents one will be - * ignored - */ - public fun eventFilters(eventFilters: String) { - it.property("eventFilters", eventFilters) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * To configure using a cache operation by default. If an operation in the message header, then - * the operation from the header takes precedence. - */ - public fun action(action: String) { - it.property("action", action) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * A Configuration for the Cache - */ - public fun cacheConfiguration(cacheConfiguration: String) { - it.property("cacheConfiguration", cacheConfiguration) - } - - /** - * The CacheLoader factory - */ - public fun cacheLoaderFactory(cacheLoaderFactory: String) { - it.property("cacheLoaderFactory", cacheLoaderFactory) - } - - /** - * The CacheWriter factory - */ - public fun cacheWriterFactory(cacheWriterFactory: String) { - it.property("cacheWriterFactory", cacheWriterFactory) - } - - /** - * Configure if a cache need to be created if it does exist or can't be pre-configured. - */ - public fun createCacheIfNotExists(createCacheIfNotExists: String) { - it.property("createCacheIfNotExists", createCacheIfNotExists) - } - - /** - * Configure if a cache need to be created if it does exist or can't be pre-configured. - */ - public fun createCacheIfNotExists(createCacheIfNotExists: Boolean) { - it.property("createCacheIfNotExists", createCacheIfNotExists.toString()) - } - - /** - * The ExpiryPolicy factory - */ - public fun expiryPolicyFactory(expiryPolicyFactory: String) { - it.property("expiryPolicyFactory", expiryPolicyFactory) - } - - /** - * Configure if a camel-cache should try to find implementations of jcache api in runtimes like - * OSGi. - */ - public fun lookupProviders(lookupProviders: String) { - it.property("lookupProviders", lookupProviders) - } - - /** - * Configure if a camel-cache should try to find implementations of jcache api in runtimes like - * OSGi. - */ - public fun lookupProviders(lookupProviders: Boolean) { - it.property("lookupProviders", lookupProviders.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JcrUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JcrUriDsl.kt deleted file mode 100644 index 7e317a37ecab3..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JcrUriDsl.kt +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Read and write nodes to/from a JCR compliant content repository. - */ -public fun UriDsl.jcr(i: JcrUriDsl.() -> Unit) { - JcrUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JcrUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jcr") - } - - private var host: String = "" - - private var base: String = "" - - /** - * Name of the javax.jcr.Repository to lookup from the Camel registry to be used. - */ - public fun host(host: String) { - this.host = host - it.url("$host/$base") - } - - /** - * Get the base node when accessing the repository - */ - public fun base(base: String) { - this.base = base - it.url("$host/$base") - } - - /** - * When isDeep is true, events whose associated parent node is at absPath or within its subgraph - * are received. - */ - public fun deep(deep: String) { - it.property("deep", deep) - } - - /** - * When isDeep is true, events whose associated parent node is at absPath or within its subgraph - * are received. - */ - public fun deep(deep: Boolean) { - it.property("deep", deep.toString()) - } - - /** - * eventTypes (a combination of one or more event types encoded as a bit mask value such as - * javax.jcr.observation.Event.NODE_ADDED, javax.jcr.observation.Event.NODE_REMOVED, etc.). - */ - public fun eventTypes(eventTypes: String) { - it.property("eventTypes", eventTypes) - } - - /** - * eventTypes (a combination of one or more event types encoded as a bit mask value such as - * javax.jcr.observation.Event.NODE_ADDED, javax.jcr.observation.Event.NODE_REMOVED, etc.). - */ - public fun eventTypes(eventTypes: Int) { - it.property("eventTypes", eventTypes.toString()) - } - - /** - * When a comma separated nodeTypeName list string is set, only events whose associated parent - * node has one of the node types (or a subtype of one of the node types) in this list will be - * received. - */ - public fun nodeTypeNames(nodeTypeNames: String) { - it.property("nodeTypeNames", nodeTypeNames) - } - - /** - * If noLocal is true, then events generated by the session through which the listener was - * registered are ignored. Otherwise, they are not ignored. - */ - public fun noLocal(noLocal: String) { - it.property("noLocal", noLocal) - } - - /** - * If noLocal is true, then events generated by the session through which the listener was - * registered are ignored. Otherwise, they are not ignored. - */ - public fun noLocal(noLocal: Boolean) { - it.property("noLocal", noLocal.toString()) - } - - /** - * Password for login - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Interval in milliseconds to wait before each session live checking The default value is 60000 - * ms. - */ - public fun sessionLiveCheckInterval(sessionLiveCheckInterval: String) { - it.property("sessionLiveCheckInterval", sessionLiveCheckInterval) - } - - /** - * Interval in milliseconds to wait before the first session live checking. The default value is - * 3000 ms. - */ - public fun sessionLiveCheckIntervalOnStart(sessionLiveCheckIntervalOnStart: String) { - it.property("sessionLiveCheckIntervalOnStart", sessionLiveCheckIntervalOnStart) - } - - /** - * Username for login - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * When a comma separated uuid list string is set, only events whose associated parent node has - * one of the identifiers in the comma separated uuid list will be received. - */ - public fun uuids(uuids: String) { - it.property("uuids", uuids) - } - - /** - * The workspace to access. If it's not specified then the default one will be used - */ - public fun workspaceName(workspaceName: String) { - it.property("workspaceName", workspaceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JdbcUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JdbcUriDsl.kt deleted file mode 100644 index a93b28bb30166..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JdbcUriDsl.kt +++ /dev/null @@ -1,248 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Access databases through SQL and JDBC. - */ -public fun UriDsl.jdbc(i: JdbcUriDsl.() -> Unit) { - JdbcUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JdbcUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jdbc") - } - - private var dataSourceName: String = "" - - /** - * Name of DataSource to lookup in the Registry. If the name is dataSource or default, then Camel - * will attempt to lookup a default DataSource from the registry, meaning if there is a only one - * instance of DataSource found, then this DataSource will be used. - */ - public fun dataSourceName(dataSourceName: String) { - this.dataSourceName = dataSourceName - it.url("$dataSourceName") - } - - /** - * Whether to allow using named parameters in the queries. - */ - public fun allowNamedParameters(allowNamedParameters: String) { - it.property("allowNamedParameters", allowNamedParameters) - } - - /** - * Whether to allow using named parameters in the queries. - */ - public fun allowNamedParameters(allowNamedParameters: Boolean) { - it.property("allowNamedParameters", allowNamedParameters.toString()) - } - - /** - * Specify the full package and class name to use as conversion when outputType=SelectOne or - * SelectList. - */ - public fun outputClass(outputClass: String) { - it.property("outputClass", outputClass) - } - - /** - * Determines the output the producer should use. - */ - public fun outputType(outputType: String) { - it.property("outputType", outputType) - } - - /** - * Optional parameters to the java.sql.Statement. For example to set maxRows, fetchSize etc. - */ - public fun parameters(parameters: String) { - it.property("parameters", parameters) - } - - /** - * The default maximum number of rows that can be read by a polling query. The default value is 0. - */ - public fun readSize(readSize: String) { - it.property("readSize", readSize) - } - - /** - * The default maximum number of rows that can be read by a polling query. The default value is 0. - */ - public fun readSize(readSize: Int) { - it.property("readSize", readSize.toString()) - } - - /** - * Camel will set the autoCommit on the JDBC connection to be false, commit the change after - * executed the statement and reset the autoCommit flag of the connection at the end, if the - * resetAutoCommit is true. If the JDBC connection doesn't support to reset the autoCommit flag, you - * can set the resetAutoCommit flag to be false, and Camel will not try to reset the autoCommit flag. - * When used with XA transactions you most likely need to set it to false so that the transaction - * manager is in charge of committing this tx. - */ - public fun resetAutoCommit(resetAutoCommit: String) { - it.property("resetAutoCommit", resetAutoCommit) - } - - /** - * Camel will set the autoCommit on the JDBC connection to be false, commit the change after - * executed the statement and reset the autoCommit flag of the connection at the end, if the - * resetAutoCommit is true. If the JDBC connection doesn't support to reset the autoCommit flag, you - * can set the resetAutoCommit flag to be false, and Camel will not try to reset the autoCommit flag. - * When used with XA transactions you most likely need to set it to false so that the transaction - * manager is in charge of committing this tx. - */ - public fun resetAutoCommit(resetAutoCommit: Boolean) { - it.property("resetAutoCommit", resetAutoCommit.toString()) - } - - /** - * Whether transactions are in use. - */ - public fun transacted(transacted: String) { - it.property("transacted", transacted) - } - - /** - * Whether transactions are in use. - */ - public fun transacted(transacted: Boolean) { - it.property("transacted", transacted.toString()) - } - - /** - * To read BLOB columns as bytes instead of string data. This may be needed for certain databases - * such as Oracle where you must read BLOB columns as bytes. - */ - public fun useGetBytesForBlob(useGetBytesForBlob: String) { - it.property("useGetBytesForBlob", useGetBytesForBlob) - } - - /** - * To read BLOB columns as bytes instead of string data. This may be needed for certain databases - * such as Oracle where you must read BLOB columns as bytes. - */ - public fun useGetBytesForBlob(useGetBytesForBlob: Boolean) { - it.property("useGetBytesForBlob", useGetBytesForBlob.toString()) - } - - /** - * Set this option to true to use the prepareStatementStrategy with named parameters. This allows - * to define queries with named placeholders, and use headers with the dynamic values for the query - * placeholders. - */ - public fun useHeadersAsParameters(useHeadersAsParameters: String) { - it.property("useHeadersAsParameters", useHeadersAsParameters) - } - - /** - * Set this option to true to use the prepareStatementStrategy with named parameters. This allows - * to define queries with named placeholders, and use headers with the dynamic values for the query - * placeholders. - */ - public fun useHeadersAsParameters(useHeadersAsParameters: Boolean) { - it.property("useHeadersAsParameters", useHeadersAsParameters.toString()) - } - - /** - * Sets whether to use JDBC 4 or JDBC 3.0 or older semantic when retrieving column name. JDBC 4.0 - * uses columnLabel to get the column name where as JDBC 3.0 uses both columnName or columnLabel. - * Unfortunately JDBC drivers behave differently so you can use this option to work out issues around - * your JDBC driver if you get problem using this component This option is default true. - */ - public fun useJDBC4ColumnNameAndLabelSemantics(useJDBC4ColumnNameAndLabelSemantics: String) { - it.property("useJDBC4ColumnNameAndLabelSemantics", useJDBC4ColumnNameAndLabelSemantics) - } - - /** - * Sets whether to use JDBC 4 or JDBC 3.0 or older semantic when retrieving column name. JDBC 4.0 - * uses columnLabel to get the column name where as JDBC 3.0 uses both columnName or columnLabel. - * Unfortunately JDBC drivers behave differently so you can use this option to work out issues around - * your JDBC driver if you get problem using this component This option is default true. - */ - public fun useJDBC4ColumnNameAndLabelSemantics(useJDBC4ColumnNameAndLabelSemantics: Boolean) { - it.property("useJDBC4ColumnNameAndLabelSemantics", - useJDBC4ColumnNameAndLabelSemantics.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use a custom org.apache.camel.component.jdbc.BeanRowMapper when using outputClass. The - * default implementation will lower case the row names and skip underscores, and dashes. For example - * CUST_ID is mapped as custId. - */ - public fun beanRowMapper(beanRowMapper: String) { - it.property("beanRowMapper", beanRowMapper) - } - - /** - * To use a custom strategy for working with connections. Do not use a custom strategy when using - * the spring-jdbc component because a special Spring ConnectionStrategy is used by default to - * support Spring Transactions. - */ - public fun connectionStrategy(connectionStrategy: String) { - it.property("connectionStrategy", connectionStrategy) - } - - /** - * Allows the plugin to use a custom org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy - * to control preparation of the query and prepared statement. - */ - public fun prepareStatementStrategy(prepareStatementStrategy: String) { - it.property("prepareStatementStrategy", prepareStatementStrategy) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JettyUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JettyUriDsl.kt deleted file mode 100644 index 36a197852ba76..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JettyUriDsl.kt +++ /dev/null @@ -1,610 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Expose HTTP endpoints using Jetty 12. - */ -public fun UriDsl.jetty(i: JettyUriDsl.() -> Unit) { - JettyUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JettyUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jetty") - } - - private var httpUri: String = "" - - /** - * The url of the HTTP endpoint to call. - */ - public fun httpUri(httpUri: String) { - this.httpUri = httpUri - it.url("$httpUri") - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * To use a custom HttpBinding to control the mapping between Camel message and HttpClient. - */ - public fun httpBinding(httpBinding: String) { - it.property("httpBinding", httpBinding) - } - - /** - * If this option is false the Servlet will disable the HTTP streaming and set the content-length - * header on the response - */ - public fun chunked(chunked: String) { - it.property("chunked", chunked) - } - - /** - * If this option is false the Servlet will disable the HTTP streaming and set the content-length - * header on the response - */ - public fun chunked(chunked: Boolean) { - it.property("chunked", chunked.toString()) - } - - /** - * Determines whether or not the raw input stream is cached or not. The Camel consumer - * (camel-servlet, camel-jetty etc.) will by default cache the input stream to support reading it - * multiple times to ensure it Camel can retrieve all data from the stream. However you can set this - * option to true when you for example need to access the raw stream, such as streaming it directly - * to a file or other persistent store. DefaultHttpBinding will copy the request input stream into a - * stream cache and put it into message body if this option is false to support reading the stream - * multiple times. If you use Servlet to bridge/proxy an endpoint then consider enabling this option - * to improve performance, in case you do not need to read the message payload multiple times. The - * producer (camel-http) will by default cache the response body stream. If setting this option to - * true, then the producers will not cache the response body stream but use the response stream as-is - * (the stream can only be read once) as the message body. - */ - public fun disableStreamCache(disableStreamCache: String) { - it.property("disableStreamCache", disableStreamCache) - } - - /** - * Determines whether or not the raw input stream is cached or not. The Camel consumer - * (camel-servlet, camel-jetty etc.) will by default cache the input stream to support reading it - * multiple times to ensure it Camel can retrieve all data from the stream. However you can set this - * option to true when you for example need to access the raw stream, such as streaming it directly - * to a file or other persistent store. DefaultHttpBinding will copy the request input stream into a - * stream cache and put it into message body if this option is false to support reading the stream - * multiple times. If you use Servlet to bridge/proxy an endpoint then consider enabling this option - * to improve performance, in case you do not need to read the message payload multiple times. The - * producer (camel-http) will by default cache the response body stream. If setting this option to - * true, then the producers will not cache the response body stream but use the response stream as-is - * (the stream can only be read once) as the message body. - */ - public fun disableStreamCache(disableStreamCache: Boolean) { - it.property("disableStreamCache", disableStreamCache.toString()) - } - - /** - * If enabled and an Exchange failed processing on the consumer side, and if the caused Exception - * was send back serialized in the response as a application/x-java-serialized-object content type. - * On the producer side the exception will be deserialized and thrown as is, instead of the - * HttpOperationFailedException. The caused exception is required to be serialized. This is by - * default turned off. If you enable this then be aware that Java will deserialize the incoming data - * from the request to Java and that can be a potential security risk. - */ - public fun transferException(transferException: String) { - it.property("transferException", transferException) - } - - /** - * If enabled and an Exchange failed processing on the consumer side, and if the caused Exception - * was send back serialized in the response as a application/x-java-serialized-object content type. - * On the producer side the exception will be deserialized and thrown as is, instead of the - * HttpOperationFailedException. The caused exception is required to be serialized. This is by - * default turned off. If you enable this then be aware that Java will deserialize the incoming data - * from the request to Java and that can be a potential security risk. - */ - public fun transferException(transferException: Boolean) { - it.property("transferException", transferException.toString()) - } - - /** - * Configure the consumer to work in async mode - */ - public fun async(async: String) { - it.property("async", async) - } - - /** - * Configure the consumer to work in async mode - */ - public fun async(async: Boolean) { - it.property("async", async.toString()) - } - - /** - * Allows to set a timeout in millis when using Jetty as consumer (server). By default Jetty uses - * 30000. You can use a value of = 0 to never expire. If a timeout occurs then the request will be - * expired and Jetty will return back a http error 503 to the client. This option is only in use when - * using Jetty with the Asynchronous Routing Engine. - */ - public fun continuationTimeout(continuationTimeout: String) { - it.property("continuationTimeout", continuationTimeout) - } - - /** - * Allows to set a timeout in millis when using Jetty as consumer (server). By default Jetty uses - * 30000. You can use a value of = 0 to never expire. If a timeout occurs then the request will be - * expired and Jetty will return back a http error 503 to the client. This option is only in use when - * using Jetty with the Asynchronous Routing Engine. - */ - public fun continuationTimeout(continuationTimeout: Int) { - it.property("continuationTimeout", continuationTimeout.toString()) - } - - /** - * If the option is true, Jetty server will setup the CrossOriginFilter which supports the CORS - * out of box. - */ - public fun enableCORS(enableCORS: String) { - it.property("enableCORS", enableCORS) - } - - /** - * If the option is true, Jetty server will setup the CrossOriginFilter which supports the CORS - * out of box. - */ - public fun enableCORS(enableCORS: Boolean) { - it.property("enableCORS", enableCORS.toString()) - } - - /** - * If this option is true, Jetty JMX support will be enabled for this endpoint. See Jetty JMX - * support for more details. - */ - public fun enableJmx(enableJmx: String) { - it.property("enableJmx", enableJmx) - } - - /** - * If this option is true, Jetty JMX support will be enabled for this endpoint. See Jetty JMX - * support for more details. - */ - public fun enableJmx(enableJmx: Boolean) { - it.property("enableJmx", enableJmx.toString()) - } - - /** - * Whether org.apache.camel.component.jetty.MultiPartFilter is enabled or not. You should set this - * value to false when bridging endpoints, to ensure multipart requests is proxied/bridged as well. - */ - public fun enableMultipartFilter(enableMultipartFilter: String) { - it.property("enableMultipartFilter", enableMultipartFilter) - } - - /** - * Whether org.apache.camel.component.jetty.MultiPartFilter is enabled or not. You should set this - * value to false when bridging endpoints, to ensure multipart requests is proxied/bridged as well. - */ - public fun enableMultipartFilter(enableMultipartFilter: Boolean) { - it.property("enableMultipartFilter", enableMultipartFilter.toString()) - } - - /** - * Used to only allow consuming if the HttpMethod matches, such as GET/POST/PUT etc. Multiple - * methods can be specified separated by comma. - */ - public fun httpMethodRestrict(httpMethodRestrict: String) { - it.property("httpMethodRestrict", httpMethodRestrict) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the exception's stack trace - * will be logged when the exception stack trace is not sent in the response's body. - */ - public fun logException(logException: String) { - it.property("logException", logException) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the exception's stack trace - * will be logged when the exception stack trace is not sent in the response's body. - */ - public fun logException(logException: Boolean) { - it.property("logException", logException.toString()) - } - - /** - * Whether or not the consumer should try to find a target consumer by matching the URI prefix if - * no exact match is found. - */ - public fun matchOnUriPrefix(matchOnUriPrefix: String) { - it.property("matchOnUriPrefix", matchOnUriPrefix) - } - - /** - * Whether or not the consumer should try to find a target consumer by matching the URI prefix if - * no exact match is found. - */ - public fun matchOnUriPrefix(matchOnUriPrefix: Boolean) { - it.property("matchOnUriPrefix", matchOnUriPrefix.toString()) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the response's body won't - * contain the exception's stack trace. - */ - public fun muteException(muteException: String) { - it.property("muteException", muteException) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the response's body won't - * contain the exception's stack trace. - */ - public fun muteException(muteException: Boolean) { - it.property("muteException", muteException.toString()) - } - - /** - * To use a custom buffer size on the jakarta.servlet.ServletResponse. - */ - public fun responseBufferSize(responseBufferSize: String) { - it.property("responseBufferSize", responseBufferSize) - } - - /** - * To use a custom buffer size on the jakarta.servlet.ServletResponse. - */ - public fun responseBufferSize(responseBufferSize: Int) { - it.property("responseBufferSize", responseBufferSize.toString()) - } - - /** - * If the option is true, jetty server will send the date header to the client which sends the - * request. NOTE please make sure there is no any other camel-jetty endpoint is share the same port, - * otherwise this option may not work as expected. - */ - public fun sendDateHeader(sendDateHeader: String) { - it.property("sendDateHeader", sendDateHeader) - } - - /** - * If the option is true, jetty server will send the date header to the client which sends the - * request. NOTE please make sure there is no any other camel-jetty endpoint is share the same port, - * otherwise this option may not work as expected. - */ - public fun sendDateHeader(sendDateHeader: Boolean) { - it.property("sendDateHeader", sendDateHeader.toString()) - } - - /** - * If the option is true, jetty will send the server header with the jetty version information to - * the client which sends the request. NOTE please make sure there is no any other camel-jetty - * endpoint is share the same port, otherwise this option may not work as expected. - */ - public fun sendServerVersion(sendServerVersion: String) { - it.property("sendServerVersion", sendServerVersion) - } - - /** - * If the option is true, jetty will send the server header with the jetty version information to - * the client which sends the request. NOTE please make sure there is no any other camel-jetty - * endpoint is share the same port, otherwise this option may not work as expected. - */ - public fun sendServerVersion(sendServerVersion: Boolean) { - it.property("sendServerVersion", sendServerVersion.toString()) - } - - /** - * Specifies whether to enable the session manager on the server side of Jetty. - */ - public fun sessionSupport(sessionSupport: String) { - it.property("sessionSupport", sessionSupport) - } - - /** - * Specifies whether to enable the session manager on the server side of Jetty. - */ - public fun sessionSupport(sessionSupport: Boolean) { - it.property("sessionSupport", sessionSupport.toString()) - } - - /** - * Whether or not to use Jetty continuations for the Jetty Server. - */ - public fun useContinuation(useContinuation: String) { - it.property("useContinuation", useContinuation) - } - - /** - * Whether or not to use Jetty continuations for the Jetty Server. - */ - public fun useContinuation(useContinuation: Boolean) { - it.property("useContinuation", useContinuation.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Whether to eager check whether the HTTP requests has content if the content-length header is 0 - * or not present. This can be turned on in case HTTP clients do not send streamed data. - */ - public fun eagerCheckContentAvailable(eagerCheckContentAvailable: String) { - it.property("eagerCheckContentAvailable", eagerCheckContentAvailable) - } - - /** - * Whether to eager check whether the HTTP requests has content if the content-length header is 0 - * or not present. This can be turned on in case HTTP clients do not send streamed data. - */ - public fun eagerCheckContentAvailable(eagerCheckContentAvailable: Boolean) { - it.property("eagerCheckContentAvailable", eagerCheckContentAvailable.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * The size threshold after which files will be written to disk for multipart/form-data requests. - * By default the files are not written to disk - */ - public fun fileSizeThreshold(fileSizeThreshold: String) { - it.property("fileSizeThreshold", fileSizeThreshold) - } - - /** - * The size threshold after which files will be written to disk for multipart/form-data requests. - * By default the files are not written to disk - */ - public fun fileSizeThreshold(fileSizeThreshold: Int) { - it.property("fileSizeThreshold", fileSizeThreshold.toString()) - } - - /** - * The directory location where files will be store for multipart/form-data requests. By default - * the files are written in the system temporary folder - */ - public fun filesLocation(filesLocation: String) { - it.property("filesLocation", filesLocation) - } - - /** - * Configuration of the filter init parameters. These parameters will be applied to the filter - * list before starting the jetty server. - */ - public fun filterInitParameters(filterInitParameters: String) { - it.property("filterInitParameters", filterInitParameters) - } - - /** - * Allows using a custom filters which is putted into a list and can be find in the Registry. - * Multiple values can be separated by comma. - */ - public fun filters(filters: String) { - it.property("filters", filters) - } - - /** - * Specifies a comma-delimited set of Handler instances to lookup in your Registry. These handlers - * are added to the Jetty servlet context (for example, to add security). Important: You can not use - * different handlers with different Jetty endpoints using the same port number. The handlers is - * associated to the port number. If you need different handlers, then use different port numbers. - */ - public fun handlers(handlers: String) { - it.property("handlers", handlers) - } - - /** - * The max idle time (in milli seconds) is applied to an HTTP request for IO operations and - * delayed dispatch. Idle time 0 implies an infinite timeout, -1 (default) implies no HTTP channel - * timeout and the connection timeout is used instead. - */ - public fun idleTimeout(idleTimeout: String) { - it.property("idleTimeout", idleTimeout) - } - - /** - * The max idle time (in milli seconds) is applied to an HTTP request for IO operations and - * delayed dispatch. Idle time 0 implies an infinite timeout, -1 (default) implies no HTTP channel - * timeout and the connection timeout is used instead. - */ - public fun idleTimeout(idleTimeout: Int) { - it.property("idleTimeout", idleTimeout.toString()) - } - - /** - * If this option is true then IN exchange Body of the exchange will be mapped to HTTP body. - * Setting this to false will avoid the HTTP mapping. - */ - public fun mapHttpMessageBody(mapHttpMessageBody: String) { - it.property("mapHttpMessageBody", mapHttpMessageBody) - } - - /** - * If this option is true then IN exchange Body of the exchange will be mapped to HTTP body. - * Setting this to false will avoid the HTTP mapping. - */ - public fun mapHttpMessageBody(mapHttpMessageBody: Boolean) { - it.property("mapHttpMessageBody", mapHttpMessageBody.toString()) - } - - /** - * If this option is true then IN exchange Form Encoded body of the exchange will be mapped to - * HTTP. Setting this to false will avoid the HTTP Form Encoded body mapping. - */ - public fun mapHttpMessageFormUrlEncodedBody(mapHttpMessageFormUrlEncodedBody: String) { - it.property("mapHttpMessageFormUrlEncodedBody", mapHttpMessageFormUrlEncodedBody) - } - - /** - * If this option is true then IN exchange Form Encoded body of the exchange will be mapped to - * HTTP. Setting this to false will avoid the HTTP Form Encoded body mapping. - */ - public fun mapHttpMessageFormUrlEncodedBody(mapHttpMessageFormUrlEncodedBody: Boolean) { - it.property("mapHttpMessageFormUrlEncodedBody", mapHttpMessageFormUrlEncodedBody.toString()) - } - - /** - * If this option is true then IN exchange Headers of the exchange will be mapped to HTTP headers. - * Setting this to false will avoid the HTTP Headers mapping. - */ - public fun mapHttpMessageHeaders(mapHttpMessageHeaders: String) { - it.property("mapHttpMessageHeaders", mapHttpMessageHeaders) - } - - /** - * If this option is true then IN exchange Headers of the exchange will be mapped to HTTP headers. - * Setting this to false will avoid the HTTP Headers mapping. - */ - public fun mapHttpMessageHeaders(mapHttpMessageHeaders: Boolean) { - it.property("mapHttpMessageHeaders", mapHttpMessageHeaders.toString()) - } - - /** - * The maximum size allowed for uploaded files. -1 means no limit - */ - public fun maxFileSize(maxFileSize: String) { - it.property("maxFileSize", maxFileSize) - } - - /** - * The maximum size allowed for uploaded files. -1 means no limit - */ - public fun maxFileSize(maxFileSize: Int) { - it.property("maxFileSize", maxFileSize.toString()) - } - - /** - * The maximum size allowed for multipart/form-data requests. -1 means no limit - */ - public fun maxRequestSize(maxRequestSize: String) { - it.property("maxRequestSize", maxRequestSize) - } - - /** - * The maximum size allowed for multipart/form-data requests. -1 means no limit - */ - public fun maxRequestSize(maxRequestSize: Int) { - it.property("maxRequestSize", maxRequestSize.toString()) - } - - /** - * Allows using a custom multipart filter. Note: setting multipartFilterRef forces the value of - * enableMultipartFilter to true. - */ - public fun multipartFilter(multipartFilter: String) { - it.property("multipartFilter", multipartFilter) - } - - /** - * Specifies whether to enable HTTP OPTIONS for this Servlet consumer. By default OPTIONS is - * turned off. - */ - public fun optionsEnabled(optionsEnabled: String) { - it.property("optionsEnabled", optionsEnabled) - } - - /** - * Specifies whether to enable HTTP OPTIONS for this Servlet consumer. By default OPTIONS is - * turned off. - */ - public fun optionsEnabled(optionsEnabled: Boolean) { - it.property("optionsEnabled", optionsEnabled.toString()) - } - - /** - * Specifies whether to enable HTTP TRACE for this Servlet consumer. By default TRACE is turned - * off. - */ - public fun traceEnabled(traceEnabled: String) { - it.property("traceEnabled", traceEnabled) - } - - /** - * Specifies whether to enable HTTP TRACE for this Servlet consumer. By default TRACE is turned - * off. - */ - public fun traceEnabled(traceEnabled: Boolean) { - it.property("traceEnabled", traceEnabled.toString()) - } - - /** - * To configure security using SSLContextParameters - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JgroupsRaftUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JgroupsRaftUriDsl.kt deleted file mode 100644 index 1eb8b98cc2b72..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JgroupsRaftUriDsl.kt +++ /dev/null @@ -1,138 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Exchange messages with JGroups-raft clusters. - */ -public fun UriDsl.`jgroups-raft`(i: JgroupsRaftUriDsl.() -> Unit) { - JgroupsRaftUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JgroupsRaftUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jgroups-raft") - } - - private var clusterName: String = "" - - /** - * The name of the JGroupsraft cluster the component should connect to. - */ - public fun clusterName(clusterName: String) { - this.clusterName = clusterName - it.url("$clusterName") - } - - /** - * If set to true, the consumer endpoint will receive roleChange event as well (not just - * connecting and/or using the state machine). By default it is set to false. - */ - public fun enableRoleChangeEvents(enableRoleChangeEvents: String) { - it.property("enableRoleChangeEvents", enableRoleChangeEvents) - } - - /** - * If set to true, the consumer endpoint will receive roleChange event as well (not just - * connecting and/or using the state machine). By default it is set to false. - */ - public fun enableRoleChangeEvents(enableRoleChangeEvents: Boolean) { - it.property("enableRoleChangeEvents", enableRoleChangeEvents.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JgroupsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JgroupsUriDsl.kt deleted file mode 100644 index f623086a5266a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JgroupsUriDsl.kt +++ /dev/null @@ -1,145 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Exchange messages with JGroups clusters. - */ -public fun UriDsl.jgroups(i: JgroupsUriDsl.() -> Unit) { - JgroupsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JgroupsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jgroups") - } - - private var clusterName: String = "" - - /** - * The name of the JGroups cluster the component should connect to. - */ - public fun clusterName(clusterName: String) { - this.clusterName = clusterName - it.url("$clusterName") - } - - /** - * Specifies configuration properties of the JChannel used by the endpoint. - */ - public fun channelProperties(channelProperties: String) { - it.property("channelProperties", channelProperties) - } - - /** - * If set to true, the consumer endpoint will receive org.jgroups.View messages as well (not only - * org.jgroups.Message instances). By default only regular messages are consumed by the endpoint. - */ - public fun enableViewMessages(enableViewMessages: String) { - it.property("enableViewMessages", enableViewMessages) - } - - /** - * If set to true, the consumer endpoint will receive org.jgroups.View messages as well (not only - * org.jgroups.Message instances). By default only regular messages are consumed by the endpoint. - */ - public fun enableViewMessages(enableViewMessages: Boolean) { - it.property("enableViewMessages", enableViewMessages.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JiraUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JiraUriDsl.kt deleted file mode 100644 index 0a5cf570410d4..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JiraUriDsl.kt +++ /dev/null @@ -1,431 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Interact with JIRA issue tracker. - */ -public fun UriDsl.jira(i: JiraUriDsl.() -> Unit) { - JiraUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JiraUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jira") - } - - private var type: String = "" - - /** - * Operation to perform. Consumers: NewIssues, NewComments. Producers: AddIssue, AttachFile, - * DeleteIssue, TransitionIssue, UpdateIssue, Watchers. See this class javadoc description for more - * information. - */ - public fun type(type: String) { - this.type = type - it.url("$type") - } - - /** - * Time in milliseconds to elapse for the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Time in milliseconds to elapse for the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * The Jira server url, for example http://my_jira.com:8081. - */ - public fun jiraUrl(jiraUrl: String) { - it.property("jiraUrl", jiraUrl) - } - - /** - * JQL is the query language from JIRA which allows you to retrieve the data you want. For example - * jql=project=MyProject Where MyProject is the product key in Jira. It is important to use the RAW() - * and set the JQL inside it to prevent camel parsing it, example: RAW(project in (MYP, COM) AND - * resolution = Unresolved) - */ - public fun jql(jql: String) { - it.property("jql", jql) - } - - /** - * Max number of issues to search for - */ - public fun maxResults(maxResults: String) { - it.property("maxResults", maxResults) - } - - /** - * Max number of issues to search for - */ - public fun maxResults(maxResults: Int) { - it.property("maxResults", maxResults.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Indicator for sending only changed fields in exchange body or issue object. By default consumer - * sends only changed fields. - */ - public fun sendOnlyUpdatedField(sendOnlyUpdatedField: String) { - it.property("sendOnlyUpdatedField", sendOnlyUpdatedField) - } - - /** - * Indicator for sending only changed fields in exchange body or issue object. By default consumer - * sends only changed fields. - */ - public fun sendOnlyUpdatedField(sendOnlyUpdatedField: Boolean) { - it.property("sendOnlyUpdatedField", sendOnlyUpdatedField.toString()) - } - - /** - * Comma separated list of fields to watch for changes. Status,Priority are the defaults. - */ - public fun watchedFields(watchedFields: String) { - it.property("watchedFields", watchedFields) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * (OAuth or Personal Access Token authentication) The access token generated by the Jira server. - */ - public fun accessToken(accessToken: String) { - it.property("accessToken", accessToken) - } - - /** - * (OAuth only) The consumer key from Jira settings. - */ - public fun consumerKey(consumerKey: String) { - it.property("consumerKey", consumerKey) - } - - /** - * (Basic authentication only) The password or the API Token to authenticate to the Jira server. - * Use only if username basic authentication is used. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * (OAuth only) The private key generated by the client to encrypt the conversation to the server. - */ - public fun privateKey(privateKey: String) { - it.property("privateKey", privateKey) - } - - /** - * (Basic authentication only) The username to authenticate to the Jira server. Use only if OAuth - * is not enabled on the Jira server. Do not set the username and OAuth token parameter, if they are - * both set, the username basic authentication takes precedence. - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * (OAuth only) The verification code from Jira generated in the first step of the authorization - * proccess. - */ - public fun verificationCode(verificationCode: String) { - it.property("verificationCode", verificationCode) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JmsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JmsUriDsl.kt deleted file mode 100644 index 36a4168d16c3f..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JmsUriDsl.kt +++ /dev/null @@ -1,1532 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Sent and receive messages to/from a JMS Queue or Topic. - */ -public fun UriDsl.jms(i: JmsUriDsl.() -> Unit) { - JmsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JmsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jms") - } - - private var destinationType: String = "" - - private var destinationName: String = "" - - /** - * The kind of destination to use - */ - public fun destinationType(destinationType: String) { - this.destinationType = destinationType - it.url("$destinationType:$destinationName") - } - - /** - * Name of the queue or topic to use as destination - */ - public fun destinationName(destinationName: String) { - this.destinationName = destinationName - it.url("$destinationType:$destinationName") - } - - /** - * Sets the JMS client ID to use. Note that this value, if specified, must be unique and can only - * be used by a single JMS connection instance. It is typically only required for durable topic - * subscriptions with JMS 1.1. - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * The connection factory to be use. A connection factory must be configured either on the - * component or endpoint. - */ - public fun connectionFactory(connectionFactory: String) { - it.property("connectionFactory", connectionFactory) - } - - /** - * Specifies whether Camel ignores the JMSReplyTo header in messages. If true, Camel does not send - * a reply back to the destination specified in the JMSReplyTo header. You can use this option if you - * want Camel to consume from a route and you do not want Camel to automatically send back a reply - * message because another component in your code handles the reply message. You can also use this - * option if you want to use Camel as a proxy between different message brokers and you want to route - * message from one system to another. - */ - public fun disableReplyTo(disableReplyTo: String) { - it.property("disableReplyTo", disableReplyTo) - } - - /** - * Specifies whether Camel ignores the JMSReplyTo header in messages. If true, Camel does not send - * a reply back to the destination specified in the JMSReplyTo header. You can use this option if you - * want Camel to consume from a route and you do not want Camel to automatically send back a reply - * message because another component in your code handles the reply message. You can also use this - * option if you want to use Camel as a proxy between different message brokers and you want to route - * message from one system to another. - */ - public fun disableReplyTo(disableReplyTo: Boolean) { - it.property("disableReplyTo", disableReplyTo.toString()) - } - - /** - * The durable subscriber name for specifying durable topic subscriptions. The clientId option - * must be configured as well. - */ - public fun durableSubscriptionName(durableSubscriptionName: String) { - it.property("durableSubscriptionName", durableSubscriptionName) - } - - /** - * Allows you to force the use of a specific jakarta.jms.Message implementation for sending JMS - * messages. Possible values are: Bytes, Map, Object, Stream, Text. By default, Camel would determine - * which JMS message type to use from the In body type. This option allows you to specify it. - */ - public fun jmsMessageType(jmsMessageType: String) { - it.property("jmsMessageType", jmsMessageType) - } - - /** - * Provides an explicit ReplyTo destination (overrides any incoming value of - * Message.getJMSReplyTo() in consumer). - */ - public fun replyTo(replyTo: String) { - it.property("replyTo", replyTo) - } - - /** - * Specifies whether to test the connection on startup. This ensures that when Camel starts that - * all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted - * then Camel throws an exception on startup. This ensures that Camel is not started with failed - * connections. The JMS producers is tested as well. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: String) { - it.property("testConnectionOnStartup", testConnectionOnStartup) - } - - /** - * Specifies whether to test the connection on startup. This ensures that when Camel starts that - * all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted - * then Camel throws an exception on startup. This ensures that Camel is not started with failed - * connections. The JMS producers is tested as well. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: Boolean) { - it.property("testConnectionOnStartup", testConnectionOnStartup.toString()) - } - - /** - * The JMS acknowledgement name, which is one of: SESSION_TRANSACTED, CLIENT_ACKNOWLEDGE, - * AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE - */ - public fun acknowledgementModeName(acknowledgementModeName: String) { - it.property("acknowledgementModeName", acknowledgementModeName) - } - - /** - * Consumer priorities allow you to ensure that high priority consumers receive messages while - * they are active. Normally, active consumers connected to a queue receive messages from it in a - * round-robin fashion. When consumer priorities are in use, messages are delivered round-robin if - * multiple active consumers exist with the same high priority. Messages will only going to lower - * priority consumers when the high priority consumers do not have credit available to consume the - * message, or those high priority consumers have declined to accept the message (for instance - * because it does not meet the criteria of any selectors associated with the consumer). - */ - public fun artemisConsumerPriority(artemisConsumerPriority: String) { - it.property("artemisConsumerPriority", artemisConsumerPriority) - } - - /** - * Consumer priorities allow you to ensure that high priority consumers receive messages while - * they are active. Normally, active consumers connected to a queue receive messages from it in a - * round-robin fashion. When consumer priorities are in use, messages are delivered round-robin if - * multiple active consumers exist with the same high priority. Messages will only going to lower - * priority consumers when the high priority consumers do not have credit available to consume the - * message, or those high priority consumers have declined to accept the message (for instance - * because it does not meet the criteria of any selectors associated with the consumer). - */ - public fun artemisConsumerPriority(artemisConsumerPriority: Int) { - it.property("artemisConsumerPriority", artemisConsumerPriority.toString()) - } - - /** - * Whether the JmsConsumer processes the Exchange asynchronously. If enabled then the JmsConsumer - * may pickup the next message from the JMS queue, while the previous message is being processed - * asynchronously (by the Asynchronous Routing Engine). This means that messages may be processed not - * 100% strictly in order. If disabled (as default) then the Exchange is fully processed before the - * JmsConsumer will pickup the next message from the JMS queue. Note if transacted has been enabled, - * then asyncConsumer=true does not run asynchronously, as transaction must be executed synchronously - * (Camel 3.0 may support async transactions). - */ - public fun asyncConsumer(asyncConsumer: String) { - it.property("asyncConsumer", asyncConsumer) - } - - /** - * Whether the JmsConsumer processes the Exchange asynchronously. If enabled then the JmsConsumer - * may pickup the next message from the JMS queue, while the previous message is being processed - * asynchronously (by the Asynchronous Routing Engine). This means that messages may be processed not - * 100% strictly in order. If disabled (as default) then the Exchange is fully processed before the - * JmsConsumer will pickup the next message from the JMS queue. Note if transacted has been enabled, - * then asyncConsumer=true does not run asynchronously, as transaction must be executed synchronously - * (Camel 3.0 may support async transactions). - */ - public fun asyncConsumer(asyncConsumer: Boolean) { - it.property("asyncConsumer", asyncConsumer.toString()) - } - - /** - * Specifies whether the consumer container should auto-startup. - */ - public fun autoStartup(autoStartup: String) { - it.property("autoStartup", autoStartup) - } - - /** - * Specifies whether the consumer container should auto-startup. - */ - public fun autoStartup(autoStartup: Boolean) { - it.property("autoStartup", autoStartup.toString()) - } - - /** - * Sets the cache level by ID for the underlying JMS resources. See cacheLevelName option for more - * details. - */ - public fun cacheLevel(cacheLevel: String) { - it.property("cacheLevel", cacheLevel) - } - - /** - * Sets the cache level by ID for the underlying JMS resources. See cacheLevelName option for more - * details. - */ - public fun cacheLevel(cacheLevel: Int) { - it.property("cacheLevel", cacheLevel.toString()) - } - - /** - * Sets the cache level by name for the underlying JMS resources. Possible values are: CACHE_AUTO, - * CACHE_CONNECTION, CACHE_CONSUMER, CACHE_NONE, and CACHE_SESSION. The default setting is - * CACHE_AUTO. See the Spring documentation and Transactions Cache Levels for more information. - */ - public fun cacheLevelName(cacheLevelName: String) { - it.property("cacheLevelName", cacheLevelName) - } - - /** - * Specifies the default number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToConcurrentConsumers is used - * to control number of concurrent consumers on the reply message listener. - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * Specifies the default number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToConcurrentConsumers is used - * to control number of concurrent consumers on the reply message listener. - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * Specifies the maximum number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToMaxConcurrentConsumers is - * used to control number of concurrent consumers on the reply message listener. - */ - public fun maxConcurrentConsumers(maxConcurrentConsumers: String) { - it.property("maxConcurrentConsumers", maxConcurrentConsumers) - } - - /** - * Specifies the maximum number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToMaxConcurrentConsumers is - * used to control number of concurrent consumers on the reply message listener. - */ - public fun maxConcurrentConsumers(maxConcurrentConsumers: Int) { - it.property("maxConcurrentConsumers", maxConcurrentConsumers.toString()) - } - - /** - * Specifies whether to use persistent delivery by default for replies. - */ - public fun replyToDeliveryPersistent(replyToDeliveryPersistent: String) { - it.property("replyToDeliveryPersistent", replyToDeliveryPersistent) - } - - /** - * Specifies whether to use persistent delivery by default for replies. - */ - public fun replyToDeliveryPersistent(replyToDeliveryPersistent: Boolean) { - it.property("replyToDeliveryPersistent", replyToDeliveryPersistent.toString()) - } - - /** - * Sets the JMS selector to use - */ - public fun selector(selector: String) { - it.property("selector", selector) - } - - /** - * Set whether to make the subscription durable. The durable subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * durable subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Only makes sense when listening to a - * topic (pub-sub domain), therefore this method switches the pubSubDomain flag as well. - */ - public fun subscriptionDurable(subscriptionDurable: String) { - it.property("subscriptionDurable", subscriptionDurable) - } - - /** - * Set whether to make the subscription durable. The durable subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * durable subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Only makes sense when listening to a - * topic (pub-sub domain), therefore this method switches the pubSubDomain flag as well. - */ - public fun subscriptionDurable(subscriptionDurable: Boolean) { - it.property("subscriptionDurable", subscriptionDurable.toString()) - } - - /** - * Set the name of a subscription to create. To be applied in case of a topic (pub-sub domain) - * with a shared or durable subscription. The subscription name needs to be unique within this - * client's JMS client id. Default is the class name of the specified message listener. Note: Only 1 - * concurrent consumer (which is the default of this message listener container) is allowed for each - * subscription, except for a shared subscription (which requires JMS 2.0). - */ - public fun subscriptionName(subscriptionName: String) { - it.property("subscriptionName", subscriptionName) - } - - /** - * Set whether to make the subscription shared. The shared subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * shared subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Note that shared subscriptions may also - * be durable, so this flag can (and often will) be combined with subscriptionDurable as well. Only - * makes sense when listening to a topic (pub-sub domain), therefore this method switches the - * pubSubDomain flag as well. Requires a JMS 2.0 compatible message broker. - */ - public fun subscriptionShared(subscriptionShared: String) { - it.property("subscriptionShared", subscriptionShared) - } - - /** - * Set whether to make the subscription shared. The shared subscription name to be used can be - * specified through the subscriptionName property. Default is false. Set this to true to register a - * shared subscription, typically in combination with a subscriptionName value (unless your message - * listener class name is good enough as subscription name). Note that shared subscriptions may also - * be durable, so this flag can (and often will) be combined with subscriptionDurable as well. Only - * makes sense when listening to a topic (pub-sub domain), therefore this method switches the - * pubSubDomain flag as well. Requires a JMS 2.0 compatible message broker. - */ - public fun subscriptionShared(subscriptionShared: Boolean) { - it.property("subscriptionShared", subscriptionShared.toString()) - } - - /** - * Specifies whether the consumer accept messages while it is stopping. You may consider enabling - * this option, if you start and stop JMS routes at runtime, while there are still messages enqueued - * on the queue. If this option is false, and you stop the JMS route, then messages may be rejected, - * and the JMS broker would have to attempt redeliveries, which yet again may be rejected, and - * eventually the message may be moved at a dead letter queue on the JMS broker. To avoid this its - * recommended to enable this option. - */ - public fun acceptMessagesWhileStopping(acceptMessagesWhileStopping: String) { - it.property("acceptMessagesWhileStopping", acceptMessagesWhileStopping) - } - - /** - * Specifies whether the consumer accept messages while it is stopping. You may consider enabling - * this option, if you start and stop JMS routes at runtime, while there are still messages enqueued - * on the queue. If this option is false, and you stop the JMS route, then messages may be rejected, - * and the JMS broker would have to attempt redeliveries, which yet again may be rejected, and - * eventually the message may be moved at a dead letter queue on the JMS broker. To avoid this its - * recommended to enable this option. - */ - public fun acceptMessagesWhileStopping(acceptMessagesWhileStopping: Boolean) { - it.property("acceptMessagesWhileStopping", acceptMessagesWhileStopping.toString()) - } - - /** - * Whether the DefaultMessageListenerContainer used in the reply managers for request-reply - * messaging allow the DefaultMessageListenerContainer.runningAllowed flag to quick stop in case - * JmsConfiguration#isAcceptMessagesWhileStopping is enabled, and org.apache.camel.CamelContext is - * currently being stopped. This quick stop ability is enabled by default in the regular JMS - * consumers but to enable for reply managers you must enable this flag. - */ - public fun allowReplyManagerQuickStop(allowReplyManagerQuickStop: String) { - it.property("allowReplyManagerQuickStop", allowReplyManagerQuickStop) - } - - /** - * Whether the DefaultMessageListenerContainer used in the reply managers for request-reply - * messaging allow the DefaultMessageListenerContainer.runningAllowed flag to quick stop in case - * JmsConfiguration#isAcceptMessagesWhileStopping is enabled, and org.apache.camel.CamelContext is - * currently being stopped. This quick stop ability is enabled by default in the regular JMS - * consumers but to enable for reply managers you must enable this flag. - */ - public fun allowReplyManagerQuickStop(allowReplyManagerQuickStop: Boolean) { - it.property("allowReplyManagerQuickStop", allowReplyManagerQuickStop.toString()) - } - - /** - * The consumer type to use, which can be one of: Simple, Default, or Custom. The consumer type - * determines which Spring JMS listener to use. Default will use - * org.springframework.jms.listener.DefaultMessageListenerContainer, Simple will use - * org.springframework.jms.listener.SimpleMessageListenerContainer. When Custom is specified, the - * MessageListenerContainerFactory defined by the messageListenerContainerFactory option will - * determine what org.springframework.jms.listener.AbstractMessageListenerContainer to use. - */ - public fun consumerType(consumerType: String) { - it.property("consumerType", consumerType) - } - - /** - * Specifies what default TaskExecutor type to use in the DefaultMessageListenerContainer, for - * both consumer endpoints and the ReplyTo consumer of producer endpoints. Possible values: - * SimpleAsync (uses Spring's SimpleAsyncTaskExecutor) or ThreadPool (uses Spring's - * ThreadPoolTaskExecutor with optimal values - cached thread-pool-like). If not set, it defaults to - * the previous behaviour, which uses a cached thread pool for consumer endpoints and SimpleAsync for - * reply consumers. The use of ThreadPool is recommended to reduce thread trash in elastic - * configurations with dynamically increasing and decreasing concurrent consumers. - */ - public fun defaultTaskExecutorType(defaultTaskExecutorType: String) { - it.property("defaultTaskExecutorType", defaultTaskExecutorType) - } - - /** - * Enables eager loading of JMS properties and payload as soon as a message is loaded which - * generally is inefficient as the JMS properties may not be required but sometimes can catch early - * any issues with the underlying JMS provider and the use of JMS properties. See also the option - * eagerPoisonBody. - */ - public fun eagerLoadingOfProperties(eagerLoadingOfProperties: String) { - it.property("eagerLoadingOfProperties", eagerLoadingOfProperties) - } - - /** - * Enables eager loading of JMS properties and payload as soon as a message is loaded which - * generally is inefficient as the JMS properties may not be required but sometimes can catch early - * any issues with the underlying JMS provider and the use of JMS properties. See also the option - * eagerPoisonBody. - */ - public fun eagerLoadingOfProperties(eagerLoadingOfProperties: Boolean) { - it.property("eagerLoadingOfProperties", eagerLoadingOfProperties.toString()) - } - - /** - * If eagerLoadingOfProperties is enabled and the JMS message payload (JMS body or JMS properties) - * is poison (cannot be read/mapped), then set this text as the message body instead so the message - * can be processed (the cause of the poison are already stored as exception on the Exchange). This - * can be turned off by setting eagerPoisonBody=false. See also the option eagerLoadingOfProperties. - */ - public fun eagerPoisonBody(eagerPoisonBody: String) { - it.property("eagerPoisonBody", eagerPoisonBody) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Specifies whether the listener session should be exposed when consuming messages. - */ - public fun exposeListenerSession(exposeListenerSession: String) { - it.property("exposeListenerSession", exposeListenerSession) - } - - /** - * Specifies whether the listener session should be exposed when consuming messages. - */ - public fun exposeListenerSession(exposeListenerSession: Boolean) { - it.property("exposeListenerSession", exposeListenerSession.toString()) - } - - /** - * The consumer type of the reply consumer (when doing request/reply), which can be one of: - * Simple, Default, or Custom. The consumer type determines which Spring JMS listener to use. Default - * will use org.springframework.jms.listener.DefaultMessageListenerContainer, Simple will use - * org.springframework.jms.listener.SimpleMessageListenerContainer. When Custom is specified, the - * MessageListenerContainerFactory defined by the messageListenerContainerFactory option will - * determine what org.springframework.jms.listener.AbstractMessageListenerContainer to use. - */ - public fun replyToConsumerType(replyToConsumerType: String) { - it.property("replyToConsumerType", replyToConsumerType) - } - - /** - * Whether a JMS consumer is allowed to send a reply message to the same destination that the - * consumer is using to consume from. This prevents an endless loop by consuming and sending back the - * same message to itself. - */ - public fun replyToSameDestinationAllowed(replyToSameDestinationAllowed: String) { - it.property("replyToSameDestinationAllowed", replyToSameDestinationAllowed) - } - - /** - * Whether a JMS consumer is allowed to send a reply message to the same destination that the - * consumer is using to consume from. This prevents an endless loop by consuming and sending back the - * same message to itself. - */ - public fun replyToSameDestinationAllowed(replyToSameDestinationAllowed: Boolean) { - it.property("replyToSameDestinationAllowed", replyToSameDestinationAllowed.toString()) - } - - /** - * Allows you to specify a custom task executor for consuming messages. - */ - public fun taskExecutor(taskExecutor: String) { - it.property("taskExecutor", taskExecutor) - } - - /** - * Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant - * broker. - */ - public fun deliveryDelay(deliveryDelay: String) { - it.property("deliveryDelay", deliveryDelay) - } - - /** - * Sets delivery delay to use for send calls for JMS. This option requires JMS 2.0 compliant - * broker. - */ - public fun deliveryDelay(deliveryDelay: Int) { - it.property("deliveryDelay", deliveryDelay.toString()) - } - - /** - * Specifies the delivery mode to be used. Possible values are those defined by - * jakarta.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. - */ - public fun deliveryMode(deliveryMode: String) { - it.property("deliveryMode", deliveryMode) - } - - /** - * Specifies the delivery mode to be used. Possible values are those defined by - * jakarta.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. - */ - public fun deliveryMode(deliveryMode: Int) { - it.property("deliveryMode", deliveryMode.toString()) - } - - /** - * Specifies whether persistent delivery is used by default. - */ - public fun deliveryPersistent(deliveryPersistent: String) { - it.property("deliveryPersistent", deliveryPersistent) - } - - /** - * Specifies whether persistent delivery is used by default. - */ - public fun deliveryPersistent(deliveryPersistent: Boolean) { - it.property("deliveryPersistent", deliveryPersistent.toString()) - } - - /** - * Set if the deliveryMode, priority or timeToLive qualities of service should be used when - * sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and - * timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos - * option, which operates at message granularity, reading QoS properties exclusively from the Camel - * In message headers. - */ - public fun explicitQosEnabled(explicitQosEnabled: String) { - it.property("explicitQosEnabled", explicitQosEnabled) - } - - /** - * Set if the deliveryMode, priority or timeToLive qualities of service should be used when - * sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and - * timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos - * option, which operates at message granularity, reading QoS properties exclusively from the Camel - * In message headers. - */ - public fun explicitQosEnabled(explicitQosEnabled: Boolean) { - it.property("explicitQosEnabled", explicitQosEnabled.toString()) - } - - /** - * Sets whether JMS date properties should be formatted according to the ISO 8601 standard. - */ - public fun formatDateHeadersToIso8601(formatDateHeadersToIso8601: String) { - it.property("formatDateHeadersToIso8601", formatDateHeadersToIso8601) - } - - /** - * Sets whether JMS date properties should be formatted according to the ISO 8601 standard. - */ - public fun formatDateHeadersToIso8601(formatDateHeadersToIso8601: Boolean) { - it.property("formatDateHeadersToIso8601", formatDateHeadersToIso8601.toString()) - } - - /** - * Set to true, if you want to send message using the QoS settings specified on the message, - * instead of the QoS settings on the JMS endpoint. The following three headers are considered - * JMSPriority, JMSDeliveryMode, and JMSExpiration. You can provide all or only some of them. If not - * provided, Camel will fall back to use the values from the endpoint instead. So, when using this - * option, the headers override the values from the endpoint. The explicitQosEnabled option, by - * contrast, will only use options set on the endpoint, and not values from the message header. - */ - public fun preserveMessageQos(preserveMessageQos: String) { - it.property("preserveMessageQos", preserveMessageQos) - } - - /** - * Set to true, if you want to send message using the QoS settings specified on the message, - * instead of the QoS settings on the JMS endpoint. The following three headers are considered - * JMSPriority, JMSDeliveryMode, and JMSExpiration. You can provide all or only some of them. If not - * provided, Camel will fall back to use the values from the endpoint instead. So, when using this - * option, the headers override the values from the endpoint. The explicitQosEnabled option, by - * contrast, will only use options set on the endpoint, and not values from the message header. - */ - public fun preserveMessageQos(preserveMessageQos: Boolean) { - it.property("preserveMessageQos", preserveMessageQos.toString()) - } - - /** - * Values greater than 1 specify the message priority when sending (where 1 is the lowest priority - * and 9 is the highest). The explicitQosEnabled option must also be enabled in order for this option - * to have any effect. - */ - public fun priority(priority: String) { - it.property("priority", priority) - } - - /** - * Values greater than 1 specify the message priority when sending (where 1 is the lowest priority - * and 9 is the highest). The explicitQosEnabled option must also be enabled in order for this option - * to have any effect. - */ - public fun priority(priority: Int) { - it.property("priority", priority.toString()) - } - - /** - * Specifies the default number of concurrent consumers when doing request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToConcurrentConsumers(replyToConcurrentConsumers: String) { - it.property("replyToConcurrentConsumers", replyToConcurrentConsumers) - } - - /** - * Specifies the default number of concurrent consumers when doing request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToConcurrentConsumers(replyToConcurrentConsumers: Int) { - it.property("replyToConcurrentConsumers", replyToConcurrentConsumers.toString()) - } - - /** - * Specifies the maximum number of concurrent consumers when using request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToMaxConcurrentConsumers(replyToMaxConcurrentConsumers: String) { - it.property("replyToMaxConcurrentConsumers", replyToMaxConcurrentConsumers) - } - - /** - * Specifies the maximum number of concurrent consumers when using request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToMaxConcurrentConsumers(replyToMaxConcurrentConsumers: Int) { - it.property("replyToMaxConcurrentConsumers", replyToMaxConcurrentConsumers.toString()) - } - - /** - * Specifies the maximum number of concurrent consumers for continue routing when timeout occurred - * when using request/reply over JMS. - */ - public - fun replyToOnTimeoutMaxConcurrentConsumers(replyToOnTimeoutMaxConcurrentConsumers: String) { - it.property("replyToOnTimeoutMaxConcurrentConsumers", replyToOnTimeoutMaxConcurrentConsumers) - } - - /** - * Specifies the maximum number of concurrent consumers for continue routing when timeout occurred - * when using request/reply over JMS. - */ - public fun replyToOnTimeoutMaxConcurrentConsumers(replyToOnTimeoutMaxConcurrentConsumers: Int) { - it.property("replyToOnTimeoutMaxConcurrentConsumers", - replyToOnTimeoutMaxConcurrentConsumers.toString()) - } - - /** - * Provides an explicit ReplyTo destination in the JMS message, which overrides the setting of - * replyTo. It is useful if you want to forward the message to a remote Queue and receive the reply - * message from the ReplyTo destination. - */ - public fun replyToOverride(replyToOverride: String) { - it.property("replyToOverride", replyToOverride) - } - - /** - * Allows for explicitly specifying which kind of strategy to use for replyTo queues when doing - * request/reply over JMS. Possible values are: Temporary, Shared, or Exclusive. By default Camel - * will use temporary queues. However if replyTo has been configured, then Shared is used by default. - * This option allows you to use exclusive queues instead of shared ones. See Camel JMS documentation - * for more details, and especially the notes about the implications if running in a clustered - * environment, and the fact that Shared reply queues has lower performance than its alternatives - * Temporary and Exclusive. - */ - public fun replyToType(replyToType: String) { - it.property("replyToType", replyToType) - } - - /** - * The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds). - * The default is 20 seconds. You can include the header CamelJmsRequestTimeout to override this - * endpoint configured timeout value, and thus have per message individual timeout values. See also - * the requestTimeoutCheckerInterval option. - */ - public fun requestTimeout(requestTimeout: String) { - it.property("requestTimeout", requestTimeout) - } - - /** - * When sending messages, specifies the time-to-live of the message (in milliseconds). - */ - public fun timeToLive(timeToLive: String) { - it.property("timeToLive", timeToLive) - } - - /** - * When sending messages, specifies the time-to-live of the message (in milliseconds). - */ - public fun timeToLive(timeToLive: Int) { - it.property("timeToLive", timeToLive.toString()) - } - - /** - * This option is used to allow additional headers which may have values that are invalid - * according to JMS specification. For example, some message systems, such as WMQ, do this with - * header names using prefix JMS_IBM_MQMD_ containing values with byte array or other invalid types. - * You can specify multiple header names separated by comma, and use as suffix for wildcard matching. - */ - public fun allowAdditionalHeaders(allowAdditionalHeaders: String) { - it.property("allowAdditionalHeaders", allowAdditionalHeaders) - } - - /** - * Whether to allow sending messages with no body. If this option is false and the message body is - * null, then an JMSException is thrown. - */ - public fun allowNullBody(allowNullBody: String) { - it.property("allowNullBody", allowNullBody) - } - - /** - * Whether to allow sending messages with no body. If this option is false and the message body is - * null, then an JMSException is thrown. - */ - public fun allowNullBody(allowNullBody: Boolean) { - it.property("allowNullBody", allowNullBody.toString()) - } - - /** - * If true, Camel will always make a JMS message copy of the message when it is passed to the - * producer for sending. Copying the message is needed in some situations, such as when a - * replyToDestinationSelectorName is set (incidentally, Camel will set the alwaysCopyMessage option - * to true, if a replyToDestinationSelectorName is set) - */ - public fun alwaysCopyMessage(alwaysCopyMessage: String) { - it.property("alwaysCopyMessage", alwaysCopyMessage) - } - - /** - * If true, Camel will always make a JMS message copy of the message when it is passed to the - * producer for sending. Copying the message is needed in some situations, such as when a - * replyToDestinationSelectorName is set (incidentally, Camel will set the alwaysCopyMessage option - * to true, if a replyToDestinationSelectorName is set) - */ - public fun alwaysCopyMessage(alwaysCopyMessage: Boolean) { - it.property("alwaysCopyMessage", alwaysCopyMessage.toString()) - } - - /** - * When using InOut exchange pattern use this JMS property instead of JMSCorrelationID JMS - * property to correlate messages. If set messages will be correlated solely on the value of this - * property JMSCorrelationID property will be ignored and not set by Camel. - */ - public fun correlationProperty(correlationProperty: String) { - it.property("correlationProperty", correlationProperty) - } - - /** - * Use this option to force disabling time to live. For example when you do request/reply over - * JMS, then Camel will by default use the requestTimeout value as time to live on the message being - * sent. The problem is that the sender and receiver systems have to have their clocks synchronized, - * so they are in sync. This is not always so easy to archive. So you can use disableTimeToLive=true - * to not set a time to live value on the sent message. Then the message will not expire on the - * receiver system. See below in section About time to live for more details. - */ - public fun disableTimeToLive(disableTimeToLive: String) { - it.property("disableTimeToLive", disableTimeToLive) - } - - /** - * Use this option to force disabling time to live. For example when you do request/reply over - * JMS, then Camel will by default use the requestTimeout value as time to live on the message being - * sent. The problem is that the sender and receiver systems have to have their clocks synchronized, - * so they are in sync. This is not always so easy to archive. So you can use disableTimeToLive=true - * to not set a time to live value on the sent message. Then the message will not expire on the - * receiver system. See below in section About time to live for more details. - */ - public fun disableTimeToLive(disableTimeToLive: Boolean) { - it.property("disableTimeToLive", disableTimeToLive.toString()) - } - - /** - * When using mapJmsMessage=false Camel will create a new JMS message to send to a new JMS - * destination if you touch the headers (get or set) during the route. Set this option to true to - * force Camel to send the original JMS message that was received. - */ - public fun forceSendOriginalMessage(forceSendOriginalMessage: String) { - it.property("forceSendOriginalMessage", forceSendOriginalMessage) - } - - /** - * When using mapJmsMessage=false Camel will create a new JMS message to send to a new JMS - * destination if you touch the headers (get or set) during the route. Set this option to true to - * force Camel to send the original JMS message that was received. - */ - public fun forceSendOriginalMessage(forceSendOriginalMessage: Boolean) { - it.property("forceSendOriginalMessage", forceSendOriginalMessage.toString()) - } - - /** - * Only applicable when sending to JMS destination using InOnly (eg fire and forget). Enabling - * this option will enrich the Camel Exchange with the actual JMSMessageID that was used by the JMS - * client when the message was sent to the JMS destination. - */ - public fun includeSentJMSMessageID(includeSentJMSMessageID: String) { - it.property("includeSentJMSMessageID", includeSentJMSMessageID) - } - - /** - * Only applicable when sending to JMS destination using InOnly (eg fire and forget). Enabling - * this option will enrich the Camel Exchange with the actual JMSMessageID that was used by the JMS - * client when the message was sent to the JMS destination. - */ - public fun includeSentJMSMessageID(includeSentJMSMessageID: Boolean) { - it.property("includeSentJMSMessageID", includeSentJMSMessageID.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Sets the cache level by name for the reply consumer when doing request/reply over JMS. This - * option only applies when using fixed reply queues (not temporary). Camel will by default use: - * CACHE_CONSUMER for exclusive or shared w/ replyToSelectorName. And CACHE_SESSION for shared - * without replyToSelectorName. Some JMS brokers such as IBM WebSphere may require to set the - * replyToCacheLevelName=CACHE_NONE to work. Note: If using temporary queues then CACHE_NONE is not - * allowed, and you must use a higher value such as CACHE_CONSUMER or CACHE_SESSION. - */ - public fun replyToCacheLevelName(replyToCacheLevelName: String) { - it.property("replyToCacheLevelName", replyToCacheLevelName) - } - - /** - * Sets the JMS Selector using the fixed name to be used so you can filter out your own replies - * from the others when using a shared queue (that is, if you are not using a temporary reply queue). - */ - public fun replyToDestinationSelectorName(replyToDestinationSelectorName: String) { - it.property("replyToDestinationSelectorName", replyToDestinationSelectorName) - } - - /** - * Sets whether StreamMessage type is enabled or not. Message payloads of streaming kind such as - * files, InputStream, etc will either by sent as BytesMessage or StreamMessage. This option controls - * which kind will be used. By default BytesMessage is used which enforces the entire message payload - * to be read into memory. By enabling this option the message payload is read into memory in chunks - * and each chunk is then written to the StreamMessage until no more data. - */ - public fun streamMessageTypeEnabled(streamMessageTypeEnabled: String) { - it.property("streamMessageTypeEnabled", streamMessageTypeEnabled) - } - - /** - * Sets whether StreamMessage type is enabled or not. Message payloads of streaming kind such as - * files, InputStream, etc will either by sent as BytesMessage or StreamMessage. This option controls - * which kind will be used. By default BytesMessage is used which enforces the entire message payload - * to be read into memory. By enabling this option the message payload is read into memory in chunks - * and each chunk is then written to the StreamMessage until no more data. - */ - public fun streamMessageTypeEnabled(streamMessageTypeEnabled: Boolean) { - it.property("streamMessageTypeEnabled", streamMessageTypeEnabled.toString()) - } - - /** - * Controls whether or not to include serialized headers. Applies only when transferExchange is - * true. This requires that the objects are serializable. Camel will exclude any non-serializable - * objects and log it at WARN level. - */ - public fun allowSerializedHeaders(allowSerializedHeaders: String) { - it.property("allowSerializedHeaders", allowSerializedHeaders) - } - - /** - * Controls whether or not to include serialized headers. Applies only when transferExchange is - * true. This requires that the objects are serializable. Camel will exclude any non-serializable - * objects and log it at WARN level. - */ - public fun allowSerializedHeaders(allowSerializedHeaders: Boolean) { - it.property("allowSerializedHeaders", allowSerializedHeaders.toString()) - } - - /** - * Whether optimizing for Apache Artemis streaming mode. This can reduce memory overhead when - * using Artemis with JMS StreamMessage types. This option must only be enabled if Apache Artemis is - * being used. - */ - public fun artemisStreamingEnabled(artemisStreamingEnabled: String) { - it.property("artemisStreamingEnabled", artemisStreamingEnabled) - } - - /** - * Whether optimizing for Apache Artemis streaming mode. This can reduce memory overhead when - * using Artemis with JMS StreamMessage types. This option must only be enabled if Apache Artemis is - * being used. - */ - public fun artemisStreamingEnabled(artemisStreamingEnabled: Boolean) { - it.property("artemisStreamingEnabled", artemisStreamingEnabled.toString()) - } - - /** - * Whether to startup the JmsConsumer message listener asynchronously, when starting a route. For - * example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while - * retrying and/or fail-over. This will cause Camel to block while starting routes. By setting this - * option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker - * using a dedicated thread in asynchronous mode. If this option is used, then beware that if the - * connection could not be established, then an exception is logged at WARN level, and the consumer - * will not be able to receive messages; You can then restart the route to retry. - */ - public fun asyncStartListener(asyncStartListener: String) { - it.property("asyncStartListener", asyncStartListener) - } - - /** - * Whether to startup the JmsConsumer message listener asynchronously, when starting a route. For - * example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while - * retrying and/or fail-over. This will cause Camel to block while starting routes. By setting this - * option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker - * using a dedicated thread in asynchronous mode. If this option is used, then beware that if the - * connection could not be established, then an exception is logged at WARN level, and the consumer - * will not be able to receive messages; You can then restart the route to retry. - */ - public fun asyncStartListener(asyncStartListener: Boolean) { - it.property("asyncStartListener", asyncStartListener.toString()) - } - - /** - * Whether to stop the JmsConsumer message listener asynchronously, when stopping a route. - */ - public fun asyncStopListener(asyncStopListener: String) { - it.property("asyncStopListener", asyncStopListener) - } - - /** - * Whether to stop the JmsConsumer message listener asynchronously, when stopping a route. - */ - public fun asyncStopListener(asyncStopListener: Boolean) { - it.property("asyncStopListener", asyncStopListener.toString()) - } - - /** - * A pluggable org.springframework.jms.support.destination.DestinationResolver that allows you to - * use your own resolver (for example, to lookup the real destination in a JNDI registry). - */ - public fun destinationResolver(destinationResolver: String) { - it.property("destinationResolver", destinationResolver) - } - - /** - * Specifies a org.springframework.util.ErrorHandler to be invoked in case of any uncaught - * exceptions thrown while processing a Message. By default these exceptions will be logged at the - * WARN level, if no errorHandler has been configured. You can configure logging level and whether - * stack traces should be logged using errorHandlerLoggingLevel and errorHandlerLogStackTrace - * options. This makes it much easier to configure, than having to code a custom errorHandler. - */ - public fun errorHandler(errorHandler: String) { - it.property("errorHandler", errorHandler) - } - - /** - * Specifies the JMS Exception Listener that is to be notified of any underlying JMS exceptions. - */ - public fun exceptionListener(exceptionListener: String) { - it.property("exceptionListener", exceptionListener) - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * Specify the limit for the number of consumers that are allowed to be idle at any given time. - */ - public fun idleConsumerLimit(idleConsumerLimit: String) { - it.property("idleConsumerLimit", idleConsumerLimit) - } - - /** - * Specify the limit for the number of consumers that are allowed to be idle at any given time. - */ - public fun idleConsumerLimit(idleConsumerLimit: Int) { - it.property("idleConsumerLimit", idleConsumerLimit.toString()) - } - - /** - * Specifies the limit for idle executions of a receive task, not having received any message - * within its execution. If this limit is reached, the task will shut down and leave receiving to - * other executing tasks (in the case of dynamic scheduling; see the maxConcurrentConsumers setting). - * There is additional doc available from Spring. - */ - public fun idleTaskExecutionLimit(idleTaskExecutionLimit: String) { - it.property("idleTaskExecutionLimit", idleTaskExecutionLimit) - } - - /** - * Specifies the limit for idle executions of a receive task, not having received any message - * within its execution. If this limit is reached, the task will shut down and leave receiving to - * other executing tasks (in the case of dynamic scheduling; see the maxConcurrentConsumers setting). - * There is additional doc available from Spring. - */ - public fun idleTaskExecutionLimit(idleTaskExecutionLimit: Int) { - it.property("idleTaskExecutionLimit", idleTaskExecutionLimit.toString()) - } - - /** - * Whether to include all JMSX prefixed properties when mapping from JMS to Camel Message. Setting - * this to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using - * a custom headerFilterStrategy then this option does not apply. - */ - public fun includeAllJMSXProperties(includeAllJMSXProperties: String) { - it.property("includeAllJMSXProperties", includeAllJMSXProperties) - } - - /** - * Whether to include all JMSX prefixed properties when mapping from JMS to Camel Message. Setting - * this to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using - * a custom headerFilterStrategy then this option does not apply. - */ - public fun includeAllJMSXProperties(includeAllJMSXProperties: Boolean) { - it.property("includeAllJMSXProperties", includeAllJMSXProperties.toString()) - } - - /** - * Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS - * specification. Camel provides two implementations out of the box: default and passthrough. The - * default strategy will safely marshal dots and hyphens (. and -). The passthrough strategy leaves - * the key as is. Can be used for JMS brokers which do not care whether JMS header keys contain - * illegal characters. You can provide your own implementation of the - * org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the # notation. - */ - public fun jmsKeyFormatStrategy(jmsKeyFormatStrategy: String) { - it.property("jmsKeyFormatStrategy", jmsKeyFormatStrategy) - } - - /** - * Specifies whether Camel should auto map the received JMS message to a suited payload type, such - * as jakarta.jms.TextMessage to a String etc. - */ - public fun mapJmsMessage(mapJmsMessage: String) { - it.property("mapJmsMessage", mapJmsMessage) - } - - /** - * Specifies whether Camel should auto map the received JMS message to a suited payload type, such - * as jakarta.jms.TextMessage to a String etc. - */ - public fun mapJmsMessage(mapJmsMessage: Boolean) { - it.property("mapJmsMessage", mapJmsMessage.toString()) - } - - /** - * The number of messages per task. -1 is unlimited. If you use a range for concurrent consumers - * (eg min max), then this option can be used to set a value to eg 100 to control how fast the - * consumers will shrink when less work is required. - */ - public fun maxMessagesPerTask(maxMessagesPerTask: String) { - it.property("maxMessagesPerTask", maxMessagesPerTask) - } - - /** - * The number of messages per task. -1 is unlimited. If you use a range for concurrent consumers - * (eg min max), then this option can be used to set a value to eg 100 to control how fast the - * consumers will shrink when less work is required. - */ - public fun maxMessagesPerTask(maxMessagesPerTask: Int) { - it.property("maxMessagesPerTask", maxMessagesPerTask.toString()) - } - - /** - * To use a custom Spring org.springframework.jms.support.converter.MessageConverter so you can be - * in control how to map to/from a jakarta.jms.Message. - */ - public fun messageConverter(messageConverter: String) { - it.property("messageConverter", messageConverter) - } - - /** - * To use the given MessageCreatedStrategy which are invoked when Camel creates new instances of - * jakarta.jms.Message objects when Camel is sending a JMS message. - */ - public fun messageCreatedStrategy(messageCreatedStrategy: String) { - it.property("messageCreatedStrategy", messageCreatedStrategy) - } - - /** - * When sending, specifies whether message IDs should be added. This is just an hint to the JMS - * broker. If the JMS provider accepts this hint, these messages must have the message ID set to - * null; if the provider ignores the hint, the message ID must be set to its normal unique value. - */ - public fun messageIdEnabled(messageIdEnabled: String) { - it.property("messageIdEnabled", messageIdEnabled) - } - - /** - * When sending, specifies whether message IDs should be added. This is just an hint to the JMS - * broker. If the JMS provider accepts this hint, these messages must have the message ID set to - * null; if the provider ignores the hint, the message ID must be set to its normal unique value. - */ - public fun messageIdEnabled(messageIdEnabled: Boolean) { - it.property("messageIdEnabled", messageIdEnabled.toString()) - } - - /** - * Registry ID of the MessageListenerContainerFactory used to determine what - * org.springframework.jms.listener.AbstractMessageListenerContainer to use to consume messages. - * Setting this will automatically set consumerType to Custom. - */ - public fun messageListenerContainerFactory(messageListenerContainerFactory: String) { - it.property("messageListenerContainerFactory", messageListenerContainerFactory) - } - - /** - * Specifies whether timestamps should be enabled by default on sending messages. This is just an - * hint to the JMS broker. If the JMS provider accepts this hint, these messages must have the - * timestamp set to zero; if the provider ignores the hint the timestamp must be set to its normal - * value. - */ - public fun messageTimestampEnabled(messageTimestampEnabled: String) { - it.property("messageTimestampEnabled", messageTimestampEnabled) - } - - /** - * Specifies whether timestamps should be enabled by default on sending messages. This is just an - * hint to the JMS broker. If the JMS provider accepts this hint, these messages must have the - * timestamp set to zero; if the provider ignores the hint the timestamp must be set to its normal - * value. - */ - public fun messageTimestampEnabled(messageTimestampEnabled: Boolean) { - it.property("messageTimestampEnabled", messageTimestampEnabled.toString()) - } - - /** - * Specifies whether to inhibit the delivery of messages published by its own connection. - */ - public fun pubSubNoLocal(pubSubNoLocal: String) { - it.property("pubSubNoLocal", pubSubNoLocal) - } - - /** - * Specifies whether to inhibit the delivery of messages published by its own connection. - */ - public fun pubSubNoLocal(pubSubNoLocal: Boolean) { - it.property("pubSubNoLocal", pubSubNoLocal.toString()) - } - - /** - * The timeout for receiving messages (in milliseconds). - */ - public fun receiveTimeout(receiveTimeout: String) { - it.property("receiveTimeout", receiveTimeout) - } - - /** - * Specifies the interval between recovery attempts, i.e. when a connection is being refreshed, in - * milliseconds. The default is 5000 ms, that is, 5 seconds. - */ - public fun recoveryInterval(recoveryInterval: String) { - it.property("recoveryInterval", recoveryInterval) - } - - /** - * Configures how often Camel should check for timed out Exchanges when doing request/reply over - * JMS. By default Camel checks once per second. But if you must react faster when a timeout occurs, - * then you can lower this interval, to check more frequently. The timeout is determined by the - * option requestTimeout. - */ - public fun requestTimeoutCheckerInterval(requestTimeoutCheckerInterval: String) { - it.property("requestTimeoutCheckerInterval", requestTimeoutCheckerInterval) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * A pluggable TemporaryQueueResolver that allows you to use your own resolver for creating - * temporary queues (some messaging systems has special requirements for creating temporary queues). - */ - public fun temporaryQueueResolver(temporaryQueueResolver: String) { - it.property("temporaryQueueResolver", temporaryQueueResolver) - } - - /** - * If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the - * consumer side, then the caused Exception will be send back in response as a - * jakarta.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows - * you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable - * robust routing. Notice that if you also have transferExchange enabled, this option takes - * precedence. The caught exception is required to be serializable. The original Exception on the - * consumer side can be wrapped in an outer exception such as org.apache.camel.RuntimeCamelException - * when returned to the producer. Use this with caution as the data is using Java Object - * serialization and requires the received to be able to deserialize the data at Class level, which - * forces a strong coupling between the producers and consumer! - */ - public fun transferException(transferException: String) { - it.property("transferException", transferException) - } - - /** - * If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the - * consumer side, then the caused Exception will be send back in response as a - * jakarta.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows - * you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable - * robust routing. Notice that if you also have transferExchange enabled, this option takes - * precedence. The caught exception is required to be serializable. The original Exception on the - * consumer side can be wrapped in an outer exception such as org.apache.camel.RuntimeCamelException - * when returned to the producer. Use this with caution as the data is using Java Object - * serialization and requires the received to be able to deserialize the data at Class level, which - * forces a strong coupling between the producers and consumer! - */ - public fun transferException(transferException: Boolean) { - it.property("transferException", transferException.toString()) - } - - /** - * You can transfer the exchange over the wire instead of just the body and headers. The following - * fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, - * exchange properties, exchange exception. This requires that the objects are serializable. Camel - * will exclude any non-serializable objects and log it at WARN level. You must enable this option on - * both the producer and consumer side, so Camel knows the payloads is an Exchange and not a regular - * payload. Use this with caution as the data is using Java Object serialization and requires the - * receiver to be able to deserialize the data at Class level, which forces a strong coupling between - * the producers and consumers having to use compatible Camel versions! - */ - public fun transferExchange(transferExchange: String) { - it.property("transferExchange", transferExchange) - } - - /** - * You can transfer the exchange over the wire instead of just the body and headers. The following - * fields are transferred: In body, Out body, Fault body, In headers, Out headers, Fault headers, - * exchange properties, exchange exception. This requires that the objects are serializable. Camel - * will exclude any non-serializable objects and log it at WARN level. You must enable this option on - * both the producer and consumer side, so Camel knows the payloads is an Exchange and not a regular - * payload. Use this with caution as the data is using Java Object serialization and requires the - * receiver to be able to deserialize the data at Class level, which forces a strong coupling between - * the producers and consumers having to use compatible Camel versions! - */ - public fun transferExchange(transferExchange: Boolean) { - it.property("transferExchange", transferExchange.toString()) - } - - /** - * Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. - */ - public fun useMessageIDAsCorrelationID(useMessageIDAsCorrelationID: String) { - it.property("useMessageIDAsCorrelationID", useMessageIDAsCorrelationID) - } - - /** - * Specifies whether JMSMessageID should always be used as JMSCorrelationID for InOut messages. - */ - public fun useMessageIDAsCorrelationID(useMessageIDAsCorrelationID: Boolean) { - it.property("useMessageIDAsCorrelationID", useMessageIDAsCorrelationID.toString()) - } - - /** - * Number of times to wait for provisional correlation id to be updated to the actual correlation - * id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. - */ - public - fun waitForProvisionCorrelationToBeUpdatedCounter(waitForProvisionCorrelationToBeUpdatedCounter: String) { - it.property("waitForProvisionCorrelationToBeUpdatedCounter", - waitForProvisionCorrelationToBeUpdatedCounter) - } - - /** - * Number of times to wait for provisional correlation id to be updated to the actual correlation - * id when doing request/reply over JMS and when the option useMessageIDAsCorrelationID is enabled. - */ - public - fun waitForProvisionCorrelationToBeUpdatedCounter(waitForProvisionCorrelationToBeUpdatedCounter: Int) { - it.property("waitForProvisionCorrelationToBeUpdatedCounter", - waitForProvisionCorrelationToBeUpdatedCounter.toString()) - } - - /** - * Interval in millis to sleep each time while waiting for provisional correlation id to be - * updated. - */ - public - fun waitForProvisionCorrelationToBeUpdatedThreadSleepingTime(waitForProvisionCorrelationToBeUpdatedThreadSleepingTime: String) { - it.property("waitForProvisionCorrelationToBeUpdatedThreadSleepingTime", - waitForProvisionCorrelationToBeUpdatedThreadSleepingTime) - } - - /** - * Number of times to wait for temporary replyTo queue to be created and ready when doing - * request/reply over JMS. - */ - public - fun waitForTemporaryReplyToToBeUpdatedCounter(waitForTemporaryReplyToToBeUpdatedCounter: String) { - it.property("waitForTemporaryReplyToToBeUpdatedCounter", - waitForTemporaryReplyToToBeUpdatedCounter) - } - - /** - * Number of times to wait for temporary replyTo queue to be created and ready when doing - * request/reply over JMS. - */ - public - fun waitForTemporaryReplyToToBeUpdatedCounter(waitForTemporaryReplyToToBeUpdatedCounter: Int) { - it.property("waitForTemporaryReplyToToBeUpdatedCounter", - waitForTemporaryReplyToToBeUpdatedCounter.toString()) - } - - /** - * Interval in millis to sleep each time while waiting for temporary replyTo queue to be ready. - */ - public - fun waitForTemporaryReplyToToBeUpdatedThreadSleepingTime(waitForTemporaryReplyToToBeUpdatedThreadSleepingTime: String) { - it.property("waitForTemporaryReplyToToBeUpdatedThreadSleepingTime", - waitForTemporaryReplyToToBeUpdatedThreadSleepingTime) - } - - /** - * Allows to configure the default errorHandler logging level for logging uncaught exceptions. - */ - public fun errorHandlerLoggingLevel(errorHandlerLoggingLevel: String) { - it.property("errorHandlerLoggingLevel", errorHandlerLoggingLevel) - } - - /** - * Allows to control whether stack-traces should be logged or not, by the default errorHandler. - */ - public fun errorHandlerLogStackTrace(errorHandlerLogStackTrace: String) { - it.property("errorHandlerLogStackTrace", errorHandlerLogStackTrace) - } - - /** - * Allows to control whether stack-traces should be logged or not, by the default errorHandler. - */ - public fun errorHandlerLogStackTrace(errorHandlerLogStackTrace: Boolean) { - it.property("errorHandlerLogStackTrace", errorHandlerLogStackTrace.toString()) - } - - /** - * Password to use with the ConnectionFactory. You can also configure username/password directly - * on the ConnectionFactory. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Username to use with the ConnectionFactory. You can also configure username/password directly - * on the ConnectionFactory. - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * Specifies whether to use transacted mode - */ - public fun transacted(transacted: String) { - it.property("transacted", transacted) - } - - /** - * Specifies whether to use transacted mode - */ - public fun transacted(transacted: Boolean) { - it.property("transacted", transacted.toString()) - } - - /** - * Specifies whether InOut operations (request reply) default to using transacted mode If this - * flag is set to true, then Spring JmsTemplate will have sessionTransacted set to true, and the - * acknowledgeMode as transacted on the JmsTemplate used for InOut operations. Note from Spring JMS: - * that within a JTA transaction, the parameters passed to createQueue, createTopic methods are not - * taken into account. Depending on the Java EE transaction context, the container makes its own - * decisions on these values. Analogously, these parameters are not taken into account within a - * locally managed transaction either, since Spring JMS operates on an existing JMS Session in this - * case. Setting this flag to true will use a short local JMS transaction when running outside of a - * managed transaction, and a synchronized local JMS transaction in case of a managed transaction - * (other than an XA transaction) being present. This has the effect of a local JMS transaction being - * managed alongside the main transaction (which might be a native JDBC transaction), with the JMS - * transaction committing right after the main transaction. - */ - public fun transactedInOut(transactedInOut: String) { - it.property("transactedInOut", transactedInOut) - } - - /** - * Specifies whether InOut operations (request reply) default to using transacted mode If this - * flag is set to true, then Spring JmsTemplate will have sessionTransacted set to true, and the - * acknowledgeMode as transacted on the JmsTemplate used for InOut operations. Note from Spring JMS: - * that within a JTA transaction, the parameters passed to createQueue, createTopic methods are not - * taken into account. Depending on the Java EE transaction context, the container makes its own - * decisions on these values. Analogously, these parameters are not taken into account within a - * locally managed transaction either, since Spring JMS operates on an existing JMS Session in this - * case. Setting this flag to true will use a short local JMS transaction when running outside of a - * managed transaction, and a synchronized local JMS transaction in case of a managed transaction - * (other than an XA transaction) being present. This has the effect of a local JMS transaction being - * managed alongside the main transaction (which might be a native JDBC transaction), with the JMS - * transaction committing right after the main transaction. - */ - public fun transactedInOut(transactedInOut: Boolean) { - it.property("transactedInOut", transactedInOut.toString()) - } - - /** - * If true, Camel will create a JmsTransactionManager, if there is no transactionManager injected - * when option transacted=true. - */ - public fun lazyCreateTransactionManager(lazyCreateTransactionManager: String) { - it.property("lazyCreateTransactionManager", lazyCreateTransactionManager) - } - - /** - * If true, Camel will create a JmsTransactionManager, if there is no transactionManager injected - * when option transacted=true. - */ - public fun lazyCreateTransactionManager(lazyCreateTransactionManager: Boolean) { - it.property("lazyCreateTransactionManager", lazyCreateTransactionManager.toString()) - } - - /** - * The Spring transaction manager to use. - */ - public fun transactionManager(transactionManager: String) { - it.property("transactionManager", transactionManager) - } - - /** - * The name of the transaction to use. - */ - public fun transactionName(transactionName: String) { - it.property("transactionName", transactionName) - } - - /** - * The timeout value of the transaction (in seconds), if using transacted mode. - */ - public fun transactionTimeout(transactionTimeout: String) { - it.property("transactionTimeout", transactionTimeout) - } - - /** - * The timeout value of the transaction (in seconds), if using transacted mode. - */ - public fun transactionTimeout(transactionTimeout: Int) { - it.property("transactionTimeout", transactionTimeout.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JmxUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JmxUriDsl.kt deleted file mode 100644 index 91c6f19e0bd82..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JmxUriDsl.kt +++ /dev/null @@ -1,404 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Double -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Receive JMX notifications. - */ -public fun UriDsl.jmx(i: JmxUriDsl.() -> Unit) { - JmxUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JmxUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jmx") - } - - private var serverURL: String = "" - - /** - * Server url comes from the remaining endpoint. Use platform to connect to local JVM. - */ - public fun serverURL(serverURL: String) { - this.serverURL = serverURL - it.url("$serverURL") - } - - /** - * Format for the message body. Either xml or raw. If xml, the notification is serialized to xml. - * If raw, then the raw java object is set as the body. - */ - public fun format(format: String) { - it.property("format", format) - } - - /** - * The frequency to poll the bean to check the monitor (monitor types only). - */ - public fun granularityPeriod(granularityPeriod: String) { - it.property("granularityPeriod", granularityPeriod) - } - - /** - * The type of monitor to create. One of string, gauge, counter (monitor types only). - */ - public fun monitorType(monitorType: String) { - it.property("monitorType", monitorType) - } - - /** - * The domain for the mbean you're connecting to - */ - public fun objectDomain(objectDomain: String) { - it.property("objectDomain", objectDomain) - } - - /** - * The name key for the mbean you're connecting to. This value is mutually exclusive with the - * object properties that get passed. - */ - public fun objectName(objectName: String) { - it.property("objectName", objectName) - } - - /** - * The attribute to observe for the monitor bean or consumer. - */ - public fun observedAttribute(observedAttribute: String) { - it.property("observedAttribute", observedAttribute) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * To use a custom shared thread pool for the consumers. By default each consume has their own - * thread-pool to process and route notifications. - */ - public fun executorService(executorService: String) { - it.property("executorService", executorService) - } - - /** - * Value to handback to the listener when a notification is received. This value will be put in - * the message header with the key JMXConstants#JMX_HANDBACK. - */ - public fun handback(handback: String) { - it.property("handback", handback) - } - - /** - * Reference to a bean that implements the NotificationFilter. - */ - public fun notificationFilter(notificationFilter: String) { - it.property("notificationFilter", notificationFilter) - } - - /** - * Properties for the object name. These values will be used if the objectName param is not set - */ - public fun objectProperties(objectProperties: String) { - it.property("objectProperties", objectProperties) - } - - /** - * The number of seconds to wait before attempting to retry establishment of the initial - * connection or attempt to reconnect a lost connection - */ - public fun reconnectDelay(reconnectDelay: String) { - it.property("reconnectDelay", reconnectDelay) - } - - /** - * The number of seconds to wait before attempting to retry establishment of the initial - * connection or attempt to reconnect a lost connection - */ - public fun reconnectDelay(reconnectDelay: Int) { - it.property("reconnectDelay", reconnectDelay.toString()) - } - - /** - * If true the consumer will attempt to reconnect to the JMX server when any connection failure - * occurs. The consumer will attempt to re-establish the JMX connection every 'x' seconds until the - * connection is made-- where 'x' is the configured reconnectionDelay - */ - public fun reconnectOnConnectionFailure(reconnectOnConnectionFailure: String) { - it.property("reconnectOnConnectionFailure", reconnectOnConnectionFailure) - } - - /** - * If true the consumer will attempt to reconnect to the JMX server when any connection failure - * occurs. The consumer will attempt to re-establish the JMX connection every 'x' seconds until the - * connection is made-- where 'x' is the configured reconnectionDelay - */ - public fun reconnectOnConnectionFailure(reconnectOnConnectionFailure: Boolean) { - it.property("reconnectOnConnectionFailure", reconnectOnConnectionFailure.toString()) - } - - /** - * If true the consumer will throw an exception if unable to establish the JMX connection upon - * startup. If false, the consumer will attempt to establish the JMX connection every 'x' seconds - * until the connection is made -- where 'x' is the configured reconnectionDelay - */ - public fun testConnectionOnStartup(testConnectionOnStartup: String) { - it.property("testConnectionOnStartup", testConnectionOnStartup) - } - - /** - * If true the consumer will throw an exception if unable to establish the JMX connection upon - * startup. If false, the consumer will attempt to establish the JMX connection every 'x' seconds - * until the connection is made -- where 'x' is the configured reconnectionDelay - */ - public fun testConnectionOnStartup(testConnectionOnStartup: Boolean) { - it.property("testConnectionOnStartup", testConnectionOnStartup.toString()) - } - - /** - * Initial threshold for the monitor. The value must exceed this before notifications are fired - * (counter monitor only). - */ - public fun initThreshold(initThreshold: String) { - it.property("initThreshold", initThreshold) - } - - /** - * Initial threshold for the monitor. The value must exceed this before notifications are fired - * (counter monitor only). - */ - public fun initThreshold(initThreshold: Int) { - it.property("initThreshold", initThreshold.toString()) - } - - /** - * The value at which the counter is reset to zero (counter monitor only). - */ - public fun modulus(modulus: String) { - it.property("modulus", modulus) - } - - /** - * The value at which the counter is reset to zero (counter monitor only). - */ - public fun modulus(modulus: Int) { - it.property("modulus", modulus.toString()) - } - - /** - * The amount to increment the threshold after it's been exceeded (counter monitor only). - */ - public fun offset(offset: String) { - it.property("offset", offset) - } - - /** - * The amount to increment the threshold after it's been exceeded (counter monitor only). - */ - public fun offset(offset: Int) { - it.property("offset", offset.toString()) - } - - /** - * If true, then the value reported in the notification is the difference from the threshold as - * opposed to the value itself (counter and gauge monitor only). - */ - public fun differenceMode(differenceMode: String) { - it.property("differenceMode", differenceMode) - } - - /** - * If true, then the value reported in the notification is the difference from the threshold as - * opposed to the value itself (counter and gauge monitor only). - */ - public fun differenceMode(differenceMode: Boolean) { - it.property("differenceMode", differenceMode.toString()) - } - - /** - * If true, the gauge will fire a notification when the high threshold is exceeded (gauge monitor - * only). - */ - public fun notifyHigh(notifyHigh: String) { - it.property("notifyHigh", notifyHigh) - } - - /** - * If true, the gauge will fire a notification when the high threshold is exceeded (gauge monitor - * only). - */ - public fun notifyHigh(notifyHigh: Boolean) { - it.property("notifyHigh", notifyHigh.toString()) - } - - /** - * If true, the gauge will fire a notification when the low threshold is exceeded (gauge monitor - * only). - */ - public fun notifyLow(notifyLow: String) { - it.property("notifyLow", notifyLow) - } - - /** - * If true, the gauge will fire a notification when the low threshold is exceeded (gauge monitor - * only). - */ - public fun notifyLow(notifyLow: Boolean) { - it.property("notifyLow", notifyLow.toString()) - } - - /** - * Value for the gauge's high threshold (gauge monitor only). - */ - public fun thresholdHigh(thresholdHigh: String) { - it.property("thresholdHigh", thresholdHigh) - } - - /** - * Value for the gauge's high threshold (gauge monitor only). - */ - public fun thresholdHigh(thresholdHigh: Double) { - it.property("thresholdHigh", thresholdHigh.toString()) - } - - /** - * Value for the gauge's low threshold (gauge monitor only). - */ - public fun thresholdLow(thresholdLow: String) { - it.property("thresholdLow", thresholdLow) - } - - /** - * Value for the gauge's low threshold (gauge monitor only). - */ - public fun thresholdLow(thresholdLow: Double) { - it.property("thresholdLow", thresholdLow.toString()) - } - - /** - * Credentials for making a remote connection - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Credentials for making a remote connection - */ - public fun user(user: String) { - it.property("user", user) - } - - /** - * If true, will fire a notification when the string attribute differs from the string to compare - * (string monitor or consumer). By default the consumer will notify match if observed attribute and - * string to compare has been configured. - */ - public fun notifyDiffer(notifyDiffer: String) { - it.property("notifyDiffer", notifyDiffer) - } - - /** - * If true, will fire a notification when the string attribute differs from the string to compare - * (string monitor or consumer). By default the consumer will notify match if observed attribute and - * string to compare has been configured. - */ - public fun notifyDiffer(notifyDiffer: Boolean) { - it.property("notifyDiffer", notifyDiffer.toString()) - } - - /** - * If true, will fire a notification when the string attribute matches the string to compare - * (string monitor or consumer). By default the consumer will notify match if observed attribute and - * string to compare has been configured. - */ - public fun notifyMatch(notifyMatch: String) { - it.property("notifyMatch", notifyMatch) - } - - /** - * If true, will fire a notification when the string attribute matches the string to compare - * (string monitor or consumer). By default the consumer will notify match if observed attribute and - * string to compare has been configured. - */ - public fun notifyMatch(notifyMatch: Boolean) { - it.property("notifyMatch", notifyMatch.toString()) - } - - /** - * Value for attribute to compare (string monitor or consumer). By default the consumer will - * notify match if observed attribute and string to compare has been configured. - */ - public fun stringToCompare(stringToCompare: String) { - it.property("stringToCompare", stringToCompare) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JoltUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JoltUriDsl.kt deleted file mode 100644 index 85295ce90e978..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JoltUriDsl.kt +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * JSON to JSON transformation using JOLT. - */ -public fun UriDsl.jolt(i: JoltUriDsl.() -> Unit) { - JoltUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JoltUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jolt") - } - - private var resourceUri: String = "" - - /** - * Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file - * and http loads the resource using these protocols (classpath is default). ref will lookup the - * resource in the registry. bean will call a method on a bean to be used as the resource. For bean - * you can specify the method name after dot, eg bean:myBean.myMethod. - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: String) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: Boolean) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader.toString()) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * Specifies if the input is hydrated JSON or a JSON String. - */ - public fun inputType(inputType: String) { - it.property("inputType", inputType) - } - - /** - * Specifies if the output should be hydrated JSON or a JSON String. - */ - public fun outputType(outputType: String) { - it.property("outputType", outputType) - } - - /** - * Specifies the Transform DSL of the endpoint resource. If none is specified Chainr will be used. - */ - public fun transformDsl(transformDsl: String) { - it.property("transformDsl", transformDsl) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JooqUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JooqUriDsl.kt deleted file mode 100644 index e500ff95c585f..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JooqUriDsl.kt +++ /dev/null @@ -1,364 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Store and retrieve Java objects from an SQL database using JOOQ. - */ -public fun UriDsl.jooq(i: JooqUriDsl.() -> Unit) { - JooqUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JooqUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jooq") - } - - private var entityType: String = "" - - /** - * JOOQ entity class - */ - public fun entityType(entityType: String) { - this.entityType = entityType - it.url("$entityType") - } - - /** - * To use a specific database configuration - */ - public fun databaseConfiguration(databaseConfiguration: String) { - it.property("databaseConfiguration", databaseConfiguration) - } - - /** - * Delete entity after it is consumed - */ - public fun consumeDelete(consumeDelete: String) { - it.property("consumeDelete", consumeDelete) - } - - /** - * Delete entity after it is consumed - */ - public fun consumeDelete(consumeDelete: Boolean) { - it.property("consumeDelete", consumeDelete.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Type of operation to execute on query - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * To execute plain SQL query - */ - public fun query(query: String) { - it.property("query", query) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JpaUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JpaUriDsl.kt deleted file mode 100644 index 3acc45b48a741..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JpaUriDsl.kt +++ /dev/null @@ -1,673 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Store and retrieve Java objects from databases using Java Persistence API (JPA). - */ -public fun UriDsl.jpa(i: JpaUriDsl.() -> Unit) { - JpaUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JpaUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jpa") - } - - private var entityType: String = "" - - /** - * Entity class name - */ - public fun entityType(entityType: String) { - this.entityType = entityType - it.url("$entityType") - } - - /** - * The camel-jpa component will join transaction by default. You can use this option to turn this - * off, for example, if you use LOCAL_RESOURCE and join transaction doesn't work with your JPA - * provider. This option can also be set globally on the JpaComponent, instead of having to set it on - * all endpoints. - */ - public fun joinTransaction(joinTransaction: String) { - it.property("joinTransaction", joinTransaction) - } - - /** - * The camel-jpa component will join transaction by default. You can use this option to turn this - * off, for example, if you use LOCAL_RESOURCE and join transaction doesn't work with your JPA - * provider. This option can also be set globally on the JpaComponent, instead of having to set it on - * all endpoints. - */ - public fun joinTransaction(joinTransaction: Boolean) { - it.property("joinTransaction", joinTransaction.toString()) - } - - /** - * Set the maximum number of results to retrieve on the Query. - */ - public fun maximumResults(maximumResults: String) { - it.property("maximumResults", maximumResults) - } - - /** - * Set the maximum number of results to retrieve on the Query. - */ - public fun maximumResults(maximumResults: Int) { - it.property("maximumResults", maximumResults.toString()) - } - - /** - * To use a named query. - */ - public fun namedQuery(namedQuery: String) { - it.property("namedQuery", namedQuery) - } - - /** - * To use a custom native query. You may want to use the option resultClass also when using native - * queries. - */ - public fun nativeQuery(nativeQuery: String) { - it.property("nativeQuery", nativeQuery) - } - - /** - * The JPA persistence unit used by default. - */ - public fun persistenceUnit(persistenceUnit: String) { - it.property("persistenceUnit", persistenceUnit) - } - - /** - * To use a custom query. - */ - public fun query(query: String) { - it.property("query", query) - } - - /** - * Defines the type of the returned payload (we will call - * entityManager.createNativeQuery(nativeQuery, resultClass) instead of - * entityManager.createNativeQuery(nativeQuery)). Without this option, we will return an object - * array. Only has an effect when using in conjunction with a native query when consuming data. - */ - public fun resultClass(resultClass: String) { - it.property("resultClass", resultClass) - } - - /** - * If true, the entity is deleted after it is consumed; if false, the entity is not deleted. - */ - public fun consumeDelete(consumeDelete: String) { - it.property("consumeDelete", consumeDelete) - } - - /** - * If true, the entity is deleted after it is consumed; if false, the entity is not deleted. - */ - public fun consumeDelete(consumeDelete: Boolean) { - it.property("consumeDelete", consumeDelete.toString()) - } - - /** - * Specifies whether to set an exclusive lock on each entity bean while processing the results - * from polling. - */ - public fun consumeLockEntity(consumeLockEntity: String) { - it.property("consumeLockEntity", consumeLockEntity) - } - - /** - * Specifies whether to set an exclusive lock on each entity bean while processing the results - * from polling. - */ - public fun consumeLockEntity(consumeLockEntity: Boolean) { - it.property("consumeLockEntity", consumeLockEntity.toString()) - } - - /** - * To use a custom DeleteHandler to delete the row after the consumer is done processing the - * exchange - */ - public fun deleteHandler(deleteHandler: String) { - it.property("deleteHandler", deleteHandler) - } - - /** - * To configure the lock mode on the consumer. - */ - public fun lockModeType(lockModeType: String) { - it.property("lockModeType", lockModeType) - } - - /** - * An integer value to define the maximum number of messages to gather per poll. By default, no - * maximum is set. It can be used to avoid polling many thousands of messages when starting up the - * server. Set a value of 0 or negative to disable. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * An integer value to define the maximum number of messages to gather per poll. By default, no - * maximum is set. It can be used to avoid polling many thousands of messages when starting up the - * server. Set a value of 0 or negative to disable. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * To use a custom Pre-DeleteHandler to delete the row after the consumer has read the entity. - */ - public fun preDeleteHandler(preDeleteHandler: String) { - it.property("preDeleteHandler", preDeleteHandler) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * To configure whether to use NOWAIT on lock and silently skip the entity. - */ - public fun skipLockedEntity(skipLockedEntity: String) { - it.property("skipLockedEntity", skipLockedEntity) - } - - /** - * To configure whether to use NOWAIT on lock and silently skip the entity. - */ - public fun skipLockedEntity(skipLockedEntity: Boolean) { - it.property("skipLockedEntity", skipLockedEntity.toString()) - } - - /** - * Whether to run the consumer in transacted mode, by which all messages will either commit or - * rollback, when the entire batch has been processed. The default behavior (false) is to commit all - * the previously successfully processed messages, and only roll back the last failed message. - */ - public fun transacted(transacted: String) { - it.property("transacted", transacted) - } - - /** - * Whether to run the consumer in transacted mode, by which all messages will either commit or - * rollback, when the entire batch has been processed. The default behavior (false) is to commit all - * the previously successfully processed messages, and only roll back the last failed message. - */ - public fun transacted(transacted: Boolean) { - it.property("transacted", transacted.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * This key/value mapping is used for building the query parameters. It is expected to be of the - * generic type java.util.Map where the keys are the named parameters of a given JPA query and the - * values are their corresponding effective values you want to select for. When it's used for - * producer, Simple expression can be used as a parameter value. It allows you to retrieve parameter - * values from the message body, header and etc. - */ - public fun parameters(parameters: String) { - it.property("parameters", parameters) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * If enabled, then the producer will find a single entity by using the message body as a key and - * entityType as the class type. This can be used instead of a query to find a single entity. - */ - public fun findEntity(findEntity: String) { - it.property("findEntity", findEntity) - } - - /** - * If enabled, then the producer will find a single entity by using the message body as a key and - * entityType as the class type. This can be used instead of a query to find a single entity. - */ - public fun findEntity(findEntity: Boolean) { - it.property("findEntity", findEntity.toString()) - } - - /** - * Set the position of the first result to retrieve. - */ - public fun firstResult(firstResult: String) { - it.property("firstResult", firstResult) - } - - /** - * Set the position of the first result to retrieve. - */ - public fun firstResult(firstResult: Int) { - it.property("firstResult", firstResult.toString()) - } - - /** - * Flushes the EntityManager after the entity bean has been persisted. - */ - public fun flushOnSend(flushOnSend: String) { - it.property("flushOnSend", flushOnSend) - } - - /** - * Flushes the EntityManager after the entity bean has been persisted. - */ - public fun flushOnSend(flushOnSend: Boolean) { - it.property("flushOnSend", flushOnSend.toString()) - } - - /** - * To put the query (or find) result in a header or property instead of the body. If the value - * starts with the prefix property:, put the result into the so named property, otherwise into the - * header. - */ - public fun outputTarget(outputTarget: String) { - it.property("outputTarget", outputTarget) - } - - /** - * Indicates to use entityManager.remove(entity). - */ - public fun remove(remove: String) { - it.property("remove", remove) - } - - /** - * Indicates to use entityManager.remove(entity). - */ - public fun remove(remove: Boolean) { - it.property("remove", remove.toString()) - } - - /** - * If enabled, a query or a find which would return no results or more than one result, will throw - * an exception instead. - */ - public fun singleResult(singleResult: String) { - it.property("singleResult", singleResult) - } - - /** - * If enabled, a query or a find which would return no results or more than one result, will throw - * an exception instead. - */ - public fun singleResult(singleResult: Boolean) { - it.property("singleResult", singleResult.toString()) - } - - /** - * To configure whether to use executeUpdate() when producer executes a query. When you use - * INSERT, UPDATE or a DELETE statement as a named query, you need to specify this option to 'true'. - */ - public fun useExecuteUpdate(useExecuteUpdate: String) { - it.property("useExecuteUpdate", useExecuteUpdate) - } - - /** - * To configure whether to use executeUpdate() when producer executes a query. When you use - * INSERT, UPDATE or a DELETE statement as a named query, you need to specify this option to 'true'. - */ - public fun useExecuteUpdate(useExecuteUpdate: Boolean) { - it.property("useExecuteUpdate", useExecuteUpdate.toString()) - } - - /** - * Indicates to use entityManager.persist(entity) instead of entityManager.merge(entity). Note: - * entityManager.persist(entity) doesn't work for detached entities (where the EntityManager has to - * execute an UPDATE instead of an INSERT query)! - */ - public fun usePersist(usePersist: String) { - it.property("usePersist", usePersist) - } - - /** - * Indicates to use entityManager.persist(entity) instead of entityManager.merge(entity). Note: - * entityManager.persist(entity) doesn't work for detached entities (where the EntityManager has to - * execute an UPDATE instead of an INSERT query)! - */ - public fun usePersist(usePersist: Boolean) { - it.property("usePersist", usePersist.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * If set to true, then Camel will use the EntityManager from the header - * JpaConstants.ENTITY_MANAGER instead of the configured entity manager on the component/endpoint. - * This allows end users to control which entity manager will be in use. - */ - public fun usePassedInEntityManager(usePassedInEntityManager: String) { - it.property("usePassedInEntityManager", usePassedInEntityManager) - } - - /** - * If set to true, then Camel will use the EntityManager from the header - * JpaConstants.ENTITY_MANAGER instead of the configured entity manager on the component/endpoint. - * This allows end users to control which entity manager will be in use. - */ - public fun usePassedInEntityManager(usePassedInEntityManager: Boolean) { - it.property("usePassedInEntityManager", usePassedInEntityManager.toString()) - } - - /** - * Additional properties for the entity manager to use. - */ - public fun entityManagerProperties(entityManagerProperties: String) { - it.property("entityManagerProperties", entityManagerProperties) - } - - /** - * Whether to use Spring's SharedEntityManager for the consumer/producer. Note in most cases, - * joinTransaction should be set to false as this is not an EXTENDED EntityManager. - */ - public fun sharedEntityManager(sharedEntityManager: String) { - it.property("sharedEntityManager", sharedEntityManager) - } - - /** - * Whether to use Spring's SharedEntityManager for the consumer/producer. Note in most cases, - * joinTransaction should be set to false as this is not an EXTENDED EntityManager. - */ - public fun sharedEntityManager(sharedEntityManager: Boolean) { - it.property("sharedEntityManager", sharedEntityManager.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsltUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsltUriDsl.kt deleted file mode 100644 index 39859b9b12ac2..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsltUriDsl.kt +++ /dev/null @@ -1,166 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Query or transform JSON payloads using JSLT. - */ -public fun UriDsl.jslt(i: JsltUriDsl.() -> Unit) { - JsltUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JsltUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jslt") - } - - private var resourceUri: String = "" - - /** - * Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file - * and http loads the resource using these protocols (classpath is default). ref will lookup the - * resource in the registry. bean will call a method on a bean to be used as the resource. For bean - * you can specify the method name after dot, eg bean:myBean.myMethod. - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: String) { - it.property("allowContextMapAll", allowContextMapAll) - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: Boolean) { - it.property("allowContextMapAll", allowContextMapAll.toString()) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: String) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: Boolean) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader.toString()) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * If true, the mapper will use the USE_BIG_DECIMAL_FOR_FLOATS in serialization features - */ - public fun mapBigDecimalAsFloats(mapBigDecimalAsFloats: String) { - it.property("mapBigDecimalAsFloats", mapBigDecimalAsFloats) - } - - /** - * If true, the mapper will use the USE_BIG_DECIMAL_FOR_FLOATS in serialization features - */ - public fun mapBigDecimalAsFloats(mapBigDecimalAsFloats: Boolean) { - it.property("mapBigDecimalAsFloats", mapBigDecimalAsFloats.toString()) - } - - /** - * Setting a custom JSON Object Mapper to be used - */ - public fun objectMapper(objectMapper: String) { - it.property("objectMapper", objectMapper) - } - - /** - * If true, JSON in output message is pretty printed. - */ - public fun prettyPrint(prettyPrint: String) { - it.property("prettyPrint", prettyPrint) - } - - /** - * If true, JSON in output message is pretty printed. - */ - public fun prettyPrint(prettyPrint: Boolean) { - it.property("prettyPrint", prettyPrint.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsonPatchUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsonPatchUriDsl.kt deleted file mode 100644 index bc59f2026244a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsonPatchUriDsl.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Transforms JSON using JSON patch (RFC 6902). - */ -public fun UriDsl.`json-patch`(i: JsonPatchUriDsl.() -> Unit) { - JsonPatchUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JsonPatchUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("json-patch") - } - - private var resourceUri: String = "" - - /** - * Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file - * and http loads the resource using these protocols (classpath is default). ref will lookup the - * resource in the registry. bean will call a method on a bean to be used as the resource. For bean - * you can specify the method name after dot, eg bean:myBean.myMethod. - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: String) { - it.property("allowContextMapAll", allowContextMapAll) - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: Boolean) { - it.property("allowContextMapAll", allowContextMapAll.toString()) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsonValidatorUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsonValidatorUriDsl.kt deleted file mode 100644 index 61e4301a7db77..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsonValidatorUriDsl.kt +++ /dev/null @@ -1,188 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Validate JSON payloads using NetworkNT JSON Schema. - */ -public fun UriDsl.`json-validator`(i: JsonValidatorUriDsl.() -> Unit) { - JsonValidatorUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JsonValidatorUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("json-validator") - } - - private var resourceUri: String = "" - - /** - * Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file - * and http loads the resource using these protocols (classpath is default). ref will lookup the - * resource in the registry. bean will call a method on a bean to be used as the resource. For bean - * you can specify the method name after dot, eg bean:myBean.myMethod. - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: String) { - it.property("allowContextMapAll", allowContextMapAll) - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: Boolean) { - it.property("allowContextMapAll", allowContextMapAll.toString()) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * Whether to fail if no body exists. - */ - public fun failOnNullBody(failOnNullBody: String) { - it.property("failOnNullBody", failOnNullBody) - } - - /** - * Whether to fail if no body exists. - */ - public fun failOnNullBody(failOnNullBody: Boolean) { - it.property("failOnNullBody", failOnNullBody.toString()) - } - - /** - * Whether to fail if no header exists when validating against a header. - */ - public fun failOnNullHeader(failOnNullHeader: String) { - it.property("failOnNullHeader", failOnNullHeader) - } - - /** - * Whether to fail if no header exists when validating against a header. - */ - public fun failOnNullHeader(failOnNullHeader: Boolean) { - it.property("failOnNullHeader", failOnNullHeader.toString()) - } - - /** - * To validate against a header instead of the message body. - */ - public fun headerName(headerName: String) { - it.property("headerName", headerName) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Comma-separated list of Jackson DeserializationFeature enum values which will be disabled for - * parsing exchange body - */ - public fun disabledDeserializationFeatures(disabledDeserializationFeatures: String) { - it.property("disabledDeserializationFeatures", disabledDeserializationFeatures) - } - - /** - * Comma-separated list of Jackson DeserializationFeature enum values which will be enabled for - * parsing exchange body - */ - public fun enabledDeserializationFeatures(enabledDeserializationFeatures: String) { - it.property("enabledDeserializationFeatures", enabledDeserializationFeatures) - } - - /** - * To use a custom ValidatorErrorHandler. The default error handler captures the errors and throws - * an exception. - */ - public fun errorHandler(errorHandler: String) { - it.property("errorHandler", errorHandler) - } - - /** - * The used Jackson object mapper - */ - public fun objectMapper(objectMapper: String) { - it.property("objectMapper", objectMapper) - } - - /** - * To use a custom schema loader allowing for adding custom format validation. The default - * implementation will create a schema loader that tries to determine the schema version from the - * $schema property of the specified schema. - */ - public fun uriSchemaLoader(uriSchemaLoader: String) { - it.property("uriSchemaLoader", uriSchemaLoader) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsonataUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsonataUriDsl.kt deleted file mode 100644 index 9b9a5228acf31..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JsonataUriDsl.kt +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Transforms JSON payload using JSONata transformation. - */ -public fun UriDsl.jsonata(i: JsonataUriDsl.() -> Unit) { - JsonataUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JsonataUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jsonata") - } - - private var resourceUri: String = "" - - /** - * Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file - * and http loads the resource using these protocols (classpath is default). ref will lookup the - * resource in the registry. bean will call a method on a bean to be used as the resource. For bean - * you can specify the method name after dot, eg bean:myBean.myMethod. - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: String) { - it.property("allowContextMapAll", allowContextMapAll) - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: Boolean) { - it.property("allowContextMapAll", allowContextMapAll.toString()) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * Specifies if the input should be Jackson JsonNode or a JSON String. - */ - public fun inputType(inputType: String) { - it.property("inputType", inputType) - } - - /** - * Specifies if the output should be Jackson JsonNode or a JSON String. - */ - public fun outputType(outputType: String) { - it.property("outputType", outputType) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To configure the Jsonata frame binding. Allows custom functions to be added. - */ - public fun frameBinding(frameBinding: String) { - it.property("frameBinding", frameBinding) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Jt400UriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Jt400UriDsl.kt deleted file mode 100644 index a6b061452285e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Jt400UriDsl.kt +++ /dev/null @@ -1,511 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Exchanges messages with an IBM i system using data queues, message queues, or program call. IBM i - * is the replacement for AS/400 and iSeries servers. - */ -public fun UriDsl.jt400(i: Jt400UriDsl.() -> Unit) { - Jt400UriDsl(this).apply(i) -} - -@CamelDslMarker -public class Jt400UriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jt400") - } - - private var userID: String = "" - - private var password: String = "" - - private var systemName: String = "" - - private var objectPath: String = "" - - private var type: String = "" - - /** - * Returns the ID of the IBM i user. - */ - public fun userID(userID: String) { - this.userID = userID - it.url("$userID:$password@$systemName/QSYS.LIB/$objectPath.$type") - } - - /** - * Returns the password of the IBM i user. - */ - public fun password(password: String) { - this.password = password - it.url("$userID:$password@$systemName/QSYS.LIB/$objectPath.$type") - } - - /** - * Returns the name of the IBM i system. - */ - public fun systemName(systemName: String) { - this.systemName = systemName - it.url("$userID:$password@$systemName/QSYS.LIB/$objectPath.$type") - } - - /** - * Returns the fully qualified integrated file system path name of the target object of this - * endpoint. - */ - public fun objectPath(objectPath: String) { - this.objectPath = objectPath - it.url("$userID:$password@$systemName/QSYS.LIB/$objectPath.$type") - } - - /** - * Whether to work with data queues or remote program call - */ - public fun type(type: String) { - this.type = type - it.url("$userID:$password@$systemName/QSYS.LIB/$objectPath.$type") - } - - /** - * Sets the CCSID to use for the connection with the IBM i system. - */ - public fun ccsid(ccsid: String) { - it.property("ccsid", ccsid) - } - - /** - * Sets the CCSID to use for the connection with the IBM i system. - */ - public fun ccsid(ccsid: Int) { - it.property("ccsid", ccsid.toString()) - } - - /** - * Sets the data format for sending messages. - */ - public fun format(format: String) { - it.property("format", format) - } - - /** - * Sets whether IBM i prompting is enabled in the environment running Camel. - */ - public fun guiAvailable(guiAvailable: String) { - it.property("guiAvailable", guiAvailable) - } - - /** - * Sets whether IBM i prompting is enabled in the environment running Camel. - */ - public fun guiAvailable(guiAvailable: Boolean) { - it.property("guiAvailable", guiAvailable.toString()) - } - - /** - * Whether to use keyed or non-keyed data queues. - */ - public fun keyed(keyed: String) { - it.property("keyed", keyed) - } - - /** - * Whether to use keyed or non-keyed data queues. - */ - public fun keyed(keyed: Boolean) { - it.property("keyed", keyed.toString()) - } - - /** - * Search key for keyed data queues. - */ - public fun searchKey(searchKey: String) { - it.property("searchKey", searchKey) - } - - /** - * Action to be taken on messages when read from a message queue. Messages can be marked as old - * (OLD), removed from the queue (REMOVE), or neither (SAME). - */ - public fun messageAction(messageAction: String) { - it.property("messageAction", messageAction) - } - - /** - * Timeout in millis the consumer will wait while trying to read a new message of the data queue. - */ - public fun readTimeout(readTimeout: String) { - it.property("readTimeout", readTimeout) - } - - /** - * Timeout in millis the consumer will wait while trying to read a new message of the data queue. - */ - public fun readTimeout(readTimeout: Int) { - it.property("readTimeout", readTimeout.toString()) - } - - /** - * Search type such as EQ for equal etc. - */ - public fun searchType(searchType: String) { - it.property("searchType", searchType) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * If true, the consumer endpoint will set the Jt400Constants.MESSAGE_REPLYTO_KEY header of the - * camel message for any IBM i inquiry messages received. If that message is then routed to a - * producer endpoint, the action will not be processed as sending a message to the queue, but rather - * a reply to the specific inquiry message. - */ - public fun sendingReply(sendingReply: String) { - it.property("sendingReply", sendingReply) - } - - /** - * If true, the consumer endpoint will set the Jt400Constants.MESSAGE_REPLYTO_KEY header of the - * camel message for any IBM i inquiry messages received. If that message is then routed to a - * producer endpoint, the action will not be processed as sending a message to the queue, but rather - * a reply to the specific inquiry message. - */ - public fun sendingReply(sendingReply: Boolean) { - it.property("sendingReply", sendingReply.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Specifies which fields (program parameters) are output parameters. - */ - public fun outputFieldsIdxArray(outputFieldsIdxArray: String) { - it.property("outputFieldsIdxArray", outputFieldsIdxArray) - } - - /** - * Specifies the fields (program parameters) length as in the IBM i program definition. - */ - public fun outputFieldsLengthArray(outputFieldsLengthArray: String) { - it.property("outputFieldsLengthArray", outputFieldsLengthArray) - } - - /** - * Procedure name from a service program to call - */ - public fun procedureName(procedureName: String) { - it.property("procedureName", procedureName) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Whether connections to IBM i are secured with SSL. - */ - public fun secured(secured: String) { - it.property("secured", secured) - } - - /** - * Whether connections to IBM i are secured with SSL. - */ - public fun secured(secured: Boolean) { - it.property("secured", secured.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JteUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JteUriDsl.kt deleted file mode 100644 index 52a9b2002b78c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/JteUriDsl.kt +++ /dev/null @@ -1,131 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Transform messages using a Java based template engine (JTE). - */ -public fun UriDsl.jte(i: JteUriDsl.() -> Unit) { - JteUriDsl(this).apply(i) -} - -@CamelDslMarker -public class JteUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("jte") - } - - private var resourceUri: String = "" - - /** - * Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file - * and http loads the resource using these protocols (classpath is default). ref will lookup the - * resource in the registry. bean will call a method on a bean to be used as the resource. For bean - * you can specify the method name after dot, eg bean:myBean.myMethod. - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: String) { - it.property("allowContextMapAll", allowContextMapAll) - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: Boolean) { - it.property("allowContextMapAll", allowContextMapAll.toString()) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: String) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: Boolean) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader.toString()) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KafkaUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KafkaUriDsl.kt deleted file mode 100644 index 26639f0d32c3c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KafkaUriDsl.kt +++ /dev/null @@ -1,1563 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Double -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Sent and receive messages to/from an Apache Kafka broker. - */ -public fun UriDsl.kafka(i: KafkaUriDsl.() -> Unit) { - KafkaUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KafkaUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kafka") - } - - private var topic: String = "" - - /** - * Name of the topic to use. On the consumer you can use comma to separate multiple topics. A - * producer can only send a message to a single topic. - */ - public fun topic(topic: String) { - this.topic = topic - it.url("$topic") - } - - /** - * Sets additional properties for either kafka consumer or kafka producer in case they can't be - * set directly on the camel configurations (e.g.: new Kafka properties that are not reflected yet in - * Camel configurations), the properties have to be prefixed with additionalProperties.., e.g.: - * additionalProperties.transactional.id=12345&additionalProperties.schema.registry.url=http://localhost:8811/avro - */ - public fun additionalProperties(additionalProperties: String) { - it.property("additionalProperties", additionalProperties) - } - - /** - * URL of the Kafka brokers to use. The format is host1:port1,host2:port2, and the list can be a - * subset of brokers or a VIP pointing to a subset of brokers. This option is known as - * bootstrap.servers in the Kafka documentation. - */ - public fun brokers(brokers: String) { - it.property("brokers", brokers) - } - - /** - * The client id is a user-specified string sent in each request to help trace calls. It should - * logically identify the application making the request. - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * The maximum amount of time in milliseconds to wait when reconnecting to a broker that has - * repeatedly failed to connect. If provided, the backoff per host will increase exponentially for - * each consecutive connection failure, up to this maximum. After calculating the backoff increase, - * 20% random jitter is added to avoid connection storms. - */ - public fun reconnectBackoffMaxMs(reconnectBackoffMaxMs: String) { - it.property("reconnectBackoffMaxMs", reconnectBackoffMaxMs) - } - - /** - * The maximum amount of time in milliseconds to wait when reconnecting to a broker that has - * repeatedly failed to connect. If provided, the backoff per host will increase exponentially for - * each consecutive connection failure, up to this maximum. After calculating the backoff increase, - * 20% random jitter is added to avoid connection storms. - */ - public fun reconnectBackoffMaxMs(reconnectBackoffMaxMs: Int) { - it.property("reconnectBackoffMaxMs", reconnectBackoffMaxMs.toString()) - } - - /** - * The maximum amount of time in milliseconds to wait when retrying a request to the broker that - * has repeatedly failed. If provided, the backoff per client will increase exponentially for each - * failed request, up to this maximum. To prevent all clients from being synchronized upon retry, a - * randomized jitter with a factor of 0.2 will be applied to the backoff, resulting in the backoff - * falling within a range between 20% below and 20% above the computed value. If retry.backoff.ms is - * set to be higher than retry.backoff.max.ms, then retry.backoff.max.ms will be used as a constant - * backoff from the beginning without any exponential increase - */ - public fun retryBackoffMaxMs(retryBackoffMaxMs: String) { - it.property("retryBackoffMaxMs", retryBackoffMaxMs) - } - - /** - * The maximum amount of time in milliseconds to wait when retrying a request to the broker that - * has repeatedly failed. If provided, the backoff per client will increase exponentially for each - * failed request, up to this maximum. To prevent all clients from being synchronized upon retry, a - * randomized jitter with a factor of 0.2 will be applied to the backoff, resulting in the backoff - * falling within a range between 20% below and 20% above the computed value. If retry.backoff.ms is - * set to be higher than retry.backoff.max.ms, then retry.backoff.max.ms will be used as a constant - * backoff from the beginning without any exponential increase - */ - public fun retryBackoffMaxMs(retryBackoffMaxMs: Int) { - it.property("retryBackoffMaxMs", retryBackoffMaxMs.toString()) - } - - /** - * The amount of time to wait before attempting to retry a failed request to a given topic - * partition. This avoids repeatedly sending requests in a tight loop under some failure scenarios. - * This value is the initial backoff value and will increase exponentially for each failed request, - * up to the retry.backoff.max.ms value. - */ - public fun retryBackoffMs(retryBackoffMs: String) { - it.property("retryBackoffMs", retryBackoffMs) - } - - /** - * The amount of time to wait before attempting to retry a failed request to a given topic - * partition. This avoids repeatedly sending requests in a tight loop under some failure scenarios. - * This value is the initial backoff value and will increase exponentially for each failed request, - * up to the retry.backoff.max.ms value. - */ - public fun retryBackoffMs(retryBackoffMs: Int) { - it.property("retryBackoffMs", retryBackoffMs.toString()) - } - - /** - * Timeout in milliseconds to wait gracefully for the consumer or producer to shut down and - * terminate its worker threads. - */ - public fun shutdownTimeout(shutdownTimeout: String) { - it.property("shutdownTimeout", shutdownTimeout) - } - - /** - * Timeout in milliseconds to wait gracefully for the consumer or producer to shut down and - * terminate its worker threads. - */ - public fun shutdownTimeout(shutdownTimeout: Int) { - it.property("shutdownTimeout", shutdownTimeout.toString()) - } - - /** - * Whether to allow doing manual commits via KafkaManualCommit. If this option is enabled then an - * instance of KafkaManualCommit is stored on the Exchange message header, which allows end users to - * access this API and perform manual offset commits via the Kafka consumer. - */ - public fun allowManualCommit(allowManualCommit: String) { - it.property("allowManualCommit", allowManualCommit) - } - - /** - * Whether to allow doing manual commits via KafkaManualCommit. If this option is enabled then an - * instance of KafkaManualCommit is stored on the Exchange message header, which allows end users to - * access this API and perform manual offset commits via the Kafka consumer. - */ - public fun allowManualCommit(allowManualCommit: Boolean) { - it.property("allowManualCommit", allowManualCommit.toString()) - } - - /** - * If true, periodically commit to ZooKeeper the offset of messages already fetched by the - * consumer. This committed offset will be used when the process fails as the position from which the - * new consumer will begin. - */ - public fun autoCommitEnable(autoCommitEnable: String) { - it.property("autoCommitEnable", autoCommitEnable) - } - - /** - * If true, periodically commit to ZooKeeper the offset of messages already fetched by the - * consumer. This committed offset will be used when the process fails as the position from which the - * new consumer will begin. - */ - public fun autoCommitEnable(autoCommitEnable: Boolean) { - it.property("autoCommitEnable", autoCommitEnable.toString()) - } - - /** - * The frequency in ms that the consumer offsets are committed to zookeeper. - */ - public fun autoCommitIntervalMs(autoCommitIntervalMs: String) { - it.property("autoCommitIntervalMs", autoCommitIntervalMs) - } - - /** - * The frequency in ms that the consumer offsets are committed to zookeeper. - */ - public fun autoCommitIntervalMs(autoCommitIntervalMs: Int) { - it.property("autoCommitIntervalMs", autoCommitIntervalMs.toString()) - } - - /** - * What to do when there is no initial offset in ZooKeeper or if an offset is out of range: - * earliest : automatically reset the offset to the earliest offset latest: automatically reset the - * offset to the latest offset fail: throw exception to the consumer - */ - public fun autoOffsetReset(autoOffsetReset: String) { - it.property("autoOffsetReset", autoOffsetReset) - } - - /** - * Whether to use batching for processing or streaming. The default is false, which uses streaming - */ - public fun batching(batching: String) { - it.property("batching", batching) - } - - /** - * Whether to use batching for processing or streaming. The default is false, which uses streaming - */ - public fun batching(batching: Boolean) { - it.property("batching", batching.toString()) - } - - /** - * This options controls what happens when a consumer is processing an exchange and it fails. If - * the option is false then the consumer continues to the next message and processes it. If the - * option is true then the consumer breaks out. Using the default NoopCommitManager will cause the - * consumer to not commit the offset so that the message is re-attempted. The consumer should use the - * KafkaManualCommit to determine the best way to handle the message. Using either the - * SyncCommitManager or the AsyncCommitManager, the consumer will seek back to the offset of the - * message that caused a failure, and then re-attempt to process this message. However, this can lead - * to endless processing of the same message if it's bound to fail every time, e.g., a poison - * message. Therefore, it's recommended to deal with that, for example, by using Camel's error - * handler. - */ - public fun breakOnFirstError(breakOnFirstError: String) { - it.property("breakOnFirstError", breakOnFirstError) - } - - /** - * This options controls what happens when a consumer is processing an exchange and it fails. If - * the option is false then the consumer continues to the next message and processes it. If the - * option is true then the consumer breaks out. Using the default NoopCommitManager will cause the - * consumer to not commit the offset so that the message is re-attempted. The consumer should use the - * KafkaManualCommit to determine the best way to handle the message. Using either the - * SyncCommitManager or the AsyncCommitManager, the consumer will seek back to the offset of the - * message that caused a failure, and then re-attempt to process this message. However, this can lead - * to endless processing of the same message if it's bound to fail every time, e.g., a poison - * message. Therefore, it's recommended to deal with that, for example, by using Camel's error - * handler. - */ - public fun breakOnFirstError(breakOnFirstError: Boolean) { - it.property("breakOnFirstError", breakOnFirstError.toString()) - } - - /** - * Automatically check the CRC32 of the records consumed. This ensures no on-the-wire or on-disk - * corruption to the messages occurred. This check adds some overhead, so it may be disabled in cases - * seeking extreme performance. - */ - public fun checkCrcs(checkCrcs: String) { - it.property("checkCrcs", checkCrcs) - } - - /** - * Automatically check the CRC32 of the records consumed. This ensures no on-the-wire or on-disk - * corruption to the messages occurred. This check adds some overhead, so it may be disabled in cases - * seeking extreme performance. - */ - public fun checkCrcs(checkCrcs: Boolean) { - it.property("checkCrcs", checkCrcs.toString()) - } - - /** - * The maximum time, in milliseconds, that the code will wait for a synchronous commit to complete - */ - public fun commitTimeoutMs(commitTimeoutMs: String) { - it.property("commitTimeoutMs", commitTimeoutMs) - } - - /** - * The configuration controls the maximum amount of time the client will wait for the response of - * a request. If the response is not received before the timeout elapsed, the client will resend the - * request if necessary or fail the request if retries are exhausted. - */ - public fun consumerRequestTimeoutMs(consumerRequestTimeoutMs: String) { - it.property("consumerRequestTimeoutMs", consumerRequestTimeoutMs) - } - - /** - * The configuration controls the maximum amount of time the client will wait for the response of - * a request. If the response is not received before the timeout elapsed, the client will resend the - * request if necessary or fail the request if retries are exhausted. - */ - public fun consumerRequestTimeoutMs(consumerRequestTimeoutMs: Int) { - it.property("consumerRequestTimeoutMs", consumerRequestTimeoutMs.toString()) - } - - /** - * The number of consumers that connect to kafka server. Each consumer is run on a separate thread - * that retrieves and process the incoming data. - */ - public fun consumersCount(consumersCount: String) { - it.property("consumersCount", consumersCount) - } - - /** - * The number of consumers that connect to kafka server. Each consumer is run on a separate thread - * that retrieves and process the incoming data. - */ - public fun consumersCount(consumersCount: Int) { - it.property("consumersCount", consumersCount.toString()) - } - - /** - * The maximum amount of data the server should return for a fetch request. This is not an - * absolute maximum, if the first message in the first non-empty partition of the fetch is larger - * than this value, the message will still be returned to ensure that the consumer can make progress. - * The maximum message size accepted by the broker is defined via message.max.bytes (broker config) - * or max.message.bytes (topic config). Note that the consumer performs multiple fetches in parallel. - */ - public fun fetchMaxBytes(fetchMaxBytes: String) { - it.property("fetchMaxBytes", fetchMaxBytes) - } - - /** - * The maximum amount of data the server should return for a fetch request. This is not an - * absolute maximum, if the first message in the first non-empty partition of the fetch is larger - * than this value, the message will still be returned to ensure that the consumer can make progress. - * The maximum message size accepted by the broker is defined via message.max.bytes (broker config) - * or max.message.bytes (topic config). Note that the consumer performs multiple fetches in parallel. - */ - public fun fetchMaxBytes(fetchMaxBytes: Int) { - it.property("fetchMaxBytes", fetchMaxBytes.toString()) - } - - /** - * The minimum amount of data the server should return for a fetch request. If insufficient data - * is available, the request will wait for that much data to accumulate before answering the request. - */ - public fun fetchMinBytes(fetchMinBytes: String) { - it.property("fetchMinBytes", fetchMinBytes) - } - - /** - * The minimum amount of data the server should return for a fetch request. If insufficient data - * is available, the request will wait for that much data to accumulate before answering the request. - */ - public fun fetchMinBytes(fetchMinBytes: Int) { - it.property("fetchMinBytes", fetchMinBytes.toString()) - } - - /** - * The maximum amount of time the server will block before answering the fetch request if there - * isn't enough data to immediately satisfy fetch.min.bytes - */ - public fun fetchWaitMaxMs(fetchWaitMaxMs: String) { - it.property("fetchWaitMaxMs", fetchWaitMaxMs) - } - - /** - * The maximum amount of time the server will block before answering the fetch request if there - * isn't enough data to immediately satisfy fetch.min.bytes - */ - public fun fetchWaitMaxMs(fetchWaitMaxMs: Int) { - it.property("fetchWaitMaxMs", fetchWaitMaxMs.toString()) - } - - /** - * A string that uniquely identifies the group of consumer processes to which this consumer - * belongs. By setting the same group id, multiple processes can indicate that they are all part of - * the same consumer group. This option is required for consumers. - */ - public fun groupId(groupId: String) { - it.property("groupId", groupId) - } - - /** - * A unique identifier of the consumer instance provided by the end user. Only non-empty strings - * are permitted. If set, the consumer is treated as a static member, which means that only one - * instance with this ID is allowed in the consumer group at any time. This can be used in - * combination with a larger session timeout to avoid group rebalances caused by transient - * unavailability (e.g., process restarts). If not set, the consumer will join the group as a dynamic - * member, which is the traditional behavior. - */ - public fun groupInstanceId(groupInstanceId: String) { - it.property("groupInstanceId", groupInstanceId) - } - - /** - * To use a custom KafkaHeaderDeserializer to deserialize kafka headers values - */ - public fun headerDeserializer(headerDeserializer: String) { - it.property("headerDeserializer", headerDeserializer) - } - - /** - * The expected time between heartbeats to the consumer coordinator when using Kafka's group - * management facilities. Heartbeats are used to ensure that the consumer's session stays active and - * to facilitate rebalancing when new consumers join or leave the group. The value must be set lower - * than session.timeout.ms, but typically should be set no higher than 1/3 of that value. It can be - * adjusted even lower to control the expected time for normal rebalances. - */ - public fun heartbeatIntervalMs(heartbeatIntervalMs: String) { - it.property("heartbeatIntervalMs", heartbeatIntervalMs) - } - - /** - * The expected time between heartbeats to the consumer coordinator when using Kafka's group - * management facilities. Heartbeats are used to ensure that the consumer's session stays active and - * to facilitate rebalancing when new consumers join or leave the group. The value must be set lower - * than session.timeout.ms, but typically should be set no higher than 1/3 of that value. It can be - * adjusted even lower to control the expected time for normal rebalances. - */ - public fun heartbeatIntervalMs(heartbeatIntervalMs: Int) { - it.property("heartbeatIntervalMs", heartbeatIntervalMs.toString()) - } - - /** - * Deserializer class for the key that implements the Deserializer interface. - */ - public fun keyDeserializer(keyDeserializer: String) { - it.property("keyDeserializer", keyDeserializer) - } - - /** - * The maximum amount of data per-partition the server will return. The maximum total memory used - * for a request will be #partitions max.partition.fetch.bytes. This size must be at least as large - * as the maximum message size the server allows or else it is possible for the producer to send - * messages larger than the consumer can fetch. If that happens, the consumer can get stuck trying to - * fetch a large message on a certain partition. - */ - public fun maxPartitionFetchBytes(maxPartitionFetchBytes: String) { - it.property("maxPartitionFetchBytes", maxPartitionFetchBytes) - } - - /** - * The maximum amount of data per-partition the server will return. The maximum total memory used - * for a request will be #partitions max.partition.fetch.bytes. This size must be at least as large - * as the maximum message size the server allows or else it is possible for the producer to send - * messages larger than the consumer can fetch. If that happens, the consumer can get stuck trying to - * fetch a large message on a certain partition. - */ - public fun maxPartitionFetchBytes(maxPartitionFetchBytes: Int) { - it.property("maxPartitionFetchBytes", maxPartitionFetchBytes.toString()) - } - - /** - * The maximum delay between invocations of poll() when using consumer group management. This - * places an upper bound on the amount of time that the consumer can be idle before fetching more - * records. If poll() is not called before expiration of this timeout, then the consumer is - * considered failed, and the group will re-balance to reassign the partitions to another member. - */ - public fun maxPollIntervalMs(maxPollIntervalMs: String) { - it.property("maxPollIntervalMs", maxPollIntervalMs) - } - - /** - * The maximum number of records returned in a single call to poll() - */ - public fun maxPollRecords(maxPollRecords: String) { - it.property("maxPollRecords", maxPollRecords) - } - - /** - * The maximum number of records returned in a single call to poll() - */ - public fun maxPollRecords(maxPollRecords: Int) { - it.property("maxPollRecords", maxPollRecords.toString()) - } - - /** - * The offset repository to use to locally store the offset of each partition of the topic. - * Defining one will disable the autocommit. - */ - public fun offsetRepository(offsetRepository: String) { - it.property("offsetRepository", offsetRepository) - } - - /** - * The class name of the partition assignment strategy that the client will use to distribute - * partition ownership amongst consumer instances when group management is used - */ - public fun partitionAssignor(partitionAssignor: String) { - it.property("partitionAssignor", partitionAssignor) - } - - /** - * What to do if kafka threw an exception while polling for new messages. Will by default use the - * value from the component configuration unless an explicit value has been configured on the - * endpoint level. DISCARD will discard the message and continue to poll the next message. - * ERROR_HANDLER will use Camel's error handler to process the exception, and afterwards continue to - * poll the next message. RECONNECT will re-connect the consumer and try polling the message again. - * RETRY will let the consumer retry poll the same message again. STOP will stop the consumer (it has - * to be manually started/restarted if the consumer should be able to consume messages again) - */ - public fun pollOnError(pollOnError: String) { - it.property("pollOnError", pollOnError) - } - - /** - * The timeout used when polling the KafkaConsumer. - */ - public fun pollTimeoutMs(pollTimeoutMs: String) { - it.property("pollTimeoutMs", pollTimeoutMs) - } - - /** - * Whether to eager validate that broker host:port is valid and can be DNS resolved to known host - * during starting this consumer. If the validation fails, then an exception is thrown, which makes - * Camel fail fast. Disabling this will postpone the validation after the consumer is started, and - * Camel will keep re-connecting in case of validation or DNS resolution error. - */ - public fun preValidateHostAndPort(preValidateHostAndPort: String) { - it.property("preValidateHostAndPort", preValidateHostAndPort) - } - - /** - * Whether to eager validate that broker host:port is valid and can be DNS resolved to known host - * during starting this consumer. If the validation fails, then an exception is thrown, which makes - * Camel fail fast. Disabling this will postpone the validation after the consumer is started, and - * Camel will keep re-connecting in case of validation or DNS resolution error. - */ - public fun preValidateHostAndPort(preValidateHostAndPort: Boolean) { - it.property("preValidateHostAndPort", preValidateHostAndPort.toString()) - } - - /** - * Set if KafkaConsumer should read from the beginning or the end on startup: - * SeekPolicy.BEGINNING: read from the beginning. SeekPolicy.END: read from the end. - */ - public fun seekTo(seekTo: String) { - it.property("seekTo", seekTo) - } - - /** - * The timeout used to detect failures when using Kafka's group management facilities. - */ - public fun sessionTimeoutMs(sessionTimeoutMs: String) { - it.property("sessionTimeoutMs", sessionTimeoutMs) - } - - /** - * The timeout used to detect failures when using Kafka's group management facilities. - */ - public fun sessionTimeoutMs(sessionTimeoutMs: Int) { - it.property("sessionTimeoutMs", sessionTimeoutMs.toString()) - } - - /** - * This enables the use of a specific Avro reader for use with the in multiple Schema registries - * documentation with Avro Deserializers implementation. This option is only available externally - * (not standard Apache Kafka) - */ - public fun specificAvroReader(specificAvroReader: String) { - it.property("specificAvroReader", specificAvroReader) - } - - /** - * This enables the use of a specific Avro reader for use with the in multiple Schema registries - * documentation with Avro Deserializers implementation. This option is only available externally - * (not standard Apache Kafka) - */ - public fun specificAvroReader(specificAvroReader: Boolean) { - it.property("specificAvroReader", specificAvroReader.toString()) - } - - /** - * Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic - * number of topics matching the pattern. - */ - public fun topicIsPattern(topicIsPattern: String) { - it.property("topicIsPattern", topicIsPattern) - } - - /** - * Whether the topic is a pattern (regular expression). This can be used to subscribe to dynamic - * number of topics matching the pattern. - */ - public fun topicIsPattern(topicIsPattern: Boolean) { - it.property("topicIsPattern", topicIsPattern.toString()) - } - - /** - * Deserializer class for value that implements the Deserializer interface. - */ - public fun valueDeserializer(valueDeserializer: String) { - it.property("valueDeserializer", valueDeserializer) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Controls how to read messages written transactionally. If set to read_committed, - * consumer.poll() will only return transactional messages which have been committed. If set to - * read_uncommitted (the default), consumer.poll() will return all messages, even transactional - * messages which have been aborted. Non-transactional messages will be returned unconditionally in - * either mode. Messages will always be returned in offset order. Hence, in read_committed mode, - * consumer.poll() will only return messages up to the last stable offset (LSO), which is the one - * less than the offset of the first open transaction. In particular, any messages appearing after - * messages belonging to ongoing transactions will be withheld until the relevant transaction has - * been completed. As a result, read_committed consumers will not be able to read up to the high - * watermark when there are in flight transactions. Further, when in read_committed the seekToEnd - * method will return the LSO - */ - public fun isolationLevel(isolationLevel: String) { - it.property("isolationLevel", isolationLevel) - } - - /** - * Factory to use for creating KafkaManualCommit instances. This allows to plugin a custom factory - * to create custom KafkaManualCommit instances in case special logic is needed when doing manual - * commits that deviates from the default implementation that comes out of the box. - */ - public fun kafkaManualCommitFactory(kafkaManualCommitFactory: String) { - it.property("kafkaManualCommitFactory", kafkaManualCommitFactory) - } - - /** - * If this feature is enabled and a single element of a batch is an Exchange or Message, the - * producer will generate individual kafka header values for it by using the batch Message to - * determine the values. Normal behavior consists of always using the same header values (which are - * determined by the parent Exchange which contains the Iterable or Iterator). - */ - public fun batchWithIndividualHeaders(batchWithIndividualHeaders: String) { - it.property("batchWithIndividualHeaders", batchWithIndividualHeaders) - } - - /** - * If this feature is enabled and a single element of a batch is an Exchange or Message, the - * producer will generate individual kafka header values for it by using the batch Message to - * determine the values. Normal behavior consists of always using the same header values (which are - * determined by the parent Exchange which contains the Iterable or Iterator). - */ - public fun batchWithIndividualHeaders(batchWithIndividualHeaders: Boolean) { - it.property("batchWithIndividualHeaders", batchWithIndividualHeaders.toString()) - } - - /** - * The total bytes of memory the producer can use to buffer records waiting to be sent to the - * server. If records are sent faster than they can be delivered to the server, the producer will - * either block or throw an exception based on the preference specified by block.on.buffer.full.This - * setting should correspond roughly to the total memory the producer will use, but is not a hard - * bound since not all memory the producer uses is used for buffering. Some additional memory will be - * used for compression (if compression is enabled) as well as for maintaining in-flight requests. - */ - public fun bufferMemorySize(bufferMemorySize: String) { - it.property("bufferMemorySize", bufferMemorySize) - } - - /** - * The total bytes of memory the producer can use to buffer records waiting to be sent to the - * server. If records are sent faster than they can be delivered to the server, the producer will - * either block or throw an exception based on the preference specified by block.on.buffer.full.This - * setting should correspond roughly to the total memory the producer will use, but is not a hard - * bound since not all memory the producer uses is used for buffering. Some additional memory will be - * used for compression (if compression is enabled) as well as for maintaining in-flight requests. - */ - public fun bufferMemorySize(bufferMemorySize: Int) { - it.property("bufferMemorySize", bufferMemorySize.toString()) - } - - /** - * This parameter allows you to specify the compression codec for all data generated by this - * producer. Valid values are none, gzip, snappy, lz4 and zstd. - */ - public fun compressionCodec(compressionCodec: String) { - it.property("compressionCodec", compressionCodec) - } - - /** - * Close idle connections after the number of milliseconds specified by this config. - */ - public fun connectionMaxIdleMs(connectionMaxIdleMs: String) { - it.property("connectionMaxIdleMs", connectionMaxIdleMs) - } - - /** - * Close idle connections after the number of milliseconds specified by this config. - */ - public fun connectionMaxIdleMs(connectionMaxIdleMs: Int) { - it.property("connectionMaxIdleMs", connectionMaxIdleMs.toString()) - } - - /** - * An upper bound on the time to report success or failure after a call to send() returns. This - * limits the total time that a record will be delayed prior to sending, the time to await - * acknowledgement from the broker (if expected), and the time allowed for retriable send failures. - */ - public fun deliveryTimeoutMs(deliveryTimeoutMs: String) { - it.property("deliveryTimeoutMs", deliveryTimeoutMs) - } - - /** - * An upper bound on the time to report success or failure after a call to send() returns. This - * limits the total time that a record will be delayed prior to sending, the time to await - * acknowledgement from the broker (if expected), and the time allowed for retriable send failures. - */ - public fun deliveryTimeoutMs(deliveryTimeoutMs: Int) { - it.property("deliveryTimeoutMs", deliveryTimeoutMs.toString()) - } - - /** - * When set to 'true', the producer will ensure that exactly one copy of each message is written - * in the stream. If 'false', producer retries due to broker failures, etc., may write duplicates of - * the retried message in the stream. Note that enabling idempotence requires - * max.in.flight.requests.per.connection to be less than or equal to 5 (with message ordering - * preserved for any allowable value), retries to be greater than 0, and acks must be 'all'. - * Idempotence is enabled by default if no conflicting configurations are set. If conflicting - * configurations are set and idempotence is not explicitly enabled, idempotence is disabled. If - * idempotence is explicitly enabled and conflicting configurations are set, a ConfigException is - * thrown. - */ - public fun enableIdempotence(enableIdempotence: String) { - it.property("enableIdempotence", enableIdempotence) - } - - /** - * When set to 'true', the producer will ensure that exactly one copy of each message is written - * in the stream. If 'false', producer retries due to broker failures, etc., may write duplicates of - * the retried message in the stream. Note that enabling idempotence requires - * max.in.flight.requests.per.connection to be less than or equal to 5 (with message ordering - * preserved for any allowable value), retries to be greater than 0, and acks must be 'all'. - * Idempotence is enabled by default if no conflicting configurations are set. If conflicting - * configurations are set and idempotence is not explicitly enabled, idempotence is disabled. If - * idempotence is explicitly enabled and conflicting configurations are set, a ConfigException is - * thrown. - */ - public fun enableIdempotence(enableIdempotence: Boolean) { - it.property("enableIdempotence", enableIdempotence.toString()) - } - - /** - * To use a custom KafkaHeaderSerializer to serialize kafka headers values - */ - public fun headerSerializer(headerSerializer: String) { - it.property("headerSerializer", headerSerializer) - } - - /** - * The record key (or null if no key is specified). If this option has been configured then it - * take precedence over header KafkaConstants#KEY - */ - public fun key(key: String) { - it.property("key", key) - } - - /** - * The serializer class for keys (defaults to the same as for messages if nothing is given). - */ - public fun keySerializer(keySerializer: String) { - it.property("keySerializer", keySerializer) - } - - /** - * The producer groups together any records that arrive in between request transmissions into a - * single, batched, request. Normally, this occurs only under load when records arrive faster than - * they can be sent out. However, in some circumstances, the client may want to reduce the number of - * requests even under a moderate load. This setting achieves this by adding a small amount of - * artificial delay. That is, rather than immediately sending out a record, the producer will wait - * for up to the given delay to allow other records to be sent so that they can be batched together. - * This can be thought of as analogous to Nagle's algorithm in TCP. This setting gives the upper - * bound on the delay for batching: once we get batch.size worth of records for a partition, it will - * be sent immediately regardless of this setting, however, if we have fewer than this many bytes - * accumulated for this partition, we will 'linger' for the specified time waiting for more records - * to show up. This setting defaults to 0 (i.e., no delay). Setting linger.ms=5, for example, would - * have the effect of reducing the number of requests sent but would add up to 5ms of latency to - * records sent in the absence of load. - */ - public fun lingerMs(lingerMs: String) { - it.property("lingerMs", lingerMs) - } - - /** - * The producer groups together any records that arrive in between request transmissions into a - * single, batched, request. Normally, this occurs only under load when records arrive faster than - * they can be sent out. However, in some circumstances, the client may want to reduce the number of - * requests even under a moderate load. This setting achieves this by adding a small amount of - * artificial delay. That is, rather than immediately sending out a record, the producer will wait - * for up to the given delay to allow other records to be sent so that they can be batched together. - * This can be thought of as analogous to Nagle's algorithm in TCP. This setting gives the upper - * bound on the delay for batching: once we get batch.size worth of records for a partition, it will - * be sent immediately regardless of this setting, however, if we have fewer than this many bytes - * accumulated for this partition, we will 'linger' for the specified time waiting for more records - * to show up. This setting defaults to 0 (i.e., no delay). Setting linger.ms=5, for example, would - * have the effect of reducing the number of requests sent but would add up to 5ms of latency to - * records sent in the absence of load. - */ - public fun lingerMs(lingerMs: Int) { - it.property("lingerMs", lingerMs.toString()) - } - - /** - * The configuration controls how long the KafkaProducer's send(), partitionsFor(), - * initTransactions(), sendOffsetsToTransaction(), commitTransaction() and abortTransaction() methods - * will block. For send() this timeout bounds the total time waiting for both metadata fetch and - * buffer allocation (blocking in the user-supplied serializers or partitioner is not counted against - * this timeout). For partitionsFor() this time out bounds the time spent waiting for metadata if it - * is unavailable. The transaction-related methods always block, but may time out if the transaction - * coordinator could not be discovered or did not respond within the timeout. - */ - public fun maxBlockMs(maxBlockMs: String) { - it.property("maxBlockMs", maxBlockMs) - } - - /** - * The configuration controls how long the KafkaProducer's send(), partitionsFor(), - * initTransactions(), sendOffsetsToTransaction(), commitTransaction() and abortTransaction() methods - * will block. For send() this timeout bounds the total time waiting for both metadata fetch and - * buffer allocation (blocking in the user-supplied serializers or partitioner is not counted against - * this timeout). For partitionsFor() this time out bounds the time spent waiting for metadata if it - * is unavailable. The transaction-related methods always block, but may time out if the transaction - * coordinator could not be discovered or did not respond within the timeout. - */ - public fun maxBlockMs(maxBlockMs: Int) { - it.property("maxBlockMs", maxBlockMs.toString()) - } - - /** - * The maximum number of unacknowledged requests the client will send on a single connection - * before blocking. Note that if this setting is set to be greater than 1 and there are failed sends, - * there is a risk of message re-ordering due to retries (i.e., if retries are enabled). - */ - public fun maxInFlightRequest(maxInFlightRequest: String) { - it.property("maxInFlightRequest", maxInFlightRequest) - } - - /** - * The maximum number of unacknowledged requests the client will send on a single connection - * before blocking. Note that if this setting is set to be greater than 1 and there are failed sends, - * there is a risk of message re-ordering due to retries (i.e., if retries are enabled). - */ - public fun maxInFlightRequest(maxInFlightRequest: Int) { - it.property("maxInFlightRequest", maxInFlightRequest.toString()) - } - - /** - * The maximum size of a request. This is also effectively a cap on the maximum record size. Note - * that the server has its own cap on record size which may be different from this. This setting will - * limit the number of record batches the producer will send in a single request to avoid sending - * huge requests. - */ - public fun maxRequestSize(maxRequestSize: String) { - it.property("maxRequestSize", maxRequestSize) - } - - /** - * The maximum size of a request. This is also effectively a cap on the maximum record size. Note - * that the server has its own cap on record size which may be different from this. This setting will - * limit the number of record batches the producer will send in a single request to avoid sending - * huge requests. - */ - public fun maxRequestSize(maxRequestSize: Int) { - it.property("maxRequestSize", maxRequestSize.toString()) - } - - /** - * The period of time in milliseconds after which we force a refresh of metadata even if we - * haven't seen any partition leadership changes to proactively discover any new brokers or - * partitions. - */ - public fun metadataMaxAgeMs(metadataMaxAgeMs: String) { - it.property("metadataMaxAgeMs", metadataMaxAgeMs) - } - - /** - * The period of time in milliseconds after which we force a refresh of metadata even if we - * haven't seen any partition leadership changes to proactively discover any new brokers or - * partitions. - */ - public fun metadataMaxAgeMs(metadataMaxAgeMs: Int) { - it.property("metadataMaxAgeMs", metadataMaxAgeMs.toString()) - } - - /** - * A list of classes to use as metrics reporters. Implementing the MetricReporter interface allows - * plugging in classes that will be notified of new metric creation. The JmxReporter is always - * included to register JMX statistics. - */ - public fun metricReporters(metricReporters: String) { - it.property("metricReporters", metricReporters) - } - - /** - * The window of time a metrics sample is computed over. - */ - public fun metricsSampleWindowMs(metricsSampleWindowMs: String) { - it.property("metricsSampleWindowMs", metricsSampleWindowMs) - } - - /** - * The window of time a metrics sample is computed over. - */ - public fun metricsSampleWindowMs(metricsSampleWindowMs: Int) { - it.property("metricsSampleWindowMs", metricsSampleWindowMs.toString()) - } - - /** - * The number of samples maintained to compute metrics. - */ - public fun noOfMetricsSample(noOfMetricsSample: String) { - it.property("noOfMetricsSample", noOfMetricsSample) - } - - /** - * The number of samples maintained to compute metrics. - */ - public fun noOfMetricsSample(noOfMetricsSample: Int) { - it.property("noOfMetricsSample", noOfMetricsSample.toString()) - } - - /** - * The partitioner class for partitioning messages amongst sub-topics. The default partitioner is - * based on the hash of the key. - */ - public fun partitioner(partitioner: String) { - it.property("partitioner", partitioner) - } - - /** - * Whether the message keys should be ignored when computing the partition. This setting has - * effect only when partitioner is not set - */ - public fun partitionerIgnoreKeys(partitionerIgnoreKeys: String) { - it.property("partitionerIgnoreKeys", partitionerIgnoreKeys) - } - - /** - * Whether the message keys should be ignored when computing the partition. This setting has - * effect only when partitioner is not set - */ - public fun partitionerIgnoreKeys(partitionerIgnoreKeys: Boolean) { - it.property("partitionerIgnoreKeys", partitionerIgnoreKeys.toString()) - } - - /** - * The partition to which the record will be sent (or null if no partition was specified). If this - * option has been configured then it take precedence over header KafkaConstants#PARTITION_KEY - */ - public fun partitionKey(partitionKey: String) { - it.property("partitionKey", partitionKey) - } - - /** - * The partition to which the record will be sent (or null if no partition was specified). If this - * option has been configured then it take precedence over header KafkaConstants#PARTITION_KEY - */ - public fun partitionKey(partitionKey: Int) { - it.property("partitionKey", partitionKey.toString()) - } - - /** - * The producer will attempt to batch records together into fewer requests whenever multiple - * records are being sent to the same partition. This helps performance on both the client and the - * server. This configuration controls the default batch size in bytes. No attempt will be made to - * batch records larger than this size. Requests sent to brokers will contain multiple batches, one - * for each partition with data available to be sent. A small batch size will make batching less - * common and may reduce throughput (a batch size of zero will disable batching entirely). A very - * large batch size may use memory a bit more wastefully as we will always allocate a buffer of the - * specified batch size in anticipation of additional records. - */ - public fun producerBatchSize(producerBatchSize: String) { - it.property("producerBatchSize", producerBatchSize) - } - - /** - * The producer will attempt to batch records together into fewer requests whenever multiple - * records are being sent to the same partition. This helps performance on both the client and the - * server. This configuration controls the default batch size in bytes. No attempt will be made to - * batch records larger than this size. Requests sent to brokers will contain multiple batches, one - * for each partition with data available to be sent. A small batch size will make batching less - * common and may reduce throughput (a batch size of zero will disable batching entirely). A very - * large batch size may use memory a bit more wastefully as we will always allocate a buffer of the - * specified batch size in anticipation of additional records. - */ - public fun producerBatchSize(producerBatchSize: Int) { - it.property("producerBatchSize", producerBatchSize.toString()) - } - - /** - * The maximum number of unsent messages that can be queued up the producer when using async mode - * before either the producer must be blocked or data must be dropped. - */ - public fun queueBufferingMaxMessages(queueBufferingMaxMessages: String) { - it.property("queueBufferingMaxMessages", queueBufferingMaxMessages) - } - - /** - * The maximum number of unsent messages that can be queued up the producer when using async mode - * before either the producer must be blocked or data must be dropped. - */ - public fun queueBufferingMaxMessages(queueBufferingMaxMessages: Int) { - it.property("queueBufferingMaxMessages", queueBufferingMaxMessages.toString()) - } - - /** - * The size of the TCP receive buffer (SO_RCVBUF) to use when reading data. - */ - public fun receiveBufferBytes(receiveBufferBytes: String) { - it.property("receiveBufferBytes", receiveBufferBytes) - } - - /** - * The size of the TCP receive buffer (SO_RCVBUF) to use when reading data. - */ - public fun receiveBufferBytes(receiveBufferBytes: Int) { - it.property("receiveBufferBytes", receiveBufferBytes.toString()) - } - - /** - * The amount of time to wait before attempting to reconnect to a given host. This avoids - * repeatedly connecting to a host in a tight loop. This backoff applies to all requests sent by the - * consumer to the broker. - */ - public fun reconnectBackoffMs(reconnectBackoffMs: String) { - it.property("reconnectBackoffMs", reconnectBackoffMs) - } - - /** - * The amount of time to wait before attempting to reconnect to a given host. This avoids - * repeatedly connecting to a host in a tight loop. This backoff applies to all requests sent by the - * consumer to the broker. - */ - public fun reconnectBackoffMs(reconnectBackoffMs: Int) { - it.property("reconnectBackoffMs", reconnectBackoffMs.toString()) - } - - /** - * Whether the producer should store the RecordMetadata results from sending to Kafka. The results - * are stored in a List containing the RecordMetadata metadata's. The list is stored on a header with - * the key KafkaConstants#KAFKA_RECORDMETA - */ - public fun recordMetadata(recordMetadata: String) { - it.property("recordMetadata", recordMetadata) - } - - /** - * Whether the producer should store the RecordMetadata results from sending to Kafka. The results - * are stored in a List containing the RecordMetadata metadata's. The list is stored on a header with - * the key KafkaConstants#KAFKA_RECORDMETA - */ - public fun recordMetadata(recordMetadata: Boolean) { - it.property("recordMetadata", recordMetadata.toString()) - } - - /** - * The number of acknowledgments the producer requires the leader to have received before - * considering a request complete. This controls the durability of records that are sent. The - * following settings are allowed: acks=0 If set to zero, then the producer will not wait for any - * acknowledgment from the server at all. The record will be immediately added to the socket buffer - * and considered sent. No guarantee can be made that the server has received the record in this - * case, and the retry configuration will not take effect (as the client won't generally know of any - * failures). The offset given back for each record will always be set to -1. acks=1 This will mean - * the leader will write the record to its local log but will respond without awaiting full - * acknowledgment from all followers. In this case should the leader fail immediately after - * acknowledging the record, but before the followers have replicated it, then the record will be - * lost. acks=all This means the leader will wait for the full set of in-sync replicas to acknowledge - * the record. This guarantees that the record will not be lost as long as at least one in-sync - * replica remains alive. This is the strongest available guarantee. This is equivalent to the - * acks=-1 setting. Note that enabling idempotence requires this config value to be 'all'. If - * conflicting configurations are set and idempotence is not explicitly enabled, idempotence is - * disabled. - */ - public fun requestRequiredAcks(requestRequiredAcks: String) { - it.property("requestRequiredAcks", requestRequiredAcks) - } - - /** - * The amount of time the broker will wait trying to meet the request.required.acks requirement - * before sending back an error to the client. - */ - public fun requestTimeoutMs(requestTimeoutMs: String) { - it.property("requestTimeoutMs", requestTimeoutMs) - } - - /** - * The amount of time the broker will wait trying to meet the request.required.acks requirement - * before sending back an error to the client. - */ - public fun requestTimeoutMs(requestTimeoutMs: Int) { - it.property("requestTimeoutMs", requestTimeoutMs.toString()) - } - - /** - * Setting a value greater than zero will cause the client to resend any record that has failed to - * be sent due to a potentially transient error. Note that this retry is no different from if the - * client re-sending the record upon receiving the error. Produce requests will be failed before the - * number of retries has been exhausted if the timeout configured by delivery.timeout.ms expires - * first before successful acknowledgement. Users should generally prefer to leave this config unset - * and instead use delivery.timeout.ms to control retry behavior. Enabling idempotence requires this - * config value to be greater than 0. If conflicting configurations are set and idempotence is not - * explicitly enabled, idempotence is disabled. Allowing retries while setting enable.idempotence to - * false and max.in.flight.requests.per.connection to 1 will potentially change the ordering of - * records, because if two batches are sent to a single partition, and the first fails and is retried - * but the second succeeds; then the records in the second batch may appear first. - */ - public fun retries(retries: String) { - it.property("retries", retries) - } - - /** - * Setting a value greater than zero will cause the client to resend any record that has failed to - * be sent due to a potentially transient error. Note that this retry is no different from if the - * client re-sending the record upon receiving the error. Produce requests will be failed before the - * number of retries has been exhausted if the timeout configured by delivery.timeout.ms expires - * first before successful acknowledgement. Users should generally prefer to leave this config unset - * and instead use delivery.timeout.ms to control retry behavior. Enabling idempotence requires this - * config value to be greater than 0. If conflicting configurations are set and idempotence is not - * explicitly enabled, idempotence is disabled. Allowing retries while setting enable.idempotence to - * false and max.in.flight.requests.per.connection to 1 will potentially change the ordering of - * records, because if two batches are sent to a single partition, and the first fails and is retried - * but the second succeeds; then the records in the second batch may appear first. - */ - public fun retries(retries: Int) { - it.property("retries", retries.toString()) - } - - /** - * Socket write buffer size - */ - public fun sendBufferBytes(sendBufferBytes: String) { - it.property("sendBufferBytes", sendBufferBytes) - } - - /** - * Socket write buffer size - */ - public fun sendBufferBytes(sendBufferBytes: Int) { - it.property("sendBufferBytes", sendBufferBytes.toString()) - } - - /** - * Sets whether sending to kafka should send the message body as a single record, or use a - * java.util.Iterator to send multiple records to kafka (if the message body can be iterated). - */ - public fun useIterator(useIterator: String) { - it.property("useIterator", useIterator) - } - - /** - * Sets whether sending to kafka should send the message body as a single record, or use a - * java.util.Iterator to send multiple records to kafka (if the message body can be iterated). - */ - public fun useIterator(useIterator: Boolean) { - it.property("useIterator", useIterator.toString()) - } - - /** - * The serializer class for messages. - */ - public fun valueSerializer(valueSerializer: String) { - it.property("valueSerializer", valueSerializer) - } - - /** - * To use a custom worker pool for continue routing Exchange after kafka server has acknowledged - * the message that was sent to it from KafkaProducer using asynchronous non-blocking processing. If - * using this option, then you must handle the lifecycle of the thread pool to shut the pool down - * when no longer needed. - */ - public fun workerPool(workerPool: String) { - it.property("workerPool", workerPool) - } - - /** - * Number of core threads for the worker pool for continue routing Exchange after kafka server has - * acknowledged the message that was sent to it from KafkaProducer using asynchronous non-blocking - * processing. - */ - public fun workerPoolCoreSize(workerPoolCoreSize: String) { - it.property("workerPoolCoreSize", workerPoolCoreSize) - } - - /** - * Number of core threads for the worker pool for continue routing Exchange after kafka server has - * acknowledged the message that was sent to it from KafkaProducer using asynchronous non-blocking - * processing. - */ - public fun workerPoolCoreSize(workerPoolCoreSize: Int) { - it.property("workerPoolCoreSize", workerPoolCoreSize.toString()) - } - - /** - * Maximum number of threads for the worker pool for continue routing Exchange after kafka server - * has acknowledged the message that was sent to it from KafkaProducer using asynchronous - * non-blocking processing. - */ - public fun workerPoolMaxSize(workerPoolMaxSize: String) { - it.property("workerPoolMaxSize", workerPoolMaxSize) - } - - /** - * Maximum number of threads for the worker pool for continue routing Exchange after kafka server - * has acknowledged the message that was sent to it from KafkaProducer using asynchronous - * non-blocking processing. - */ - public fun workerPoolMaxSize(workerPoolMaxSize: Int) { - it.property("workerPoolMaxSize", workerPoolMaxSize.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Factory to use for creating org.apache.kafka.clients.consumer.KafkaConsumer and - * org.apache.kafka.clients.producer.KafkaProducer instances. This allows to configure a custom - * factory to create instances with logic that extends the vanilla Kafka clients. - */ - public fun kafkaClientFactory(kafkaClientFactory: String) { - it.property("kafkaClientFactory", kafkaClientFactory) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * Sets interceptors for producer or consumers. Producer interceptors have to be classes - * implementing org.apache.kafka.clients.producer.ProducerInterceptor Consumer interceptors have to - * be classes implementing org.apache.kafka.clients.consumer.ConsumerInterceptor Note that if you use - * Producer interceptor on a consumer it will throw a class cast exception in runtime - */ - public fun interceptorClasses(interceptorClasses: String) { - it.property("interceptorClasses", interceptorClasses) - } - - /** - * URL of the schema registry servers to use. The format is host1:port1,host2:port2. This is known - * as schema.registry.url in multiple Schema registries documentation. This option is only available - * externally (not standard Apache Kafka) - */ - public fun schemaRegistryURL(schemaRegistryURL: String) { - it.property("schemaRegistryURL", schemaRegistryURL) - } - - /** - * Login thread sleep time between refresh attempts. - */ - public fun kerberosBeforeReloginMinTime(kerberosBeforeReloginMinTime: String) { - it.property("kerberosBeforeReloginMinTime", kerberosBeforeReloginMinTime) - } - - /** - * Login thread sleep time between refresh attempts. - */ - public fun kerberosBeforeReloginMinTime(kerberosBeforeReloginMinTime: Int) { - it.property("kerberosBeforeReloginMinTime", kerberosBeforeReloginMinTime.toString()) - } - - /** - * Location of the kerberos config file. - */ - public fun kerberosConfigLocation(kerberosConfigLocation: String) { - it.property("kerberosConfigLocation", kerberosConfigLocation) - } - - /** - * Kerberos kinit command path. Default is /usr/bin/kinit - */ - public fun kerberosInitCmd(kerberosInitCmd: String) { - it.property("kerberosInitCmd", kerberosInitCmd) - } - - /** - * A list of rules for mapping from principal names to short names (typically operating system - * usernames). The rules are evaluated in order, and the first rule that matches a principal name is - * used to map it to a short name. Any later rules in the list are ignored. By default, principal - * names of the form {username}/{hostname}{REALM} are mapped to {username}. For more details on the - * format, please see the Security Authorization and ACLs documentation (at the Apache Kafka project - * website). Multiple values can be separated by comma - */ - public fun kerberosPrincipalToLocalRules(kerberosPrincipalToLocalRules: String) { - it.property("kerberosPrincipalToLocalRules", kerberosPrincipalToLocalRules) - } - - /** - * Percentage of random jitter added to the renewal time. - */ - public fun kerberosRenewJitter(kerberosRenewJitter: String) { - it.property("kerberosRenewJitter", kerberosRenewJitter) - } - - /** - * Percentage of random jitter added to the renewal time. - */ - public fun kerberosRenewJitter(kerberosRenewJitter: Double) { - it.property("kerberosRenewJitter", kerberosRenewJitter.toString()) - } - - /** - * Login thread will sleep until the specified window factor of time from last refresh to ticket's - * expiry has been reached, at which time it will try to renew the ticket. - */ - public fun kerberosRenewWindowFactor(kerberosRenewWindowFactor: String) { - it.property("kerberosRenewWindowFactor", kerberosRenewWindowFactor) - } - - /** - * Login thread will sleep until the specified window factor of time from last refresh to ticket's - * expiry has been reached, at which time it will try to renew the ticket. - */ - public fun kerberosRenewWindowFactor(kerberosRenewWindowFactor: Double) { - it.property("kerberosRenewWindowFactor", kerberosRenewWindowFactor.toString()) - } - - /** - * Expose the kafka sasl.jaas.config parameter Example: - * org.apache.kafka.common.security.plain.PlainLoginModule required username=USERNAME - * password=PASSWORD; - */ - public fun saslJaasConfig(saslJaasConfig: String) { - it.property("saslJaasConfig", saslJaasConfig) - } - - /** - * The Kerberos principal name that Kafka runs as. This can be defined either in Kafka's JAAS - * config or in Kafka's config. - */ - public fun saslKerberosServiceName(saslKerberosServiceName: String) { - it.property("saslKerberosServiceName", saslKerberosServiceName) - } - - /** - * The Simple Authentication and Security Layer (SASL) Mechanism used. For the valid values see - * http://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml - */ - public fun saslMechanism(saslMechanism: String) { - it.property("saslMechanism", saslMechanism) - } - - /** - * Protocol used to communicate with brokers. SASL_PLAINTEXT, PLAINTEXT, SASL_SSL and SSL are - * supported - */ - public fun securityProtocol(securityProtocol: String) { - it.property("securityProtocol", securityProtocol) - } - - /** - * A list of cipher suites. This is a named combination of authentication, encryption, MAC and key - * exchange algorithm used to negotiate the security settings for a network connection using TLS or - * SSL network protocol. By default, all the available cipher suites are supported. - */ - public fun sslCipherSuites(sslCipherSuites: String) { - it.property("sslCipherSuites", sslCipherSuites) - } - - /** - * SSL configuration using a Camel SSLContextParameters object. If configured, it's applied before - * the other SSL endpoint parameters. NOTE: Kafka only supports loading keystore from file locations, - * so prefix the location with file: in the KeyStoreParameters.resource option. - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * The list of protocols enabled for SSL connections. The default is TLSv1.2,TLSv1.3 when running - * with Java 11 or newer, TLSv1.2 otherwise. With the default value for Java 11, clients and servers - * will prefer TLSv1.3 if both support it and fallback to TLSv1.2 otherwise (assuming both support at - * least TLSv1.2). This default should be fine for most cases. Also see the config documentation for - * SslProtocol. - */ - public fun sslEnabledProtocols(sslEnabledProtocols: String) { - it.property("sslEnabledProtocols", sslEnabledProtocols) - } - - /** - * The endpoint identification algorithm to validate server hostname using server certificate. Use - * none or false to disable server hostname verification. - */ - public fun sslEndpointAlgorithm(sslEndpointAlgorithm: String) { - it.property("sslEndpointAlgorithm", sslEndpointAlgorithm) - } - - /** - * The algorithm used by key manager factory for SSL connections. Default value is the key manager - * factory algorithm configured for the Java Virtual Machine. - */ - public fun sslKeymanagerAlgorithm(sslKeymanagerAlgorithm: String) { - it.property("sslKeymanagerAlgorithm", sslKeymanagerAlgorithm) - } - - /** - * The password of the private key in the key store file or the PEM key specified in - * sslKeystoreKey. This is required for clients only if two-way authentication is configured. - */ - public fun sslKeyPassword(sslKeyPassword: String) { - it.property("sslKeyPassword", sslKeyPassword) - } - - /** - * The location of the key store file. This is optional for the client and can be used for two-way - * authentication for the client. - */ - public fun sslKeystoreLocation(sslKeystoreLocation: String) { - it.property("sslKeystoreLocation", sslKeystoreLocation) - } - - /** - * The store password for the key store file. This is optional for the client and only needed if - * sslKeystoreLocation is configured. Key store password is not supported for PEM format. - */ - public fun sslKeystorePassword(sslKeystorePassword: String) { - it.property("sslKeystorePassword", sslKeystorePassword) - } - - /** - * The file format of the key store file. This is optional for the client. The default value is - * JKS - */ - public fun sslKeystoreType(sslKeystoreType: String) { - it.property("sslKeystoreType", sslKeystoreType) - } - - /** - * The SSL protocol used to generate the SSLContext. The default is TLSv1.3 when running with Java - * 11 or newer, TLSv1.2 otherwise. This value should be fine for most use cases. Allowed values in - * recent JVMs are TLSv1.2 and TLSv1.3. TLS, TLSv1.1, SSL, SSLv2 and SSLv3 may be supported in older - * JVMs, but their usage is discouraged due to known security vulnerabilities. With the default value - * for this config and sslEnabledProtocols, clients will downgrade to TLSv1.2 if the server does not - * support TLSv1.3. If this config is set to TLSv1.2, clients will not use TLSv1.3 even if it is one - * of the values in sslEnabledProtocols and the server only supports TLSv1.3. - */ - public fun sslProtocol(sslProtocol: String) { - it.property("sslProtocol", sslProtocol) - } - - /** - * The name of the security provider used for SSL connections. Default value is the default - * security provider of the JVM. - */ - public fun sslProvider(sslProvider: String) { - it.property("sslProvider", sslProvider) - } - - /** - * The algorithm used by trust manager factory for SSL connections. Default value is the trust - * manager factory algorithm configured for the Java Virtual Machine. - */ - public fun sslTrustmanagerAlgorithm(sslTrustmanagerAlgorithm: String) { - it.property("sslTrustmanagerAlgorithm", sslTrustmanagerAlgorithm) - } - - /** - * The location of the trust store file. - */ - public fun sslTruststoreLocation(sslTruststoreLocation: String) { - it.property("sslTruststoreLocation", sslTruststoreLocation) - } - - /** - * The password for the trust store file. If a password is not set, trust store file configured - * will still be used, but integrity checking is disabled. Trust store password is not supported for - * PEM format. - */ - public fun sslTruststorePassword(sslTruststorePassword: String) { - it.property("sslTruststorePassword", sslTruststorePassword) - } - - /** - * The file format of the trust store file. The default value is JKS. - */ - public fun sslTruststoreType(sslTruststoreType: String) { - it.property("sslTruststoreType", sslTruststoreType) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KameletUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KameletUriDsl.kt deleted file mode 100644 index c6c176810fb49..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KameletUriDsl.kt +++ /dev/null @@ -1,204 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * To call Kamelets - */ -public fun UriDsl.kamelet(i: KameletUriDsl.() -> Unit) { - KameletUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KameletUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kamelet") - } - - private var templateId: String = "" - - private var routeId: String = "" - - /** - * The Route Template ID - */ - public fun templateId(templateId: String) { - this.templateId = templateId - it.url("$templateId/$routeId") - } - - /** - * The Route ID. Default value notice: The ID will be auto-generated if not provided - */ - public fun routeId(routeId: String) { - this.routeId = routeId - it.url("$templateId/$routeId") - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * If sending a message to a direct endpoint which has no active consumer, then we can tell the - * producer to block and wait for the consumer to become active. - */ - public fun block(block: String) { - it.property("block", block) - } - - /** - * If sending a message to a direct endpoint which has no active consumer, then we can tell the - * producer to block and wait for the consumer to become active. - */ - public fun block(block: Boolean) { - it.property("block", block.toString()) - } - - /** - * Whether the producer should fail by throwing an exception, when sending to a kamelet endpoint - * with no active consumers. - */ - public fun failIfNoConsumers(failIfNoConsumers: String) { - it.property("failIfNoConsumers", failIfNoConsumers) - } - - /** - * Whether the producer should fail by throwing an exception, when sending to a kamelet endpoint - * with no active consumers. - */ - public fun failIfNoConsumers(failIfNoConsumers: Boolean) { - it.property("failIfNoConsumers", failIfNoConsumers.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The timeout value to use if block is enabled. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * The timeout value to use if block is enabled. - */ - public fun timeout(timeout: Int) { - it.property("timeout", timeout.toString()) - } - - /** - * Location of the Kamelet to use which can be specified as a resource from file system, classpath - * etc. The location cannot use wildcards, and must refer to a file including extension, for example - * file:/etc/foo-kamelet.xml - */ - public fun location(location: String) { - it.property("location", location) - } - - /** - * Kamelets, by default, will not do fine-grained error handling, but works in no-error-handler - * mode. This can be turned off, to use old behaviour in earlier versions of Camel. - */ - public fun noErrorHandler(noErrorHandler: String) { - it.property("noErrorHandler", noErrorHandler) - } - - /** - * Kamelets, by default, will not do fine-grained error handling, but works in no-error-handler - * mode. This can be turned off, to use old behaviour in earlier versions of Camel. - */ - public fun noErrorHandler(noErrorHandler: Boolean) { - it.property("noErrorHandler", noErrorHandler.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KnativeUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KnativeUriDsl.kt deleted file mode 100644 index fd89fdce98a26..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KnativeUriDsl.kt +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive events from Knative. - */ -public fun UriDsl.knative(i: KnativeUriDsl.() -> Unit) { - KnativeUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KnativeUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("knative") - } - - private var type: String = "" - - private var typeId: String = "" - - /** - * The Knative resource type - */ - public fun type(type: String) { - this.type = type - it.url("$type/$typeId") - } - - /** - * The identifier of the Knative resource - */ - public fun typeId(typeId: String) { - this.typeId = typeId - it.url("$type/$typeId") - } - - /** - * CloudEvent headers to override - */ - public fun ceOverride(ceOverride: String) { - it.property("ceOverride", ceOverride) - } - - /** - * Set the version of the cloudevents spec. - */ - public fun cloudEventsSpecVersion(cloudEventsSpecVersion: String) { - it.property("cloudEventsSpecVersion", cloudEventsSpecVersion) - } - - /** - * Set the event-type information of the produced events. - */ - public fun cloudEventsType(cloudEventsType: String) { - it.property("cloudEventsType", cloudEventsType) - } - - /** - * The environment - */ - public fun environment(environment: String) { - it.property("environment", environment) - } - - /** - * Set the filters. - */ - public fun filters(filters: String) { - it.property("filters", filters) - } - - /** - * The SinkBinding configuration. - */ - public fun sinkBinding(sinkBinding: String) { - it.property("sinkBinding", sinkBinding) - } - - /** - * Set the transport options. - */ - public fun transportOptions(transportOptions: String) { - it.property("transportOptions", transportOptions) - } - - /** - * Transforms the reply into a cloud event that will be processed by the caller. When listening to - * events from a Knative Broker, if this flag is enabled, replies will be published to the same - * Broker where the request comes from (beware that if you don't change the type of the received - * message, you may create a loop and receive your same reply). When this flag is disabled, - * CloudEvent headers are removed from the reply. - */ - public fun replyWithCloudEvent(replyWithCloudEvent: String) { - it.property("replyWithCloudEvent", replyWithCloudEvent) - } - - /** - * Transforms the reply into a cloud event that will be processed by the caller. When listening to - * events from a Knative Broker, if this flag is enabled, replies will be published to the same - * Broker where the request comes from (beware that if you don't change the type of the received - * message, you may create a loop and receive your same reply). When this flag is disabled, - * CloudEvent headers are removed from the reply. - */ - public fun replyWithCloudEvent(replyWithCloudEvent: Boolean) { - it.property("replyWithCloudEvent", replyWithCloudEvent.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * If the consumer should construct a full reply to knative request. - */ - public fun reply(reply: String) { - it.property("reply", reply) - } - - /** - * If the consumer should construct a full reply to knative request. - */ - public fun reply(reply: Boolean) { - it.property("reply", reply.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The version of the k8s resource referenced by the endpoint. - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The type of the k8s resource referenced by the endpoint. - */ - public fun kind(kind: String) { - it.property("kind", kind) - } - - /** - * The name of the k8s resource referenced by the endpoint. - */ - public fun name(name: String) { - it.property("name", name) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesConfigMapsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesConfigMapsUriDsl.kt deleted file mode 100644 index c29669dff006a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesConfigMapsUriDsl.kt +++ /dev/null @@ -1,351 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes ConfigMaps and get notified on ConfigMaps changes. - */ -public fun UriDsl.`kubernetes-config-maps`(i: KubernetesConfigMapsUriDsl.() -> Unit) { - KubernetesConfigMapsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesConfigMapsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-config-maps") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * The Consumer CRD Resource Group we would like to watch - */ - public fun crdGroup(crdGroup: String) { - it.property("crdGroup", crdGroup) - } - - /** - * The Consumer CRD Resource name we would like to watch - */ - public fun crdName(crdName: String) { - it.property("crdName", crdName) - } - - /** - * The Consumer CRD Resource Plural we would like to watch - */ - public fun crdPlural(crdPlural: String) { - it.property("crdPlural", crdPlural) - } - - /** - * The Consumer CRD Resource Scope we would like to watch - */ - public fun crdScope(crdScope: String) { - it.property("crdScope", crdScope) - } - - /** - * The Consumer CRD Resource Version we would like to watch - */ - public fun crdVersion(crdVersion: String) { - it.property("crdVersion", crdVersion) - } - - /** - * The Consumer Label key when watching at some resources - */ - public fun labelKey(labelKey: String) { - it.property("labelKey", labelKey) - } - - /** - * The Consumer Label value when watching at some resources - */ - public fun labelValue(labelValue: String) { - it.property("labelValue", labelValue) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: String) { - it.property("poolSize", poolSize) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: Int) { - it.property("poolSize", poolSize.toString()) - } - - /** - * The Consumer Resource Name we would like to watch - */ - public fun resourceName(resourceName: String) { - it.property("resourceName", resourceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesCronjobUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesCronjobUriDsl.kt deleted file mode 100644 index b5ea6542722cb..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesCronjobUriDsl.kt +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes CronJob. - */ -public fun UriDsl.`kubernetes-cronjob`(i: KubernetesCronjobUriDsl.() -> Unit) { - KubernetesCronjobUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesCronjobUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-cronjob") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesCustomResourcesUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesCustomResourcesUriDsl.kt deleted file mode 100644 index 8ff2478f934e8..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesCustomResourcesUriDsl.kt +++ /dev/null @@ -1,351 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes Custom Resources and get notified on Deployment changes. - */ -public fun UriDsl.`kubernetes-custom-resources`(i: KubernetesCustomResourcesUriDsl.() -> Unit) { - KubernetesCustomResourcesUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesCustomResourcesUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-custom-resources") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * The Consumer CRD Resource Group we would like to watch - */ - public fun crdGroup(crdGroup: String) { - it.property("crdGroup", crdGroup) - } - - /** - * The Consumer CRD Resource name we would like to watch - */ - public fun crdName(crdName: String) { - it.property("crdName", crdName) - } - - /** - * The Consumer CRD Resource Plural we would like to watch - */ - public fun crdPlural(crdPlural: String) { - it.property("crdPlural", crdPlural) - } - - /** - * The Consumer CRD Resource Scope we would like to watch - */ - public fun crdScope(crdScope: String) { - it.property("crdScope", crdScope) - } - - /** - * The Consumer CRD Resource Version we would like to watch - */ - public fun crdVersion(crdVersion: String) { - it.property("crdVersion", crdVersion) - } - - /** - * The Consumer Label key when watching at some resources - */ - public fun labelKey(labelKey: String) { - it.property("labelKey", labelKey) - } - - /** - * The Consumer Label value when watching at some resources - */ - public fun labelValue(labelValue: String) { - it.property("labelValue", labelValue) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: String) { - it.property("poolSize", poolSize) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: Int) { - it.property("poolSize", poolSize.toString()) - } - - /** - * The Consumer Resource Name we would like to watch - */ - public fun resourceName(resourceName: String) { - it.property("resourceName", resourceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesDeploymentsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesDeploymentsUriDsl.kt deleted file mode 100644 index 031a0f7b8e74b..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesDeploymentsUriDsl.kt +++ /dev/null @@ -1,351 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes Deployments and get notified on Deployment changes. - */ -public fun UriDsl.`kubernetes-deployments`(i: KubernetesDeploymentsUriDsl.() -> Unit) { - KubernetesDeploymentsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesDeploymentsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-deployments") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * The Consumer CRD Resource Group we would like to watch - */ - public fun crdGroup(crdGroup: String) { - it.property("crdGroup", crdGroup) - } - - /** - * The Consumer CRD Resource name we would like to watch - */ - public fun crdName(crdName: String) { - it.property("crdName", crdName) - } - - /** - * The Consumer CRD Resource Plural we would like to watch - */ - public fun crdPlural(crdPlural: String) { - it.property("crdPlural", crdPlural) - } - - /** - * The Consumer CRD Resource Scope we would like to watch - */ - public fun crdScope(crdScope: String) { - it.property("crdScope", crdScope) - } - - /** - * The Consumer CRD Resource Version we would like to watch - */ - public fun crdVersion(crdVersion: String) { - it.property("crdVersion", crdVersion) - } - - /** - * The Consumer Label key when watching at some resources - */ - public fun labelKey(labelKey: String) { - it.property("labelKey", labelKey) - } - - /** - * The Consumer Label value when watching at some resources - */ - public fun labelValue(labelValue: String) { - it.property("labelValue", labelValue) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: String) { - it.property("poolSize", poolSize) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: Int) { - it.property("poolSize", poolSize.toString()) - } - - /** - * The Consumer Resource Name we would like to watch - */ - public fun resourceName(resourceName: String) { - it.property("resourceName", resourceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesEventsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesEventsUriDsl.kt deleted file mode 100644 index 9129d18d13d3a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesEventsUriDsl.kt +++ /dev/null @@ -1,351 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes Events and get notified on Events changes. - */ -public fun UriDsl.`kubernetes-events`(i: KubernetesEventsUriDsl.() -> Unit) { - KubernetesEventsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesEventsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-events") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * The Consumer CRD Resource Group we would like to watch - */ - public fun crdGroup(crdGroup: String) { - it.property("crdGroup", crdGroup) - } - - /** - * The Consumer CRD Resource name we would like to watch - */ - public fun crdName(crdName: String) { - it.property("crdName", crdName) - } - - /** - * The Consumer CRD Resource Plural we would like to watch - */ - public fun crdPlural(crdPlural: String) { - it.property("crdPlural", crdPlural) - } - - /** - * The Consumer CRD Resource Scope we would like to watch - */ - public fun crdScope(crdScope: String) { - it.property("crdScope", crdScope) - } - - /** - * The Consumer CRD Resource Version we would like to watch - */ - public fun crdVersion(crdVersion: String) { - it.property("crdVersion", crdVersion) - } - - /** - * The Consumer Label key when watching at some resources - */ - public fun labelKey(labelKey: String) { - it.property("labelKey", labelKey) - } - - /** - * The Consumer Label value when watching at some resources - */ - public fun labelValue(labelValue: String) { - it.property("labelValue", labelValue) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: String) { - it.property("poolSize", poolSize) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: Int) { - it.property("poolSize", poolSize.toString()) - } - - /** - * The Consumer Resource Name we would like to watch - */ - public fun resourceName(resourceName: String) { - it.property("resourceName", resourceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesHpaUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesHpaUriDsl.kt deleted file mode 100644 index 08c7933a83dc5..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesHpaUriDsl.kt +++ /dev/null @@ -1,352 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes Horizontal Pod Autoscalers (HPA) and get notified on HPA - * changes. - */ -public fun UriDsl.`kubernetes-hpa`(i: KubernetesHpaUriDsl.() -> Unit) { - KubernetesHpaUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesHpaUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-hpa") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * The Consumer CRD Resource Group we would like to watch - */ - public fun crdGroup(crdGroup: String) { - it.property("crdGroup", crdGroup) - } - - /** - * The Consumer CRD Resource name we would like to watch - */ - public fun crdName(crdName: String) { - it.property("crdName", crdName) - } - - /** - * The Consumer CRD Resource Plural we would like to watch - */ - public fun crdPlural(crdPlural: String) { - it.property("crdPlural", crdPlural) - } - - /** - * The Consumer CRD Resource Scope we would like to watch - */ - public fun crdScope(crdScope: String) { - it.property("crdScope", crdScope) - } - - /** - * The Consumer CRD Resource Version we would like to watch - */ - public fun crdVersion(crdVersion: String) { - it.property("crdVersion", crdVersion) - } - - /** - * The Consumer Label key when watching at some resources - */ - public fun labelKey(labelKey: String) { - it.property("labelKey", labelKey) - } - - /** - * The Consumer Label value when watching at some resources - */ - public fun labelValue(labelValue: String) { - it.property("labelValue", labelValue) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: String) { - it.property("poolSize", poolSize) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: Int) { - it.property("poolSize", poolSize.toString()) - } - - /** - * The Consumer Resource Name we would like to watch - */ - public fun resourceName(resourceName: String) { - it.property("resourceName", resourceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesJobUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesJobUriDsl.kt deleted file mode 100644 index 8ec674e8276e2..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesJobUriDsl.kt +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes Jobs. - */ -public fun UriDsl.`kubernetes-job`(i: KubernetesJobUriDsl.() -> Unit) { - KubernetesJobUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesJobUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-job") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesNamespacesUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesNamespacesUriDsl.kt deleted file mode 100644 index 33e047ac0fba8..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesNamespacesUriDsl.kt +++ /dev/null @@ -1,351 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes Namespaces and get notified on Namespace changes. - */ -public fun UriDsl.`kubernetes-namespaces`(i: KubernetesNamespacesUriDsl.() -> Unit) { - KubernetesNamespacesUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesNamespacesUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-namespaces") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * The Consumer CRD Resource Group we would like to watch - */ - public fun crdGroup(crdGroup: String) { - it.property("crdGroup", crdGroup) - } - - /** - * The Consumer CRD Resource name we would like to watch - */ - public fun crdName(crdName: String) { - it.property("crdName", crdName) - } - - /** - * The Consumer CRD Resource Plural we would like to watch - */ - public fun crdPlural(crdPlural: String) { - it.property("crdPlural", crdPlural) - } - - /** - * The Consumer CRD Resource Scope we would like to watch - */ - public fun crdScope(crdScope: String) { - it.property("crdScope", crdScope) - } - - /** - * The Consumer CRD Resource Version we would like to watch - */ - public fun crdVersion(crdVersion: String) { - it.property("crdVersion", crdVersion) - } - - /** - * The Consumer Label key when watching at some resources - */ - public fun labelKey(labelKey: String) { - it.property("labelKey", labelKey) - } - - /** - * The Consumer Label value when watching at some resources - */ - public fun labelValue(labelValue: String) { - it.property("labelValue", labelValue) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: String) { - it.property("poolSize", poolSize) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: Int) { - it.property("poolSize", poolSize.toString()) - } - - /** - * The Consumer Resource Name we would like to watch - */ - public fun resourceName(resourceName: String) { - it.property("resourceName", resourceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesNodesUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesNodesUriDsl.kt deleted file mode 100644 index cc6ddfc04e7b1..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesNodesUriDsl.kt +++ /dev/null @@ -1,351 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes Nodes and get notified on Node changes. - */ -public fun UriDsl.`kubernetes-nodes`(i: KubernetesNodesUriDsl.() -> Unit) { - KubernetesNodesUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesNodesUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-nodes") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * The Consumer CRD Resource Group we would like to watch - */ - public fun crdGroup(crdGroup: String) { - it.property("crdGroup", crdGroup) - } - - /** - * The Consumer CRD Resource name we would like to watch - */ - public fun crdName(crdName: String) { - it.property("crdName", crdName) - } - - /** - * The Consumer CRD Resource Plural we would like to watch - */ - public fun crdPlural(crdPlural: String) { - it.property("crdPlural", crdPlural) - } - - /** - * The Consumer CRD Resource Scope we would like to watch - */ - public fun crdScope(crdScope: String) { - it.property("crdScope", crdScope) - } - - /** - * The Consumer CRD Resource Version we would like to watch - */ - public fun crdVersion(crdVersion: String) { - it.property("crdVersion", crdVersion) - } - - /** - * The Consumer Label key when watching at some resources - */ - public fun labelKey(labelKey: String) { - it.property("labelKey", labelKey) - } - - /** - * The Consumer Label value when watching at some resources - */ - public fun labelValue(labelValue: String) { - it.property("labelValue", labelValue) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: String) { - it.property("poolSize", poolSize) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: Int) { - it.property("poolSize", poolSize.toString()) - } - - /** - * The Consumer Resource Name we would like to watch - */ - public fun resourceName(resourceName: String) { - it.property("resourceName", resourceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesPersistentVolumesClaimsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesPersistentVolumesClaimsUriDsl.kt deleted file mode 100644 index d2e2bd0b25791..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesPersistentVolumesClaimsUriDsl.kt +++ /dev/null @@ -1,237 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes Persistent Volumes Claims and get notified on Persistent Volumes - * Claim changes. - */ -public - fun UriDsl.`kubernetes-persistent-volumes-claims`(i: KubernetesPersistentVolumesClaimsUriDsl.() -> Unit) { - KubernetesPersistentVolumesClaimsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesPersistentVolumesClaimsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-persistent-volumes-claims") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesPersistentVolumesUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesPersistentVolumesUriDsl.kt deleted file mode 100644 index ce1d756436a0e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesPersistentVolumesUriDsl.kt +++ /dev/null @@ -1,236 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes Persistent Volumes and get notified on Persistent Volume - * changes. - */ -public fun UriDsl.`kubernetes-persistent-volumes`(i: KubernetesPersistentVolumesUriDsl.() -> Unit) { - KubernetesPersistentVolumesUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesPersistentVolumesUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-persistent-volumes") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesPodsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesPodsUriDsl.kt deleted file mode 100644 index a92b84e6b0d48..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesPodsUriDsl.kt +++ /dev/null @@ -1,351 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes Pods and get notified on Pod changes. - */ -public fun UriDsl.`kubernetes-pods`(i: KubernetesPodsUriDsl.() -> Unit) { - KubernetesPodsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesPodsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-pods") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * The Consumer CRD Resource Group we would like to watch - */ - public fun crdGroup(crdGroup: String) { - it.property("crdGroup", crdGroup) - } - - /** - * The Consumer CRD Resource name we would like to watch - */ - public fun crdName(crdName: String) { - it.property("crdName", crdName) - } - - /** - * The Consumer CRD Resource Plural we would like to watch - */ - public fun crdPlural(crdPlural: String) { - it.property("crdPlural", crdPlural) - } - - /** - * The Consumer CRD Resource Scope we would like to watch - */ - public fun crdScope(crdScope: String) { - it.property("crdScope", crdScope) - } - - /** - * The Consumer CRD Resource Version we would like to watch - */ - public fun crdVersion(crdVersion: String) { - it.property("crdVersion", crdVersion) - } - - /** - * The Consumer Label key when watching at some resources - */ - public fun labelKey(labelKey: String) { - it.property("labelKey", labelKey) - } - - /** - * The Consumer Label value when watching at some resources - */ - public fun labelValue(labelValue: String) { - it.property("labelValue", labelValue) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: String) { - it.property("poolSize", poolSize) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: Int) { - it.property("poolSize", poolSize.toString()) - } - - /** - * The Consumer Resource Name we would like to watch - */ - public fun resourceName(resourceName: String) { - it.property("resourceName", resourceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesReplicationControllersUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesReplicationControllersUriDsl.kt deleted file mode 100644 index 661fda25e2041..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesReplicationControllersUriDsl.kt +++ /dev/null @@ -1,353 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes Replication Controllers and get notified on Replication - * Controllers changes. - */ -public - fun UriDsl.`kubernetes-replication-controllers`(i: KubernetesReplicationControllersUriDsl.() -> Unit) { - KubernetesReplicationControllersUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesReplicationControllersUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-replication-controllers") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * The Consumer CRD Resource Group we would like to watch - */ - public fun crdGroup(crdGroup: String) { - it.property("crdGroup", crdGroup) - } - - /** - * The Consumer CRD Resource name we would like to watch - */ - public fun crdName(crdName: String) { - it.property("crdName", crdName) - } - - /** - * The Consumer CRD Resource Plural we would like to watch - */ - public fun crdPlural(crdPlural: String) { - it.property("crdPlural", crdPlural) - } - - /** - * The Consumer CRD Resource Scope we would like to watch - */ - public fun crdScope(crdScope: String) { - it.property("crdScope", crdScope) - } - - /** - * The Consumer CRD Resource Version we would like to watch - */ - public fun crdVersion(crdVersion: String) { - it.property("crdVersion", crdVersion) - } - - /** - * The Consumer Label key when watching at some resources - */ - public fun labelKey(labelKey: String) { - it.property("labelKey", labelKey) - } - - /** - * The Consumer Label value when watching at some resources - */ - public fun labelValue(labelValue: String) { - it.property("labelValue", labelValue) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: String) { - it.property("poolSize", poolSize) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: Int) { - it.property("poolSize", poolSize.toString()) - } - - /** - * The Consumer Resource Name we would like to watch - */ - public fun resourceName(resourceName: String) { - it.property("resourceName", resourceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesResourcesQuotaUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesResourcesQuotaUriDsl.kt deleted file mode 100644 index ea8e1d87ec977..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesResourcesQuotaUriDsl.kt +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes Resources Quotas. - */ -public fun UriDsl.`kubernetes-resources-quota`(i: KubernetesResourcesQuotaUriDsl.() -> Unit) { - KubernetesResourcesQuotaUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesResourcesQuotaUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-resources-quota") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesSecretsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesSecretsUriDsl.kt deleted file mode 100644 index be5e65e5c8bb4..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesSecretsUriDsl.kt +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes Secrets. - */ -public fun UriDsl.`kubernetes-secrets`(i: KubernetesSecretsUriDsl.() -> Unit) { - KubernetesSecretsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesSecretsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-secrets") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesServiceAccountsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesServiceAccountsUriDsl.kt deleted file mode 100644 index e5f3c90b76cfe..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesServiceAccountsUriDsl.kt +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes Service Accounts. - */ -public fun UriDsl.`kubernetes-service-accounts`(i: KubernetesServiceAccountsUriDsl.() -> Unit) { - KubernetesServiceAccountsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesServiceAccountsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-service-accounts") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesServicesUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesServicesUriDsl.kt deleted file mode 100644 index 99282da75ea73..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KubernetesServicesUriDsl.kt +++ /dev/null @@ -1,351 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Kubernetes Services and get notified on Service changes. - */ -public fun UriDsl.`kubernetes-services`(i: KubernetesServicesUriDsl.() -> Unit) { - KubernetesServicesUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KubernetesServicesUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kubernetes-services") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * The Consumer CRD Resource Group we would like to watch - */ - public fun crdGroup(crdGroup: String) { - it.property("crdGroup", crdGroup) - } - - /** - * The Consumer CRD Resource name we would like to watch - */ - public fun crdName(crdName: String) { - it.property("crdName", crdName) - } - - /** - * The Consumer CRD Resource Plural we would like to watch - */ - public fun crdPlural(crdPlural: String) { - it.property("crdPlural", crdPlural) - } - - /** - * The Consumer CRD Resource Scope we would like to watch - */ - public fun crdScope(crdScope: String) { - it.property("crdScope", crdScope) - } - - /** - * The Consumer CRD Resource Version we would like to watch - */ - public fun crdVersion(crdVersion: String) { - it.property("crdVersion", crdVersion) - } - - /** - * The Consumer Label key when watching at some resources - */ - public fun labelKey(labelKey: String) { - it.property("labelKey", labelKey) - } - - /** - * The Consumer Label value when watching at some resources - */ - public fun labelValue(labelValue: String) { - it.property("labelValue", labelValue) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: String) { - it.property("poolSize", poolSize) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: Int) { - it.property("poolSize", poolSize.toString()) - } - - /** - * The Consumer Resource Name we would like to watch - */ - public fun resourceName(resourceName: String) { - it.property("resourceName", resourceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KuduUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KuduUriDsl.kt deleted file mode 100644 index 16056655d6e18..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/KuduUriDsl.kt +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Interact with Apache Kudu, a free and open source column-oriented data store of the Apache Hadoop - * ecosystem. - */ -public fun UriDsl.kudu(i: KuduUriDsl.() -> Unit) { - KuduUriDsl(this).apply(i) -} - -@CamelDslMarker -public class KuduUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("kudu") - } - - private var host: String = "" - - private var port: String = "" - - private var tableName: String = "" - - /** - * Host of the server to connect to - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port/$tableName") - } - - /** - * Port of the server to connect to - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port/$tableName") - } - - /** - * Table to connect to - */ - public fun tableName(tableName: String) { - this.tableName = tableName - it.url("$host:$port/$tableName") - } - - /** - * Operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jChatUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jChatUriDsl.kt deleted file mode 100644 index 5c30219ab4c62..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jChatUriDsl.kt +++ /dev/null @@ -1,158 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * LangChain4j Chat component - */ -public fun UriDsl.`langchain4j-chat`(i: Langchain4jChatUriDsl.() -> Unit) { - Langchain4jChatUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Langchain4jChatUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("langchain4j-chat") - } - - private var chatId: String = "" - - /** - * The id - */ - public fun chatId(chatId: String) { - this.chatId = chatId - it.url("$chatId") - } - - /** - * Operation in case of Endpoint of type CHAT. The value is one of the values of - * org.apache.camel.component.langchain4j.chat.LangChain4jChatOperations - */ - public fun chatOperation(chatOperation: String) { - it.property("chatOperation", chatOperation) - } - - /** - * Tool description - */ - public fun description(description: String) { - it.property("description", description) - } - - /** - * List of Tool parameters in the form of parameter.= - */ - public fun parameters(parameters: String) { - it.property("parameters", parameters) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Tool's Camel Parameters, programmatically define Tool description and parameters - */ - public fun camelToolParameter(camelToolParameter: String) { - it.property("camelToolParameter", camelToolParameter) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Chat Language Model of type dev.langchain4j.model.chat.ChatLanguageModel - */ - public fun chatModel(chatModel: String) { - it.property("chatModel", chatModel) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jEmbeddingsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jEmbeddingsUriDsl.kt deleted file mode 100644 index 8d1ef24da84cd..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jEmbeddingsUriDsl.kt +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * LangChain4j Embeddings - */ -public fun UriDsl.`langchain4j-embeddings`(i: Langchain4jEmbeddingsUriDsl.() -> Unit) { - Langchain4jEmbeddingsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Langchain4jEmbeddingsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("langchain4j-embeddings") - } - - private var embeddingId: String = "" - - /** - * The id - */ - public fun embeddingId(embeddingId: String) { - this.embeddingId = embeddingId - it.url("$embeddingId") - } - - /** - * The EmbeddingModel engine to use. - */ - public fun embeddingModel(embeddingModel: String) { - it.property("embeddingModel", embeddingModel) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jToolsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jToolsUriDsl.kt deleted file mode 100644 index d952f9dee12f3..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jToolsUriDsl.kt +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * LangChain4j Tools and Function Calling Features - */ -public fun UriDsl.`langchain4j-tools`(i: Langchain4jToolsUriDsl.() -> Unit) { - Langchain4jToolsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Langchain4jToolsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("langchain4j-tools") - } - - private var toolId: String = "" - - /** - * The tool name - */ - public fun toolId(toolId: String) { - this.toolId = toolId - it.url("$toolId") - } - - /** - * The tags for the tools - */ - public fun tags(tags: String) { - it.property("tags", tags) - } - - /** - * Tool description - */ - public fun description(description: String) { - it.property("description", description) - } - - /** - * List of Tool parameters in the form of parameter.= - */ - public fun parameters(parameters: String) { - it.property("parameters", parameters) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Tool's Camel Parameters, programmatically define Tool description and parameters - */ - public fun camelToolParameter(camelToolParameter: String) { - it.property("camelToolParameter", camelToolParameter) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Chat Language Model of type dev.langchain4j.model.chat.ChatLanguageModel - */ - public fun chatModel(chatModel: String) { - it.property("chatModel", chatModel) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jWebSearchUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jWebSearchUriDsl.kt deleted file mode 100644 index 5a19ab25af881..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Langchain4jWebSearchUriDsl.kt +++ /dev/null @@ -1,189 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * LangChain4j Web Search Engine - */ -public fun UriDsl.`langchain4j-web-search`(i: Langchain4jWebSearchUriDsl.() -> Unit) { - Langchain4jWebSearchUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Langchain4jWebSearchUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("langchain4j-web-search") - } - - private var searchId: String = "" - - /** - * The id - */ - public fun searchId(searchId: String) { - this.searchId = searchId - it.url("$searchId") - } - - /** - * The additionalParams is the additional parameters for the search request are a map of key-value - * pairs that represent additional parameters for the search request. - */ - public fun additionalParams(additionalParams: String) { - it.property("additionalParams", additionalParams) - } - - /** - * The geoLocation is the desired geolocation for search results. Each search engine may have a - * different set of supported geolocations. - */ - public fun geoLocation(geoLocation: String) { - it.property("geoLocation", geoLocation) - } - - /** - * The language is the desired language for search results. The expected values may vary depending - * on the search engine. - */ - public fun language(language: String) { - it.property("language", language) - } - - /** - * The maxResults is the expected number of results to be found if the search request were made. - * Each search engine may have a different limit for the maximum number of results that can be - * returned. - */ - public fun maxResults(maxResults: String) { - it.property("maxResults", maxResults) - } - - /** - * The maxResults is the expected number of results to be found if the search request were made. - * Each search engine may have a different limit for the maximum number of results that can be - * returned. - */ - public fun maxResults(maxResults: Int) { - it.property("maxResults", maxResults.toString()) - } - - /** - * The resultType is the result type of the request. Valid values are - * LANGCHAIN4J_WEB_SEARCH_ORGANIC_RESULT, CONTENT, or SNIPPET. CONTENT is the default value; it will - * return a list of String . You can also specify to return either the Langchain4j Web Search Organic - * Result object (using LANGCHAIN4J_WEB_SEARCH_ORGANIC_RESULT) or snippet (using SNIPPET) for each - * result. If maxResults is equal to 1, the response will be a single object instead of a list. - */ - public fun resultType(resultType: String) { - it.property("resultType", resultType) - } - - /** - * The safeSearch is the safe search flag, indicating whether to enable or disable safe search. - */ - public fun safeSearch(safeSearch: String) { - it.property("safeSearch", safeSearch) - } - - /** - * The safeSearch is the safe search flag, indicating whether to enable or disable safe search. - */ - public fun safeSearch(safeSearch: Boolean) { - it.property("safeSearch", safeSearch.toString()) - } - - /** - * The startIndex is the start index for search results, which may vary depending on the search - * engine. - */ - public fun startIndex(startIndex: String) { - it.property("startIndex", startIndex) - } - - /** - * The startIndex is the start index for search results, which may vary depending on the search - * engine. - */ - public fun startIndex(startIndex: Int) { - it.property("startIndex", startIndex.toString()) - } - - /** - * The startPage is the start page number for search results - */ - public fun startPage(startPage: String) { - it.property("startPage", startPage) - } - - /** - * The startPage is the start page number for search results - */ - public fun startPage(startPage: Int) { - it.property("startPage", startPage.toString()) - } - - /** - * The WebSearchEngine engine to use. This is mandatory. Use one of the implementations from - * Langchain4j web search engines. - */ - public fun webSearchEngine(webSearchEngine: String) { - it.property("webSearchEngine", webSearchEngine) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The webSearchRequest is the custom WebSearchRequest - advanced - */ - public fun webSearchRequest(webSearchRequest: String) { - it.property("webSearchRequest", webSearchRequest) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LanguageUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LanguageUriDsl.kt deleted file mode 100644 index b5c811318fa08..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LanguageUriDsl.kt +++ /dev/null @@ -1,182 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Execute scripts in any of the languages supported by Camel. - */ -public fun UriDsl.language(i: LanguageUriDsl.() -> Unit) { - LanguageUriDsl(this).apply(i) -} - -@CamelDslMarker -public class LanguageUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("language") - } - - private var languageName: String = "" - - private var resourceUri: String = "" - - /** - * Sets the name of the language to use - */ - public fun languageName(languageName: String) { - this.languageName = languageName - it.url("$languageName:$resourceUri") - } - - /** - * Path to the resource, or a reference to lookup a bean in the Registry to use as the resource - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$languageName:$resourceUri") - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: String) { - it.property("allowContextMapAll", allowContextMapAll) - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: Boolean) { - it.property("allowContextMapAll", allowContextMapAll.toString()) - } - - /** - * Whether the script is binary content or text content. By default the script is read as text - * content (eg java.lang.String) - */ - public fun binary(binary: String) { - it.property("binary", binary) - } - - /** - * Whether the script is binary content or text content. By default the script is read as text - * content (eg java.lang.String) - */ - public fun binary(binary: Boolean) { - it.property("binary", binary.toString()) - } - - /** - * Whether to cache the compiled script and reuse Notice reusing the script can cause side effects - * from processing one Camel org.apache.camel.Exchange to the next org.apache.camel.Exchange. - */ - public fun cacheScript(cacheScript: String) { - it.property("cacheScript", cacheScript) - } - - /** - * Whether to cache the compiled script and reuse Notice reusing the script can cause side effects - * from processing one Camel org.apache.camel.Exchange to the next org.apache.camel.Exchange. - */ - public fun cacheScript(cacheScript: Boolean) { - it.property("cacheScript", cacheScript.toString()) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: String) { - it.property("resultType", resultType) - } - - /** - * Sets the script to execute - */ - public fun script(script: String) { - it.property("script", script) - } - - /** - * Whether or not the result of the script should be used as message body. This options is default - * true. - */ - public fun transform(transform: String) { - it.property("transform", transform) - } - - /** - * Whether or not the result of the script should be used as message body. This options is default - * true. - */ - public fun transform(transform: Boolean) { - it.property("transform", transform.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LdapUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LdapUriDsl.kt deleted file mode 100644 index 8b4be7a5e20d1..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LdapUriDsl.kt +++ /dev/null @@ -1,123 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform searches on LDAP servers. - */ -public fun UriDsl.ldap(i: LdapUriDsl.() -> Unit) { - LdapUriDsl(this).apply(i) -} - -@CamelDslMarker -public class LdapUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("ldap") - } - - private var dirContextName: String = "" - - /** - * Name of either a javax.naming.directory.DirContext, or java.util.Hashtable, or Map bean to - * lookup in the registry. If the bean is either a Hashtable or Map then a new - * javax.naming.directory.DirContext instance is created for each use. If the bean is a - * javax.naming.directory.DirContext then the bean is used as given. The latter may not be possible - * in all situations where the javax.naming.directory.DirContext must not be shared, and in those - * situations it can be better to use java.util.Hashtable or Map instead. - */ - public fun dirContextName(dirContextName: String) { - this.dirContextName = dirContextName - it.url("$dirContextName") - } - - /** - * The base DN for searches. - */ - public fun base(base: String) { - it.property("base", base) - } - - /** - * When specified the ldap module uses paging to retrieve all results (most LDAP Servers throw an - * exception when trying to retrieve more than 1000 entries in one query). To be able to use this a - * LdapContext (subclass of DirContext) has to be passed in as ldapServerBean (otherwise an exception - * is thrown) - */ - public fun pageSize(pageSize: String) { - it.property("pageSize", pageSize) - } - - /** - * When specified the ldap module uses paging to retrieve all results (most LDAP Servers throw an - * exception when trying to retrieve more than 1000 entries in one query). To be able to use this a - * LdapContext (subclass of DirContext) has to be passed in as ldapServerBean (otherwise an exception - * is thrown) - */ - public fun pageSize(pageSize: Int) { - it.property("pageSize", pageSize.toString()) - } - - /** - * Comma-separated list of attributes that should be set in each entry of the result - */ - public fun returnedAttributes(returnedAttributes: String) { - it.property("returnedAttributes", returnedAttributes) - } - - /** - * Specifies how deeply to search the tree of entries, starting at the base DN. - */ - public fun scope(scope: String) { - it.property("scope", scope) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LdifUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LdifUriDsl.kt deleted file mode 100644 index 9a4b5e615083c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LdifUriDsl.kt +++ /dev/null @@ -1,77 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform updates on an LDAP server from an LDIF body content. - */ -public fun UriDsl.ldif(i: LdifUriDsl.() -> Unit) { - LdifUriDsl(this).apply(i) -} - -@CamelDslMarker -public class LdifUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("ldif") - } - - private var ldapConnectionName: String = "" - - /** - * The name of the LdapConnection bean to pull from the registry. Note that this must be of scope - * prototype to avoid it being shared among threads or using a connection that has timed out. - */ - public fun ldapConnectionName(ldapConnectionName: String) { - this.ldapConnectionName = ldapConnectionName - it.url("$ldapConnectionName") - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LogUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LogUriDsl.kt deleted file mode 100644 index fc199a6de93d0..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LogUriDsl.kt +++ /dev/null @@ -1,523 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Prints data form the routed message (such as body and headers) to the logger. - */ -public fun UriDsl.log(i: LogUriDsl.() -> Unit) { - LogUriDsl(this).apply(i) -} - -@CamelDslMarker -public class LogUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("log") - } - - private var loggerName: String = "" - - /** - * Name of the logging category to use - */ - public fun loggerName(loggerName: String) { - this.loggerName = loggerName - it.url("$loggerName") - } - - /** - * If true, will hide stats when no new messages have been received for a time interval, if false, - * show stats regardless of message traffic. - */ - public fun groupActiveOnly(groupActiveOnly: String) { - it.property("groupActiveOnly", groupActiveOnly) - } - - /** - * If true, will hide stats when no new messages have been received for a time interval, if false, - * show stats regardless of message traffic. - */ - public fun groupActiveOnly(groupActiveOnly: Boolean) { - it.property("groupActiveOnly", groupActiveOnly.toString()) - } - - /** - * Set the initial delay for stats (in millis) - */ - public fun groupDelay(groupDelay: String) { - it.property("groupDelay", groupDelay) - } - - /** - * Set the initial delay for stats (in millis) - */ - public fun groupDelay(groupDelay: Int) { - it.property("groupDelay", groupDelay.toString()) - } - - /** - * If specified will group message stats by this time interval (in millis) - */ - public fun groupInterval(groupInterval: String) { - it.property("groupInterval", groupInterval) - } - - /** - * If specified will group message stats by this time interval (in millis) - */ - public fun groupInterval(groupInterval: Int) { - it.property("groupInterval", groupInterval.toString()) - } - - /** - * An integer that specifies a group size for throughput logging. - */ - public fun groupSize(groupSize: String) { - it.property("groupSize", groupSize) - } - - /** - * An integer that specifies a group size for throughput logging. - */ - public fun groupSize(groupSize: Int) { - it.property("groupSize", groupSize.toString()) - } - - /** - * Logging level to use. The default value is INFO. - */ - public fun level(level: String) { - it.property("level", level) - } - - /** - * If true, mask sensitive information like password or passphrase in the log. - */ - public fun logMask(logMask: String) { - it.property("logMask", logMask) - } - - /** - * If true, mask sensitive information like password or passphrase in the log. - */ - public fun logMask(logMask: Boolean) { - it.property("logMask", logMask.toString()) - } - - /** - * An optional Marker name to use. - */ - public fun marker(marker: String) { - it.property("marker", marker) - } - - /** - * If enabled only the body will be printed out - */ - public fun plain(plain: String) { - it.property("plain", plain) - } - - /** - * If enabled only the body will be printed out - */ - public fun plain(plain: Boolean) { - it.property("plain", plain.toString()) - } - - /** - * If enabled then the source location of where the log endpoint is used in Camel routes, would be - * used as logger name, instead of the given name. However, if the source location is disabled or not - * possible to resolve then the existing logger name will be used. - */ - public fun sourceLocationLoggerName(sourceLocationLoggerName: String) { - it.property("sourceLocationLoggerName", sourceLocationLoggerName) - } - - /** - * If enabled then the source location of where the log endpoint is used in Camel routes, would be - * used as logger name, instead of the given name. However, if the source location is disabled or not - * possible to resolve then the existing logger name will be used. - */ - public fun sourceLocationLoggerName(sourceLocationLoggerName: Boolean) { - it.property("sourceLocationLoggerName", sourceLocationLoggerName.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use a custom exchange formatter - */ - public fun exchangeFormatter(exchangeFormatter: String) { - it.property("exchangeFormatter", exchangeFormatter) - } - - /** - * Limits the number of characters logged per line. - */ - public fun maxChars(maxChars: String) { - it.property("maxChars", maxChars) - } - - /** - * Limits the number of characters logged per line. - */ - public fun maxChars(maxChars: Int) { - it.property("maxChars", maxChars.toString()) - } - - /** - * If enabled then each information is outputted on a newline. - */ - public fun multiline(multiline: String) { - it.property("multiline", multiline) - } - - /** - * If enabled then each information is outputted on a newline. - */ - public fun multiline(multiline: Boolean) { - it.property("multiline", multiline.toString()) - } - - /** - * Quick option for turning all options on. (multiline, maxChars has to be manually set if to be - * used) - */ - public fun showAll(showAll: String) { - it.property("showAll", showAll) - } - - /** - * Quick option for turning all options on. (multiline, maxChars has to be manually set if to be - * used) - */ - public fun showAll(showAll: Boolean) { - it.property("showAll", showAll.toString()) - } - - /** - * Show all of the exchange properties (both internal and custom). - */ - public fun showAllProperties(showAllProperties: String) { - it.property("showAllProperties", showAllProperties) - } - - /** - * Show all of the exchange properties (both internal and custom). - */ - public fun showAllProperties(showAllProperties: Boolean) { - it.property("showAllProperties", showAllProperties.toString()) - } - - /** - * Show the message body. - */ - public fun showBody(showBody: String) { - it.property("showBody", showBody) - } - - /** - * Show the message body. - */ - public fun showBody(showBody: Boolean) { - it.property("showBody", showBody.toString()) - } - - /** - * Show the body Java type. - */ - public fun showBodyType(showBodyType: String) { - it.property("showBodyType", showBodyType) - } - - /** - * Show the body Java type. - */ - public fun showBodyType(showBodyType: Boolean) { - it.property("showBodyType", showBodyType.toString()) - } - - /** - * Whether Camel should show cached stream bodies or not (org.apache.camel.StreamCache). - */ - public fun showCachedStreams(showCachedStreams: String) { - it.property("showCachedStreams", showCachedStreams) - } - - /** - * Whether Camel should show cached stream bodies or not (org.apache.camel.StreamCache). - */ - public fun showCachedStreams(showCachedStreams: Boolean) { - it.property("showCachedStreams", showCachedStreams.toString()) - } - - /** - * If the exchange has a caught exception, show the exception message (no stack trace). A caught - * exception is stored as a property on the exchange (using the key - * org.apache.camel.Exchange#EXCEPTION_CAUGHT) and for instance a doCatch can catch exceptions. - */ - public fun showCaughtException(showCaughtException: String) { - it.property("showCaughtException", showCaughtException) - } - - /** - * If the exchange has a caught exception, show the exception message (no stack trace). A caught - * exception is stored as a property on the exchange (using the key - * org.apache.camel.Exchange#EXCEPTION_CAUGHT) and for instance a doCatch can catch exceptions. - */ - public fun showCaughtException(showCaughtException: Boolean) { - it.property("showCaughtException", showCaughtException.toString()) - } - - /** - * If the exchange has an exception, show the exception message (no stacktrace) - */ - public fun showException(showException: String) { - it.property("showException", showException) - } - - /** - * If the exchange has an exception, show the exception message (no stacktrace) - */ - public fun showException(showException: Boolean) { - it.property("showException", showException.toString()) - } - - /** - * Show the unique exchange ID. - */ - public fun showExchangeId(showExchangeId: String) { - it.property("showExchangeId", showExchangeId) - } - - /** - * Show the unique exchange ID. - */ - public fun showExchangeId(showExchangeId: Boolean) { - it.property("showExchangeId", showExchangeId.toString()) - } - - /** - * Shows the Message Exchange Pattern (or MEP for short). - */ - public fun showExchangePattern(showExchangePattern: String) { - it.property("showExchangePattern", showExchangePattern) - } - - /** - * Shows the Message Exchange Pattern (or MEP for short). - */ - public fun showExchangePattern(showExchangePattern: Boolean) { - it.property("showExchangePattern", showExchangePattern.toString()) - } - - /** - * If enabled Camel will output files - */ - public fun showFiles(showFiles: String) { - it.property("showFiles", showFiles) - } - - /** - * If enabled Camel will output files - */ - public fun showFiles(showFiles: Boolean) { - it.property("showFiles", showFiles.toString()) - } - - /** - * If enabled Camel will on Future objects wait for it to complete to obtain the payload to be - * logged. - */ - public fun showFuture(showFuture: String) { - it.property("showFuture", showFuture) - } - - /** - * If enabled Camel will on Future objects wait for it to complete to obtain the payload to be - * logged. - */ - public fun showFuture(showFuture: Boolean) { - it.property("showFuture", showFuture.toString()) - } - - /** - * Show the message headers. - */ - public fun showHeaders(showHeaders: String) { - it.property("showHeaders", showHeaders) - } - - /** - * Show the message headers. - */ - public fun showHeaders(showHeaders: Boolean) { - it.property("showHeaders", showHeaders.toString()) - } - - /** - * Show the exchange properties (only custom). Use showAllProperties to show both internal and - * custom properties. - */ - public fun showProperties(showProperties: String) { - it.property("showProperties", showProperties) - } - - /** - * Show the exchange properties (only custom). Use showAllProperties to show both internal and - * custom properties. - */ - public fun showProperties(showProperties: Boolean) { - it.property("showProperties", showProperties.toString()) - } - - /** - * Show route Group. - */ - public fun showRouteGroup(showRouteGroup: String) { - it.property("showRouteGroup", showRouteGroup) - } - - /** - * Show route Group. - */ - public fun showRouteGroup(showRouteGroup: Boolean) { - it.property("showRouteGroup", showRouteGroup.toString()) - } - - /** - * Show route ID. - */ - public fun showRouteId(showRouteId: String) { - it.property("showRouteId", showRouteId) - } - - /** - * Show route ID. - */ - public fun showRouteId(showRouteId: Boolean) { - it.property("showRouteId", showRouteId.toString()) - } - - /** - * Show the stack trace, if an exchange has an exception. Only effective if one of showAll, - * showException or showCaughtException are enabled. - */ - public fun showStackTrace(showStackTrace: String) { - it.property("showStackTrace", showStackTrace) - } - - /** - * Show the stack trace, if an exchange has an exception. Only effective if one of showAll, - * showException or showCaughtException are enabled. - */ - public fun showStackTrace(showStackTrace: Boolean) { - it.property("showStackTrace", showStackTrace.toString()) - } - - /** - * Whether Camel should show stream bodies or not (eg such as java.io.InputStream). Beware if you - * enable this option then you may not be able later to access the message body as the stream have - * already been read by this logger. To remedy this you will have to use Stream Caching. - */ - public fun showStreams(showStreams: String) { - it.property("showStreams", showStreams) - } - - /** - * Whether Camel should show stream bodies or not (eg such as java.io.InputStream). Beware if you - * enable this option then you may not be able later to access the message body as the stream have - * already been read by this logger. To remedy this you will have to use Stream Caching. - */ - public fun showStreams(showStreams: Boolean) { - it.property("showStreams", showStreams.toString()) - } - - /** - * Show the variables. - */ - public fun showVariables(showVariables: String) { - it.property("showVariables", showVariables) - } - - /** - * Show the variables. - */ - public fun showVariables(showVariables: Boolean) { - it.property("showVariables", showVariables.toString()) - } - - /** - * Whether to skip line separators when logging the message body. This allows to log the message - * body in one line, setting this option to false will preserve any line separators from the body, - * which then will log the body as is. - */ - public fun skipBodyLineSeparator(skipBodyLineSeparator: String) { - it.property("skipBodyLineSeparator", skipBodyLineSeparator) - } - - /** - * Whether to skip line separators when logging the message body. This allows to log the message - * body in one line, setting this option to false will preserve any line separators from the body, - * which then will log the body as is. - */ - public fun skipBodyLineSeparator(skipBodyLineSeparator: Boolean) { - it.property("skipBodyLineSeparator", skipBodyLineSeparator.toString()) - } - - /** - * Sets the outputs style to use. - */ - public fun style(style: String) { - it.property("style", style) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LprUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LprUriDsl.kt deleted file mode 100644 index ee835fe7d2b30..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LprUriDsl.kt +++ /dev/null @@ -1,193 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send print jobs to printers. - */ -public fun UriDsl.lpr(i: LprUriDsl.() -> Unit) { - LprUriDsl(this).apply(i) -} - -@CamelDslMarker -public class LprUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("lpr") - } - - private var hostname: String = "" - - private var port: String = "" - - private var printername: String = "" - - /** - * Hostname of the printer - */ - public fun hostname(hostname: String) { - this.hostname = hostname - it.url("$hostname:$port/$printername") - } - - /** - * Port number of the printer - */ - public fun port(port: String) { - this.port = port - it.url("$hostname:$port/$printername") - } - - /** - * Port number of the printer - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$hostname:$port/$printername") - } - - /** - * Name of the printer - */ - public fun printername(printername: String) { - this.printername = printername - it.url("$hostname:$port/$printername") - } - - /** - * Number of copies to print - */ - public fun copies(copies: String) { - it.property("copies", copies) - } - - /** - * Number of copies to print - */ - public fun copies(copies: Int) { - it.property("copies", copies.toString()) - } - - /** - * Sets DocFlavor to use. - */ - public fun docFlavor(docFlavor: String) { - it.property("docFlavor", docFlavor) - } - - /** - * Sets DocFlavor to use. - */ - public fun flavor(flavor: String) { - it.property("flavor", flavor) - } - - /** - * Sets the stationary as defined by enumeration names in the - * javax.print.attribute.standard.MediaSizeName API. The default setting is to use North American - * Letter sized stationary. The value's case is ignored, e.g. values of iso_a4 and ISO_A4 may be - * used. - */ - public fun mediaSize(mediaSize: String) { - it.property("mediaSize", mediaSize) - } - - /** - * Sets MediaTray supported by the javax.print.DocFlavor API, for example upper,middle etc. - */ - public fun mediaTray(mediaTray: String) { - it.property("mediaTray", mediaTray) - } - - /** - * Sets mimeTypes supported by the javax.print.DocFlavor API - */ - public fun mimeType(mimeType: String) { - it.property("mimeType", mimeType) - } - - /** - * Sets the page orientation. - */ - public fun orientation(orientation: String) { - it.property("orientation", orientation) - } - - /** - * Sets the prefix name of the printer, it is useful when the printer name does not start with - * //hostname/printer - */ - public fun printerPrefix(printerPrefix: String) { - it.property("printerPrefix", printerPrefix) - } - - /** - * etting this option to false prevents sending of the print data to the printer - */ - public fun sendToPrinter(sendToPrinter: String) { - it.property("sendToPrinter", sendToPrinter) - } - - /** - * etting this option to false prevents sending of the print data to the printer - */ - public fun sendToPrinter(sendToPrinter: Boolean) { - it.property("sendToPrinter", sendToPrinter.toString()) - } - - /** - * Sets one sided or two sided printing based on the javax.print.attribute.standard.Sides API - */ - public fun sides(sides: String) { - it.property("sides", sides) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LuceneUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LuceneUriDsl.kt deleted file mode 100644 index d995e4c412605..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LuceneUriDsl.kt +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform inserts or queries against Apache Lucene databases. - */ -public fun UriDsl.lucene(i: LuceneUriDsl.() -> Unit) { - LuceneUriDsl(this).apply(i) -} - -@CamelDslMarker -public class LuceneUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("lucene") - } - - private var host: String = "" - - private var operation: String = "" - - /** - * The URL to the lucene server - */ - public fun host(host: String) { - this.host = host - it.url("$host:$operation") - } - - /** - * Operation to do such as insert or query. - */ - public fun operation(operation: String) { - this.operation = operation - it.url("$host:$operation") - } - - /** - * An Analyzer builds TokenStreams, which analyze text. It thus represents a policy for extracting - * index terms from text. The value for analyzer can be any class that extends the abstract class - * org.apache.lucene.analysis.Analyzer. Lucene also offers a rich set of analyzers out of the box - */ - public fun analyzer(analyzer: String) { - it.property("analyzer", analyzer) - } - - /** - * A file system directory in which index files are created upon analysis of the document by the - * specified analyzer - */ - public fun indexDir(indexDir: String) { - it.property("indexDir", indexDir) - } - - /** - * An integer value that limits the result set of the search operation - */ - public fun maxHits(maxHits: String) { - it.property("maxHits", maxHits) - } - - /** - * An integer value that limits the result set of the search operation - */ - public fun maxHits(maxHits: Int) { - it.property("maxHits", maxHits.toString()) - } - - /** - * An optional directory containing files to be used to be analyzed and added to the index at - * producer startup. - */ - public fun srcDir(srcDir: String) { - it.property("srcDir", srcDir) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LumberjackUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LumberjackUriDsl.kt deleted file mode 100644 index 055440e787de8..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/LumberjackUriDsl.kt +++ /dev/null @@ -1,124 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Receive logs messages using the Lumberjack protocol. - */ -public fun UriDsl.lumberjack(i: LumberjackUriDsl.() -> Unit) { - LumberjackUriDsl(this).apply(i) -} - -@CamelDslMarker -public class LumberjackUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("lumberjack") - } - - private var host: String = "" - - private var port: String = "" - - /** - * Network interface on which to listen for Lumberjack - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port") - } - - /** - * Network port on which to listen for Lumberjack - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port") - } - - /** - * Network port on which to listen for Lumberjack - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port") - } - - /** - * SSL configuration - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MapstructUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MapstructUriDsl.kt deleted file mode 100644 index d705ac0616183..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MapstructUriDsl.kt +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Type Conversion using Mapstruct - */ -public fun UriDsl.mapstruct(i: MapstructUriDsl.() -> Unit) { - MapstructUriDsl(this).apply(i) -} - -@CamelDslMarker -public class MapstructUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("mapstruct") - } - - private var className: String = "" - - /** - * The fully qualified class name of the POJO that mapstruct should convert to (target) - */ - public fun className(className: String) { - this.className = className - it.url("$className") - } - - /** - * Whether there must exist a mapstruct converter to convert to the POJO. - */ - public fun mandatory(mandatory: String) { - it.property("mandatory", mandatory) - } - - /** - * Whether there must exist a mapstruct converter to convert to the POJO. - */ - public fun mandatory(mandatory: Boolean) { - it.property("mandatory", mandatory.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MasterUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MasterUriDsl.kt deleted file mode 100644 index 2d0455dfdf613..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MasterUriDsl.kt +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Have only a single consumer in a cluster consuming from a given endpoint; with automatic failover - * if the JVM dies. - */ -public fun UriDsl.master(i: MasterUriDsl.() -> Unit) { - MasterUriDsl(this).apply(i) -} - -@CamelDslMarker -public class MasterUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("master") - } - - private var namespace: String = "" - - private var delegateUri: String = "" - - /** - * The name of the cluster namespace to use - */ - public fun namespace(namespace: String) { - this.namespace = namespace - it.url("$namespace:$delegateUri") - } - - /** - * The endpoint uri to use in master/slave mode - */ - public fun delegateUri(delegateUri: String) { - this.delegateUri = delegateUri - it.url("$namespace:$delegateUri") - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MetricsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MetricsUriDsl.kt deleted file mode 100644 index 7c327829fdca9..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MetricsUriDsl.kt +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Collect various metrics directly from Camel routes using the DropWizard metrics library. - */ -public fun UriDsl.metrics(i: MetricsUriDsl.() -> Unit) { - MetricsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class MetricsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("metrics") - } - - private var metricsType: String = "" - - private var metricsName: String = "" - - /** - * Type of metrics - */ - public fun metricsType(metricsType: String) { - this.metricsType = metricsType - it.url("$metricsType:$metricsName") - } - - /** - * Name of metrics - */ - public fun metricsName(metricsName: String) { - this.metricsName = metricsName - it.url("$metricsType:$metricsName") - } - - /** - * Action when using timer type - */ - public fun action(action: String) { - it.property("action", action) - } - - /** - * Decrement value when using counter type - */ - public fun decrement(decrement: String) { - it.property("decrement", decrement) - } - - /** - * Decrement value when using counter type - */ - public fun decrement(decrement: Int) { - it.property("decrement", decrement.toString()) - } - - /** - * Increment value when using counter type - */ - public fun increment(increment: String) { - it.property("increment", increment) - } - - /** - * Increment value when using counter type - */ - public fun increment(increment: Int) { - it.property("increment", increment.toString()) - } - - /** - * Mark when using meter type - */ - public fun mark(mark: String) { - it.property("mark", mark) - } - - /** - * Mark when using meter type - */ - public fun mark(mark: Int) { - it.property("mark", mark.toString()) - } - - /** - * Subject value when using gauge type - */ - public fun subject(subject: String) { - it.property("subject", subject) - } - - /** - * Value value when using histogram type - */ - public fun `value`(`value`: String) { - it.property("value", value) - } - - /** - * Value value when using histogram type - */ - public fun `value`(`value`: Int) { - it.property("value", value.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MicrometerUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MicrometerUriDsl.kt deleted file mode 100644 index 9cee343aa5757..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MicrometerUriDsl.kt +++ /dev/null @@ -1,131 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Collect various metrics directly from Camel routes using the Micrometer library. - */ -public fun UriDsl.micrometer(i: MicrometerUriDsl.() -> Unit) { - MicrometerUriDsl(this).apply(i) -} - -@CamelDslMarker -public class MicrometerUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("micrometer") - } - - private var metricsType: String = "" - - private var metricsName: String = "" - - private var tags: String = "" - - /** - * Type of metrics - */ - public fun metricsType(metricsType: String) { - this.metricsType = metricsType - it.url("$metricsType:$metricsName") - } - - /** - * Name of metrics - */ - public fun metricsName(metricsName: String) { - this.metricsName = metricsName - it.url("$metricsType:$metricsName") - } - - /** - * Tags of metrics - */ - public fun tags(tags: String) { - this.tags = tags - it.url("$metricsType:$metricsName") - } - - /** - * Action expression when using timer type - */ - public fun action(action: String) { - it.property("action", action) - } - - /** - * Decrement value expression when using counter type - */ - public fun decrement(decrement: String) { - it.property("decrement", decrement) - } - - /** - * Increment value expression when using counter type - */ - public fun increment(increment: String) { - it.property("increment", increment) - } - - /** - * Description of metrics - */ - public fun metricsDescription(metricsDescription: String) { - it.property("metricsDescription", metricsDescription) - } - - /** - * Value expression when using histogram type - */ - public fun `value`(`value`: String) { - it.property("value", value) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MilvusUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MilvusUriDsl.kt deleted file mode 100644 index 06e52f3014657..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MilvusUriDsl.kt +++ /dev/null @@ -1,119 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on the Milvus Vector Database. - */ -public fun UriDsl.milvus(i: MilvusUriDsl.() -> Unit) { - MilvusUriDsl(this).apply(i) -} - -@CamelDslMarker -public class MilvusUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("milvus") - } - - private var collection: String = "" - - /** - * The collection Name - */ - public fun collection(collection: String) { - this.collection = collection - it.url("$collection") - } - - /** - * The host to connect to. - */ - public fun host(host: String) { - it.property("host", host) - } - - /** - * The port to connect to. - */ - public fun port(port: String) { - it.property("port", port) - } - - /** - * The port to connect to. - */ - public fun port(port: Int) { - it.property("port", port.toString()) - } - - /** - * Sets a default timeout for all requests - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Sets a default timeout for all requests - */ - public fun timeout(timeout: Int) { - it.property("timeout", timeout.toString()) - } - - /** - * Sets the API key to use for authentication - */ - public fun token(token: String) { - it.property("token", token) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MinaUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MinaUriDsl.kt deleted file mode 100644 index 07057fa1acc1a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MinaUriDsl.kt +++ /dev/null @@ -1,455 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Socket level networking using TCP or UDP with Apache Mina 2.x. - */ -public fun UriDsl.mina(i: MinaUriDsl.() -> Unit) { - MinaUriDsl(this).apply(i) -} - -@CamelDslMarker -public class MinaUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("mina") - } - - private var protocol: String = "" - - private var host: String = "" - - private var port: String = "" - - /** - * Protocol to use - */ - public fun protocol(protocol: String) { - this.protocol = protocol - it.url("$protocol:$host:$port") - } - - /** - * Hostname to use. Use localhost or 0.0.0.0 for local server as consumer. For producer use the - * hostname or ip address of the remote server. - */ - public fun host(host: String) { - this.host = host - it.url("$protocol:$host:$port") - } - - /** - * Port number - */ - public fun port(port: String) { - this.port = port - it.url("$protocol:$host:$port") - } - - /** - * Port number - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$protocol:$host:$port") - } - - /** - * Whether to disconnect(close) from Mina session right after use. Can be used for both consumer - * and producer. - */ - public fun disconnect(disconnect: String) { - it.property("disconnect", disconnect) - } - - /** - * Whether to disconnect(close) from Mina session right after use. Can be used for both consumer - * and producer. - */ - public fun disconnect(disconnect: Boolean) { - it.property("disconnect", disconnect.toString()) - } - - /** - * You can enable the Apache MINA logging filter. Apache MINA uses slf4j logging at INFO level to - * log all input and output. - */ - public fun minaLogger(minaLogger: String) { - it.property("minaLogger", minaLogger) - } - - /** - * You can enable the Apache MINA logging filter. Apache MINA uses slf4j logging at INFO level to - * log all input and output. - */ - public fun minaLogger(minaLogger: Boolean) { - it.property("minaLogger", minaLogger.toString()) - } - - /** - * Setting to set endpoint as one-way or request-response. - */ - public fun sync(sync: String) { - it.property("sync", sync) - } - - /** - * Setting to set endpoint as one-way or request-response. - */ - public fun sync(sync: Boolean) { - it.property("sync", sync.toString()) - } - - /** - * You can configure the timeout that specifies how long to wait for a response from a remote - * server. The timeout unit is in milliseconds, so 60000 is 60 seconds. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * You can configure the timeout that specifies how long to wait for a response from a remote - * server. The timeout unit is in milliseconds, so 60000 is 60 seconds. - */ - public fun timeout(timeout: Int) { - it.property("timeout", timeout.toString()) - } - - /** - * Maximum amount of time it should take to send data to the MINA session. Default is 10000 - * milliseconds. - */ - public fun writeTimeout(writeTimeout: String) { - it.property("writeTimeout", writeTimeout) - } - - /** - * Maximum amount of time it should take to send data to the MINA session. Default is 10000 - * milliseconds. - */ - public fun writeTimeout(writeTimeout: Int) { - it.property("writeTimeout", writeTimeout.toString()) - } - - /** - * If the clientMode is true, mina consumer will connect the address as a TCP client. - */ - public fun clientMode(clientMode: String) { - it.property("clientMode", clientMode) - } - - /** - * If the clientMode is true, mina consumer will connect the address as a TCP client. - */ - public fun clientMode(clientMode: Boolean) { - it.property("clientMode", clientMode.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * If sync is enabled this option dictates MinaConsumer which logging level to use when logging a - * there is no reply to send back. - */ - public fun noReplyLogLevel(noReplyLogLevel: String) { - it.property("noReplyLogLevel", noReplyLogLevel) - } - - /** - * Whether to create the InetAddress once and reuse. Setting this to false allows to pickup DNS - * changes in the network. - */ - public fun cachedAddress(cachedAddress: String) { - it.property("cachedAddress", cachedAddress) - } - - /** - * Whether to create the InetAddress once and reuse. Setting this to false allows to pickup DNS - * changes in the network. - */ - public fun cachedAddress(cachedAddress: Boolean) { - it.property("cachedAddress", cachedAddress.toString()) - } - - /** - * Sessions can be lazily created to avoid exceptions, if the remote server is not up and running - * when the Camel producer is started. - */ - public fun lazySessionCreation(lazySessionCreation: String) { - it.property("lazySessionCreation", lazySessionCreation) - } - - /** - * Sessions can be lazily created to avoid exceptions, if the remote server is not up and running - * when the Camel producer is started. - */ - public fun lazySessionCreation(lazySessionCreation: Boolean) { - it.property("lazySessionCreation", lazySessionCreation.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * If sync is enabled then this option dictates MinaConsumer if it should disconnect where there - * is no reply to send back. - */ - public fun disconnectOnNoReply(disconnectOnNoReply: String) { - it.property("disconnectOnNoReply", disconnectOnNoReply) - } - - /** - * If sync is enabled then this option dictates MinaConsumer if it should disconnect where there - * is no reply to send back. - */ - public fun disconnectOnNoReply(disconnectOnNoReply: Boolean) { - it.property("disconnectOnNoReply", disconnectOnNoReply.toString()) - } - - /** - * Number of worker threads in the worker pool for TCP and UDP - */ - public fun maximumPoolSize(maximumPoolSize: String) { - it.property("maximumPoolSize", maximumPoolSize) - } - - /** - * Number of worker threads in the worker pool for TCP and UDP - */ - public fun maximumPoolSize(maximumPoolSize: Int) { - it.property("maximumPoolSize", maximumPoolSize.toString()) - } - - /** - * Whether to use ordered thread pool, to ensure events are processed orderly on the same channel. - */ - public fun orderedThreadPoolExecutor(orderedThreadPoolExecutor: String) { - it.property("orderedThreadPoolExecutor", orderedThreadPoolExecutor) - } - - /** - * Whether to use ordered thread pool, to ensure events are processed orderly on the same channel. - */ - public fun orderedThreadPoolExecutor(orderedThreadPoolExecutor: Boolean) { - it.property("orderedThreadPoolExecutor", orderedThreadPoolExecutor.toString()) - } - - /** - * Only used for TCP. You can transfer the exchange over the wire instead of just the body. The - * following fields are transferred: In body, Out body, fault body, In headers, Out headers, fault - * headers, exchange properties, exchange exception. This requires that the objects are serializable. - * Camel will exclude any non-serializable objects and log it at WARN level. - */ - public fun transferExchange(transferExchange: String) { - it.property("transferExchange", transferExchange) - } - - /** - * Only used for TCP. You can transfer the exchange over the wire instead of just the body. The - * following fields are transferred: In body, Out body, fault body, In headers, Out headers, fault - * headers, exchange properties, exchange exception. This requires that the objects are serializable. - * Camel will exclude any non-serializable objects and log it at WARN level. - */ - public fun transferExchange(transferExchange: Boolean) { - it.property("transferExchange", transferExchange.toString()) - } - - /** - * The mina component installs a default codec if both, codec is null and textline is false. - * Setting allowDefaultCodec to false prevents the mina component from installing a default codec as - * the first element in the filter chain. This is useful in scenarios where another filter must be - * the first in the filter chain, like the SSL filter. - */ - public fun allowDefaultCodec(allowDefaultCodec: String) { - it.property("allowDefaultCodec", allowDefaultCodec) - } - - /** - * The mina component installs a default codec if both, codec is null and textline is false. - * Setting allowDefaultCodec to false prevents the mina component from installing a default codec as - * the first element in the filter chain. This is useful in scenarios where another filter must be - * the first in the filter chain, like the SSL filter. - */ - public fun allowDefaultCodec(allowDefaultCodec: Boolean) { - it.property("allowDefaultCodec", allowDefaultCodec.toString()) - } - - /** - * To use a custom minda codec implementation. - */ - public fun codec(codec: String) { - it.property("codec", codec) - } - - /** - * To set the textline protocol decoder max line length. By default the default value of Mina - * itself is used which are 1024. - */ - public fun decoderMaxLineLength(decoderMaxLineLength: String) { - it.property("decoderMaxLineLength", decoderMaxLineLength) - } - - /** - * To set the textline protocol decoder max line length. By default the default value of Mina - * itself is used which are 1024. - */ - public fun decoderMaxLineLength(decoderMaxLineLength: Int) { - it.property("decoderMaxLineLength", decoderMaxLineLength.toString()) - } - - /** - * To set the textline protocol encoder max line length. By default the default value of Mina - * itself is used which are Integer.MAX_VALUE. - */ - public fun encoderMaxLineLength(encoderMaxLineLength: String) { - it.property("encoderMaxLineLength", encoderMaxLineLength) - } - - /** - * To set the textline protocol encoder max line length. By default the default value of Mina - * itself is used which are Integer.MAX_VALUE. - */ - public fun encoderMaxLineLength(encoderMaxLineLength: Int) { - it.property("encoderMaxLineLength", encoderMaxLineLength.toString()) - } - - /** - * You can configure the encoding (a charset name) to use for the TCP textline codec and the UDP - * protocol. If not provided, Camel will use the JVM default Charset - */ - public fun encoding(encoding: String) { - it.property("encoding", encoding) - } - - /** - * You can set a list of Mina IoFilters to use. - */ - public fun filters(filters: String) { - it.property("filters", filters) - } - - /** - * Only used for TCP. If no codec is specified, you can use this flag to indicate a text line - * based codec; if not specified or the value is false, then Object Serialization is assumed over - * TCP. - */ - public fun textline(textline: String) { - it.property("textline", textline) - } - - /** - * Only used for TCP. If no codec is specified, you can use this flag to indicate a text line - * based codec; if not specified or the value is false, then Object Serialization is assumed over - * TCP. - */ - public fun textline(textline: Boolean) { - it.property("textline", textline.toString()) - } - - /** - * Only used for TCP and if textline=true. Sets the text line delimiter to use. If none provided, - * Camel will use DEFAULT. This delimiter is used to mark the end of text. - */ - public fun textlineDelimiter(textlineDelimiter: String) { - it.property("textlineDelimiter", textlineDelimiter) - } - - /** - * To configure SSL security. - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MinioUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MinioUriDsl.kt deleted file mode 100644 index 8050f699c9a4b..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MinioUriDsl.kt +++ /dev/null @@ -1,809 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Store and retrieve objects from Minio Storage Service using Minio SDK. - */ -public fun UriDsl.minio(i: MinioUriDsl.() -> Unit) { - MinioUriDsl(this).apply(i) -} - -@CamelDslMarker -public class MinioUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("minio") - } - - private var bucketName: String = "" - - /** - * Bucket name - */ - public fun bucketName(bucketName: String) { - this.bucketName = bucketName - it.url("$bucketName") - } - - /** - * Setting the autocreation of the bucket if bucket name not exist. - */ - public fun autoCreateBucket(autoCreateBucket: String) { - it.property("autoCreateBucket", autoCreateBucket) - } - - /** - * Setting the autocreation of the bucket if bucket name not exist. - */ - public fun autoCreateBucket(autoCreateBucket: Boolean) { - it.property("autoCreateBucket", autoCreateBucket.toString()) - } - - /** - * Endpoint can be an URL, domain name, IPv4 address or IPv6 address. - */ - public fun endpoint(endpoint: String) { - it.property("endpoint", endpoint) - } - - /** - * Reference to a Minio Client object in the registry. - */ - public fun minioClient(minioClient: String) { - it.property("minioClient", minioClient) - } - - /** - * Set when creating new bucket. - */ - public fun objectLock(objectLock: String) { - it.property("objectLock", objectLock) - } - - /** - * Set when creating new bucket. - */ - public fun objectLock(objectLock: Boolean) { - it.property("objectLock", objectLock.toString()) - } - - /** - * The policy for this queue to set in the method. - */ - public fun policy(policy: String) { - it.property("policy", policy) - } - - /** - * TCP/IP port number. 80 and 443 are used as defaults for HTTP and HTTPS. - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * TCP/IP port number. 80 and 443 are used as defaults for HTTP and HTTPS. - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * The region in which Minio client needs to work. When using this parameter, the configuration - * will expect the lowercase name of the region (for example ap-east-1). You'll need to use the name - * Region.EU_WEST_1.id() - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * Flag to indicate to use secure connection to minio service or not. - */ - public fun secure(secure: String) { - it.property("secure", secure) - } - - /** - * Flag to indicate to use secure connection to minio service or not. - */ - public fun secure(secure: Boolean) { - it.property("secure", secure.toString()) - } - - /** - * If this option is true and includeBody is true, then the MinioObject.close() method will be - * called on exchange completion. This option is strongly related to includeBody option. In case of - * setting includeBody to true and autocloseBody to false, it will be up to the caller to close the - * MinioObject stream. Setting autocloseBody to true, will close the MinioObject stream - * automatically. - */ - public fun autoCloseBody(autoCloseBody: String) { - it.property("autoCloseBody", autoCloseBody) - } - - /** - * If this option is true and includeBody is true, then the MinioObject.close() method will be - * called on exchange completion. This option is strongly related to includeBody option. In case of - * setting includeBody to true and autocloseBody to false, it will be up to the caller to close the - * MinioObject stream. Setting autocloseBody to true, will close the MinioObject stream - * automatically. - */ - public fun autoCloseBody(autoCloseBody: Boolean) { - it.property("autoCloseBody", autoCloseBody.toString()) - } - - /** - * Set this flag if you want to bypassGovernanceMode when deleting a particular object. - */ - public fun bypassGovernanceMode(bypassGovernanceMode: String) { - it.property("bypassGovernanceMode", bypassGovernanceMode) - } - - /** - * Set this flag if you want to bypassGovernanceMode when deleting a particular object. - */ - public fun bypassGovernanceMode(bypassGovernanceMode: Boolean) { - it.property("bypassGovernanceMode", bypassGovernanceMode.toString()) - } - - /** - * Delete objects from Minio after they have been retrieved. The delete is only performed if the - * Exchange is committed. If a rollback occurs, the object is not deleted. If this option is false, - * then the same objects will be retrieve over and over again on the polls. Therefore you need to use - * the Idempotent Consumer EIP in the route to filter out duplicates. You can filter using the - * MinioConstants#BUCKET_NAME and MinioConstants#OBJECT_NAME headers, or only the - * MinioConstants#OBJECT_NAME header. - */ - public fun deleteAfterRead(deleteAfterRead: String) { - it.property("deleteAfterRead", deleteAfterRead) - } - - /** - * Delete objects from Minio after they have been retrieved. The delete is only performed if the - * Exchange is committed. If a rollback occurs, the object is not deleted. If this option is false, - * then the same objects will be retrieve over and over again on the polls. Therefore you need to use - * the Idempotent Consumer EIP in the route to filter out duplicates. You can filter using the - * MinioConstants#BUCKET_NAME and MinioConstants#OBJECT_NAME headers, or only the - * MinioConstants#OBJECT_NAME header. - */ - public fun deleteAfterRead(deleteAfterRead: Boolean) { - it.property("deleteAfterRead", deleteAfterRead.toString()) - } - - /** - * The delimiter which is used in the ListObjectsRequest to only consume objects we are interested - * in. - */ - public fun delimiter(delimiter: String) { - it.property("delimiter", delimiter) - } - - /** - * Destination bucket name. - */ - public fun destinationBucketName(destinationBucketName: String) { - it.property("destinationBucketName", destinationBucketName) - } - - /** - * Destination object name. - */ - public fun destinationObjectName(destinationObjectName: String) { - it.property("destinationObjectName", destinationObjectName) - } - - /** - * If it is true, the exchange body will be set to a stream to the contents of the file. If false, - * the headers will be set with the Minio object metadata, but the body will be null. This option is - * strongly related to autocloseBody option. In case of setting includeBody to true and autocloseBody - * to false, it will be up to the caller to close the MinioObject stream. Setting autocloseBody to - * true, will close the MinioObject stream automatically. - */ - public fun includeBody(includeBody: String) { - it.property("includeBody", includeBody) - } - - /** - * If it is true, the exchange body will be set to a stream to the contents of the file. If false, - * the headers will be set with the Minio object metadata, but the body will be null. This option is - * strongly related to autocloseBody option. In case of setting includeBody to true and autocloseBody - * to false, it will be up to the caller to close the MinioObject stream. Setting autocloseBody to - * true, will close the MinioObject stream automatically. - */ - public fun includeBody(includeBody: Boolean) { - it.property("includeBody", includeBody.toString()) - } - - /** - * The flag which is used in the ListObjectsRequest to set include folders. - */ - public fun includeFolders(includeFolders: String) { - it.property("includeFolders", includeFolders) - } - - /** - * The flag which is used in the ListObjectsRequest to set include folders. - */ - public fun includeFolders(includeFolders: Boolean) { - it.property("includeFolders", includeFolders.toString()) - } - - /** - * The flag which is used in the ListObjectsRequest to get objects with user meta data. - */ - public fun includeUserMetadata(includeUserMetadata: String) { - it.property("includeUserMetadata", includeUserMetadata) - } - - /** - * The flag which is used in the ListObjectsRequest to get objects with user meta data. - */ - public fun includeUserMetadata(includeUserMetadata: Boolean) { - it.property("includeUserMetadata", includeUserMetadata.toString()) - } - - /** - * The flag which is used in the ListObjectsRequest to get objects with versioning. - */ - public fun includeVersions(includeVersions: String) { - it.property("includeVersions", includeVersions) - } - - /** - * The flag which is used in the ListObjectsRequest to get objects with versioning. - */ - public fun includeVersions(includeVersions: Boolean) { - it.property("includeVersions", includeVersions.toString()) - } - - /** - * Number of bytes of object data from offset. - */ - public fun length(length: String) { - it.property("length", length) - } - - /** - * Number of bytes of object data from offset. - */ - public fun length(length: Int) { - it.property("length", length.toString()) - } - - /** - * Set match ETag parameter for get object(s). - */ - public fun matchETag(matchETag: String) { - it.property("matchETag", matchETag) - } - - /** - * Set the maxConnections parameter in the minio client configuration - */ - public fun maxConnections(maxConnections: String) { - it.property("maxConnections", maxConnections) - } - - /** - * Set the maxConnections parameter in the minio client configuration - */ - public fun maxConnections(maxConnections: Int) { - it.property("maxConnections", maxConnections.toString()) - } - - /** - * Gets the maximum number of messages as a limit to poll at each polling. Gets the maximum number - * of messages as a limit to poll at each polling. The default value is 10. Use 0 or a negative - * number to set it as unlimited. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * Gets the maximum number of messages as a limit to poll at each polling. Gets the maximum number - * of messages as a limit to poll at each polling. The default value is 10. Use 0 or a negative - * number to set it as unlimited. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * Set modified since parameter for get object(s). - */ - public fun modifiedSince(modifiedSince: String) { - it.property("modifiedSince", modifiedSince) - } - - /** - * Move objects from bucket to a different bucket after they have been retrieved. To accomplish - * the operation the destinationBucket option must be set. The copy bucket operation is only - * performed if the Exchange is committed. If a rollback occurs, the object is not moved. - */ - public fun moveAfterRead(moveAfterRead: String) { - it.property("moveAfterRead", moveAfterRead) - } - - /** - * Move objects from bucket to a different bucket after they have been retrieved. To accomplish - * the operation the destinationBucket option must be set. The copy bucket operation is only - * performed if the Exchange is committed. If a rollback occurs, the object is not moved. - */ - public fun moveAfterRead(moveAfterRead: Boolean) { - it.property("moveAfterRead", moveAfterRead.toString()) - } - - /** - * Set not match ETag parameter for get object(s). - */ - public fun notMatchETag(notMatchETag: String) { - it.property("notMatchETag", notMatchETag) - } - - /** - * To get the object from the bucket with the given object name. - */ - public fun objectName(objectName: String) { - it.property("objectName", objectName) - } - - /** - * Start byte position of object data. - */ - public fun offset(offset: String) { - it.property("offset", offset) - } - - /** - * Start byte position of object data. - */ - public fun offset(offset: Int) { - it.property("offset", offset.toString()) - } - - /** - * Object name starts with prefix. - */ - public fun prefix(prefix: String) { - it.property("prefix", prefix) - } - - /** - * List recursively than directory structure emulation. - */ - public fun recursive(recursive: String) { - it.property("recursive", recursive) - } - - /** - * List recursively than directory structure emulation. - */ - public fun recursive(recursive: Boolean) { - it.property("recursive", recursive.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * list objects in bucket after this object name. - */ - public fun startAfter(startAfter: String) { - it.property("startAfter", startAfter) - } - - /** - * Set un modified since parameter for get object(s). - */ - public fun unModifiedSince(unModifiedSince: String) { - it.property("unModifiedSince", unModifiedSince) - } - - /** - * when true, version 1 of REST API is used. - */ - public fun useVersion1(useVersion1: String) { - it.property("useVersion1", useVersion1) - } - - /** - * when true, version 1 of REST API is used. - */ - public fun useVersion1(useVersion1: Boolean) { - it.property("useVersion1", useVersion1.toString()) - } - - /** - * Set specific version_ID of a object when deleting the object. - */ - public fun versionId(versionId: String) { - it.property("versionId", versionId) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Delete file object after the Minio file has been uploaded. - */ - public fun deleteAfterWrite(deleteAfterWrite: String) { - it.property("deleteAfterWrite", deleteAfterWrite) - } - - /** - * Delete file object after the Minio file has been uploaded. - */ - public fun deleteAfterWrite(deleteAfterWrite: Boolean) { - it.property("deleteAfterWrite", deleteAfterWrite.toString()) - } - - /** - * Setting the key name for an element in the bucket through endpoint parameter. - */ - public fun keyName(keyName: String) { - it.property("keyName", keyName) - } - - /** - * The operation to do in case the user don't want to do only an upload. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * If we want to use a POJO request as body or not. - */ - public fun pojoRequest(pojoRequest: String) { - it.property("pojoRequest", pojoRequest) - } - - /** - * If we want to use a POJO request as body or not. - */ - public fun pojoRequest(pojoRequest: Boolean) { - it.property("pojoRequest", pojoRequest.toString()) - } - - /** - * The storage class to set in the request. - */ - public fun storageClass(storageClass: String) { - it.property("storageClass", storageClass) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Set custom HTTP client for authenticated access. - */ - public fun customHttpClient(customHttpClient: String) { - it.property("customHttpClient", customHttpClient) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Amazon AWS Secret Access Key or Minio Access Key. If not set camel will connect to service for - * anonymous access. - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Amazon AWS Access Key Id or Minio Secret Key. If not set camel will connect to service for - * anonymous access. - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Server-side encryption. - */ - public fun serverSideEncryption(serverSideEncryption: String) { - it.property("serverSideEncryption", serverSideEncryption) - } - - /** - * Server-side encryption for source object while copy/move objects. - */ - public fun serverSideEncryptionCustomerKey(serverSideEncryptionCustomerKey: String) { - it.property("serverSideEncryptionCustomerKey", serverSideEncryptionCustomerKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MllpUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MllpUriDsl.kt deleted file mode 100644 index a9539f123b11a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MllpUriDsl.kt +++ /dev/null @@ -1,493 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Communicate with external systems using the MLLP protocol. - */ -public fun UriDsl.mllp(i: MllpUriDsl.() -> Unit) { - MllpUriDsl(this).apply(i) -} - -@CamelDslMarker -public class MllpUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("mllp") - } - - private var hostname: String = "" - - private var port: String = "" - - /** - * Hostname or IP for connection for the TCP connection. The default value is null, which means - * any local IP address - */ - public fun hostname(hostname: String) { - this.hostname = hostname - it.url("$hostname:$port") - } - - /** - * Port number for the TCP connection - */ - public fun port(port: String) { - this.port = port - it.url("$hostname:$port") - } - - /** - * Port number for the TCP connection - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$hostname:$port") - } - - /** - * Enable/Disable the automatic generation of a MLLP Acknowledgement MLLP Consumers only - */ - public fun autoAck(autoAck: String) { - it.property("autoAck", autoAck) - } - - /** - * Enable/Disable the automatic generation of a MLLP Acknowledgement MLLP Consumers only - */ - public fun autoAck(autoAck: Boolean) { - it.property("autoAck", autoAck.toString()) - } - - /** - * Sets the default charset to use - */ - public fun charsetName(charsetName: String) { - it.property("charsetName", charsetName) - } - - /** - * Enable/Disable the automatic generation of message headers from the HL7 Message MLLP Consumers - * only - */ - public fun hl7Headers(hl7Headers: String) { - it.property("hl7Headers", hl7Headers) - } - - /** - * Enable/Disable the automatic generation of message headers from the HL7 Message MLLP Consumers - * only - */ - public fun hl7Headers(hl7Headers: Boolean) { - it.property("hl7Headers", hl7Headers.toString()) - } - - /** - * Enable/Disable strict compliance to the MLLP standard. The MLLP standard specifies - * START_OF_BLOCKhl7 payloadEND_OF_BLOCKEND_OF_DATA, however, some systems do not send the final - * END_OF_DATA byte. This setting controls whether or not the final END_OF_DATA byte is required or - * optional. - */ - public fun requireEndOfData(requireEndOfData: String) { - it.property("requireEndOfData", requireEndOfData) - } - - /** - * Enable/Disable strict compliance to the MLLP standard. The MLLP standard specifies - * START_OF_BLOCKhl7 payloadEND_OF_BLOCKEND_OF_DATA, however, some systems do not send the final - * END_OF_DATA byte. This setting controls whether or not the final END_OF_DATA byte is required or - * optional. - */ - public fun requireEndOfData(requireEndOfData: Boolean) { - it.property("requireEndOfData", requireEndOfData.toString()) - } - - /** - * Enable/Disable converting the payload to a String. If enabled, HL7 Payloads received from - * external systems will be validated converted to a String. If the charsetName property is set, that - * character set will be used for the conversion. If the charsetName property is not set, the value - * of MSH-18 will be used to determine th appropriate character set. If MSH-18 is not set, then the - * default ISO-8859-1 character set will be use. - */ - public fun stringPayload(stringPayload: String) { - it.property("stringPayload", stringPayload) - } - - /** - * Enable/Disable converting the payload to a String. If enabled, HL7 Payloads received from - * external systems will be validated converted to a String. If the charsetName property is set, that - * character set will be used for the conversion. If the charsetName property is not set, the value - * of MSH-18 will be used to determine th appropriate character set. If MSH-18 is not set, then the - * default ISO-8859-1 character set will be use. - */ - public fun stringPayload(stringPayload: Boolean) { - it.property("stringPayload", stringPayload.toString()) - } - - /** - * Enable/Disable the validation of HL7 Payloads If enabled, HL7 Payloads received from external - * systems will be validated (see Hl7Util.generateInvalidPayloadExceptionMessage for details on the - * validation). If and invalid payload is detected, a MllpInvalidMessageException (for consumers) or - * a MllpInvalidAcknowledgementException will be thrown. - */ - public fun validatePayload(validatePayload: String) { - it.property("validatePayload", validatePayload) - } - - /** - * Enable/Disable the validation of HL7 Payloads If enabled, HL7 Payloads received from external - * systems will be validated (see Hl7Util.generateInvalidPayloadExceptionMessage for details on the - * validation). If and invalid payload is detected, a MllpInvalidMessageException (for consumers) or - * a MllpInvalidAcknowledgementException will be thrown. - */ - public fun validatePayload(validatePayload: Boolean) { - it.property("validatePayload", validatePayload.toString()) - } - - /** - * Timeout (in milliseconds) while waiting for a TCP connection TCP Server Only - */ - public fun acceptTimeout(acceptTimeout: String) { - it.property("acceptTimeout", acceptTimeout) - } - - /** - * Timeout (in milliseconds) while waiting for a TCP connection TCP Server Only - */ - public fun acceptTimeout(acceptTimeout: Int) { - it.property("acceptTimeout", acceptTimeout.toString()) - } - - /** - * The maximum queue length for incoming connection indications (a request to connect) is set to - * the backlog parameter. If a connection indication arrives when the queue is full, the connection - * is refused. - */ - public fun backlog(backlog: String) { - it.property("backlog", backlog) - } - - /** - * The maximum queue length for incoming connection indications (a request to connect) is set to - * the backlog parameter. If a connection indication arrives when the queue is full, the connection - * is refused. - */ - public fun backlog(backlog: Int) { - it.property("backlog", backlog.toString()) - } - - /** - * TCP Server Only - The number of milliseconds to wait between bind attempts - */ - public fun bindRetryInterval(bindRetryInterval: String) { - it.property("bindRetryInterval", bindRetryInterval) - } - - /** - * TCP Server Only - The number of milliseconds to wait between bind attempts - */ - public fun bindRetryInterval(bindRetryInterval: Int) { - it.property("bindRetryInterval", bindRetryInterval.toString()) - } - - /** - * TCP Server Only - The number of milliseconds to retry binding to a server port - */ - public fun bindTimeout(bindTimeout: String) { - it.property("bindTimeout", bindTimeout) - } - - /** - * TCP Server Only - The number of milliseconds to retry binding to a server port - */ - public fun bindTimeout(bindTimeout: Int) { - it.property("bindTimeout", bindTimeout.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * occurred while the consumer is trying to receive incoming messages, or the likes, will now be - * processed as a message and handled by the routing Error Handler. If disabled, the consumer will - * use the org.apache.camel.spi.ExceptionHandler to deal with exceptions by logging them at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * occurred while the consumer is trying to receive incoming messages, or the likes, will now be - * processed as a message and handled by the routing Error Handler. If disabled, the consumer will - * use the org.apache.camel.spi.ExceptionHandler to deal with exceptions by logging them at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * TCP Server Only - Allow the endpoint to start before the TCP ServerSocket is bound. In some - * environments, it may be desirable to allow the endpoint to start before the TCP ServerSocket is - * bound. - */ - public fun lenientBind(lenientBind: String) { - it.property("lenientBind", lenientBind) - } - - /** - * TCP Server Only - Allow the endpoint to start before the TCP ServerSocket is bound. In some - * environments, it may be desirable to allow the endpoint to start before the TCP ServerSocket is - * bound. - */ - public fun lenientBind(lenientBind: Boolean) { - it.property("lenientBind", lenientBind.toString()) - } - - /** - * The maximum number of concurrent MLLP Consumer connections that will be allowed. If a new - * connection is received and the maximum is number are already established, the new connection will - * be reset immediately. - */ - public fun maxConcurrentConsumers(maxConcurrentConsumers: String) { - it.property("maxConcurrentConsumers", maxConcurrentConsumers) - } - - /** - * The maximum number of concurrent MLLP Consumer connections that will be allowed. If a new - * connection is received and the maximum is number are already established, the new connection will - * be reset immediately. - */ - public fun maxConcurrentConsumers(maxConcurrentConsumers: Int) { - it.property("maxConcurrentConsumers", maxConcurrentConsumers.toString()) - } - - /** - * Enable/disable the SO_REUSEADDR socket option. - */ - public fun reuseAddress(reuseAddress: String) { - it.property("reuseAddress", reuseAddress) - } - - /** - * Enable/disable the SO_REUSEADDR socket option. - */ - public fun reuseAddress(reuseAddress: Boolean) { - it.property("reuseAddress", reuseAddress.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Timeout (in milliseconds) for establishing for a TCP connection TCP Client only - */ - public fun connectTimeout(connectTimeout: String) { - it.property("connectTimeout", connectTimeout) - } - - /** - * Timeout (in milliseconds) for establishing for a TCP connection TCP Client only - */ - public fun connectTimeout(connectTimeout: Int) { - it.property("connectTimeout", connectTimeout.toString()) - } - - /** - * decide what action to take when idle timeout occurs. Possible values are : RESET: set SO_LINGER - * to 0 and reset the socket CLOSE: close the socket gracefully default is RESET. - */ - public fun idleTimeoutStrategy(idleTimeoutStrategy: String) { - it.property("idleTimeoutStrategy", idleTimeoutStrategy) - } - - /** - * Enable/disable the SO_KEEPALIVE socket option. - */ - public fun keepAlive(keepAlive: String) { - it.property("keepAlive", keepAlive) - } - - /** - * Enable/disable the SO_KEEPALIVE socket option. - */ - public fun keepAlive(keepAlive: Boolean) { - it.property("keepAlive", keepAlive.toString()) - } - - /** - * Enable/disable the TCP_NODELAY socket option. - */ - public fun tcpNoDelay(tcpNoDelay: String) { - it.property("tcpNoDelay", tcpNoDelay) - } - - /** - * Enable/disable the TCP_NODELAY socket option. - */ - public fun tcpNoDelay(tcpNoDelay: Boolean) { - it.property("tcpNoDelay", tcpNoDelay.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Maximum buffer size used when receiving or sending data over the wire. - */ - public fun maxBufferSize(maxBufferSize: String) { - it.property("maxBufferSize", maxBufferSize) - } - - /** - * Maximum buffer size used when receiving or sending data over the wire. - */ - public fun maxBufferSize(maxBufferSize: Int) { - it.property("maxBufferSize", maxBufferSize.toString()) - } - - /** - * Minimum buffer size used when receiving or sending data over the wire. - */ - public fun minBufferSize(minBufferSize: String) { - it.property("minBufferSize", minBufferSize) - } - - /** - * Minimum buffer size used when receiving or sending data over the wire. - */ - public fun minBufferSize(minBufferSize: Int) { - it.property("minBufferSize", minBufferSize.toString()) - } - - /** - * The SO_TIMEOUT value (in milliseconds) used after the start of an MLLP frame has been received - */ - public fun readTimeout(readTimeout: String) { - it.property("readTimeout", readTimeout) - } - - /** - * The SO_TIMEOUT value (in milliseconds) used after the start of an MLLP frame has been received - */ - public fun readTimeout(readTimeout: Int) { - it.property("readTimeout", readTimeout.toString()) - } - - /** - * Sets the SO_RCVBUF option to the specified value (in bytes) - */ - public fun receiveBufferSize(receiveBufferSize: String) { - it.property("receiveBufferSize", receiveBufferSize) - } - - /** - * Sets the SO_RCVBUF option to the specified value (in bytes) - */ - public fun receiveBufferSize(receiveBufferSize: Int) { - it.property("receiveBufferSize", receiveBufferSize.toString()) - } - - /** - * The SO_TIMEOUT value (in milliseconds) used when waiting for the start of an MLLP frame - */ - public fun receiveTimeout(receiveTimeout: String) { - it.property("receiveTimeout", receiveTimeout) - } - - /** - * The SO_TIMEOUT value (in milliseconds) used when waiting for the start of an MLLP frame - */ - public fun receiveTimeout(receiveTimeout: Int) { - it.property("receiveTimeout", receiveTimeout.toString()) - } - - /** - * Sets the SO_SNDBUF option to the specified value (in bytes) - */ - public fun sendBufferSize(sendBufferSize: String) { - it.property("sendBufferSize", sendBufferSize) - } - - /** - * Sets the SO_SNDBUF option to the specified value (in bytes) - */ - public fun sendBufferSize(sendBufferSize: Int) { - it.property("sendBufferSize", sendBufferSize.toString()) - } - - /** - * The approximate idle time allowed before the Client TCP Connection will be reset. A null value - * or a value less than or equal to zero will disable the idle timeout. - */ - public fun idleTimeout(idleTimeout: String) { - it.property("idleTimeout", idleTimeout) - } - - /** - * The approximate idle time allowed before the Client TCP Connection will be reset. A null value - * or a value less than or equal to zero will disable the idle timeout. - */ - public fun idleTimeout(idleTimeout: Int) { - it.property("idleTimeout", idleTimeout.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MockUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MockUriDsl.kt deleted file mode 100644 index b4dc5ad37c8b6..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MockUriDsl.kt +++ /dev/null @@ -1,271 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Test routes and mediation rules using mocks. - */ -public fun UriDsl.mock(i: MockUriDsl.() -> Unit) { - MockUriDsl(this).apply(i) -} - -@CamelDslMarker -public class MockUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("mock") - } - - private var name: String = "" - - /** - * Name of mock endpoint - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * Sets a grace period after which the mock endpoint will re-assert to ensure the preliminary - * assertion is still valid. This is used, for example, to assert that exactly a number of messages - * arrive. For example, if the expected count was set to 5, then the assertion is satisfied when five - * or more messages arrive. To ensure that exactly 5 messages arrive, then you would need to wait a - * little period to ensure no further message arrives. This is what you can use this method for. By - * default, this period is disabled. - */ - public fun assertPeriod(assertPeriod: String) { - it.property("assertPeriod", assertPeriod) - } - - /** - * Specifies the expected number of message exchanges that should be received by this endpoint. - * Beware: If you want to expect that 0 messages, then take extra care, as 0 matches when the tests - * starts, so you need to set a assert period time to let the test run for a while to make sure there - * are still no messages arrived; for that use setAssertPeriod(long). An alternative is to use - * NotifyBuilder, and use the notifier to know when Camel is done routing some messages, before you - * call the assertIsSatisfied() method on the mocks. This allows you to not use a fixed assert - * period, to speedup testing times. If you want to assert that exactly nth message arrives to this - * mock endpoint, then see also the setAssertPeriod(long) method for further details. - */ - public fun expectedCount(expectedCount: String) { - it.property("expectedCount", expectedCount) - } - - /** - * Specifies the expected number of message exchanges that should be received by this endpoint. - * Beware: If you want to expect that 0 messages, then take extra care, as 0 matches when the tests - * starts, so you need to set a assert period time to let the test run for a while to make sure there - * are still no messages arrived; for that use setAssertPeriod(long). An alternative is to use - * NotifyBuilder, and use the notifier to know when Camel is done routing some messages, before you - * call the assertIsSatisfied() method on the mocks. This allows you to not use a fixed assert - * period, to speedup testing times. If you want to assert that exactly nth message arrives to this - * mock endpoint, then see also the setAssertPeriod(long) method for further details. - */ - public fun expectedCount(expectedCount: Int) { - it.property("expectedCount", expectedCount.toString()) - } - - /** - * Sets whether assertIsSatisfied() should fail fast at the first detected failed expectation - * while it may otherwise wait for all expected messages to arrive before performing expectations - * verifications. Is by default true. Set to false to use behavior as in Camel 2.x. - */ - public fun failFast(failFast: String) { - it.property("failFast", failFast) - } - - /** - * Sets whether assertIsSatisfied() should fail fast at the first detected failed expectation - * while it may otherwise wait for all expected messages to arrive before performing expectations - * verifications. Is by default true. Set to false to use behavior as in Camel 2.x. - */ - public fun failFast(failFast: Boolean) { - it.property("failFast", failFast.toString()) - } - - /** - * To turn on logging when the mock receives an incoming message. This will log only one time at - * INFO level for the incoming message. For more detailed logging then set the logger to DEBUG level - * for the org.apache.camel.component.mock.MockEndpoint class. - */ - public fun log(log: String) { - it.property("log", log) - } - - /** - * To turn on logging when the mock receives an incoming message. This will log only one time at - * INFO level for the incoming message. For more detailed logging then set the logger to DEBUG level - * for the org.apache.camel.component.mock.MockEndpoint class. - */ - public fun log(log: Boolean) { - it.property("log", log.toString()) - } - - /** - * A number that is used to turn on throughput logging based on groups of the size. - */ - public fun reportGroup(reportGroup: String) { - it.property("reportGroup", reportGroup) - } - - /** - * A number that is used to turn on throughput logging based on groups of the size. - */ - public fun reportGroup(reportGroup: Int) { - it.property("reportGroup", reportGroup.toString()) - } - - /** - * Sets the minimum expected amount of time (in millis) the assertIsSatisfied() will wait on a - * latch until it is satisfied - */ - public fun resultMinimumWaitTime(resultMinimumWaitTime: String) { - it.property("resultMinimumWaitTime", resultMinimumWaitTime) - } - - /** - * Sets the maximum amount of time (in millis) the assertIsSatisfied() will wait on a latch until - * it is satisfied - */ - public fun resultWaitTime(resultWaitTime: String) { - it.property("resultWaitTime", resultWaitTime) - } - - /** - * Specifies to only retain the first nth number of received Exchanges. This is used when testing - * with big data, to reduce memory consumption by not storing copies of every Exchange this mock - * endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still - * return the actual number of received Exchanges. For example if we have received 5000 Exchanges, - * and have configured to only retain the first 10 Exchanges, then the getReceivedCounter() will - * still return 5000 but there is only the first 10 Exchanges in the getExchanges() and - * getReceivedExchanges() methods. When using this method, then some of the other expectation methods - * is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the - * first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) - * methods, to limit both the first and last received. - */ - public fun retainFirst(retainFirst: String) { - it.property("retainFirst", retainFirst) - } - - /** - * Specifies to only retain the first nth number of received Exchanges. This is used when testing - * with big data, to reduce memory consumption by not storing copies of every Exchange this mock - * endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still - * return the actual number of received Exchanges. For example if we have received 5000 Exchanges, - * and have configured to only retain the first 10 Exchanges, then the getReceivedCounter() will - * still return 5000 but there is only the first 10 Exchanges in the getExchanges() and - * getReceivedExchanges() methods. When using this method, then some of the other expectation methods - * is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the - * first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) - * methods, to limit both the first and last received. - */ - public fun retainFirst(retainFirst: Int) { - it.property("retainFirst", retainFirst.toString()) - } - - /** - * Specifies to only retain the last nth number of received Exchanges. This is used when testing - * with big data, to reduce memory consumption by not storing copies of every Exchange this mock - * endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still - * return the actual number of received Exchanges. For example if we have received 5000 Exchanges, - * and have configured to only retain the last 20 Exchanges, then the getReceivedCounter() will still - * return 5000 but there is only the last 20 Exchanges in the getExchanges() and - * getReceivedExchanges() methods. When using this method, then some of the other expectation methods - * is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the - * first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) - * methods, to limit both the first and last received. - */ - public fun retainLast(retainLast: String) { - it.property("retainLast", retainLast) - } - - /** - * Specifies to only retain the last nth number of received Exchanges. This is used when testing - * with big data, to reduce memory consumption by not storing copies of every Exchange this mock - * endpoint receives. Important: When using this limitation, then the getReceivedCounter() will still - * return the actual number of received Exchanges. For example if we have received 5000 Exchanges, - * and have configured to only retain the last 20 Exchanges, then the getReceivedCounter() will still - * return 5000 but there is only the last 20 Exchanges in the getExchanges() and - * getReceivedExchanges() methods. When using this method, then some of the other expectation methods - * is not supported, for example the expectedBodiesReceived(Object...) sets a expectation on the - * first number of bodies received. You can configure both setRetainFirst(int) and setRetainLast(int) - * methods, to limit both the first and last received. - */ - public fun retainLast(retainLast: Int) { - it.property("retainLast", retainLast.toString()) - } - - /** - * Allows a sleep to be specified to wait to check that this endpoint really is empty when - * expectedMessageCount(int) is called with zero - */ - public fun sleepForEmptyTest(sleepForEmptyTest: String) { - it.property("sleepForEmptyTest", sleepForEmptyTest) - } - - /** - * Sets whether to make a deep copy of the incoming Exchange when received at this mock endpoint. - * Is by default true. - */ - public fun copyOnExchange(copyOnExchange: String) { - it.property("copyOnExchange", copyOnExchange) - } - - /** - * Sets whether to make a deep copy of the incoming Exchange when received at this mock endpoint. - * Is by default true. - */ - public fun copyOnExchange(copyOnExchange: Boolean) { - it.property("copyOnExchange", copyOnExchange.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MongodbGridfsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MongodbGridfsUriDsl.kt deleted file mode 100644 index df99e7766e010..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MongodbGridfsUriDsl.kt +++ /dev/null @@ -1,214 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Interact with MongoDB GridFS. - */ -public fun UriDsl.`mongodb-gridfs`(i: MongodbGridfsUriDsl.() -> Unit) { - MongodbGridfsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class MongodbGridfsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("mongodb-gridfs") - } - - private var connectionBean: String = "" - - /** - * Name of com.mongodb.client.MongoClient to use. - */ - public fun connectionBean(connectionBean: String) { - this.connectionBean = connectionBean - it.url("$connectionBean") - } - - /** - * Sets the name of the GridFS bucket within the database. Default is fs. - */ - public fun bucket(bucket: String) { - it.property("bucket", bucket) - } - - /** - * Sets the name of the MongoDB database to target - */ - public fun database(database: String) { - it.property("database", database) - } - - /** - * Sets a MongoDB ReadPreference on the Mongo connection. Read preferences set directly on the - * connection will be overridden by this setting. The com.mongodb.ReadPreference#valueOf(String) - * utility method is used to resolve the passed readPreference value. Some examples for the possible - * values are nearest, primary or secondary etc. - */ - public fun readPreference(readPreference: String) { - it.property("readPreference", readPreference) - } - - /** - * Set the WriteConcern for write operations on MongoDB using the standard ones. Resolved from the - * fields of the WriteConcern class by calling the WriteConcern#valueOf(String) method. - */ - public fun writeConcern(writeConcern: String) { - it.property("writeConcern", writeConcern) - } - - /** - * Sets the delay between polls within the Consumer. Default is 500ms - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * If the QueryType uses a FileAttribute, this sets the name of the attribute that is used. - * Default is camel-processed. - */ - public fun fileAttributeName(fileAttributeName: String) { - it.property("fileAttributeName", fileAttributeName) - } - - /** - * Sets the initialDelay before the consumer will start polling. Default is 1000ms - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * If the QueryType uses a persistent timestamp, this sets the name of the collection within the - * DB to store the timestamp. - */ - public fun persistentTSCollection(persistentTSCollection: String) { - it.property("persistentTSCollection", persistentTSCollection) - } - - /** - * If the QueryType uses a persistent timestamp, this is the ID of the object in the collection to - * store the timestamp. - */ - public fun persistentTSObject(persistentTSObject: String) { - it.property("persistentTSObject", persistentTSObject) - } - - /** - * Additional query parameters (in JSON) that are used to configure the query used for finding - * files in the GridFsConsumer - */ - public fun query(query: String) { - it.property("query", query) - } - - /** - * Sets the QueryStrategy that is used for polling for new files. Default is Timestamp - */ - public fun queryStrategy(queryStrategy: String) { - it.property("queryStrategy", queryStrategy) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Sets the operation this endpoint will execute against GridFs. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MongodbUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MongodbUriDsl.kt deleted file mode 100644 index 26f4f171b28a4..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MongodbUriDsl.kt +++ /dev/null @@ -1,748 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on MongoDB documents and collections. - */ -public fun UriDsl.mongodb(i: MongodbUriDsl.() -> Unit) { - MongodbUriDsl(this).apply(i) -} - -@CamelDslMarker -public class MongodbUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("mongodb") - } - - private var connectionBean: String = "" - - /** - * Sets the connection bean reference used to lookup a client for connecting to a database if no - * hosts parameter is present. - */ - public fun connectionBean(connectionBean: String) { - this.connectionBean = connectionBean - it.url("$connectionBean") - } - - /** - * Sets the name of the MongoDB collection to bind to this endpoint - */ - public fun collection(collection: String) { - it.property("collection", collection) - } - - /** - * Sets the collection index (JSON FORMAT : { field1 : order1, field2 : order2}) - */ - public fun collectionIndex(collectionIndex: String) { - it.property("collectionIndex", collectionIndex) - } - - /** - * Set the whole Connection String/Uri for mongodb endpoint. - */ - public fun connectionUriString(connectionUriString: String) { - it.property("connectionUriString", connectionUriString) - } - - /** - * Create the collection during initialisation if it doesn't exist. Default is true. - */ - public fun createCollection(createCollection: String) { - it.property("createCollection", createCollection) - } - - /** - * Create the collection during initialisation if it doesn't exist. Default is true. - */ - public fun createCollection(createCollection: Boolean) { - it.property("createCollection", createCollection.toString()) - } - - /** - * Sets the name of the MongoDB database to target - */ - public fun database(database: String) { - it.property("database", database) - } - - /** - * Host address of mongodb server in host:port format. It's possible to also use more than one - * address, as a comma separated list of hosts: host1:port1,host2:port2. If this parameter is - * specified, the provided connectionBean is ignored. - */ - public fun hosts(hosts: String) { - it.property("hosts", hosts) - } - - /** - * Sets the connection bean used as a client for connecting to a database. - */ - public fun mongoConnection(mongoConnection: String) { - it.property("mongoConnection", mongoConnection) - } - - /** - * Sets the operation this endpoint will execute against MongoDB. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Convert the output of the producer to the selected type: DocumentList Document or - * MongoIterable. DocumentList or MongoIterable applies to findAll and aggregate. Document applies to - * all other operations. - */ - public fun outputType(outputType: String) { - it.property("outputType", outputType) - } - - /** - * Consumer type. - */ - public fun consumerType(consumerType: String) { - it.property("consumerType", consumerType) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Sets the logical name of the application. The application name may be used by the client to - * identify the application to the server, for use in server logs, slow query logs, and profile - * collection. Default: null - */ - public fun appName(appName: String) { - it.property("appName", appName) - } - - /** - * Specifies one or more compression algorithms that the driver will attempt to use to compress - * requests sent to the connected MongoDB instance. Possible values include: zlib, snappy, and zstd. - * Default: null - */ - public fun compressors(compressors: String) { - it.property("compressors", compressors) - } - - /** - * Specifies the maximum amount of time, in milliseconds, the Java driver waits for a connection - * to open before timing out. A value of 0 instructs the driver to never time out while waiting for a - * connection to open. Default: 10000 (10 seconds) - */ - public fun connectTimeoutMS(connectTimeoutMS: String) { - it.property("connectTimeoutMS", connectTimeoutMS) - } - - /** - * Specifies the maximum amount of time, in milliseconds, the Java driver waits for a connection - * to open before timing out. A value of 0 instructs the driver to never time out while waiting for a - * connection to open. Default: 10000 (10 seconds) - */ - public fun connectTimeoutMS(connectTimeoutMS: Int) { - it.property("connectTimeoutMS", connectTimeoutMS.toString()) - } - - /** - * MongoDB tailable cursors will block until new data arrives. If no new data is inserted, after - * some time the cursor will be automatically freed and closed by the MongoDB server. The client is - * expected to regenerate the cursor if needed. This value specifies the time to wait before - * attempting to fetch a new cursor, and if the attempt fails, how long before the next attempt is - * made. Default value is 1000ms. - */ - public fun cursorRegenerationDelay(cursorRegenerationDelay: String) { - it.property("cursorRegenerationDelay", cursorRegenerationDelay) - } - - /** - * Specifies that the driver must connect to the host directly. Default: false - */ - public fun directConnection(directConnection: String) { - it.property("directConnection", directConnection) - } - - /** - * Specifies that the driver must connect to the host directly. Default: false - */ - public fun directConnection(directConnection: Boolean) { - it.property("directConnection", directConnection.toString()) - } - - /** - * Sets whether this endpoint will attempt to dynamically resolve the target database and - * collection from the incoming Exchange properties. Can be used to override at runtime the database - * and collection specified on the otherwise static endpoint URI. It is disabled by default to boost - * performance. Enabling it will take a minimal performance hit. - */ - public fun dynamicity(dynamicity: String) { - it.property("dynamicity", dynamicity) - } - - /** - * Sets whether this endpoint will attempt to dynamically resolve the target database and - * collection from the incoming Exchange properties. Can be used to override at runtime the database - * and collection specified on the otherwise static endpoint URI. It is disabled by default to boost - * performance. Enabling it will take a minimal performance hit. - */ - public fun dynamicity(dynamicity: Boolean) { - it.property("dynamicity", dynamicity.toString()) - } - - /** - * heartbeatFrequencyMS controls when the driver checks the state of the MongoDB deployment. - * Specify the interval (in milliseconds) between checks, counted from the end of the previous check - * until the beginning of the next one. Default: Single-threaded drivers: 60 seconds. Multithreaded - * drivers: 10 seconds. - */ - public fun heartbeatFrequencyMS(heartbeatFrequencyMS: String) { - it.property("heartbeatFrequencyMS", heartbeatFrequencyMS) - } - - /** - * heartbeatFrequencyMS controls when the driver checks the state of the MongoDB deployment. - * Specify the interval (in milliseconds) between checks, counted from the end of the previous check - * until the beginning of the next one. Default: Single-threaded drivers: 60 seconds. Multithreaded - * drivers: 10 seconds. - */ - public fun heartbeatFrequencyMS(heartbeatFrequencyMS: Int) { - it.property("heartbeatFrequencyMS", heartbeatFrequencyMS.toString()) - } - - /** - * If true the driver will assume that it's connecting to MongoDB through a load balancer. - */ - public fun loadBalanced(loadBalanced: String) { - it.property("loadBalanced", loadBalanced) - } - - /** - * If true the driver will assume that it's connecting to MongoDB through a load balancer. - */ - public fun loadBalanced(loadBalanced: Boolean) { - it.property("loadBalanced", loadBalanced.toString()) - } - - /** - * The size (in milliseconds) of the latency window for selecting among multiple suitable MongoDB - * instances. Default: 15 milliseconds. - */ - public fun localThresholdMS(localThresholdMS: String) { - it.property("localThresholdMS", localThresholdMS) - } - - /** - * The size (in milliseconds) of the latency window for selecting among multiple suitable MongoDB - * instances. Default: 15 milliseconds. - */ - public fun localThresholdMS(localThresholdMS: Int) { - it.property("localThresholdMS", localThresholdMS.toString()) - } - - /** - * Specifies the maximum number of connections a pool may be establishing concurrently. Default: 2 - */ - public fun maxConnecting(maxConnecting: String) { - it.property("maxConnecting", maxConnecting) - } - - /** - * Specifies the maximum number of connections a pool may be establishing concurrently. Default: 2 - */ - public fun maxConnecting(maxConnecting: Int) { - it.property("maxConnecting", maxConnecting.toString()) - } - - /** - * Specifies the maximum amount of time, in milliseconds, the Java driver will allow a pooled - * connection to idle before closing the connection. A value of 0 indicates that there is no upper - * bound on how long the driver can allow a pooled collection to be idle. Default: 0 - */ - public fun maxIdleTimeMS(maxIdleTimeMS: String) { - it.property("maxIdleTimeMS", maxIdleTimeMS) - } - - /** - * Specifies the maximum amount of time, in milliseconds, the Java driver will allow a pooled - * connection to idle before closing the connection. A value of 0 indicates that there is no upper - * bound on how long the driver can allow a pooled collection to be idle. Default: 0 - */ - public fun maxIdleTimeMS(maxIdleTimeMS: Int) { - it.property("maxIdleTimeMS", maxIdleTimeMS.toString()) - } - - /** - * Specifies the maximum amount of time, in milliseconds, the Java driver will continue to use a - * pooled connection before closing the connection. A value of 0 indicates that there is no upper - * bound on how long the driver can keep a pooled connection open. Default: 0 - */ - public fun maxLifeTimeMS(maxLifeTimeMS: String) { - it.property("maxLifeTimeMS", maxLifeTimeMS) - } - - /** - * Specifies the maximum amount of time, in milliseconds, the Java driver will continue to use a - * pooled connection before closing the connection. A value of 0 indicates that there is no upper - * bound on how long the driver can keep a pooled connection open. Default: 0 - */ - public fun maxLifeTimeMS(maxLifeTimeMS: Int) { - it.property("maxLifeTimeMS", maxLifeTimeMS.toString()) - } - - /** - * The maximum number of connections in the connection pool. The default value is 100. - */ - public fun maxPoolSize(maxPoolSize: String) { - it.property("maxPoolSize", maxPoolSize) - } - - /** - * The maximum number of connections in the connection pool. The default value is 100. - */ - public fun maxPoolSize(maxPoolSize: Int) { - it.property("maxPoolSize", maxPoolSize.toString()) - } - - /** - * Specifies, in seconds, how stale a secondary can be before the driver stops communicating with - * that secondary. The minimum value is either 90 seconds or the heartbeat frequency plus 10 seconds, - * whichever is greater. For more information, see the server documentation for the - * maxStalenessSeconds option. Not providing a parameter or explicitly specifying -1 indicates that - * there should be no staleness check for secondaries. Default: -1 - */ - public fun maxStalenessSeconds(maxStalenessSeconds: String) { - it.property("maxStalenessSeconds", maxStalenessSeconds) - } - - /** - * Specifies, in seconds, how stale a secondary can be before the driver stops communicating with - * that secondary. The minimum value is either 90 seconds or the heartbeat frequency plus 10 seconds, - * whichever is greater. For more information, see the server documentation for the - * maxStalenessSeconds option. Not providing a parameter or explicitly specifying -1 indicates that - * there should be no staleness check for secondaries. Default: -1 - */ - public fun maxStalenessSeconds(maxStalenessSeconds: Int) { - it.property("maxStalenessSeconds", maxStalenessSeconds.toString()) - } - - /** - * Specifies the minimum number of connections that must exist at any moment in a single - * connection pool. Default: 0 - */ - public fun minPoolSize(minPoolSize: String) { - it.property("minPoolSize", minPoolSize) - } - - /** - * Specifies the minimum number of connections that must exist at any moment in a single - * connection pool. Default: 0 - */ - public fun minPoolSize(minPoolSize: Int) { - it.property("minPoolSize", minPoolSize.toString()) - } - - /** - * Configure how MongoDB clients route read operations to the members of a replica set. Possible - * values are PRIMARY, PRIMARY_PREFERRED, SECONDARY, SECONDARY_PREFERRED or NEAREST - */ - public fun readPreference(readPreference: String) { - it.property("readPreference", readPreference) - } - - /** - * A representation of a tag set as a comma-separated list of colon-separated key-value pairs, - * e.g. dc:ny,rack:1. Spaces are stripped from the beginning and end of all keys and values. To - * specify a list of tag sets, using multiple readPreferenceTags, e.g., - * readPreferenceTags=dc:ny,rack:1;readPreferenceTags=dc:ny;readPreferenceTags= Note the empty value - * for the last one, which means match any secondary as a last resort. Order matters when using - * multiple readPreferenceTags. - */ - public fun readPreferenceTags(readPreferenceTags: String) { - it.property("readPreferenceTags", readPreferenceTags) - } - - /** - * Specifies that the connection string provided includes multiple hosts. When specified, the - * driver attempts to find all members of that set. - */ - public fun replicaSet(replicaSet: String) { - it.property("replicaSet", replicaSet) - } - - /** - * Specifies that the driver must retry supported read operations if they fail due to a network - * error. Default: true - */ - public fun retryReads(retryReads: String) { - it.property("retryReads", retryReads) - } - - /** - * Specifies that the driver must retry supported read operations if they fail due to a network - * error. Default: true - */ - public fun retryReads(retryReads: Boolean) { - it.property("retryReads", retryReads.toString()) - } - - /** - * Specifies that the driver must retry supported write operations if they fail due to a network - * error. Default: true - */ - public fun retryWrites(retryWrites: String) { - it.property("retryWrites", retryWrites) - } - - /** - * Specifies that the driver must retry supported write operations if they fail due to a network - * error. Default: true - */ - public fun retryWrites(retryWrites: Boolean) { - it.property("retryWrites", retryWrites.toString()) - } - - /** - * Specifies how long (in milliseconds) to block for server selection before throwing an - * exception. Default: 30,000 milliseconds. - */ - public fun serverSelectionTimeoutMS(serverSelectionTimeoutMS: String) { - it.property("serverSelectionTimeoutMS", serverSelectionTimeoutMS) - } - - /** - * Specifies how long (in milliseconds) to block for server selection before throwing an - * exception. Default: 30,000 milliseconds. - */ - public fun serverSelectionTimeoutMS(serverSelectionTimeoutMS: Int) { - it.property("serverSelectionTimeoutMS", serverSelectionTimeoutMS.toString()) - } - - /** - * Specifies the maximum amount of time, in milliseconds, the Java driver will wait to send or - * receive a request before timing out. A value of 0 instructs the driver to never time out while - * waiting to send or receive a request. Default: 0 - */ - public fun socketTimeoutMS(socketTimeoutMS: String) { - it.property("socketTimeoutMS", socketTimeoutMS) - } - - /** - * Specifies the maximum amount of time, in milliseconds, the Java driver will wait to send or - * receive a request before timing out. A value of 0 instructs the driver to never time out while - * waiting to send or receive a request. Default: 0 - */ - public fun socketTimeoutMS(socketTimeoutMS: Int) { - it.property("socketTimeoutMS", socketTimeoutMS.toString()) - } - - /** - * The maximum number of hosts from the SRV record to connect to. - */ - public fun srvMaxHosts(srvMaxHosts: String) { - it.property("srvMaxHosts", srvMaxHosts) - } - - /** - * The maximum number of hosts from the SRV record to connect to. - */ - public fun srvMaxHosts(srvMaxHosts: Int) { - it.property("srvMaxHosts", srvMaxHosts.toString()) - } - - /** - * Specifies the service name of the SRV resource recordsthe driver retrieves to construct your - * seed list. You must use the DNS Seed List Connection Format in your connection URI to use this - * option. Default: mongodb - */ - public fun srvServiceName(srvServiceName: String) { - it.property("srvServiceName", srvServiceName) - } - - /** - * Specifies that all communication with MongoDB instances should use TLS. Supersedes the ssl - * option. Default: false - */ - public fun tls(tls: String) { - it.property("tls", tls) - } - - /** - * Specifies that all communication with MongoDB instances should use TLS. Supersedes the ssl - * option. Default: false - */ - public fun tls(tls: Boolean) { - it.property("tls", tls.toString()) - } - - /** - * Specifies that the driver should allow invalid hostnames in the certificate for TLS - * connections. Supersedes sslInvalidHostNameAllowed. Has the same effect as tlsInsecure by setting - * tlsAllowInvalidHostnames to true. Default: false - */ - public fun tlsAllowInvalidHostnames(tlsAllowInvalidHostnames: String) { - it.property("tlsAllowInvalidHostnames", tlsAllowInvalidHostnames) - } - - /** - * Specifies that the driver should allow invalid hostnames in the certificate for TLS - * connections. Supersedes sslInvalidHostNameAllowed. Has the same effect as tlsInsecure by setting - * tlsAllowInvalidHostnames to true. Default: false - */ - public fun tlsAllowInvalidHostnames(tlsAllowInvalidHostnames: Boolean) { - it.property("tlsAllowInvalidHostnames", tlsAllowInvalidHostnames.toString()) - } - - /** - * Specifies the maximum amount of time, in milliseconds that a thread may wait for a connection - * to become available. Default: 120000 (120 seconds) - */ - public fun waitQueueTimeoutMS(waitQueueTimeoutMS: String) { - it.property("waitQueueTimeoutMS", waitQueueTimeoutMS) - } - - /** - * Specifies the maximum amount of time, in milliseconds that a thread may wait for a connection - * to become available. Default: 120000 (120 seconds) - */ - public fun waitQueueTimeoutMS(waitQueueTimeoutMS: Int) { - it.property("waitQueueTimeoutMS", waitQueueTimeoutMS.toString()) - } - - /** - * Configure the connection bean with the level of acknowledgment requested from MongoDB for write - * operations to a standalone mongod, replicaset or cluster. Possible values are ACKNOWLEDGED, W1, - * W2, W3, UNACKNOWLEDGED, JOURNALED or MAJORITY. - */ - public fun writeConcern(writeConcern: String) { - it.property("writeConcern", writeConcern) - } - - /** - * In write operations, it determines whether instead of returning WriteResult as the body of the - * OUT message, we transfer the IN message to the OUT and attach the WriteResult as a header. - */ - public fun writeResultAsHeader(writeResultAsHeader: String) { - it.property("writeResultAsHeader", writeResultAsHeader) - } - - /** - * In write operations, it determines whether instead of returning WriteResult as the body of the - * OUT message, we transfer the IN message to the OUT and attach the WriteResult as a header. - */ - public fun writeResultAsHeader(writeResultAsHeader: Boolean) { - it.property("writeResultAsHeader", writeResultAsHeader.toString()) - } - - /** - * Specifies the degree of compression that Zlib should use to decrease the size of requests to - * the connected MongoDB instance. The level can range from -1 to 9, with lower values compressing - * faster (but resulting in larger requests) and larger values compressing slower (but resulting in - * smaller requests). Default: null - */ - public fun zlibCompressionLevel(zlibCompressionLevel: String) { - it.property("zlibCompressionLevel", zlibCompressionLevel) - } - - /** - * Specifies the degree of compression that Zlib should use to decrease the size of requests to - * the connected MongoDB instance. The level can range from -1 to 9, with lower values compressing - * faster (but resulting in larger requests) and larger values compressing slower (but resulting in - * smaller requests). Default: null - */ - public fun zlibCompressionLevel(zlibCompressionLevel: Int) { - it.property("zlibCompressionLevel", zlibCompressionLevel.toString()) - } - - /** - * Specifies whether changeStream consumer include a copy of the full document when modified by - * update operations. Possible values are default, updateLookup, required and whenAvailable. - */ - public fun fullDocument(fullDocument: String) { - it.property("fullDocument", fullDocument) - } - - /** - * Filter condition for change streams consumer. - */ - public fun streamFilter(streamFilter: String) { - it.property("streamFilter", streamFilter) - } - - /** - * The database name associated with the user's credentials. - */ - public fun authSource(authSource: String) { - it.property("authSource", authSource) - } - - /** - * User password for mongodb connection - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Username for mongodb connection - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * One tail tracking collection can host many trackers for several tailable consumers. To keep - * them separate, each tracker should have its own unique persistentId. - */ - public fun persistentId(persistentId: String) { - it.property("persistentId", persistentId) - } - - /** - * Enable persistent tail tracking, which is a mechanism to keep track of the last consumed - * message across system restarts. The next time the system is up, the endpoint will recover the - * cursor from the point where it last stopped slurping records. - */ - public fun persistentTailTracking(persistentTailTracking: String) { - it.property("persistentTailTracking", persistentTailTracking) - } - - /** - * Enable persistent tail tracking, which is a mechanism to keep track of the last consumed - * message across system restarts. The next time the system is up, the endpoint will recover the - * cursor from the point where it last stopped slurping records. - */ - public fun persistentTailTracking(persistentTailTracking: Boolean) { - it.property("persistentTailTracking", persistentTailTracking.toString()) - } - - /** - * Collection where tail tracking information will be persisted. If not specified, - * MongoDbTailTrackingConfig#DEFAULT_COLLECTION will be used by default. - */ - public fun tailTrackCollection(tailTrackCollection: String) { - it.property("tailTrackCollection", tailTrackCollection) - } - - /** - * Indicates what database the tail tracking mechanism will persist to. If not specified, the - * current database will be picked by default. Dynamicity will not be taken into account even if - * enabled, i.e., the tail tracking database will not vary past endpoint initialization. - */ - public fun tailTrackDb(tailTrackDb: String) { - it.property("tailTrackDb", tailTrackDb) - } - - /** - * Field where the last tracked value will be placed. If not specified, - * MongoDbTailTrackingConfig#DEFAULT_FIELD will be used by default. - */ - public fun tailTrackField(tailTrackField: String) { - it.property("tailTrackField", tailTrackField) - } - - /** - * Correlation field in the incoming record which is of increasing nature and will be used to - * position the tailing cursor every time it is generated. The cursor will be (re)created with a - * query of type: tailTrackIncreasingField greater than lastValue (possibly recovered from persistent - * tail tracking). Can be of type Integer, Date, String, etc. NOTE: No support for dot notation at - * the current time, so the field should be at the top level of the document. - */ - public fun tailTrackIncreasingField(tailTrackIncreasingField: String) { - it.property("tailTrackIncreasingField", tailTrackIncreasingField) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MustacheUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MustacheUriDsl.kt deleted file mode 100644 index 1d76fbd416364..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MustacheUriDsl.kt +++ /dev/null @@ -1,152 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Transform messages using a Mustache template. - */ -public fun UriDsl.mustache(i: MustacheUriDsl.() -> Unit) { - MustacheUriDsl(this).apply(i) -} - -@CamelDslMarker -public class MustacheUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("mustache") - } - - private var resourceUri: String = "" - - /** - * Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file - * and http loads the resource using these protocols (classpath is default). ref will lookup the - * resource in the registry. bean will call a method on a bean to be used as the resource. For bean - * you can specify the method name after dot, eg bean:myBean.myMethod. - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: String) { - it.property("allowContextMapAll", allowContextMapAll) - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: Boolean) { - it.property("allowContextMapAll", allowContextMapAll.toString()) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: String) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: Boolean) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader.toString()) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * Character encoding of the resource content. - */ - public fun encoding(encoding: String) { - it.property("encoding", encoding) - } - - /** - * Characters used to mark template code end. - */ - public fun endDelimiter(endDelimiter: String) { - it.property("endDelimiter", endDelimiter) - } - - /** - * Characters used to mark template code beginning. - */ - public fun startDelimiter(startDelimiter: String) { - it.property("startDelimiter", startDelimiter) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MvelUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MvelUriDsl.kt deleted file mode 100644 index 574b60e72f12d..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MvelUriDsl.kt +++ /dev/null @@ -1,138 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Transform messages using an MVEL template. - */ -public fun UriDsl.mvel(i: MvelUriDsl.() -> Unit) { - MvelUriDsl(this).apply(i) -} - -@CamelDslMarker -public class MvelUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("mvel") - } - - private var resourceUri: String = "" - - /** - * Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file - * and http loads the resource using these protocols (classpath is default). ref will lookup the - * resource in the registry. bean will call a method on a bean to be used as the resource. For bean - * you can specify the method name after dot, eg bean:myBean.myMethod. - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: String) { - it.property("allowContextMapAll", allowContextMapAll) - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: Boolean) { - it.property("allowContextMapAll", allowContextMapAll.toString()) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: String) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: Boolean) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader.toString()) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * Character encoding of the resource content. - */ - public fun encoding(encoding: String) { - it.property("encoding", encoding) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MybatisBeanUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MybatisBeanUriDsl.kt deleted file mode 100644 index fcfd26a10eb4c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MybatisBeanUriDsl.kt +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform queries, inserts, updates or deletes in a relational database using MyBatis. - */ -public fun UriDsl.`mybatis-bean`(i: MybatisBeanUriDsl.() -> Unit) { - MybatisBeanUriDsl(this).apply(i) -} - -@CamelDslMarker -public class MybatisBeanUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("mybatis-bean") - } - - private var beanName: String = "" - - private var methodName: String = "" - - /** - * Name of the bean with the MyBatis annotations. This can either by a type alias or a FQN class - * name. - */ - public fun beanName(beanName: String) { - this.beanName = beanName - it.url("$beanName:$methodName") - } - - /** - * Name of the method on the bean that has the SQL query to be executed. - */ - public fun methodName(methodName: String) { - this.methodName = methodName - it.url("$beanName:$methodName") - } - - /** - * The executor type to be used while executing statements. simple - executor does nothing - * special. reuse - executor reuses prepared statements. batch - executor reuses statements and - * batches updates. - */ - public fun executorType(executorType: String) { - it.property("executorType", executorType) - } - - /** - * User the header value for input parameters instead of the message body. By default, inputHeader - * == null and the input parameters are taken from the message body. If outputHeader is set, the - * value is used and query parameters will be taken from the header instead of the body. - */ - public fun inputHeader(inputHeader: String) { - it.property("inputHeader", inputHeader) - } - - /** - * Store the query result in a header instead of the message body. By default, outputHeader == - * null and the query result is stored in the message body, any existing content in the message body - * is discarded. If outputHeader is set, the value is used as the name of the header to store the - * query result and the original message body is preserved. Setting outputHeader will also omit - * populating the default CamelMyBatisResult header since it would be the same as outputHeader all - * the time. - */ - public fun outputHeader(outputHeader: String) { - it.property("outputHeader", outputHeader) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MybatisUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MybatisUriDsl.kt deleted file mode 100644 index 33404a81cdec2..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/MybatisUriDsl.kt +++ /dev/null @@ -1,447 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Performs a query, poll, insert, update or delete in a relational database using MyBatis. - */ -public fun UriDsl.mybatis(i: MybatisUriDsl.() -> Unit) { - MybatisUriDsl(this).apply(i) -} - -@CamelDslMarker -public class MybatisUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("mybatis") - } - - private var statement: String = "" - - /** - * The statement name in the MyBatis XML mapping file which maps to the query, insert, update or - * delete operation you wish to evaluate. - */ - public fun statement(statement: String) { - this.statement = statement - it.url("$statement") - } - - /** - * This option is intended to split results returned by the database pool into the batches and - * deliver them in multiple exchanges. This integer defines the maximum messages to deliver in single - * exchange. By default, no maximum is set. Can be used to set a limit of e.g. 1000 to avoid when - * starting up the server that there are thousands of files. Set a value of 0 or negative to disable - * it. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * This option is intended to split results returned by the database pool into the batches and - * deliver them in multiple exchanges. This integer defines the maximum messages to deliver in single - * exchange. By default, no maximum is set. Can be used to set a limit of e.g. 1000 to avoid when - * starting up the server that there are thousands of files. Set a value of 0 or negative to disable - * it. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * Statement to run after data has been processed in the route - */ - public fun onConsume(onConsume: String) { - it.property("onConsume", onConsume) - } - - /** - * Whether allow empty resultset to be routed to the next hop - */ - public fun routeEmptyResultSet(routeEmptyResultSet: String) { - it.property("routeEmptyResultSet", routeEmptyResultSet) - } - - /** - * Whether allow empty resultset to be routed to the next hop - */ - public fun routeEmptyResultSet(routeEmptyResultSet: Boolean) { - it.property("routeEmptyResultSet", routeEmptyResultSet.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Enables or disables transaction. If enabled then if processing an exchange failed then the - * consumer breaks out processing any further exchanges to cause a rollback eager. - */ - public fun transacted(transacted: String) { - it.property("transacted", transacted) - } - - /** - * Enables or disables transaction. If enabled then if processing an exchange failed then the - * consumer breaks out processing any further exchanges to cause a rollback eager. - */ - public fun transacted(transacted: Boolean) { - it.property("transacted", transacted.toString()) - } - - /** - * Process resultset individually or as a list - */ - public fun useIterator(useIterator: String) { - it.property("useIterator", useIterator) - } - - /** - * Process resultset individually or as a list - */ - public fun useIterator(useIterator: Boolean) { - it.property("useIterator", useIterator.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * To use a custom MyBatisProcessingStrategy - */ - public fun processingStrategy(processingStrategy: String) { - it.property("processingStrategy", processingStrategy) - } - - /** - * The executor type to be used while executing statements. simple - executor does nothing - * special. reuse - executor reuses prepared statements. batch - executor reuses statements and - * batches updates. - */ - public fun executorType(executorType: String) { - it.property("executorType", executorType) - } - - /** - * User the header value for input parameters instead of the message body. By default, inputHeader - * == null and the input parameters are taken from the message body. If outputHeader is set, the - * value is used and query parameters will be taken from the header instead of the body. - */ - public fun inputHeader(inputHeader: String) { - it.property("inputHeader", inputHeader) - } - - /** - * Store the query result in a header instead of the message body. By default, outputHeader == - * null and the query result is stored in the message body, any existing content in the message body - * is discarded. If outputHeader is set, the value is used as the name of the header to store the - * query result and the original message body is preserved. Setting outputHeader will also omit - * populating the default CamelMyBatisResult header since it would be the same as outputHeader all - * the time. - */ - public fun outputHeader(outputHeader: String) { - it.property("outputHeader", outputHeader) - } - - /** - * Mandatory to specify for the producer to control which kind of operation to invoke. - */ - public fun statementType(statementType: String) { - it.property("statementType", statementType) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NatsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NatsUriDsl.kt deleted file mode 100644 index 38efa76bc278a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NatsUriDsl.kt +++ /dev/null @@ -1,439 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages from NATS messaging system. - */ -public fun UriDsl.nats(i: NatsUriDsl.() -> Unit) { - NatsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class NatsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("nats") - } - - private var topic: String = "" - - /** - * The name of topic we want to use - */ - public fun topic(topic: String) { - this.topic = topic - it.url("$topic") - } - - /** - * Timeout for connection attempts. (in milliseconds) - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Timeout for connection attempts. (in milliseconds) - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * Define if we want to flush connection when stopping or not - */ - public fun flushConnection(flushConnection: String) { - it.property("flushConnection", flushConnection) - } - - /** - * Define if we want to flush connection when stopping or not - */ - public fun flushConnection(flushConnection: Boolean) { - it.property("flushConnection", flushConnection.toString()) - } - - /** - * Set the flush timeout (in milliseconds) - */ - public fun flushTimeout(flushTimeout: String) { - it.property("flushTimeout", flushTimeout) - } - - /** - * Set the flush timeout (in milliseconds) - */ - public fun flushTimeout(flushTimeout: Int) { - it.property("flushTimeout", flushTimeout.toString()) - } - - /** - * maximum number of pings have not received a response allowed by the client - */ - public fun maxPingsOut(maxPingsOut: String) { - it.property("maxPingsOut", maxPingsOut) - } - - /** - * maximum number of pings have not received a response allowed by the client - */ - public fun maxPingsOut(maxPingsOut: Int) { - it.property("maxPingsOut", maxPingsOut.toString()) - } - - /** - * Max reconnection attempts - */ - public fun maxReconnectAttempts(maxReconnectAttempts: String) { - it.property("maxReconnectAttempts", maxReconnectAttempts) - } - - /** - * Max reconnection attempts - */ - public fun maxReconnectAttempts(maxReconnectAttempts: Int) { - it.property("maxReconnectAttempts", maxReconnectAttempts.toString()) - } - - /** - * Turn off echo. If supported by the gnatsd version you are connecting to this flag will prevent - * the server from echoing messages back to the connection if it has subscriptions on the subject - * being published to. - */ - public fun noEcho(noEcho: String) { - it.property("noEcho", noEcho) - } - - /** - * Turn off echo. If supported by the gnatsd version you are connecting to this flag will prevent - * the server from echoing messages back to the connection if it has subscriptions on the subject - * being published to. - */ - public fun noEcho(noEcho: Boolean) { - it.property("noEcho", noEcho.toString()) - } - - /** - * Whether or not randomizing the order of servers for the connection attempts - */ - public fun noRandomizeServers(noRandomizeServers: String) { - it.property("noRandomizeServers", noRandomizeServers) - } - - /** - * Whether or not randomizing the order of servers for the connection attempts - */ - public fun noRandomizeServers(noRandomizeServers: Boolean) { - it.property("noRandomizeServers", noRandomizeServers.toString()) - } - - /** - * Whether or not running in pedantic mode (this affects performance) - */ - public fun pedantic(pedantic: String) { - it.property("pedantic", pedantic) - } - - /** - * Whether or not running in pedantic mode (this affects performance) - */ - public fun pedantic(pedantic: Boolean) { - it.property("pedantic", pedantic.toString()) - } - - /** - * Ping interval to be aware if connection is still alive (in milliseconds) - */ - public fun pingInterval(pingInterval: String) { - it.property("pingInterval", pingInterval) - } - - /** - * Ping interval to be aware if connection is still alive (in milliseconds) - */ - public fun pingInterval(pingInterval: Int) { - it.property("pingInterval", pingInterval.toString()) - } - - /** - * Whether or not using reconnection feature - */ - public fun reconnect(reconnect: String) { - it.property("reconnect", reconnect) - } - - /** - * Whether or not using reconnection feature - */ - public fun reconnect(reconnect: Boolean) { - it.property("reconnect", reconnect.toString()) - } - - /** - * Waiting time before attempts reconnection (in milliseconds) - */ - public fun reconnectTimeWait(reconnectTimeWait: String) { - it.property("reconnectTimeWait", reconnectTimeWait) - } - - /** - * Waiting time before attempts reconnection (in milliseconds) - */ - public fun reconnectTimeWait(reconnectTimeWait: Int) { - it.property("reconnectTimeWait", reconnectTimeWait.toString()) - } - - /** - * Interval to clean up cancelled/timed out requests. - */ - public fun requestCleanupInterval(requestCleanupInterval: String) { - it.property("requestCleanupInterval", requestCleanupInterval) - } - - /** - * Interval to clean up cancelled/timed out requests. - */ - public fun requestCleanupInterval(requestCleanupInterval: Int) { - it.property("requestCleanupInterval", requestCleanupInterval.toString()) - } - - /** - * URLs to one or more NAT servers. Use comma to separate URLs when specifying multiple servers. - */ - public fun servers(servers: String) { - it.property("servers", servers) - } - - /** - * Whether or not running in verbose mode - */ - public fun verbose(verbose: String) { - it.property("verbose", verbose) - } - - /** - * Whether or not running in verbose mode - */ - public fun verbose(verbose: Boolean) { - it.property("verbose", verbose.toString()) - } - - /** - * Stop receiving messages from a topic we are subscribing to after maxMessages - */ - public fun maxMessages(maxMessages: String) { - it.property("maxMessages", maxMessages) - } - - /** - * Consumer thread pool size (default is 10) - */ - public fun poolSize(poolSize: String) { - it.property("poolSize", poolSize) - } - - /** - * Consumer thread pool size (default is 10) - */ - public fun poolSize(poolSize: Int) { - it.property("poolSize", poolSize.toString()) - } - - /** - * The Queue name if we are using nats for a queue configuration - */ - public fun queueName(queueName: String) { - it.property("queueName", queueName) - } - - /** - * Can be used to turn off sending back reply message in the consumer. - */ - public fun replyToDisabled(replyToDisabled: String) { - it.property("replyToDisabled", replyToDisabled) - } - - /** - * Can be used to turn off sending back reply message in the consumer. - */ - public fun replyToDisabled(replyToDisabled: Boolean) { - it.property("replyToDisabled", replyToDisabled.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * the subject to which subscribers should send response - */ - public fun replySubject(replySubject: String) { - it.property("replySubject", replySubject) - } - - /** - * Request timeout in milliseconds - */ - public fun requestTimeout(requestTimeout: String) { - it.property("requestTimeout", requestTimeout) - } - - /** - * Request timeout in milliseconds - */ - public fun requestTimeout(requestTimeout: Int) { - it.property("requestTimeout", requestTimeout.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Reference an already instantiated connection to Nats server - */ - public fun connection(connection: String) { - it.property("connection", connection) - } - - /** - * Define the header filtering strategy - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * Whether or not connection trace messages should be printed to standard out for fine grained - * debugging of connection issues. - */ - public fun traceConnection(traceConnection: String) { - it.property("traceConnection", traceConnection) - } - - /** - * Whether or not connection trace messages should be printed to standard out for fine grained - * debugging of connection issues. - */ - public fun traceConnection(traceConnection: Boolean) { - it.property("traceConnection", traceConnection.toString()) - } - - /** - * If we use useCredentialsFile to true we'll need to set the credentialsFilePath option. It can - * be loaded by default from classpath, but you can prefix with classpath:, file:, or http: to load - * the resource from different systems. - */ - public fun credentialsFilePath(credentialsFilePath: String) { - it.property("credentialsFilePath", credentialsFilePath) - } - - /** - * Set secure option indicating TLS is required - */ - public fun secure(secure: String) { - it.property("secure", secure) - } - - /** - * Set secure option indicating TLS is required - */ - public fun secure(secure: Boolean) { - it.property("secure", secure.toString()) - } - - /** - * To configure security using SSLContextParameters - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NettyHttpUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NettyHttpUriDsl.kt deleted file mode 100644 index 57a03974f4b1d..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NettyHttpUriDsl.kt +++ /dev/null @@ -1,1259 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Netty HTTP server and client using the Netty 4.x. - */ -public fun UriDsl.`netty-http`(i: NettyHttpUriDsl.() -> Unit) { - NettyHttpUriDsl(this).apply(i) -} - -@CamelDslMarker -public class NettyHttpUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("netty-http") - } - - private var protocol: String = "" - - private var host: String = "" - - private var port: String = "" - - private var path: String = "" - - /** - * The protocol to use which is either http, https or proxy - a consumer only option. - */ - public fun protocol(protocol: String) { - this.protocol = protocol - it.url("$protocol://$host:$port/$path") - } - - /** - * The local hostname such as localhost, or 0.0.0.0 when being a consumer. The remote HTTP server - * hostname when using producer. - */ - public fun host(host: String) { - this.host = host - it.url("$protocol://$host:$port/$path") - } - - /** - * The host port number - */ - public fun port(port: String) { - this.port = port - it.url("$protocol://$host:$port/$path") - } - - /** - * The host port number - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$protocol://$host:$port/$path") - } - - /** - * Resource path - */ - public fun path(path: String) { - this.path = path - it.url("$protocol://$host:$port/$path") - } - - /** - * If the option is true, the producer will ignore the NettyHttpConstants.HTTP_URI header, and use - * the endpoint's URI for request. You may also set the throwExceptionOnFailure to be false to let - * the producer send all the fault response back. The consumer working in the bridge mode will skip - * the gzip compression and WWW URL form encoding (by adding the Exchange.SKIP_GZIP_ENCODING and - * Exchange.SKIP_WWW_FORM_URLENCODED headers to the consumed exchange). - */ - public fun bridgeEndpoint(bridgeEndpoint: String) { - it.property("bridgeEndpoint", bridgeEndpoint) - } - - /** - * If the option is true, the producer will ignore the NettyHttpConstants.HTTP_URI header, and use - * the endpoint's URI for request. You may also set the throwExceptionOnFailure to be false to let - * the producer send all the fault response back. The consumer working in the bridge mode will skip - * the gzip compression and WWW URL form encoding (by adding the Exchange.SKIP_GZIP_ENCODING and - * Exchange.SKIP_WWW_FORM_URLENCODED headers to the consumed exchange). - */ - public fun bridgeEndpoint(bridgeEndpoint: Boolean) { - it.property("bridgeEndpoint", bridgeEndpoint.toString()) - } - - /** - * Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both - * consumer and producer. - */ - public fun disconnect(disconnect: String) { - it.property("disconnect", disconnect) - } - - /** - * Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both - * consumer and producer. - */ - public fun disconnect(disconnect: Boolean) { - it.property("disconnect", disconnect.toString()) - } - - /** - * Setting to ensure socket is not closed due to inactivity - */ - public fun keepAlive(keepAlive: String) { - it.property("keepAlive", keepAlive) - } - - /** - * Setting to ensure socket is not closed due to inactivity - */ - public fun keepAlive(keepAlive: Boolean) { - it.property("keepAlive", keepAlive.toString()) - } - - /** - * Setting to facilitate socket multiplexing - */ - public fun reuseAddress(reuseAddress: String) { - it.property("reuseAddress", reuseAddress) - } - - /** - * Setting to facilitate socket multiplexing - */ - public fun reuseAddress(reuseAddress: Boolean) { - it.property("reuseAddress", reuseAddress.toString()) - } - - /** - * This option allows producers and consumers (in client mode) to reuse the same Netty Channel for - * the lifecycle of processing the Exchange. This is useful if you need to call a server multiple - * times in a Camel route and want to use the same network connection. When using this, the channel - * is not returned to the connection pool until the Exchange is done; or disconnected if the - * disconnect option is set to true. The reused Channel is stored on the Exchange as an exchange - * property with the key NettyConstants#NETTY_CHANNEL which allows you to obtain the channel during - * routing and use it as well. - */ - public fun reuseChannel(reuseChannel: String) { - it.property("reuseChannel", reuseChannel) - } - - /** - * This option allows producers and consumers (in client mode) to reuse the same Netty Channel for - * the lifecycle of processing the Exchange. This is useful if you need to call a server multiple - * times in a Camel route and want to use the same network connection. When using this, the channel - * is not returned to the connection pool until the Exchange is done; or disconnected if the - * disconnect option is set to true. The reused Channel is stored on the Exchange as an exchange - * property with the key NettyConstants#NETTY_CHANNEL which allows you to obtain the channel during - * routing and use it as well. - */ - public fun reuseChannel(reuseChannel: Boolean) { - it.property("reuseChannel", reuseChannel.toString()) - } - - /** - * Setting to set endpoint as one-way or request-response - */ - public fun sync(sync: String) { - it.property("sync", sync) - } - - /** - * Setting to set endpoint as one-way or request-response - */ - public fun sync(sync: Boolean) { - it.property("sync", sync.toString()) - } - - /** - * Setting to improve TCP protocol performance - */ - public fun tcpNoDelay(tcpNoDelay: String) { - it.property("tcpNoDelay", tcpNoDelay) - } - - /** - * Setting to improve TCP protocol performance - */ - public fun tcpNoDelay(tcpNoDelay: Boolean) { - it.property("tcpNoDelay", tcpNoDelay.toString()) - } - - /** - * Whether or not Camel should try to find a target consumer by matching the URI prefix if no - * exact match is found. - */ - public fun matchOnUriPrefix(matchOnUriPrefix: String) { - it.property("matchOnUriPrefix", matchOnUriPrefix) - } - - /** - * Whether or not Camel should try to find a target consumer by matching the URI prefix if no - * exact match is found. - */ - public fun matchOnUriPrefix(matchOnUriPrefix: Boolean) { - it.property("matchOnUriPrefix", matchOnUriPrefix.toString()) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the response's body won't - * contain the exception's stack trace. - */ - public fun muteException(muteException: String) { - it.property("muteException", muteException) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the response's body won't - * contain the exception's stack trace. - */ - public fun muteException(muteException: Boolean) { - it.property("muteException", muteException.toString()) - } - - /** - * Whether to send back HTTP status code 503 when the consumer has been suspended. If the option - * is false then the Netty Acceptor is unbound when the consumer is suspended, so clients cannot - * connect anymore. - */ - public fun send503whenSuspended(send503whenSuspended: String) { - it.property("send503whenSuspended", send503whenSuspended) - } - - /** - * Whether to send back HTTP status code 503 when the consumer has been suspended. If the option - * is false then the Netty Acceptor is unbound when the consumer is suspended, so clients cannot - * connect anymore. - */ - public fun send503whenSuspended(send503whenSuspended: Boolean) { - it.property("send503whenSuspended", send503whenSuspended.toString()) - } - - /** - * Allows to configure a backlog for netty consumer (server). Note the backlog is just a best - * effort depending on the OS. Setting this option to a value such as 200, 500 or 1000, tells the TCP - * stack how long the accept queue can be If this option is not configured, then the backlog depends - * on OS setting. - */ - public fun backlog(backlog: String) { - it.property("backlog", backlog) - } - - /** - * Allows to configure a backlog for netty consumer (server). Note the backlog is just a best - * effort depending on the OS. Setting this option to a value such as 200, 500 or 1000, tells the TCP - * stack how long the accept queue can be If this option is not configured, then the backlog depends - * on OS setting. - */ - public fun backlog(backlog: Int) { - it.property("backlog", backlog.toString()) - } - - /** - * When netty works on nio mode, it uses default bossCount parameter from Netty, which is 1. User - * can use this option to override the default bossCount from Netty - */ - public fun bossCount(bossCount: String) { - it.property("bossCount", bossCount) - } - - /** - * When netty works on nio mode, it uses default bossCount parameter from Netty, which is 1. User - * can use this option to override the default bossCount from Netty - */ - public fun bossCount(bossCount: Int) { - it.property("bossCount", bossCount.toString()) - } - - /** - * Set the BossGroup which could be used for handling the new connection of the server side across - * the NettyEndpoint - */ - public fun bossGroup(bossGroup: String) { - it.property("bossGroup", bossGroup) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Value in bytes the max content length per chunked frame received on the Netty HTTP server. - */ - public fun chunkedMaxContentLength(chunkedMaxContentLength: String) { - it.property("chunkedMaxContentLength", chunkedMaxContentLength) - } - - /** - * Value in bytes the max content length per chunked frame received on the Netty HTTP server. - */ - public fun chunkedMaxContentLength(chunkedMaxContentLength: Int) { - it.property("chunkedMaxContentLength", chunkedMaxContentLength.toString()) - } - - /** - * Allow using gzip/deflate for compression on the Netty HTTP server if the client supports it - * from the HTTP headers. - */ - public fun compression(compression: String) { - it.property("compression", compression) - } - - /** - * Allow using gzip/deflate for compression on the Netty HTTP server if the client supports it - * from the HTTP headers. - */ - public fun compression(compression: Boolean) { - it.property("compression", compression.toString()) - } - - /** - * If sync is enabled then this option dictates NettyConsumer if it should disconnect where there - * is no reply to send back. - */ - public fun disconnectOnNoReply(disconnectOnNoReply: String) { - it.property("disconnectOnNoReply", disconnectOnNoReply) - } - - /** - * If sync is enabled then this option dictates NettyConsumer if it should disconnect where there - * is no reply to send back. - */ - public fun disconnectOnNoReply(disconnectOnNoReply: Boolean) { - it.property("disconnectOnNoReply", disconnectOnNoReply.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * To disable HTTP methods on the Netty HTTP consumer. You can specify multiple separated by - * comma. - */ - public fun httpMethodRestrict(httpMethodRestrict: String) { - it.property("httpMethodRestrict", httpMethodRestrict) - } - - /** - * Whether Netty HTTP server should log a WARN if decoding the HTTP request failed and a HTTP - * Status 400 (bad request) is returned. - */ - public fun logWarnOnBadRequest(logWarnOnBadRequest: String) { - it.property("logWarnOnBadRequest", logWarnOnBadRequest) - } - - /** - * Whether Netty HTTP server should log a WARN if decoding the HTTP request failed and a HTTP - * Status 400 (bad request) is returned. - */ - public fun logWarnOnBadRequest(logWarnOnBadRequest: Boolean) { - it.property("logWarnOnBadRequest", logWarnOnBadRequest.toString()) - } - - /** - * If this option is enabled, then during binding from Netty to Camel Message then the headers - * will be mapped as well (eg added as header to the Camel Message as well). You can turn off this - * option to disable this. The headers can still be accessed from the - * org.apache.camel.component.netty.http.NettyHttpMessage message with the method getHttpRequest() - * that returns the Netty HTTP request io.netty.handler.codec.http.HttpRequest instance. - */ - public fun mapHeaders(mapHeaders: String) { - it.property("mapHeaders", mapHeaders) - } - - /** - * If this option is enabled, then during binding from Netty to Camel Message then the headers - * will be mapped as well (eg added as header to the Camel Message as well). You can turn off this - * option to disable this. The headers can still be accessed from the - * org.apache.camel.component.netty.http.NettyHttpMessage message with the method getHttpRequest() - * that returns the Netty HTTP request io.netty.handler.codec.http.HttpRequest instance. - */ - public fun mapHeaders(mapHeaders: Boolean) { - it.property("mapHeaders", mapHeaders.toString()) - } - - /** - * The maximum length of the content or each chunk. If the content length (or the length of each - * chunk) exceeds this value, the content or chunk will be split into multiple - * io.netty.handler.codec.http.HttpContents whose length is maxChunkSize at maximum. See - * io.netty.handler.codec.http.HttpObjectDecoder - */ - public fun maxChunkSize(maxChunkSize: String) { - it.property("maxChunkSize", maxChunkSize) - } - - /** - * The maximum length of the content or each chunk. If the content length (or the length of each - * chunk) exceeds this value, the content or chunk will be split into multiple - * io.netty.handler.codec.http.HttpContents whose length is maxChunkSize at maximum. See - * io.netty.handler.codec.http.HttpObjectDecoder - */ - public fun maxChunkSize(maxChunkSize: Int) { - it.property("maxChunkSize", maxChunkSize.toString()) - } - - /** - * The maximum length of all headers. If the sum of the length of each header exceeds this value, - * a io.netty.handler.codec.TooLongFrameException will be raised. - */ - public fun maxHeaderSize(maxHeaderSize: String) { - it.property("maxHeaderSize", maxHeaderSize) - } - - /** - * The maximum length of all headers. If the sum of the length of each header exceeds this value, - * a io.netty.handler.codec.TooLongFrameException will be raised. - */ - public fun maxHeaderSize(maxHeaderSize: Int) { - it.property("maxHeaderSize", maxHeaderSize.toString()) - } - - /** - * The maximum length of the initial line (e.g. {code GET / HTTP/1.0} or {code HTTP/1.0 200 OK}) - * If the length of the initial line exceeds this value, a TooLongFrameException will be raised. See - * io.netty.handler.codec.http.HttpObjectDecoder - */ - public fun maxInitialLineLength(maxInitialLineLength: String) { - it.property("maxInitialLineLength", maxInitialLineLength) - } - - /** - * The maximum length of the initial line (e.g. {code GET / HTTP/1.0} or {code HTTP/1.0 200 OK}) - * If the length of the initial line exceeds this value, a TooLongFrameException will be raised. See - * io.netty.handler.codec.http.HttpObjectDecoder - */ - public fun maxInitialLineLength(maxInitialLineLength: Int) { - it.property("maxInitialLineLength", maxInitialLineLength.toString()) - } - - /** - * To use a custom NettyServerBootstrapFactory - */ - public fun nettyServerBootstrapFactory(nettyServerBootstrapFactory: String) { - it.property("nettyServerBootstrapFactory", nettyServerBootstrapFactory) - } - - /** - * To use a shared Netty HTTP server. See Netty HTTP Server Example for more details. - */ - public fun nettySharedHttpServer(nettySharedHttpServer: String) { - it.property("nettySharedHttpServer", nettySharedHttpServer) - } - - /** - * If sync is enabled this option dictates NettyConsumer which logging level to use when logging a - * there is no reply to send back. - */ - public fun noReplyLogLevel(noReplyLogLevel: String) { - it.property("noReplyLogLevel", noReplyLogLevel) - } - - /** - * If the server (NettyConsumer) catches an java.nio.channels.ClosedChannelException then its - * logged using this logging level. This is used to avoid logging the closed channel exceptions, as - * clients can disconnect abruptly and then cause a flood of closed exceptions in the Netty server. - */ - public - fun serverClosedChannelExceptionCaughtLogLevel(serverClosedChannelExceptionCaughtLogLevel: String) { - it.property("serverClosedChannelExceptionCaughtLogLevel", - serverClosedChannelExceptionCaughtLogLevel) - } - - /** - * If the server (NettyConsumer) catches an exception then its logged using this logging level. - */ - public fun serverExceptionCaughtLogLevel(serverExceptionCaughtLogLevel: String) { - it.property("serverExceptionCaughtLogLevel", serverExceptionCaughtLogLevel) - } - - /** - * To use a custom ServerInitializerFactory - */ - public fun serverInitializerFactory(serverInitializerFactory: String) { - it.property("serverInitializerFactory", serverInitializerFactory) - } - - /** - * Specifies whether to enable HTTP TRACE for this Netty HTTP consumer. By default TRACE is turned - * off. - */ - public fun traceEnabled(traceEnabled: String) { - it.property("traceEnabled", traceEnabled) - } - - /** - * Specifies whether to enable HTTP TRACE for this Netty HTTP consumer. By default TRACE is turned - * off. - */ - public fun traceEnabled(traceEnabled: Boolean) { - it.property("traceEnabled", traceEnabled.toString()) - } - - /** - * If this option is enabled, then during binding from Netty to Camel Message then the header - * values will be URL decoded (eg %20 will be a space character. Notice this option is used by the - * default org.apache.camel.component.netty.http.NettyHttpBinding and therefore if you implement a - * custom org.apache.camel.component.netty.http.NettyHttpBinding then you would need to decode the - * headers accordingly to this option. - */ - public fun urlDecodeHeaders(urlDecodeHeaders: String) { - it.property("urlDecodeHeaders", urlDecodeHeaders) - } - - /** - * If this option is enabled, then during binding from Netty to Camel Message then the header - * values will be URL decoded (eg %20 will be a space character. Notice this option is used by the - * default org.apache.camel.component.netty.http.NettyHttpBinding and therefore if you implement a - * custom org.apache.camel.component.netty.http.NettyHttpBinding then you would need to decode the - * headers accordingly to this option. - */ - public fun urlDecodeHeaders(urlDecodeHeaders: Boolean) { - it.property("urlDecodeHeaders", urlDecodeHeaders.toString()) - } - - /** - * Whether to use ordered thread pool, to ensure events are processed orderly on the same channel. - */ - public fun usingExecutorService(usingExecutorService: String) { - it.property("usingExecutorService", usingExecutorService) - } - - /** - * Whether to use ordered thread pool, to ensure events are processed orderly on the same channel. - */ - public fun usingExecutorService(usingExecutorService: Boolean) { - it.property("usingExecutorService", usingExecutorService.toString()) - } - - /** - * Time to wait for a socket connection to be available. Value is in milliseconds. - */ - public fun connectTimeout(connectTimeout: String) { - it.property("connectTimeout", connectTimeout) - } - - /** - * Time to wait for a socket connection to be available. Value is in milliseconds. - */ - public fun connectTimeout(connectTimeout: Int) { - it.property("connectTimeout", connectTimeout.toString()) - } - - /** - * Configure a cookie handler to maintain a HTTP session - */ - public fun cookieHandler(cookieHandler: String) { - it.property("cookieHandler", cookieHandler) - } - - /** - * Allows to use a timeout for the Netty producer when calling a remote server. By default no - * timeout is in use. The value is in milli seconds, so eg 30000 is 30 seconds. The requestTimeout is - * using Netty's ReadTimeoutHandler to trigger the timeout. - */ - public fun requestTimeout(requestTimeout: String) { - it.property("requestTimeout", requestTimeout) - } - - /** - * Allows to use a timeout for the Netty producer when calling a remote server. By default no - * timeout is in use. The value is in milli seconds, so eg 30000 is 30 seconds. The requestTimeout is - * using Netty's ReadTimeoutHandler to trigger the timeout. - */ - public fun requestTimeout(requestTimeout: Int) { - it.property("requestTimeout", requestTimeout.toString()) - } - - /** - * Option to disable throwing the HttpOperationFailedException in case of failed responses from - * the remote server. This allows you to get all responses regardless of the HTTP status code. - */ - public fun throwExceptionOnFailure(throwExceptionOnFailure: String) { - it.property("throwExceptionOnFailure", throwExceptionOnFailure) - } - - /** - * Option to disable throwing the HttpOperationFailedException in case of failed responses from - * the remote server. This allows you to get all responses regardless of the HTTP status code. - */ - public fun throwExceptionOnFailure(throwExceptionOnFailure: Boolean) { - it.property("throwExceptionOnFailure", throwExceptionOnFailure.toString()) - } - - /** - * To use a custom ClientInitializerFactory - */ - public fun clientInitializerFactory(clientInitializerFactory: String) { - it.property("clientInitializerFactory", clientInitializerFactory) - } - - /** - * Channels can be lazily created to avoid exceptions, if the remote server is not up and running - * when the Camel producer is started. - */ - public fun lazyChannelCreation(lazyChannelCreation: String) { - it.property("lazyChannelCreation", lazyChannelCreation) - } - - /** - * Channels can be lazily created to avoid exceptions, if the remote server is not up and running - * when the Camel producer is started. - */ - public fun lazyChannelCreation(lazyChannelCreation: Boolean) { - it.property("lazyChannelCreation", lazyChannelCreation.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The status codes which are considered a success response. The values are inclusive. Multiple - * ranges can be defined, separated by comma, e.g. 200-204,209,301-304. Each range must be a single - * number or from-to with the dash included. The default range is 200-299 - */ - public fun okStatusCodeRange(okStatusCodeRange: String) { - it.property("okStatusCodeRange", okStatusCodeRange) - } - - /** - * Sets the value for the blockWhenExhausted configuration attribute. It determines whether to - * block when the borrowObject() method is invoked when the pool is exhausted (the maximum number of - * active objects has been reached). - */ - public fun producerPoolBlockWhenExhausted(producerPoolBlockWhenExhausted: String) { - it.property("producerPoolBlockWhenExhausted", producerPoolBlockWhenExhausted) - } - - /** - * Sets the value for the blockWhenExhausted configuration attribute. It determines whether to - * block when the borrowObject() method is invoked when the pool is exhausted (the maximum number of - * active objects has been reached). - */ - public fun producerPoolBlockWhenExhausted(producerPoolBlockWhenExhausted: Boolean) { - it.property("producerPoolBlockWhenExhausted", producerPoolBlockWhenExhausted.toString()) - } - - /** - * Whether producer pool is enabled or not. Important: If you turn this off then a single shared - * connection is used for the producer, also if you are doing request/reply. That means there is a - * potential issue with interleaved responses if replies comes back out-of-order. Therefore you need - * to have a correlation id in both the request and reply messages so you can properly correlate the - * replies to the Camel callback that is responsible for continue processing the message in Camel. To - * do this you need to implement NettyCamelStateCorrelationManager as correlation manager and - * configure it via the correlationManager option. See also the correlationManager option for more - * details. - */ - public fun producerPoolEnabled(producerPoolEnabled: String) { - it.property("producerPoolEnabled", producerPoolEnabled) - } - - /** - * Whether producer pool is enabled or not. Important: If you turn this off then a single shared - * connection is used for the producer, also if you are doing request/reply. That means there is a - * potential issue with interleaved responses if replies comes back out-of-order. Therefore you need - * to have a correlation id in both the request and reply messages so you can properly correlate the - * replies to the Camel callback that is responsible for continue processing the message in Camel. To - * do this you need to implement NettyCamelStateCorrelationManager as correlation manager and - * configure it via the correlationManager option. See also the correlationManager option for more - * details. - */ - public fun producerPoolEnabled(producerPoolEnabled: Boolean) { - it.property("producerPoolEnabled", producerPoolEnabled.toString()) - } - - /** - * Sets the cap on the number of idle instances in the pool. - */ - public fun producerPoolMaxIdle(producerPoolMaxIdle: String) { - it.property("producerPoolMaxIdle", producerPoolMaxIdle) - } - - /** - * Sets the cap on the number of idle instances in the pool. - */ - public fun producerPoolMaxIdle(producerPoolMaxIdle: Int) { - it.property("producerPoolMaxIdle", producerPoolMaxIdle.toString()) - } - - /** - * Sets the cap on the number of objects that can be allocated by the pool (checked out to - * clients, or idle awaiting checkout) at a given time. Use a negative value for no limit. - */ - public fun producerPoolMaxTotal(producerPoolMaxTotal: String) { - it.property("producerPoolMaxTotal", producerPoolMaxTotal) - } - - /** - * Sets the cap on the number of objects that can be allocated by the pool (checked out to - * clients, or idle awaiting checkout) at a given time. Use a negative value for no limit. - */ - public fun producerPoolMaxTotal(producerPoolMaxTotal: Int) { - it.property("producerPoolMaxTotal", producerPoolMaxTotal.toString()) - } - - /** - * Sets the maximum duration (value in millis) the borrowObject() method should block before - * throwing an exception when the pool is exhausted and producerPoolBlockWhenExhausted is true. When - * less than 0, the borrowObject() method may block indefinitely. - */ - public fun producerPoolMaxWait(producerPoolMaxWait: String) { - it.property("producerPoolMaxWait", producerPoolMaxWait) - } - - /** - * Sets the maximum duration (value in millis) the borrowObject() method should block before - * throwing an exception when the pool is exhausted and producerPoolBlockWhenExhausted is true. When - * less than 0, the borrowObject() method may block indefinitely. - */ - public fun producerPoolMaxWait(producerPoolMaxWait: Int) { - it.property("producerPoolMaxWait", producerPoolMaxWait.toString()) - } - - /** - * Sets the minimum amount of time (value in millis) an object may sit idle in the pool before it - * is eligible for eviction by the idle object evictor. - */ - public fun producerPoolMinEvictableIdle(producerPoolMinEvictableIdle: String) { - it.property("producerPoolMinEvictableIdle", producerPoolMinEvictableIdle) - } - - /** - * Sets the minimum amount of time (value in millis) an object may sit idle in the pool before it - * is eligible for eviction by the idle object evictor. - */ - public fun producerPoolMinEvictableIdle(producerPoolMinEvictableIdle: Int) { - it.property("producerPoolMinEvictableIdle", producerPoolMinEvictableIdle.toString()) - } - - /** - * Sets the minimum number of instances allowed in the producer pool before the evictor thread (if - * active) spawns new objects. - */ - public fun producerPoolMinIdle(producerPoolMinIdle: String) { - it.property("producerPoolMinIdle", producerPoolMinIdle) - } - - /** - * Sets the minimum number of instances allowed in the producer pool before the evictor thread (if - * active) spawns new objects. - */ - public fun producerPoolMinIdle(producerPoolMinIdle: Int) { - it.property("producerPoolMinIdle", producerPoolMinIdle.toString()) - } - - /** - * Sets whether to use a relative path in HTTP requests. - */ - public fun useRelativePath(useRelativePath: String) { - it.property("useRelativePath", useRelativePath) - } - - /** - * Sets whether to use a relative path in HTTP requests. - */ - public fun useRelativePath(useRelativePath: Boolean) { - it.property("useRelativePath", useRelativePath.toString()) - } - - /** - * Only used for TCP when transferExchange is true. When set to true, serializable objects in - * headers and properties will be added to the exchange. Otherwise Camel will exclude any - * non-serializable objects and log it at WARN level. - */ - public fun allowSerializedHeaders(allowSerializedHeaders: String) { - it.property("allowSerializedHeaders", allowSerializedHeaders) - } - - /** - * Only used for TCP when transferExchange is true. When set to true, serializable objects in - * headers and properties will be added to the exchange. Otherwise Camel will exclude any - * non-serializable objects and log it at WARN level. - */ - public fun allowSerializedHeaders(allowSerializedHeaders: Boolean) { - it.property("allowSerializedHeaders", allowSerializedHeaders.toString()) - } - - /** - * To use a explicit ChannelGroup. - */ - public fun channelGroup(channelGroup: String) { - it.property("channelGroup", channelGroup) - } - - /** - * To use a custom configured NettyHttpConfiguration for configuring this endpoint. - */ - public fun configuration(configuration: String) { - it.property("configuration", configuration) - } - - /** - * Determines whether or not the raw input stream from Netty HttpRequest#getContent() or - * HttpResponset#getContent() is cached or not (Camel will read the stream into a in light-weight - * memory based Stream caching) cache. By default Camel will cache the Netty input stream to support - * reading it multiple times to ensure it Camel can retrieve all data from the stream. However you - * can set this option to true when you for example need to access the raw stream, such as streaming - * it directly to a file or other persistent store. Mind that if you enable this option, then you - * cannot read the Netty stream multiple times out of the box, and you would need manually to reset - * the reader index on the Netty raw stream. Also Netty will auto-close the Netty stream when the - * Netty HTTP server/HTTP client is done processing, which means that if the asynchronous routing - * engine is in use then any asynchronous thread that may continue routing the - * org.apache.camel.Exchange may not be able to read the Netty stream, because Netty has closed it. - */ - public fun disableStreamCache(disableStreamCache: String) { - it.property("disableStreamCache", disableStreamCache) - } - - /** - * Determines whether or not the raw input stream from Netty HttpRequest#getContent() or - * HttpResponset#getContent() is cached or not (Camel will read the stream into a in light-weight - * memory based Stream caching) cache. By default Camel will cache the Netty input stream to support - * reading it multiple times to ensure it Camel can retrieve all data from the stream. However you - * can set this option to true when you for example need to access the raw stream, such as streaming - * it directly to a file or other persistent store. Mind that if you enable this option, then you - * cannot read the Netty stream multiple times out of the box, and you would need manually to reset - * the reader index on the Netty raw stream. Also Netty will auto-close the Netty stream when the - * Netty HTTP server/HTTP client is done processing, which means that if the asynchronous routing - * engine is in use then any asynchronous thread that may continue routing the - * org.apache.camel.Exchange may not be able to read the Netty stream, because Netty has closed it. - */ - public fun disableStreamCache(disableStreamCache: Boolean) { - it.property("disableStreamCache", disableStreamCache.toString()) - } - - /** - * To use a custom org.apache.camel.spi.HeaderFilterStrategy to filter headers. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * Whether to use native transport instead of NIO. Native transport takes advantage of the host - * operating system and is only supported on some platforms. You need to add the netty JAR for the - * host operating system you are using. See more details at: - * http://netty.io/wiki/native-transports.html - */ - public fun nativeTransport(nativeTransport: String) { - it.property("nativeTransport", nativeTransport) - } - - /** - * Whether to use native transport instead of NIO. Native transport takes advantage of the host - * operating system and is only supported on some platforms. You need to add the netty JAR for the - * host operating system you are using. See more details at: - * http://netty.io/wiki/native-transports.html - */ - public fun nativeTransport(nativeTransport: Boolean) { - it.property("nativeTransport", nativeTransport.toString()) - } - - /** - * To use a custom org.apache.camel.component.netty.http.NettyHttpBinding for binding to/from - * Netty and Camel Message API. - */ - public fun nettyHttpBinding(nettyHttpBinding: String) { - it.property("nettyHttpBinding", nettyHttpBinding) - } - - /** - * Allows to configure additional netty options using option. as prefix. For example - * option.child.keepAlive=false to set the netty option child.keepAlive=false. See the Netty - * documentation for possible options that can be used. - */ - public fun options(options: String) { - it.property("options", options) - } - - /** - * The TCP/UDP buffer sizes to be used during inbound communication. Size is bytes. - */ - public fun receiveBufferSize(receiveBufferSize: String) { - it.property("receiveBufferSize", receiveBufferSize) - } - - /** - * The TCP/UDP buffer sizes to be used during inbound communication. Size is bytes. - */ - public fun receiveBufferSize(receiveBufferSize: Int) { - it.property("receiveBufferSize", receiveBufferSize.toString()) - } - - /** - * Configures the buffer size predictor. See details at Jetty documentation and this mail thread. - */ - public fun receiveBufferSizePredictor(receiveBufferSizePredictor: String) { - it.property("receiveBufferSizePredictor", receiveBufferSizePredictor) - } - - /** - * Configures the buffer size predictor. See details at Jetty documentation and this mail thread. - */ - public fun receiveBufferSizePredictor(receiveBufferSizePredictor: Int) { - it.property("receiveBufferSizePredictor", receiveBufferSizePredictor.toString()) - } - - /** - * The TCP/UDP buffer sizes to be used during outbound communication. Size is bytes. - */ - public fun sendBufferSize(sendBufferSize: String) { - it.property("sendBufferSize", sendBufferSize) - } - - /** - * The TCP/UDP buffer sizes to be used during outbound communication. Size is bytes. - */ - public fun sendBufferSize(sendBufferSize: Int) { - it.property("sendBufferSize", sendBufferSize.toString()) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * If enabled and an Exchange failed processing on the consumer side, and if the caused Exception - * was send back serialized in the response as a application/x-java-serialized-object content type. - * On the producer side the exception will be deserialized and thrown as is, instead of the - * HttpOperationFailedException. The caused exception is required to be serialized. This is by - * default turned off. If you enable this then be aware that Java will deserialize the incoming data - * from the request to Java and that can be a potential security risk. - */ - public fun transferException(transferException: String) { - it.property("transferException", transferException) - } - - /** - * If enabled and an Exchange failed processing on the consumer side, and if the caused Exception - * was send back serialized in the response as a application/x-java-serialized-object content type. - * On the producer side the exception will be deserialized and thrown as is, instead of the - * HttpOperationFailedException. The caused exception is required to be serialized. This is by - * default turned off. If you enable this then be aware that Java will deserialize the incoming data - * from the request to Java and that can be a potential security risk. - */ - public fun transferException(transferException: Boolean) { - it.property("transferException", transferException.toString()) - } - - /** - * Only used for TCP. You can transfer the exchange over the wire instead of just the body. The - * following fields are transferred: In body, Out body, fault body, In headers, Out headers, fault - * headers, exchange properties, exchange exception. This requires that the objects are serializable. - * Camel will exclude any non-serializable objects and log it at WARN level. - */ - public fun transferExchange(transferExchange: String) { - it.property("transferExchange", transferExchange) - } - - /** - * Only used for TCP. You can transfer the exchange over the wire instead of just the body. The - * following fields are transferred: In body, Out body, fault body, In headers, Out headers, fault - * headers, exchange properties, exchange exception. This requires that the objects are serializable. - * Camel will exclude any non-serializable objects and log it at WARN level. - */ - public fun transferExchange(transferExchange: Boolean) { - it.property("transferExchange", transferExchange.toString()) - } - - /** - * Path to unix domain socket to use instead of inet socket. Host and port parameters will not be - * used, however required. It is ok to set dummy values for them. Must be used with - * nativeTransport=true and clientMode=false. - */ - public fun unixDomainSocketPath(unixDomainSocketPath: String) { - it.property("unixDomainSocketPath", unixDomainSocketPath) - } - - /** - * When netty works on nio mode, it uses default workerCount parameter from Netty (which is - * cpu_core_threads x 2). User can use this option to override the default workerCount from Netty. - */ - public fun workerCount(workerCount: String) { - it.property("workerCount", workerCount) - } - - /** - * When netty works on nio mode, it uses default workerCount parameter from Netty (which is - * cpu_core_threads x 2). User can use this option to override the default workerCount from Netty. - */ - public fun workerCount(workerCount: Int) { - it.property("workerCount", workerCount.toString()) - } - - /** - * To use a explicit EventLoopGroup as the boss thread pool. For example to share a thread pool - * with multiple consumers or producers. By default each consumer or producer has their own worker - * pool with 2 x cpu count core threads. - */ - public fun workerGroup(workerGroup: String) { - it.property("workerGroup", workerGroup) - } - - /** - * A list of decoders to be used. You can use a String which have values separated by comma, and - * have the values be looked up in the Registry. Just remember to prefix the value with # so Camel - * knows it should lookup. - */ - public fun decoders(decoders: String) { - it.property("decoders", decoders) - } - - /** - * A list of encoders to be used. You can use a String which have values separated by comma, and - * have the values be looked up in the Registry. Just remember to prefix the value with # so Camel - * knows it should lookup. - */ - public fun encoders(encoders: String) { - it.property("encoders", encoders) - } - - /** - * Which protocols to enable when using SSL - */ - public fun enabledProtocols(enabledProtocols: String) { - it.property("enabledProtocols", enabledProtocols) - } - - /** - * To enable/disable hostname verification on SSLEngine - */ - public fun hostnameVerification(hostnameVerification: String) { - it.property("hostnameVerification", hostnameVerification) - } - - /** - * To enable/disable hostname verification on SSLEngine - */ - public fun hostnameVerification(hostnameVerification: Boolean) { - it.property("hostnameVerification", hostnameVerification.toString()) - } - - /** - * Client side certificate keystore to be used for encryption - */ - public fun keyStoreFile(keyStoreFile: String) { - it.property("keyStoreFile", keyStoreFile) - } - - /** - * Keystore format to be used for payload encryption. Defaults to JKS if not set - */ - public fun keyStoreFormat(keyStoreFormat: String) { - it.property("keyStoreFormat", keyStoreFormat) - } - - /** - * Client side certificate keystore to be used for encryption. Is loaded by default from - * classpath, but you can prefix with classpath:, file:, or http: to load the resource from different - * systems. - */ - public fun keyStoreResource(keyStoreResource: String) { - it.property("keyStoreResource", keyStoreResource) - } - - /** - * Configures whether the server needs client authentication when using SSL. - */ - public fun needClientAuth(needClientAuth: String) { - it.property("needClientAuth", needClientAuth) - } - - /** - * Configures whether the server needs client authentication when using SSL. - */ - public fun needClientAuth(needClientAuth: Boolean) { - it.property("needClientAuth", needClientAuth.toString()) - } - - /** - * Password setting to use in order to encrypt/decrypt payloads sent using SSH - */ - public fun passphrase(passphrase: String) { - it.property("passphrase", passphrase) - } - - /** - * Refers to a org.apache.camel.component.netty.http.NettyHttpSecurityConfiguration for - * configuring secure web resources. - */ - public fun securityConfiguration(securityConfiguration: String) { - it.property("securityConfiguration", securityConfiguration) - } - - /** - * To configure NettyHttpSecurityConfiguration using key/value pairs from the map - */ - public fun securityOptions(securityOptions: String) { - it.property("securityOptions", securityOptions) - } - - /** - * Security provider to be used for payload encryption. Defaults to SunX509 if not set. - */ - public fun securityProvider(securityProvider: String) { - it.property("securityProvider", securityProvider) - } - - /** - * Setting to specify whether SSL encryption is applied to this endpoint - */ - public fun ssl(ssl: String) { - it.property("ssl", ssl) - } - - /** - * Setting to specify whether SSL encryption is applied to this endpoint - */ - public fun ssl(ssl: Boolean) { - it.property("ssl", ssl.toString()) - } - - /** - * When enabled and in SSL mode, then the Netty consumer will enrich the Camel Message with - * headers having information about the client certificate such as subject name, issuer name, serial - * number, and the valid date range. - */ - public fun sslClientCertHeaders(sslClientCertHeaders: String) { - it.property("sslClientCertHeaders", sslClientCertHeaders) - } - - /** - * When enabled and in SSL mode, then the Netty consumer will enrich the Camel Message with - * headers having information about the client certificate such as subject name, issuer name, serial - * number, and the valid date range. - */ - public fun sslClientCertHeaders(sslClientCertHeaders: Boolean) { - it.property("sslClientCertHeaders", sslClientCertHeaders.toString()) - } - - /** - * To configure security using SSLContextParameters - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * Reference to a class that could be used to return an SSL Handler - */ - public fun sslHandler(sslHandler: String) { - it.property("sslHandler", sslHandler) - } - - /** - * Server side certificate keystore to be used for encryption - */ - public fun trustStoreFile(trustStoreFile: String) { - it.property("trustStoreFile", trustStoreFile) - } - - /** - * Server side certificate keystore to be used for encryption. Is loaded by default from - * classpath, but you can prefix with classpath:, file:, or http: to load the resource from different - * systems. - */ - public fun trustStoreResource(trustStoreResource: String) { - it.property("trustStoreResource", trustStoreResource) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NettyUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NettyUriDsl.kt deleted file mode 100644 index 0021dc5f0a5d6..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NettyUriDsl.kt +++ /dev/null @@ -1,1069 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Socket level networking using TCP or UDP with Netty 4.x. - */ -public fun UriDsl.netty(i: NettyUriDsl.() -> Unit) { - NettyUriDsl(this).apply(i) -} - -@CamelDslMarker -public class NettyUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("netty") - } - - private var protocol: String = "" - - private var host: String = "" - - private var port: String = "" - - /** - * The protocol to use which can be tcp or udp. - */ - public fun protocol(protocol: String) { - this.protocol = protocol - it.url("$protocol://$host:$port") - } - - /** - * The hostname. For the consumer the hostname is localhost or 0.0.0.0. For the producer the - * hostname is the remote host to connect to - */ - public fun host(host: String) { - this.host = host - it.url("$protocol://$host:$port") - } - - /** - * The host port number - */ - public fun port(port: String) { - this.port = port - it.url("$protocol://$host:$port") - } - - /** - * The host port number - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$protocol://$host:$port") - } - - /** - * Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both - * consumer and producer. - */ - public fun disconnect(disconnect: String) { - it.property("disconnect", disconnect) - } - - /** - * Whether or not to disconnect(close) from Netty Channel right after use. Can be used for both - * consumer and producer. - */ - public fun disconnect(disconnect: Boolean) { - it.property("disconnect", disconnect.toString()) - } - - /** - * Setting to ensure socket is not closed due to inactivity - */ - public fun keepAlive(keepAlive: String) { - it.property("keepAlive", keepAlive) - } - - /** - * Setting to ensure socket is not closed due to inactivity - */ - public fun keepAlive(keepAlive: Boolean) { - it.property("keepAlive", keepAlive.toString()) - } - - /** - * Setting to facilitate socket multiplexing - */ - public fun reuseAddress(reuseAddress: String) { - it.property("reuseAddress", reuseAddress) - } - - /** - * Setting to facilitate socket multiplexing - */ - public fun reuseAddress(reuseAddress: Boolean) { - it.property("reuseAddress", reuseAddress.toString()) - } - - /** - * This option allows producers and consumers (in client mode) to reuse the same Netty Channel for - * the lifecycle of processing the Exchange. This is useful if you need to call a server multiple - * times in a Camel route and want to use the same network connection. When using this, the channel - * is not returned to the connection pool until the Exchange is done; or disconnected if the - * disconnect option is set to true. The reused Channel is stored on the Exchange as an exchange - * property with the key NettyConstants#NETTY_CHANNEL which allows you to obtain the channel during - * routing and use it as well. - */ - public fun reuseChannel(reuseChannel: String) { - it.property("reuseChannel", reuseChannel) - } - - /** - * This option allows producers and consumers (in client mode) to reuse the same Netty Channel for - * the lifecycle of processing the Exchange. This is useful if you need to call a server multiple - * times in a Camel route and want to use the same network connection. When using this, the channel - * is not returned to the connection pool until the Exchange is done; or disconnected if the - * disconnect option is set to true. The reused Channel is stored on the Exchange as an exchange - * property with the key NettyConstants#NETTY_CHANNEL which allows you to obtain the channel during - * routing and use it as well. - */ - public fun reuseChannel(reuseChannel: Boolean) { - it.property("reuseChannel", reuseChannel.toString()) - } - - /** - * Setting to set endpoint as one-way or request-response - */ - public fun sync(sync: String) { - it.property("sync", sync) - } - - /** - * Setting to set endpoint as one-way or request-response - */ - public fun sync(sync: Boolean) { - it.property("sync", sync.toString()) - } - - /** - * Setting to improve TCP protocol performance - */ - public fun tcpNoDelay(tcpNoDelay: String) { - it.property("tcpNoDelay", tcpNoDelay) - } - - /** - * Setting to improve TCP protocol performance - */ - public fun tcpNoDelay(tcpNoDelay: Boolean) { - it.property("tcpNoDelay", tcpNoDelay.toString()) - } - - /** - * Setting to choose Multicast over UDP - */ - public fun broadcast(broadcast: String) { - it.property("broadcast", broadcast) - } - - /** - * Setting to choose Multicast over UDP - */ - public fun broadcast(broadcast: Boolean) { - it.property("broadcast", broadcast.toString()) - } - - /** - * If the clientMode is true, netty consumer will connect the address as a TCP client. - */ - public fun clientMode(clientMode: String) { - it.property("clientMode", clientMode) - } - - /** - * If the clientMode is true, netty consumer will connect the address as a TCP client. - */ - public fun clientMode(clientMode: Boolean) { - it.property("clientMode", clientMode.toString()) - } - - /** - * Used only in clientMode in consumer, the consumer will attempt to reconnect on disconnection if - * this is enabled - */ - public fun reconnect(reconnect: String) { - it.property("reconnect", reconnect) - } - - /** - * Used only in clientMode in consumer, the consumer will attempt to reconnect on disconnection if - * this is enabled - */ - public fun reconnect(reconnect: Boolean) { - it.property("reconnect", reconnect.toString()) - } - - /** - * Used if reconnect and clientMode is enabled. The interval in milli seconds to attempt - * reconnection - */ - public fun reconnectInterval(reconnectInterval: String) { - it.property("reconnectInterval", reconnectInterval) - } - - /** - * Used if reconnect and clientMode is enabled. The interval in milli seconds to attempt - * reconnection - */ - public fun reconnectInterval(reconnectInterval: Int) { - it.property("reconnectInterval", reconnectInterval.toString()) - } - - /** - * Allows to configure a backlog for netty consumer (server). Note the backlog is just a best - * effort depending on the OS. Setting this option to a value such as 200, 500 or 1000, tells the TCP - * stack how long the accept queue can be If this option is not configured, then the backlog depends - * on OS setting. - */ - public fun backlog(backlog: String) { - it.property("backlog", backlog) - } - - /** - * Allows to configure a backlog for netty consumer (server). Note the backlog is just a best - * effort depending on the OS. Setting this option to a value such as 200, 500 or 1000, tells the TCP - * stack how long the accept queue can be If this option is not configured, then the backlog depends - * on OS setting. - */ - public fun backlog(backlog: Int) { - it.property("backlog", backlog.toString()) - } - - /** - * When netty works on nio mode, it uses default bossCount parameter from Netty, which is 1. User - * can use this option to override the default bossCount from Netty - */ - public fun bossCount(bossCount: String) { - it.property("bossCount", bossCount) - } - - /** - * When netty works on nio mode, it uses default bossCount parameter from Netty, which is 1. User - * can use this option to override the default bossCount from Netty - */ - public fun bossCount(bossCount: Int) { - it.property("bossCount", bossCount.toString()) - } - - /** - * Set the BossGroup which could be used for handling the new connection of the server side across - * the NettyEndpoint - */ - public fun bossGroup(bossGroup: String) { - it.property("bossGroup", bossGroup) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * If sync is enabled then this option dictates NettyConsumer if it should disconnect where there - * is no reply to send back. - */ - public fun disconnectOnNoReply(disconnectOnNoReply: String) { - it.property("disconnectOnNoReply", disconnectOnNoReply) - } - - /** - * If sync is enabled then this option dictates NettyConsumer if it should disconnect where there - * is no reply to send back. - */ - public fun disconnectOnNoReply(disconnectOnNoReply: Boolean) { - it.property("disconnectOnNoReply", disconnectOnNoReply.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * To use a custom NettyServerBootstrapFactory - */ - public fun nettyServerBootstrapFactory(nettyServerBootstrapFactory: String) { - it.property("nettyServerBootstrapFactory", nettyServerBootstrapFactory) - } - - /** - * When using UDP then this option can be used to specify a network interface by its name, such as - * eth0 to join a multicast group. - */ - public fun networkInterface(networkInterface: String) { - it.property("networkInterface", networkInterface) - } - - /** - * If sync is enabled this option dictates NettyConsumer which logging level to use when logging a - * there is no reply to send back. - */ - public fun noReplyLogLevel(noReplyLogLevel: String) { - it.property("noReplyLogLevel", noReplyLogLevel) - } - - /** - * If the server (NettyConsumer) catches an java.nio.channels.ClosedChannelException then its - * logged using this logging level. This is used to avoid logging the closed channel exceptions, as - * clients can disconnect abruptly and then cause a flood of closed exceptions in the Netty server. - */ - public - fun serverClosedChannelExceptionCaughtLogLevel(serverClosedChannelExceptionCaughtLogLevel: String) { - it.property("serverClosedChannelExceptionCaughtLogLevel", - serverClosedChannelExceptionCaughtLogLevel) - } - - /** - * If the server (NettyConsumer) catches an exception then its logged using this logging level. - */ - public fun serverExceptionCaughtLogLevel(serverExceptionCaughtLogLevel: String) { - it.property("serverExceptionCaughtLogLevel", serverExceptionCaughtLogLevel) - } - - /** - * To use a custom ServerInitializerFactory - */ - public fun serverInitializerFactory(serverInitializerFactory: String) { - it.property("serverInitializerFactory", serverInitializerFactory) - } - - /** - * Whether to use ordered thread pool, to ensure events are processed orderly on the same channel. - */ - public fun usingExecutorService(usingExecutorService: String) { - it.property("usingExecutorService", usingExecutorService) - } - - /** - * Whether to use ordered thread pool, to ensure events are processed orderly on the same channel. - */ - public fun usingExecutorService(usingExecutorService: Boolean) { - it.property("usingExecutorService", usingExecutorService.toString()) - } - - /** - * Time to wait for a socket connection to be available. Value is in milliseconds. - */ - public fun connectTimeout(connectTimeout: String) { - it.property("connectTimeout", connectTimeout) - } - - /** - * Time to wait for a socket connection to be available. Value is in milliseconds. - */ - public fun connectTimeout(connectTimeout: Int) { - it.property("connectTimeout", connectTimeout.toString()) - } - - /** - * Allows to use a timeout for the Netty producer when calling a remote server. By default no - * timeout is in use. The value is in milli seconds, so eg 30000 is 30 seconds. The requestTimeout is - * using Netty's ReadTimeoutHandler to trigger the timeout. - */ - public fun requestTimeout(requestTimeout: String) { - it.property("requestTimeout", requestTimeout) - } - - /** - * Allows to use a timeout for the Netty producer when calling a remote server. By default no - * timeout is in use. The value is in milli seconds, so eg 30000 is 30 seconds. The requestTimeout is - * using Netty's ReadTimeoutHandler to trigger the timeout. - */ - public fun requestTimeout(requestTimeout: Int) { - it.property("requestTimeout", requestTimeout.toString()) - } - - /** - * To use a custom ClientInitializerFactory - */ - public fun clientInitializerFactory(clientInitializerFactory: String) { - it.property("clientInitializerFactory", clientInitializerFactory) - } - - /** - * To use a custom correlation manager to manage how request and reply messages are mapped when - * using request/reply with the netty producer. This should only be used if you have a way to map - * requests together with replies such as if there is correlation ids in both the request and reply - * messages. This can be used if you want to multiplex concurrent messages on the same channel (aka - * connection) in netty. When doing this you must have a way to correlate the request and reply - * messages so you can store the right reply on the inflight Camel Exchange before its continued - * routed. We recommend extending the TimeoutCorrelationManagerSupport when you build custom - * correlation managers. This provides support for timeout and other complexities you otherwise would - * need to implement as well. See also the producerPoolEnabled option for more details. - */ - public fun correlationManager(correlationManager: String) { - it.property("correlationManager", correlationManager) - } - - /** - * Channels can be lazily created to avoid exceptions, if the remote server is not up and running - * when the Camel producer is started. - */ - public fun lazyChannelCreation(lazyChannelCreation: String) { - it.property("lazyChannelCreation", lazyChannelCreation) - } - - /** - * Channels can be lazily created to avoid exceptions, if the remote server is not up and running - * when the Camel producer is started. - */ - public fun lazyChannelCreation(lazyChannelCreation: Boolean) { - it.property("lazyChannelCreation", lazyChannelCreation.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Sets the value for the blockWhenExhausted configuration attribute. It determines whether to - * block when the borrowObject() method is invoked when the pool is exhausted (the maximum number of - * active objects has been reached). - */ - public fun producerPoolBlockWhenExhausted(producerPoolBlockWhenExhausted: String) { - it.property("producerPoolBlockWhenExhausted", producerPoolBlockWhenExhausted) - } - - /** - * Sets the value for the blockWhenExhausted configuration attribute. It determines whether to - * block when the borrowObject() method is invoked when the pool is exhausted (the maximum number of - * active objects has been reached). - */ - public fun producerPoolBlockWhenExhausted(producerPoolBlockWhenExhausted: Boolean) { - it.property("producerPoolBlockWhenExhausted", producerPoolBlockWhenExhausted.toString()) - } - - /** - * Whether producer pool is enabled or not. Important: If you turn this off then a single shared - * connection is used for the producer, also if you are doing request/reply. That means there is a - * potential issue with interleaved responses if replies comes back out-of-order. Therefore you need - * to have a correlation id in both the request and reply messages so you can properly correlate the - * replies to the Camel callback that is responsible for continue processing the message in Camel. To - * do this you need to implement NettyCamelStateCorrelationManager as correlation manager and - * configure it via the correlationManager option. See also the correlationManager option for more - * details. - */ - public fun producerPoolEnabled(producerPoolEnabled: String) { - it.property("producerPoolEnabled", producerPoolEnabled) - } - - /** - * Whether producer pool is enabled or not. Important: If you turn this off then a single shared - * connection is used for the producer, also if you are doing request/reply. That means there is a - * potential issue with interleaved responses if replies comes back out-of-order. Therefore you need - * to have a correlation id in both the request and reply messages so you can properly correlate the - * replies to the Camel callback that is responsible for continue processing the message in Camel. To - * do this you need to implement NettyCamelStateCorrelationManager as correlation manager and - * configure it via the correlationManager option. See also the correlationManager option for more - * details. - */ - public fun producerPoolEnabled(producerPoolEnabled: Boolean) { - it.property("producerPoolEnabled", producerPoolEnabled.toString()) - } - - /** - * Sets the cap on the number of idle instances in the pool. - */ - public fun producerPoolMaxIdle(producerPoolMaxIdle: String) { - it.property("producerPoolMaxIdle", producerPoolMaxIdle) - } - - /** - * Sets the cap on the number of idle instances in the pool. - */ - public fun producerPoolMaxIdle(producerPoolMaxIdle: Int) { - it.property("producerPoolMaxIdle", producerPoolMaxIdle.toString()) - } - - /** - * Sets the cap on the number of objects that can be allocated by the pool (checked out to - * clients, or idle awaiting checkout) at a given time. Use a negative value for no limit. - */ - public fun producerPoolMaxTotal(producerPoolMaxTotal: String) { - it.property("producerPoolMaxTotal", producerPoolMaxTotal) - } - - /** - * Sets the cap on the number of objects that can be allocated by the pool (checked out to - * clients, or idle awaiting checkout) at a given time. Use a negative value for no limit. - */ - public fun producerPoolMaxTotal(producerPoolMaxTotal: Int) { - it.property("producerPoolMaxTotal", producerPoolMaxTotal.toString()) - } - - /** - * Sets the maximum duration (value in millis) the borrowObject() method should block before - * throwing an exception when the pool is exhausted and producerPoolBlockWhenExhausted is true. When - * less than 0, the borrowObject() method may block indefinitely. - */ - public fun producerPoolMaxWait(producerPoolMaxWait: String) { - it.property("producerPoolMaxWait", producerPoolMaxWait) - } - - /** - * Sets the maximum duration (value in millis) the borrowObject() method should block before - * throwing an exception when the pool is exhausted and producerPoolBlockWhenExhausted is true. When - * less than 0, the borrowObject() method may block indefinitely. - */ - public fun producerPoolMaxWait(producerPoolMaxWait: Int) { - it.property("producerPoolMaxWait", producerPoolMaxWait.toString()) - } - - /** - * Sets the minimum amount of time (value in millis) an object may sit idle in the pool before it - * is eligible for eviction by the idle object evictor. - */ - public fun producerPoolMinEvictableIdle(producerPoolMinEvictableIdle: String) { - it.property("producerPoolMinEvictableIdle", producerPoolMinEvictableIdle) - } - - /** - * Sets the minimum amount of time (value in millis) an object may sit idle in the pool before it - * is eligible for eviction by the idle object evictor. - */ - public fun producerPoolMinEvictableIdle(producerPoolMinEvictableIdle: Int) { - it.property("producerPoolMinEvictableIdle", producerPoolMinEvictableIdle.toString()) - } - - /** - * Sets the minimum number of instances allowed in the producer pool before the evictor thread (if - * active) spawns new objects. - */ - public fun producerPoolMinIdle(producerPoolMinIdle: String) { - it.property("producerPoolMinIdle", producerPoolMinIdle) - } - - /** - * Sets the minimum number of instances allowed in the producer pool before the evictor thread (if - * active) spawns new objects. - */ - public fun producerPoolMinIdle(producerPoolMinIdle: Int) { - it.property("producerPoolMinIdle", producerPoolMinIdle.toString()) - } - - /** - * This option supports connection less udp sending which is a real fire and forget. A connected - * udp send receive the PortUnreachableException if no one is listen on the receiving port. - */ - public fun udpConnectionlessSending(udpConnectionlessSending: String) { - it.property("udpConnectionlessSending", udpConnectionlessSending) - } - - /** - * This option supports connection less udp sending which is a real fire and forget. A connected - * udp send receive the PortUnreachableException if no one is listen on the receiving port. - */ - public fun udpConnectionlessSending(udpConnectionlessSending: Boolean) { - it.property("udpConnectionlessSending", udpConnectionlessSending.toString()) - } - - /** - * If the useByteBuf is true, netty producer will turn the message body into ByteBuf before - * sending it out. - */ - public fun useByteBuf(useByteBuf: String) { - it.property("useByteBuf", useByteBuf) - } - - /** - * If the useByteBuf is true, netty producer will turn the message body into ByteBuf before - * sending it out. - */ - public fun useByteBuf(useByteBuf: Boolean) { - it.property("useByteBuf", useByteBuf.toString()) - } - - /** - * Only used for TCP when transferExchange is true. When set to true, serializable objects in - * headers and properties will be added to the exchange. Otherwise Camel will exclude any - * non-serializable objects and log it at WARN level. - */ - public fun allowSerializedHeaders(allowSerializedHeaders: String) { - it.property("allowSerializedHeaders", allowSerializedHeaders) - } - - /** - * Only used for TCP when transferExchange is true. When set to true, serializable objects in - * headers and properties will be added to the exchange. Otherwise Camel will exclude any - * non-serializable objects and log it at WARN level. - */ - public fun allowSerializedHeaders(allowSerializedHeaders: Boolean) { - it.property("allowSerializedHeaders", allowSerializedHeaders.toString()) - } - - /** - * To use a explicit ChannelGroup. - */ - public fun channelGroup(channelGroup: String) { - it.property("channelGroup", channelGroup) - } - - /** - * Whether to use native transport instead of NIO. Native transport takes advantage of the host - * operating system and is only supported on some platforms. You need to add the netty JAR for the - * host operating system you are using. See more details at: - * http://netty.io/wiki/native-transports.html - */ - public fun nativeTransport(nativeTransport: String) { - it.property("nativeTransport", nativeTransport) - } - - /** - * Whether to use native transport instead of NIO. Native transport takes advantage of the host - * operating system and is only supported on some platforms. You need to add the netty JAR for the - * host operating system you are using. See more details at: - * http://netty.io/wiki/native-transports.html - */ - public fun nativeTransport(nativeTransport: Boolean) { - it.property("nativeTransport", nativeTransport.toString()) - } - - /** - * Allows to configure additional netty options using option. as prefix. For example - * option.child.keepAlive=false to set the netty option child.keepAlive=false. See the Netty - * documentation for possible options that can be used. - */ - public fun options(options: String) { - it.property("options", options) - } - - /** - * The TCP/UDP buffer sizes to be used during inbound communication. Size is bytes. - */ - public fun receiveBufferSize(receiveBufferSize: String) { - it.property("receiveBufferSize", receiveBufferSize) - } - - /** - * The TCP/UDP buffer sizes to be used during inbound communication. Size is bytes. - */ - public fun receiveBufferSize(receiveBufferSize: Int) { - it.property("receiveBufferSize", receiveBufferSize.toString()) - } - - /** - * Configures the buffer size predictor. See details at Jetty documentation and this mail thread. - */ - public fun receiveBufferSizePredictor(receiveBufferSizePredictor: String) { - it.property("receiveBufferSizePredictor", receiveBufferSizePredictor) - } - - /** - * Configures the buffer size predictor. See details at Jetty documentation and this mail thread. - */ - public fun receiveBufferSizePredictor(receiveBufferSizePredictor: Int) { - it.property("receiveBufferSizePredictor", receiveBufferSizePredictor.toString()) - } - - /** - * The TCP/UDP buffer sizes to be used during outbound communication. Size is bytes. - */ - public fun sendBufferSize(sendBufferSize: String) { - it.property("sendBufferSize", sendBufferSize) - } - - /** - * The TCP/UDP buffer sizes to be used during outbound communication. Size is bytes. - */ - public fun sendBufferSize(sendBufferSize: Int) { - it.property("sendBufferSize", sendBufferSize.toString()) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * Only used for TCP. You can transfer the exchange over the wire instead of just the body. The - * following fields are transferred: In body, Out body, fault body, In headers, Out headers, fault - * headers, exchange properties, exchange exception. This requires that the objects are serializable. - * Camel will exclude any non-serializable objects and log it at WARN level. - */ - public fun transferExchange(transferExchange: String) { - it.property("transferExchange", transferExchange) - } - - /** - * Only used for TCP. You can transfer the exchange over the wire instead of just the body. The - * following fields are transferred: In body, Out body, fault body, In headers, Out headers, fault - * headers, exchange properties, exchange exception. This requires that the objects are serializable. - * Camel will exclude any non-serializable objects and log it at WARN level. - */ - public fun transferExchange(transferExchange: Boolean) { - it.property("transferExchange", transferExchange.toString()) - } - - /** - * For UDP only. If enabled the using byte array codec instead of Java serialization protocol. - */ - public fun udpByteArrayCodec(udpByteArrayCodec: String) { - it.property("udpByteArrayCodec", udpByteArrayCodec) - } - - /** - * For UDP only. If enabled the using byte array codec instead of Java serialization protocol. - */ - public fun udpByteArrayCodec(udpByteArrayCodec: Boolean) { - it.property("udpByteArrayCodec", udpByteArrayCodec.toString()) - } - - /** - * Path to unix domain socket to use instead of inet socket. Host and port parameters will not be - * used, however required. It is ok to set dummy values for them. Must be used with - * nativeTransport=true and clientMode=false. - */ - public fun unixDomainSocketPath(unixDomainSocketPath: String) { - it.property("unixDomainSocketPath", unixDomainSocketPath) - } - - /** - * When netty works on nio mode, it uses default workerCount parameter from Netty (which is - * cpu_core_threads x 2). User can use this option to override the default workerCount from Netty. - */ - public fun workerCount(workerCount: String) { - it.property("workerCount", workerCount) - } - - /** - * When netty works on nio mode, it uses default workerCount parameter from Netty (which is - * cpu_core_threads x 2). User can use this option to override the default workerCount from Netty. - */ - public fun workerCount(workerCount: Int) { - it.property("workerCount", workerCount.toString()) - } - - /** - * To use a explicit EventLoopGroup as the boss thread pool. For example to share a thread pool - * with multiple consumers or producers. By default each consumer or producer has their own worker - * pool with 2 x cpu count core threads. - */ - public fun workerGroup(workerGroup: String) { - it.property("workerGroup", workerGroup) - } - - /** - * The netty component installs a default codec if both, encoder/decoder is null and textline is - * false. Setting allowDefaultCodec to false prevents the netty component from installing a default - * codec as the first element in the filter chain. - */ - public fun allowDefaultCodec(allowDefaultCodec: String) { - it.property("allowDefaultCodec", allowDefaultCodec) - } - - /** - * The netty component installs a default codec if both, encoder/decoder is null and textline is - * false. Setting allowDefaultCodec to false prevents the netty component from installing a default - * codec as the first element in the filter chain. - */ - public fun allowDefaultCodec(allowDefaultCodec: Boolean) { - it.property("allowDefaultCodec", allowDefaultCodec.toString()) - } - - /** - * Whether or not to auto append missing end delimiter when sending using the textline codec. - */ - public fun autoAppendDelimiter(autoAppendDelimiter: String) { - it.property("autoAppendDelimiter", autoAppendDelimiter) - } - - /** - * Whether or not to auto append missing end delimiter when sending using the textline codec. - */ - public fun autoAppendDelimiter(autoAppendDelimiter: Boolean) { - it.property("autoAppendDelimiter", autoAppendDelimiter.toString()) - } - - /** - * The max line length to use for the textline codec. - */ - public fun decoderMaxLineLength(decoderMaxLineLength: String) { - it.property("decoderMaxLineLength", decoderMaxLineLength) - } - - /** - * The max line length to use for the textline codec. - */ - public fun decoderMaxLineLength(decoderMaxLineLength: Int) { - it.property("decoderMaxLineLength", decoderMaxLineLength.toString()) - } - - /** - * A list of decoders to be used. You can use a String which have values separated by comma, and - * have the values be looked up in the Registry. Just remember to prefix the value with # so Camel - * knows it should lookup. - */ - public fun decoders(decoders: String) { - it.property("decoders", decoders) - } - - /** - * The delimiter to use for the textline codec. Possible values are LINE and NULL. - */ - public fun delimiter(delimiter: String) { - it.property("delimiter", delimiter) - } - - /** - * A list of encoders to be used. You can use a String which have values separated by comma, and - * have the values be looked up in the Registry. Just remember to prefix the value with # so Camel - * knows it should lookup. - */ - public fun encoders(encoders: String) { - it.property("encoders", encoders) - } - - /** - * The encoding (a charset name) to use for the textline codec. If not provided, Camel will use - * the JVM default Charset. - */ - public fun encoding(encoding: String) { - it.property("encoding", encoding) - } - - /** - * Only used for TCP. If no codec is specified, you can use this flag to indicate a text line - * based codec; if not specified or the value is false, then Object Serialization is assumed over - * TCP - however only Strings are allowed to be serialized by default. - */ - public fun textline(textline: String) { - it.property("textline", textline) - } - - /** - * Only used for TCP. If no codec is specified, you can use this flag to indicate a text line - * based codec; if not specified or the value is false, then Object Serialization is assumed over - * TCP - however only Strings are allowed to be serialized by default. - */ - public fun textline(textline: Boolean) { - it.property("textline", textline.toString()) - } - - /** - * Which protocols to enable when using SSL - */ - public fun enabledProtocols(enabledProtocols: String) { - it.property("enabledProtocols", enabledProtocols) - } - - /** - * To enable/disable hostname verification on SSLEngine - */ - public fun hostnameVerification(hostnameVerification: String) { - it.property("hostnameVerification", hostnameVerification) - } - - /** - * To enable/disable hostname verification on SSLEngine - */ - public fun hostnameVerification(hostnameVerification: Boolean) { - it.property("hostnameVerification", hostnameVerification.toString()) - } - - /** - * Client side certificate keystore to be used for encryption - */ - public fun keyStoreFile(keyStoreFile: String) { - it.property("keyStoreFile", keyStoreFile) - } - - /** - * Keystore format to be used for payload encryption. Defaults to JKS if not set - */ - public fun keyStoreFormat(keyStoreFormat: String) { - it.property("keyStoreFormat", keyStoreFormat) - } - - /** - * Client side certificate keystore to be used for encryption. Is loaded by default from - * classpath, but you can prefix with classpath:, file:, or http: to load the resource from different - * systems. - */ - public fun keyStoreResource(keyStoreResource: String) { - it.property("keyStoreResource", keyStoreResource) - } - - /** - * Configures whether the server needs client authentication when using SSL. - */ - public fun needClientAuth(needClientAuth: String) { - it.property("needClientAuth", needClientAuth) - } - - /** - * Configures whether the server needs client authentication when using SSL. - */ - public fun needClientAuth(needClientAuth: Boolean) { - it.property("needClientAuth", needClientAuth.toString()) - } - - /** - * Password setting to use in order to encrypt/decrypt payloads sent using SSH - */ - public fun passphrase(passphrase: String) { - it.property("passphrase", passphrase) - } - - /** - * Security provider to be used for payload encryption. Defaults to SunX509 if not set. - */ - public fun securityProvider(securityProvider: String) { - it.property("securityProvider", securityProvider) - } - - /** - * Setting to specify whether SSL encryption is applied to this endpoint - */ - public fun ssl(ssl: String) { - it.property("ssl", ssl) - } - - /** - * Setting to specify whether SSL encryption is applied to this endpoint - */ - public fun ssl(ssl: Boolean) { - it.property("ssl", ssl.toString()) - } - - /** - * When enabled and in SSL mode, then the Netty consumer will enrich the Camel Message with - * headers having information about the client certificate such as subject name, issuer name, serial - * number, and the valid date range. - */ - public fun sslClientCertHeaders(sslClientCertHeaders: String) { - it.property("sslClientCertHeaders", sslClientCertHeaders) - } - - /** - * When enabled and in SSL mode, then the Netty consumer will enrich the Camel Message with - * headers having information about the client certificate such as subject name, issuer name, serial - * number, and the valid date range. - */ - public fun sslClientCertHeaders(sslClientCertHeaders: Boolean) { - it.property("sslClientCertHeaders", sslClientCertHeaders.toString()) - } - - /** - * To configure security using SSLContextParameters - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * Reference to a class that could be used to return an SSL Handler - */ - public fun sslHandler(sslHandler: String) { - it.property("sslHandler", sslHandler) - } - - /** - * Server side certificate keystore to be used for encryption - */ - public fun trustStoreFile(trustStoreFile: String) { - it.property("trustStoreFile", trustStoreFile) - } - - /** - * Server side certificate keystore to be used for encryption. Is loaded by default from - * classpath, but you can prefix with classpath:, file:, or http: to load the resource from different - * systems. - */ - public fun trustStoreResource(trustStoreResource: String) { - it.property("trustStoreResource", trustStoreResource) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NitriteUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NitriteUriDsl.kt deleted file mode 100644 index c5efe9044ccd5..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/NitriteUriDsl.kt +++ /dev/null @@ -1,158 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Access Nitrite databases. - */ -public fun UriDsl.nitrite(i: NitriteUriDsl.() -> Unit) { - NitriteUriDsl(this).apply(i) -} - -@CamelDslMarker -public class NitriteUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("nitrite") - } - - private var database: String = "" - - /** - * Path to database file. Will be created if not exists. - */ - public fun database(database: String) { - this.database = database - it.url("$database") - } - - /** - * Name of Nitrite collection. Cannot be used in combination with repositoryClass option. - */ - public fun collection(collection: String) { - it.property("collection", collection) - } - - /** - * Class of Nitrite ObjectRepository. Cannot be used in combination with collection option. - */ - public fun repositoryClass(repositoryClass: String) { - it.property("repositoryClass", repositoryClass) - } - - /** - * Optional name of ObjectRepository. Can be only used in combination with repositoryClass, - * otherwise have no effect - */ - public fun repositoryName(repositoryName: String) { - it.property("repositoryName", repositoryName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Password for Nitrite database. Required, if option username specified. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Username for Nitrite database. Database is not secured if option not specified. - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OaipmhUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OaipmhUriDsl.kt deleted file mode 100644 index 97a5e1303bba1..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OaipmhUriDsl.kt +++ /dev/null @@ -1,416 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Harvest metadata using OAI-PMH protocol - */ -public fun UriDsl.oaipmh(i: OaipmhUriDsl.() -> Unit) { - OaipmhUriDsl(this).apply(i) -} - -@CamelDslMarker -public class OaipmhUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("oaipmh") - } - - private var baseUrl: String = "" - - /** - * Base URL of the repository to which the request is made through the OAI-PMH protocol - */ - public fun baseUrl(baseUrl: String) { - this.baseUrl = baseUrl - it.url("$baseUrl") - } - - /** - * Specifies a lower bound for datestamp-based selective harvesting. UTC DateTime value - */ - public fun from(from: String) { - it.property("from", from) - } - - /** - * Identifier of the requested resources. Applicable only with certain verbs - */ - public fun identifier(identifier: String) { - it.property("identifier", identifier) - } - - /** - * Specifies the metadataPrefix of the format that should be included in the metadata part of the - * returned records. - */ - public fun metadataPrefix(metadataPrefix: String) { - it.property("metadataPrefix", metadataPrefix) - } - - /** - * Specifies membership as a criteria for set-based selective harvesting - */ - public fun `set`(`set`: String) { - it.property("set", set) - } - - /** - * Specifies an upper bound for datestamp-based selective harvesting. UTC DateTime value. - */ - public fun until(until: String) { - it.property("until", until) - } - - /** - * Request name supported by OAI-PMh protocol - */ - public fun verb(verb: String) { - it.property("verb", verb) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Returns the response of a single request. Otherwise it will make requests until there is no - * more data to return. - */ - public fun onlyFirst(onlyFirst: String) { - it.property("onlyFirst", onlyFirst) - } - - /** - * Returns the response of a single request. Otherwise it will make requests until there is no - * more data to return. - */ - public fun onlyFirst(onlyFirst: Boolean) { - it.property("onlyFirst", onlyFirst.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Ignore SSL certificate warnings - */ - public fun ignoreSSLWarnings(ignoreSSLWarnings: String) { - it.property("ignoreSSLWarnings", ignoreSSLWarnings) - } - - /** - * Ignore SSL certificate warnings - */ - public fun ignoreSSLWarnings(ignoreSSLWarnings: Boolean) { - it.property("ignoreSSLWarnings", ignoreSSLWarnings.toString()) - } - - /** - * Causes the defined url to make an https request - */ - public fun ssl(ssl: String) { - it.property("ssl", ssl) - } - - /** - * Causes the defined url to make an https request - */ - public fun ssl(ssl: Boolean) { - it.property("ssl", ssl.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Olingo2UriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Olingo2UriDsl.kt deleted file mode 100644 index ecb753b2fe967..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Olingo2UriDsl.kt +++ /dev/null @@ -1,476 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Communicate with OData 2.0 services using Apache Olingo. - */ -public fun UriDsl.olingo2(i: Olingo2UriDsl.() -> Unit) { - Olingo2UriDsl(this).apply(i) -} - -@CamelDslMarker -public class Olingo2UriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("olingo2") - } - - private var apiName: String = "" - - private var methodName: String = "" - - /** - * What kind of operation to perform - */ - public fun apiName(apiName: String) { - this.apiName = apiName - it.url("$apiName/$methodName") - } - - /** - * What sub operation to use for the selected operation - */ - public fun methodName(methodName: String) { - this.methodName = methodName - it.url("$apiName/$methodName") - } - - /** - * HTTP connection creation timeout in milliseconds, defaults to 30,000 (30 seconds) - */ - public fun connectTimeout(connectTimeout: String) { - it.property("connectTimeout", connectTimeout) - } - - /** - * HTTP connection creation timeout in milliseconds, defaults to 30,000 (30 seconds) - */ - public fun connectTimeout(connectTimeout: Int) { - it.property("connectTimeout", connectTimeout.toString()) - } - - /** - * Content-Type header value can be used to specify JSON or XML message format, defaults to - * application/json;charset=utf-8 - */ - public fun contentType(contentType: String) { - it.property("contentType", contentType) - } - - /** - * Custom entity provider read properties applied to all read operations. - */ - public fun entityProviderReadProperties(entityProviderReadProperties: String) { - it.property("entityProviderReadProperties", entityProviderReadProperties) - } - - /** - * Custom entity provider write properties applied to create, update, patch, batch and merge - * operations. For instance users can skip the Json object wrapper or enable content only mode when - * sending request data. A service URI set in the properties will always be overwritten by the - * serviceUri configuration parameter. Please consider to using the serviceUri configuration - * parameter instead of setting the respective write property here. - */ - public fun entityProviderWriteProperties(entityProviderWriteProperties: String) { - it.property("entityProviderWriteProperties", entityProviderWriteProperties) - } - - /** - * Set this to true to filter out results that have already been communicated by this component. - */ - public fun filterAlreadySeen(filterAlreadySeen: String) { - it.property("filterAlreadySeen", filterAlreadySeen) - } - - /** - * Set this to true to filter out results that have already been communicated by this component. - */ - public fun filterAlreadySeen(filterAlreadySeen: Boolean) { - it.property("filterAlreadySeen", filterAlreadySeen.toString()) - } - - /** - * Custom HTTP headers to inject into every request, this could include OAuth tokens, etc. - */ - public fun httpHeaders(httpHeaders: String) { - it.property("httpHeaders", httpHeaders) - } - - /** - * Sets the name of a parameter to be passed in the exchange In Body - */ - public fun inBody(inBody: String) { - it.property("inBody", inBody) - } - - /** - * HTTP proxy server configuration - */ - public fun proxy(proxy: String) { - it.property("proxy", proxy) - } - - /** - * Target OData service base URI, e.g. http://services.odata.org/OData/OData.svc - */ - public fun serviceUri(serviceUri: String) { - it.property("serviceUri", serviceUri) - } - - /** - * HTTP request timeout in milliseconds, defaults to 30,000 (30 seconds) - */ - public fun socketTimeout(socketTimeout: String) { - it.property("socketTimeout", socketTimeout) - } - - /** - * HTTP request timeout in milliseconds, defaults to 30,000 (30 seconds) - */ - public fun socketTimeout(socketTimeout: Int) { - it.property("socketTimeout", socketTimeout.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * For endpoints that return an array or collection, a consumer endpoint will map every element to - * distinct messages, unless splitResult is set to false. - */ - public fun splitResult(splitResult: String) { - it.property("splitResult", splitResult) - } - - /** - * For endpoints that return an array or collection, a consumer endpoint will map every element to - * distinct messages, unless splitResult is set to false. - */ - public fun splitResult(splitResult: Boolean) { - it.property("splitResult", splitResult.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Custom HTTP async client builder for more complex HTTP client configuration, overrides - * connectionTimeout, socketTimeout, proxy and sslContext. Note that a socketTimeout MUST be - * specified in the builder, otherwise OData requests could block indefinitely - */ - public fun httpAsyncClientBuilder(httpAsyncClientBuilder: String) { - it.property("httpAsyncClientBuilder", httpAsyncClientBuilder) - } - - /** - * Custom HTTP client builder for more complex HTTP client configuration, overrides - * connectionTimeout, socketTimeout, proxy and sslContext. Note that a socketTimeout MUST be - * specified in the builder, otherwise OData requests could block indefinitely - */ - public fun httpClientBuilder(httpClientBuilder: String) { - it.property("httpClientBuilder", httpClientBuilder) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * To configure security using SSLContextParameters - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Olingo4UriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Olingo4UriDsl.kt deleted file mode 100644 index 00fafc1a76859..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Olingo4UriDsl.kt +++ /dev/null @@ -1,458 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Communicate with OData 4.0 services using Apache Olingo OData API. - */ -public fun UriDsl.olingo4(i: Olingo4UriDsl.() -> Unit) { - Olingo4UriDsl(this).apply(i) -} - -@CamelDslMarker -public class Olingo4UriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("olingo4") - } - - private var apiName: String = "" - - private var methodName: String = "" - - /** - * What kind of operation to perform - */ - public fun apiName(apiName: String) { - this.apiName = apiName - it.url("$apiName/$methodName") - } - - /** - * What sub operation to use for the selected operation - */ - public fun methodName(methodName: String) { - this.methodName = methodName - it.url("$apiName/$methodName") - } - - /** - * HTTP connection creation timeout in milliseconds, defaults to 30,000 (30 seconds) - */ - public fun connectTimeout(connectTimeout: String) { - it.property("connectTimeout", connectTimeout) - } - - /** - * HTTP connection creation timeout in milliseconds, defaults to 30,000 (30 seconds) - */ - public fun connectTimeout(connectTimeout: Int) { - it.property("connectTimeout", connectTimeout.toString()) - } - - /** - * Content-Type header value can be used to specify JSON or XML message format, defaults to - * application/json;charset=utf-8 - */ - public fun contentType(contentType: String) { - it.property("contentType", contentType) - } - - /** - * Set this to true to filter out results that have already been communicated by this component. - */ - public fun filterAlreadySeen(filterAlreadySeen: String) { - it.property("filterAlreadySeen", filterAlreadySeen) - } - - /** - * Set this to true to filter out results that have already been communicated by this component. - */ - public fun filterAlreadySeen(filterAlreadySeen: Boolean) { - it.property("filterAlreadySeen", filterAlreadySeen.toString()) - } - - /** - * Custom HTTP headers to inject into every request, this could include OAuth tokens, etc. - */ - public fun httpHeaders(httpHeaders: String) { - it.property("httpHeaders", httpHeaders) - } - - /** - * Sets the name of a parameter to be passed in the exchange In Body - */ - public fun inBody(inBody: String) { - it.property("inBody", inBody) - } - - /** - * HTTP proxy server configuration - */ - public fun proxy(proxy: String) { - it.property("proxy", proxy) - } - - /** - * Target OData service base URI, e.g. http://services.odata.org/OData/OData.svc - */ - public fun serviceUri(serviceUri: String) { - it.property("serviceUri", serviceUri) - } - - /** - * HTTP request timeout in milliseconds, defaults to 30,000 (30 seconds) - */ - public fun socketTimeout(socketTimeout: String) { - it.property("socketTimeout", socketTimeout) - } - - /** - * HTTP request timeout in milliseconds, defaults to 30,000 (30 seconds) - */ - public fun socketTimeout(socketTimeout: Int) { - it.property("socketTimeout", socketTimeout.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * For endpoints that return an array or collection, a consumer endpoint will map every element to - * distinct messages, unless splitResult is set to false. - */ - public fun splitResult(splitResult: String) { - it.property("splitResult", splitResult) - } - - /** - * For endpoints that return an array or collection, a consumer endpoint will map every element to - * distinct messages, unless splitResult is set to false. - */ - public fun splitResult(splitResult: Boolean) { - it.property("splitResult", splitResult.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Custom HTTP async client builder for more complex HTTP client configuration, overrides - * connectionTimeout, socketTimeout, proxy and sslContext. Note that a socketTimeout MUST be - * specified in the builder, otherwise OData requests could block indefinitely - */ - public fun httpAsyncClientBuilder(httpAsyncClientBuilder: String) { - it.property("httpAsyncClientBuilder", httpAsyncClientBuilder) - } - - /** - * Custom HTTP client builder for more complex HTTP client configuration, overrides - * connectionTimeout, socketTimeout, proxy and sslContext. Note that a socketTimeout MUST be - * specified in the builder, otherwise OData requests could block indefinitely - */ - public fun httpClientBuilder(httpClientBuilder: String) { - it.property("httpClientBuilder", httpClientBuilder) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * To configure security using SSLContextParameters - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpensearchUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpensearchUriDsl.kt deleted file mode 100644 index d21f39c359f63..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpensearchUriDsl.kt +++ /dev/null @@ -1,302 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send requests to OpenSearch via Java Client API. - */ -public fun UriDsl.opensearch(i: OpensearchUriDsl.() -> Unit) { - OpensearchUriDsl(this).apply(i) -} - -@CamelDslMarker -public class OpensearchUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("opensearch") - } - - private var clusterName: String = "" - - /** - * Name of the cluster - */ - public fun clusterName(clusterName: String) { - this.clusterName = clusterName - it.url("$clusterName") - } - - /** - * The time in ms to wait before connection will time out. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * The time in ms to wait before connection will time out. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * Disconnect after it finish calling the producer - */ - public fun disconnect(disconnect: String) { - it.property("disconnect", disconnect) - } - - /** - * Disconnect after it finish calling the producer - */ - public fun disconnect(disconnect: Boolean) { - it.property("disconnect", disconnect.toString()) - } - - /** - * Starting index of the response. - */ - public fun from(from: String) { - it.property("from", from) - } - - /** - * Starting index of the response. - */ - public fun from(from: Int) { - it.property("from", from.toString()) - } - - /** - * Comma separated list with ip:port formatted remote transport addresses to use. - */ - public fun hostAddresses(hostAddresses: String) { - it.property("hostAddresses", hostAddresses) - } - - /** - * The name of the index to act against - */ - public fun indexName(indexName: String) { - it.property("indexName", indexName) - } - - /** - * The time in ms before retry - */ - public fun maxRetryTimeout(maxRetryTimeout: String) { - it.property("maxRetryTimeout", maxRetryTimeout) - } - - /** - * The time in ms before retry - */ - public fun maxRetryTimeout(maxRetryTimeout: Int) { - it.property("maxRetryTimeout", maxRetryTimeout.toString()) - } - - /** - * What operation to perform - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * Time in ms during which OpenSearch will keep search context alive - */ - public fun scrollKeepAliveMs(scrollKeepAliveMs: String) { - it.property("scrollKeepAliveMs", scrollKeepAliveMs) - } - - /** - * Time in ms during which OpenSearch will keep search context alive - */ - public fun scrollKeepAliveMs(scrollKeepAliveMs: Int) { - it.property("scrollKeepAliveMs", scrollKeepAliveMs.toString()) - } - - /** - * Size of the response. - */ - public fun size(size: String) { - it.property("size", size) - } - - /** - * Size of the response. - */ - public fun size(size: Int) { - it.property("size", size.toString()) - } - - /** - * The timeout in ms to wait before the socket will time out. - */ - public fun socketTimeout(socketTimeout: String) { - it.property("socketTimeout", socketTimeout) - } - - /** - * The timeout in ms to wait before the socket will time out. - */ - public fun socketTimeout(socketTimeout: Int) { - it.property("socketTimeout", socketTimeout.toString()) - } - - /** - * Enable scroll usage - */ - public fun useScroll(useScroll: String) { - it.property("useScroll", useScroll) - } - - /** - * Enable scroll usage - */ - public fun useScroll(useScroll: Boolean) { - it.property("useScroll", useScroll.toString()) - } - - /** - * Index creation waits for the write consistency number of shards to be available - */ - public fun waitForActiveShards(waitForActiveShards: String) { - it.property("waitForActiveShards", waitForActiveShards) - } - - /** - * Index creation waits for the write consistency number of shards to be available - */ - public fun waitForActiveShards(waitForActiveShards: Int) { - it.property("waitForActiveShards", waitForActiveShards.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The class to use when deserializing the documents. - */ - public fun documentClass(documentClass: String) { - it.property("documentClass", documentClass) - } - - /** - * Enable automatically discover nodes from a running OpenSearch cluster. If this option is used - * in conjunction with Spring Boot, then it's managed by the Spring Boot configuration (see: Disable - * Sniffer in Spring Boot). - */ - public fun enableSniffer(enableSniffer: String) { - it.property("enableSniffer", enableSniffer) - } - - /** - * Enable automatically discover nodes from a running OpenSearch cluster. If this option is used - * in conjunction with Spring Boot, then it's managed by the Spring Boot configuration (see: Disable - * Sniffer in Spring Boot). - */ - public fun enableSniffer(enableSniffer: Boolean) { - it.property("enableSniffer", enableSniffer.toString()) - } - - /** - * The delay of a sniff execution scheduled after a failure (in milliseconds) - */ - public fun sniffAfterFailureDelay(sniffAfterFailureDelay: String) { - it.property("sniffAfterFailureDelay", sniffAfterFailureDelay) - } - - /** - * The delay of a sniff execution scheduled after a failure (in milliseconds) - */ - public fun sniffAfterFailureDelay(sniffAfterFailureDelay: Int) { - it.property("sniffAfterFailureDelay", sniffAfterFailureDelay.toString()) - } - - /** - * The interval between consecutive ordinary sniff executions in milliseconds. Will be honoured - * when sniffOnFailure is disabled or when there are no failures between consecutive sniff executions - */ - public fun snifferInterval(snifferInterval: String) { - it.property("snifferInterval", snifferInterval) - } - - /** - * The interval between consecutive ordinary sniff executions in milliseconds. Will be honoured - * when sniffOnFailure is disabled or when there are no failures between consecutive sniff executions - */ - public fun snifferInterval(snifferInterval: Int) { - it.property("snifferInterval", snifferInterval.toString()) - } - - /** - * The certificate that can be used to access the ES Cluster. It can be loaded by default from - * classpath, but you can prefix with classpath:, file:, or http: to load the resource from different - * systems. - */ - public fun certificatePath(certificatePath: String) { - it.property("certificatePath", certificatePath) - } - - /** - * Enable SSL - */ - public fun enableSSL(enableSSL: String) { - it.property("enableSSL", enableSSL) - } - - /** - * Enable SSL - */ - public fun enableSSL(enableSSL: Boolean) { - it.property("enableSSL", enableSSL.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenshiftBuildConfigsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenshiftBuildConfigsUriDsl.kt deleted file mode 100644 index e05dd18df5d7e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenshiftBuildConfigsUriDsl.kt +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on OpenShift Build Configs. - */ -public fun UriDsl.`openshift-build-configs`(i: OpenshiftBuildConfigsUriDsl.() -> Unit) { - OpenshiftBuildConfigsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class OpenshiftBuildConfigsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("openshift-build-configs") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenshiftBuildsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenshiftBuildsUriDsl.kt deleted file mode 100644 index 30dab494ad02b..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenshiftBuildsUriDsl.kt +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on OpenShift Builds. - */ -public fun UriDsl.`openshift-builds`(i: OpenshiftBuildsUriDsl.() -> Unit) { - OpenshiftBuildsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class OpenshiftBuildsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("openshift-builds") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenshiftDeploymentconfigsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenshiftDeploymentconfigsUriDsl.kt deleted file mode 100644 index a323361d9dc81..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenshiftDeploymentconfigsUriDsl.kt +++ /dev/null @@ -1,351 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on Openshift Deployment Configs and get notified on Deployment Config changes. - */ -public fun UriDsl.`openshift-deploymentconfigs`(i: OpenshiftDeploymentconfigsUriDsl.() -> Unit) { - OpenshiftDeploymentconfigsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class OpenshiftDeploymentconfigsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("openshift-deploymentconfigs") - } - - private var masterUrl: String = "" - - /** - * URL to a remote Kubernetes API server. This should only be used when your Camel application is - * connecting from outside Kubernetes. If you run your Camel application inside Kubernetes, then you - * can use local or client as the URL to tell Camel to run in local mode. If you connect remotely to - * Kubernetes, then you may also need some of the many other configuration options for secured - * connection with certificates, etc. - */ - public fun masterUrl(masterUrl: String) { - this.masterUrl = masterUrl - it.url("$masterUrl") - } - - /** - * The Kubernetes API Version to use - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The dns domain, used for ServiceCall EIP - */ - public fun dnsDomain(dnsDomain: String) { - it.property("dnsDomain", dnsDomain) - } - - /** - * Default KubernetesClient to use if provided - */ - public fun kubernetesClient(kubernetesClient: String) { - it.property("kubernetesClient", kubernetesClient) - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - it.property("namespace", namespace) - } - - /** - * The port name, used for ServiceCall EIP - */ - public fun portName(portName: String) { - it.property("portName", portName) - } - - /** - * The port protocol, used for ServiceCall EIP - */ - public fun portProtocol(portProtocol: String) { - it.property("portProtocol", portProtocol) - } - - /** - * The Consumer CRD Resource Group we would like to watch - */ - public fun crdGroup(crdGroup: String) { - it.property("crdGroup", crdGroup) - } - - /** - * The Consumer CRD Resource name we would like to watch - */ - public fun crdName(crdName: String) { - it.property("crdName", crdName) - } - - /** - * The Consumer CRD Resource Plural we would like to watch - */ - public fun crdPlural(crdPlural: String) { - it.property("crdPlural", crdPlural) - } - - /** - * The Consumer CRD Resource Scope we would like to watch - */ - public fun crdScope(crdScope: String) { - it.property("crdScope", crdScope) - } - - /** - * The Consumer CRD Resource Version we would like to watch - */ - public fun crdVersion(crdVersion: String) { - it.property("crdVersion", crdVersion) - } - - /** - * The Consumer Label key when watching at some resources - */ - public fun labelKey(labelKey: String) { - it.property("labelKey", labelKey) - } - - /** - * The Consumer Label value when watching at some resources - */ - public fun labelValue(labelValue: String) { - it.property("labelValue", labelValue) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: String) { - it.property("poolSize", poolSize) - } - - /** - * The Consumer pool size - */ - public fun poolSize(poolSize: Int) { - it.property("poolSize", poolSize.toString()) - } - - /** - * The Consumer Resource Name we would like to watch - */ - public fun resourceName(resourceName: String) { - it.property("resourceName", resourceName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Producer operation to do on Kubernetes - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Connection timeout in milliseconds to use when making requests to the Kubernetes API server. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * The CA Cert Data - */ - public fun caCertData(caCertData: String) { - it.property("caCertData", caCertData) - } - - /** - * The CA Cert File - */ - public fun caCertFile(caCertFile: String) { - it.property("caCertFile", caCertFile) - } - - /** - * The Client Cert Data - */ - public fun clientCertData(clientCertData: String) { - it.property("clientCertData", clientCertData) - } - - /** - * The Client Cert File - */ - public fun clientCertFile(clientCertFile: String) { - it.property("clientCertFile", clientCertFile) - } - - /** - * The Key Algorithm used by the client - */ - public fun clientKeyAlgo(clientKeyAlgo: String) { - it.property("clientKeyAlgo", clientKeyAlgo) - } - - /** - * The Client Key data - */ - public fun clientKeyData(clientKeyData: String) { - it.property("clientKeyData", clientKeyData) - } - - /** - * The Client Key file - */ - public fun clientKeyFile(clientKeyFile: String) { - it.property("clientKeyFile", clientKeyFile) - } - - /** - * The Client Key Passphrase - */ - public fun clientKeyPassphrase(clientKeyPassphrase: String) { - it.property("clientKeyPassphrase", clientKeyPassphrase) - } - - /** - * The Auth Token - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * Password to connect to Kubernetes - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: String) { - it.property("trustCerts", trustCerts) - } - - /** - * Define if the certs we used are trusted anyway or not - */ - public fun trustCerts(trustCerts: Boolean) { - it.property("trustCerts", trustCerts.toString()) - } - - /** - * Username to connect to Kubernetes - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackCinderUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackCinderUriDsl.kt deleted file mode 100644 index 7bc8eabe6ed03..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackCinderUriDsl.kt +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Access data in OpenStack Cinder block storage. - */ -public fun UriDsl.`openstack-cinder`(i: OpenstackCinderUriDsl.() -> Unit) { - OpenstackCinderUriDsl(this).apply(i) -} - -@CamelDslMarker -public class OpenstackCinderUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("openstack-cinder") - } - - private var host: String = "" - - /** - * OpenStack host url - */ - public fun host(host: String) { - this.host = host - it.url("$host") - } - - /** - * OpenStack API version - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * OpenStack configuration - */ - public fun config(config: String) { - it.property("config", config) - } - - /** - * Authentication domain - */ - public fun domain(domain: String) { - it.property("domain", domain) - } - - /** - * The operation to do - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * OpenStack password - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * The project ID - */ - public fun project(project: String) { - it.property("project", project) - } - - /** - * OpenStack Cinder subsystem - */ - public fun subsystem(subsystem: String) { - it.property("subsystem", subsystem) - } - - /** - * OpenStack username - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackGlanceUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackGlanceUriDsl.kt deleted file mode 100644 index f3136745ce039..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackGlanceUriDsl.kt +++ /dev/null @@ -1,125 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage VM images and metadata definitions in OpenStack Glance. - */ -public fun UriDsl.`openstack-glance`(i: OpenstackGlanceUriDsl.() -> Unit) { - OpenstackGlanceUriDsl(this).apply(i) -} - -@CamelDslMarker -public class OpenstackGlanceUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("openstack-glance") - } - - private var host: String = "" - - /** - * OpenStack host url - */ - public fun host(host: String) { - this.host = host - it.url("$host") - } - - /** - * OpenStack API version - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * OpenStack configuration - */ - public fun config(config: String) { - it.property("config", config) - } - - /** - * Authentication domain - */ - public fun domain(domain: String) { - it.property("domain", domain) - } - - /** - * The operation to do - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * OpenStack password - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * The project ID - */ - public fun project(project: String) { - it.property("project", project) - } - - /** - * OpenStack username - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackKeystoneUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackKeystoneUriDsl.kt deleted file mode 100644 index 6a9e9a4323bff..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackKeystoneUriDsl.kt +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Access OpenStack Keystone for API client authentication, service discovery and distributed - * multi-tenant authorization. - */ -public fun UriDsl.`openstack-keystone`(i: OpenstackKeystoneUriDsl.() -> Unit) { - OpenstackKeystoneUriDsl(this).apply(i) -} - -@CamelDslMarker -public class OpenstackKeystoneUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("openstack-keystone") - } - - private var host: String = "" - - /** - * OpenStack host url - */ - public fun host(host: String) { - this.host = host - it.url("$host") - } - - /** - * OpenStack configuration - */ - public fun config(config: String) { - it.property("config", config) - } - - /** - * Authentication domain - */ - public fun domain(domain: String) { - it.property("domain", domain) - } - - /** - * The operation to do - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * OpenStack password - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * The project ID - */ - public fun project(project: String) { - it.property("project", project) - } - - /** - * OpenStack Keystone subsystem - */ - public fun subsystem(subsystem: String) { - it.property("subsystem", subsystem) - } - - /** - * OpenStack username - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackNeutronUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackNeutronUriDsl.kt deleted file mode 100644 index 050a40e1f5393..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackNeutronUriDsl.kt +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Access OpenStack Neutron for network services. - */ -public fun UriDsl.`openstack-neutron`(i: OpenstackNeutronUriDsl.() -> Unit) { - OpenstackNeutronUriDsl(this).apply(i) -} - -@CamelDslMarker -public class OpenstackNeutronUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("openstack-neutron") - } - - private var host: String = "" - - /** - * OpenStack host url - */ - public fun host(host: String) { - this.host = host - it.url("$host") - } - - /** - * OpenStack API version - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * OpenStack configuration - */ - public fun config(config: String) { - it.property("config", config) - } - - /** - * Authentication domain - */ - public fun domain(domain: String) { - it.property("domain", domain) - } - - /** - * The operation to do - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * OpenStack password - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * The project ID - */ - public fun project(project: String) { - it.property("project", project) - } - - /** - * OpenStack Neutron subsystem - */ - public fun subsystem(subsystem: String) { - it.property("subsystem", subsystem) - } - - /** - * OpenStack username - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackNovaUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackNovaUriDsl.kt deleted file mode 100644 index 9f09002b08fa1..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackNovaUriDsl.kt +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Access OpenStack to manage compute resources. - */ -public fun UriDsl.`openstack-nova`(i: OpenstackNovaUriDsl.() -> Unit) { - OpenstackNovaUriDsl(this).apply(i) -} - -@CamelDslMarker -public class OpenstackNovaUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("openstack-nova") - } - - private var host: String = "" - - /** - * OpenStack host url - */ - public fun host(host: String) { - this.host = host - it.url("$host") - } - - /** - * OpenStack API version - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * OpenStack configuration - */ - public fun config(config: String) { - it.property("config", config) - } - - /** - * Authentication domain - */ - public fun domain(domain: String) { - it.property("domain", domain) - } - - /** - * The operation to do - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * OpenStack password - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * The project ID - */ - public fun project(project: String) { - it.property("project", project) - } - - /** - * OpenStack Nova subsystem - */ - public fun subsystem(subsystem: String) { - it.property("subsystem", subsystem) - } - - /** - * OpenStack username - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackSwiftUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackSwiftUriDsl.kt deleted file mode 100644 index 4a985edd6e65c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OpenstackSwiftUriDsl.kt +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Access OpenStack Swift object/blob store. - */ -public fun UriDsl.`openstack-swift`(i: OpenstackSwiftUriDsl.() -> Unit) { - OpenstackSwiftUriDsl(this).apply(i) -} - -@CamelDslMarker -public class OpenstackSwiftUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("openstack-swift") - } - - private var host: String = "" - - /** - * OpenStack host url - */ - public fun host(host: String) { - this.host = host - it.url("$host") - } - - /** - * OpenStack API version - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * OpenStack configuration - */ - public fun config(config: String) { - it.property("config", config) - } - - /** - * Authentication domain - */ - public fun domain(domain: String) { - it.property("domain", domain) - } - - /** - * The operation to do - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * OpenStack password - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * The project ID - */ - public fun project(project: String) { - it.property("project", project) - } - - /** - * OpenStack Swift subsystem - */ - public fun subsystem(subsystem: String) { - it.property("subsystem", subsystem) - } - - /** - * OpenStack username - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OptaplannerUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OptaplannerUriDsl.kt deleted file mode 100644 index 9559e8b4213af..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/OptaplannerUriDsl.kt +++ /dev/null @@ -1,187 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Solve planning problems with OptaPlanner. - */ -public fun UriDsl.optaplanner(i: OptaplannerUriDsl.() -> Unit) { - OptaplannerUriDsl(this).apply(i) -} - -@CamelDslMarker -public class OptaplannerUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("optaplanner") - } - - private var problemName: String = "" - - /** - * Problem name - */ - public fun problemName(problemName: String) { - this.problemName = problemName - it.url("$problemName") - } - - /** - * If SolverManager is absent from the header OptaPlannerConstants.SOLVER_MANAGER then a - * SolverManager will be created using this Optaplanner config file. - */ - public fun configFile(configFile: String) { - it.property("configFile", configFile) - } - - /** - * In case of using SolverManager : the problem id - */ - public fun problemId(problemId: String) { - it.property("problemId", problemId) - } - - /** - * In case of using SolverManager : the problem id - */ - public fun problemId(problemId: Int) { - it.property("problemId", problemId.toString()) - } - - /** - * Specifies the solverId to user for the solver instance key - */ - public fun solverId(solverId: String) { - it.property("solverId", solverId) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Specifies to perform operations in async mode - */ - public fun async(async: String) { - it.property("async", async) - } - - /** - * Specifies to perform operations in async mode - */ - public fun async(async: Boolean) { - it.property("async", async.toString()) - } - - /** - * Specifies the thread pool size to use when async is true - */ - public fun threadPoolSize(threadPoolSize: String) { - it.property("threadPoolSize", threadPoolSize) - } - - /** - * Specifies the thread pool size to use when async is true - */ - public fun threadPoolSize(threadPoolSize: Int) { - it.property("threadPoolSize", threadPoolSize.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * SolverManager - */ - public fun solverManager(solverManager: String) { - it.property("solverManager", solverManager) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PahoMqtt5UriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PahoMqtt5UriDsl.kt deleted file mode 100644 index 07c5632f6400c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PahoMqtt5UriDsl.kt +++ /dev/null @@ -1,534 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Communicate with MQTT message brokers using Eclipse Paho MQTT v5 Client. - */ -public fun UriDsl.`paho-mqtt5`(i: PahoMqtt5UriDsl.() -> Unit) { - PahoMqtt5UriDsl(this).apply(i) -} - -@CamelDslMarker -public class PahoMqtt5UriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("paho-mqtt5") - } - - private var topic: String = "" - - /** - * Name of the topic - */ - public fun topic(topic: String) { - this.topic = topic - it.url("$topic") - } - - /** - * Sets whether the client will automatically attempt to reconnect to the server if the connection - * is lost. If set to false, the client will not attempt to automatically reconnect to the server in - * the event that the connection is lost. If set to true, in the event that the connection is lost, - * the client will attempt to reconnect to the server. It will initially wait 1 second before it - * attempts to reconnect, for every failed reconnect attempt, the delay will double until it is at 2 - * minutes at which point the delay will stay at 2 minutes. - */ - public fun automaticReconnect(automaticReconnect: String) { - it.property("automaticReconnect", automaticReconnect) - } - - /** - * Sets whether the client will automatically attempt to reconnect to the server if the connection - * is lost. If set to false, the client will not attempt to automatically reconnect to the server in - * the event that the connection is lost. If set to true, in the event that the connection is lost, - * the client will attempt to reconnect to the server. It will initially wait 1 second before it - * attempts to reconnect, for every failed reconnect attempt, the delay will double until it is at 2 - * minutes at which point the delay will stay at 2 minutes. - */ - public fun automaticReconnect(automaticReconnect: Boolean) { - it.property("automaticReconnect", automaticReconnect.toString()) - } - - /** - * The URL of the MQTT broker. - */ - public fun brokerUrl(brokerUrl: String) { - it.property("brokerUrl", brokerUrl) - } - - /** - * Sets whether the client and server should remember state across restarts and reconnects. If set - * to false both the client and server will maintain state across restarts of the client, the server - * and the connection. As state is maintained: Message delivery will be reliable meeting the - * specified QOS even if the client, server or connection are restarted. The server will treat a - * subscription as durable. If set to true the client and server will not maintain state across - * restarts of the client, the server or the connection. This means Message delivery to the specified - * QOS cannot be maintained if the client, server or connection are restarted The server will treat a - * subscription as non-durable - */ - public fun cleanStart(cleanStart: String) { - it.property("cleanStart", cleanStart) - } - - /** - * Sets whether the client and server should remember state across restarts and reconnects. If set - * to false both the client and server will maintain state across restarts of the client, the server - * and the connection. As state is maintained: Message delivery will be reliable meeting the - * specified QOS even if the client, server or connection are restarted. The server will treat a - * subscription as durable. If set to true the client and server will not maintain state across - * restarts of the client, the server or the connection. This means Message delivery to the specified - * QOS cannot be maintained if the client, server or connection are restarted The server will treat a - * subscription as non-durable - */ - public fun cleanStart(cleanStart: Boolean) { - it.property("cleanStart", cleanStart.toString()) - } - - /** - * MQTT client identifier. The identifier must be unique. - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * Sets the connection timeout value. This value, measured in seconds, defines the maximum time - * interval the client will wait for the network connection to the MQTT server to be established. The - * default timeout is 30 seconds. A value of 0 disables timeout processing meaning the client will - * wait until the network connection is made successfully or fails. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Sets the connection timeout value. This value, measured in seconds, defines the maximum time - * interval the client will wait for the network connection to the MQTT server to be established. The - * default timeout is 30 seconds. A value of 0 disables timeout processing meaning the client will - * wait until the network connection is made successfully or fails. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * Base directory used by file persistence. Will by default use user directory. - */ - public fun filePersistenceDirectory(filePersistenceDirectory: String) { - it.property("filePersistenceDirectory", filePersistenceDirectory) - } - - /** - * Sets the keep alive interval. This value, measured in seconds, defines the maximum time - * interval between messages sent or received. It enables the client to detect if the server is no - * longer available, without having to wait for the TCP/IP timeout. The client will ensure that at - * least one message travels across the network within each keep alive period. In the absence of a - * data-related message during the time period, the client sends a very small ping message, which the - * server will acknowledge. A value of 0 disables keepalive processing in the client. The default - * value is 60 seconds - */ - public fun keepAliveInterval(keepAliveInterval: String) { - it.property("keepAliveInterval", keepAliveInterval) - } - - /** - * Sets the keep alive interval. This value, measured in seconds, defines the maximum time - * interval between messages sent or received. It enables the client to detect if the server is no - * longer available, without having to wait for the TCP/IP timeout. The client will ensure that at - * least one message travels across the network within each keep alive period. In the absence of a - * data-related message during the time period, the client sends a very small ping message, which the - * server will acknowledge. A value of 0 disables keepalive processing in the client. The default - * value is 60 seconds - */ - public fun keepAliveInterval(keepAliveInterval: Int) { - it.property("keepAliveInterval", keepAliveInterval.toString()) - } - - /** - * Get the maximum time (in millis) to wait between reconnects - */ - public fun maxReconnectDelay(maxReconnectDelay: String) { - it.property("maxReconnectDelay", maxReconnectDelay) - } - - /** - * Get the maximum time (in millis) to wait between reconnects - */ - public fun maxReconnectDelay(maxReconnectDelay: Int) { - it.property("maxReconnectDelay", maxReconnectDelay.toString()) - } - - /** - * Client persistence to be used - memory or file. - */ - public fun persistence(persistence: String) { - it.property("persistence", persistence) - } - - /** - * Client quality of service level (0-2). - */ - public fun qos(qos: String) { - it.property("qos", qos) - } - - /** - * Client quality of service level (0-2). - */ - public fun qos(qos: Int) { - it.property("qos", qos.toString()) - } - - /** - * Sets the Receive Maximum. This value represents the limit of QoS 1 and QoS 2 publications that - * the client is willing to process concurrently. There is no mechanism to limit the number of QoS 0 - * publications that the Server might try to send. The default value is 65535 - */ - public fun receiveMaximum(receiveMaximum: String) { - it.property("receiveMaximum", receiveMaximum) - } - - /** - * Sets the Receive Maximum. This value represents the limit of QoS 1 and QoS 2 publications that - * the client is willing to process concurrently. There is no mechanism to limit the number of QoS 0 - * publications that the Server might try to send. The default value is 65535 - */ - public fun receiveMaximum(receiveMaximum: Int) { - it.property("receiveMaximum", receiveMaximum.toString()) - } - - /** - * Retain option - */ - public fun retained(retained: String) { - it.property("retained", retained) - } - - /** - * Retain option - */ - public fun retained(retained: Boolean) { - it.property("retained", retained.toString()) - } - - /** - * Set a list of one or more serverURIs the client may connect to. Multiple servers can be - * separated by comma. Each serverURI specifies the address of a server that the client may connect - * to. Two types of connection are supported tcp:// for a TCP connection and ssl:// for a TCP - * connection secured by SSL/TLS. For example: tcp://localhost:1883 ssl://localhost:8883 If the port - * is not specified, it will default to 1883 for tcp:// URIs, and 8883 for ssl:// URIs. If serverURIs - * is set then it overrides the serverURI parameter passed in on the constructor of the MQTT client. - * When an attempt to connect is initiated the client will start with the first serverURI in the list - * and work through the list until a connection is established with a server. If a connection cannot - * be made to any of the servers then the connect attempt fails. Specifying a list of servers that a - * client may connect to has several uses: High Availability and reliable message delivery Some MQTT - * servers support a high availability feature where two or more equal MQTT servers share state. An - * MQTT client can connect to any of the equal servers and be assured that messages are reliably - * delivered and durable subscriptions are maintained no matter which server the client connects to. - * The cleansession flag must be set to false if durable subscriptions and/or reliable message - * delivery is required. Hunt List A set of servers may be specified that are not equal (as in the - * high availability option). As no state is shared across the servers reliable message delivery and - * durable subscriptions are not valid. The cleansession flag must be set to true if the hunt list - * mode is used - */ - public fun serverURIs(serverURIs: String) { - it.property("serverURIs", serverURIs) - } - - /** - * Sets the Session Expiry Interval. This value, measured in seconds, defines the maximum time - * that the broker will maintain the session for once the client disconnects. Clients should only - * connect with a long Session Expiry interval if they intend to connect to the server at some later - * point in time. By default this value is -1 and so will not be sent, in this case, the session will - * not expire. If a 0 is sent, the session will end immediately once the Network Connection is - * closed. When the client has determined that it has no longer any use for the session, it should - * disconnect with a Session Expiry Interval set to 0. - */ - public fun sessionExpiryInterval(sessionExpiryInterval: String) { - it.property("sessionExpiryInterval", sessionExpiryInterval) - } - - /** - * Sets the Session Expiry Interval. This value, measured in seconds, defines the maximum time - * that the broker will maintain the session for once the client disconnects. Clients should only - * connect with a long Session Expiry interval if they intend to connect to the server at some later - * point in time. By default this value is -1 and so will not be sent, in this case, the session will - * not expire. If a 0 is sent, the session will end immediately once the Network Connection is - * closed. When the client has determined that it has no longer any use for the session, it should - * disconnect with a Session Expiry Interval set to 0. - */ - public fun sessionExpiryInterval(sessionExpiryInterval: Int) { - it.property("sessionExpiryInterval", sessionExpiryInterval.toString()) - } - - /** - * Sets the Last Will and Testament (LWT) for the connection. In the event that this client - * unexpectedly loses its connection to the server, the server will publish a message to itself using - * the supplied details. The MQTT properties set for the message. - */ - public fun willMqttProperties(willMqttProperties: String) { - it.property("willMqttProperties", willMqttProperties) - } - - /** - * Sets the Last Will and Testament (LWT) for the connection. In the event that this client - * unexpectedly loses its connection to the server, the server will publish a message to itself using - * the supplied details. The byte payload for the message. - */ - public fun willPayload(willPayload: String) { - it.property("willPayload", willPayload) - } - - /** - * Sets the Last Will and Testament (LWT) for the connection. In the event that this client - * unexpectedly loses its connection to the server, the server will publish a message to itself using - * the supplied details. The quality of service to publish the message at (0, 1 or 2). - */ - public fun willQos(willQos: String) { - it.property("willQos", willQos) - } - - /** - * Sets the Last Will and Testament (LWT) for the connection. In the event that this client - * unexpectedly loses its connection to the server, the server will publish a message to itself using - * the supplied details. The quality of service to publish the message at (0, 1 or 2). - */ - public fun willQos(willQos: Int) { - it.property("willQos", willQos.toString()) - } - - /** - * Sets the Last Will and Testament (LWT) for the connection. In the event that this client - * unexpectedly loses its connection to the server, the server will publish a message to itself using - * the supplied details. Whether or not the message should be retained. - */ - public fun willRetained(willRetained: String) { - it.property("willRetained", willRetained) - } - - /** - * Sets the Last Will and Testament (LWT) for the connection. In the event that this client - * unexpectedly loses its connection to the server, the server will publish a message to itself using - * the supplied details. Whether or not the message should be retained. - */ - public fun willRetained(willRetained: Boolean) { - it.property("willRetained", willRetained.toString()) - } - - /** - * Sets the Last Will and Testament (LWT) for the connection. In the event that this client - * unexpectedly loses its connection to the server, the server will publish a message to itself using - * the supplied details. The topic to publish to. - */ - public fun willTopic(willTopic: String) { - it.property("willTopic", willTopic) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing mqtt client - */ - public fun client(client: String) { - it.property("client", client) - } - - /** - * Sets the Custom WebSocket Headers for the WebSocket Connection. - */ - public fun customWebSocketHeaders(customWebSocketHeaders: String) { - it.property("customWebSocketHeaders", customWebSocketHeaders) - } - - /** - * Set the time in seconds that the executor service should wait when terminating before - * forcefully terminating. It is not recommended to change this value unless you are absolutely sure - * that you need to. - */ - public fun executorServiceTimeout(executorServiceTimeout: String) { - it.property("executorServiceTimeout", executorServiceTimeout) - } - - /** - * Set the time in seconds that the executor service should wait when terminating before - * forcefully terminating. It is not recommended to change this value unless you are absolutely sure - * that you need to. - */ - public fun executorServiceTimeout(executorServiceTimeout: Int) { - it.property("executorServiceTimeout", executorServiceTimeout.toString()) - } - - /** - * Whether SSL HostnameVerifier is enabled or not. The default value is true. - */ - public fun httpsHostnameVerificationEnabled(httpsHostnameVerificationEnabled: String) { - it.property("httpsHostnameVerificationEnabled", httpsHostnameVerificationEnabled) - } - - /** - * Whether SSL HostnameVerifier is enabled or not. The default value is true. - */ - public fun httpsHostnameVerificationEnabled(httpsHostnameVerificationEnabled: Boolean) { - it.property("httpsHostnameVerificationEnabled", httpsHostnameVerificationEnabled.toString()) - } - - /** - * Password to be used for authentication against the MQTT broker - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Sets the SocketFactory to use. This allows an application to apply its own policies around the - * creation of network sockets. If using an SSL connection, an SSLSocketFactory can be used to supply - * application-specific security settings. - */ - public fun socketFactory(socketFactory: String) { - it.property("socketFactory", socketFactory) - } - - /** - * Sets the SSL properties for the connection. Note that these properties are only valid if an - * implementation of the Java Secure Socket Extensions (JSSE) is available. These properties are not - * used if a custom SocketFactory has been set. The following properties can be used: - * com.ibm.ssl.protocol One of: SSL, SSLv3, TLS, TLSv1, SSL_TLS. com.ibm.ssl.contextProvider - * Underlying JSSE provider. For example IBMJSSE2 or SunJSSE com.ibm.ssl.keyStore The name of the - * file that contains the KeyStore object that you want the KeyManager to use. For example - * /mydir/etc/key.p12 com.ibm.ssl.keyStorePassword The password for the KeyStore object that you want - * the KeyManager to use. The password can either be in plain-text, or may be obfuscated using the - * static method: com.ibm.micro.security.Password.obfuscate(char password). This obfuscates the - * password using a simple and insecure XOR and Base64 encoding mechanism. Note that this is only a - * simple scrambler to obfuscate clear-text passwords. com.ibm.ssl.keyStoreType Type of key store, - * for example PKCS12, JKS, or JCEKS. com.ibm.ssl.keyStoreProvider Key store provider, for example - * IBMJCE or IBMJCEFIPS. com.ibm.ssl.trustStore The name of the file that contains the KeyStore - * object that you want the TrustManager to use. com.ibm.ssl.trustStorePassword The password for the - * TrustStore object that you want the TrustManager to use. The password can either be in plain-text, - * or may be obfuscated using the static method: com.ibm.micro.security.Password.obfuscate(char - * password). This obfuscates the password using a simple and insecure XOR and Base64 encoding - * mechanism. Note that this is only a simple scrambler to obfuscate clear-text passwords. - * com.ibm.ssl.trustStoreType The type of KeyStore object that you want the default TrustManager to - * use. Same possible values as keyStoreType. com.ibm.ssl.trustStoreProvider Trust store provider, - * for example IBMJCE or IBMJCEFIPS. com.ibm.ssl.enabledCipherSuites A list of which ciphers are - * enabled. Values are dependent on the provider, for example: - * SSL_RSA_WITH_AES_128_CBC_SHA;SSL_RSA_WITH_3DES_EDE_CBC_SHA. com.ibm.ssl.keyManager Sets the - * algorithm that will be used to instantiate a KeyManagerFactory object instead of using the default - * algorithm available in the platform. Example values: IbmX509 or IBMJ9X509. - * com.ibm.ssl.trustManager Sets the algorithm that will be used to instantiate a TrustManagerFactory - * object instead of using the default algorithm available in the platform. Example values: PKIX or - * IBMJ9X509. - */ - public fun sslClientProps(sslClientProps: String) { - it.property("sslClientProps", sslClientProps) - } - - /** - * Sets the HostnameVerifier for the SSL connection. Note that it will be used after handshake on - * a connection and you should do actions by yourself when hostname is verified error. There is no - * default HostnameVerifier - */ - public fun sslHostnameVerifier(sslHostnameVerifier: String) { - it.property("sslHostnameVerifier", sslHostnameVerifier) - } - - /** - * Username to be used for authentication against the MQTT broker - */ - public fun userName(userName: String) { - it.property("userName", userName) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PahoUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PahoUriDsl.kt deleted file mode 100644 index 336baf7c8e4d5..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PahoUriDsl.kt +++ /dev/null @@ -1,515 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Communicate with MQTT message brokers using Eclipse Paho MQTT Client. - */ -public fun UriDsl.paho(i: PahoUriDsl.() -> Unit) { - PahoUriDsl(this).apply(i) -} - -@CamelDslMarker -public class PahoUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("paho") - } - - private var topic: String = "" - - /** - * Name of the topic - */ - public fun topic(topic: String) { - this.topic = topic - it.url("$topic") - } - - /** - * Sets whether the client will automatically attempt to reconnect to the server if the connection - * is lost. If set to false, the client will not attempt to automatically reconnect to the server in - * the event that the connection is lost. If set to true, in the event that the connection is lost, - * the client will attempt to reconnect to the server. It will initially wait 1 second before it - * attempts to reconnect, for every failed reconnect attempt, the delay will double until it is at 2 - * minutes at which point the delay will stay at 2 minutes. - */ - public fun automaticReconnect(automaticReconnect: String) { - it.property("automaticReconnect", automaticReconnect) - } - - /** - * Sets whether the client will automatically attempt to reconnect to the server if the connection - * is lost. If set to false, the client will not attempt to automatically reconnect to the server in - * the event that the connection is lost. If set to true, in the event that the connection is lost, - * the client will attempt to reconnect to the server. It will initially wait 1 second before it - * attempts to reconnect, for every failed reconnect attempt, the delay will double until it is at 2 - * minutes at which point the delay will stay at 2 minutes. - */ - public fun automaticReconnect(automaticReconnect: Boolean) { - it.property("automaticReconnect", automaticReconnect.toString()) - } - - /** - * The URL of the MQTT broker. - */ - public fun brokerUrl(brokerUrl: String) { - it.property("brokerUrl", brokerUrl) - } - - /** - * Sets whether the client and server should remember state across restarts and reconnects. If set - * to false both the client and server will maintain state across restarts of the client, the server - * and the connection. As state is maintained: Message delivery will be reliable meeting the - * specified QOS even if the client, server or connection are restarted. The server will treat a - * subscription as durable. If set to true the client and server will not maintain state across - * restarts of the client, the server or the connection. This means Message delivery to the specified - * QOS cannot be maintained if the client, server or connection are restarted The server will treat a - * subscription as non-durable - */ - public fun cleanSession(cleanSession: String) { - it.property("cleanSession", cleanSession) - } - - /** - * Sets whether the client and server should remember state across restarts and reconnects. If set - * to false both the client and server will maintain state across restarts of the client, the server - * and the connection. As state is maintained: Message delivery will be reliable meeting the - * specified QOS even if the client, server or connection are restarted. The server will treat a - * subscription as durable. If set to true the client and server will not maintain state across - * restarts of the client, the server or the connection. This means Message delivery to the specified - * QOS cannot be maintained if the client, server or connection are restarted The server will treat a - * subscription as non-durable - */ - public fun cleanSession(cleanSession: Boolean) { - it.property("cleanSession", cleanSession.toString()) - } - - /** - * MQTT client identifier. The identifier must be unique. - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * Sets the connection timeout value. This value, measured in seconds, defines the maximum time - * interval the client will wait for the network connection to the MQTT server to be established. The - * default timeout is 30 seconds. A value of 0 disables timeout processing meaning the client will - * wait until the network connection is made successfully or fails. - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Sets the connection timeout value. This value, measured in seconds, defines the maximum time - * interval the client will wait for the network connection to the MQTT server to be established. The - * default timeout is 30 seconds. A value of 0 disables timeout processing meaning the client will - * wait until the network connection is made successfully or fails. - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * Base directory used by file persistence. Will by default use user directory. - */ - public fun filePersistenceDirectory(filePersistenceDirectory: String) { - it.property("filePersistenceDirectory", filePersistenceDirectory) - } - - /** - * Sets the keep alive interval. This value, measured in seconds, defines the maximum time - * interval between messages sent or received. It enables the client to detect if the server is no - * longer available, without having to wait for the TCP/IP timeout. The client will ensure that at - * least one message travels across the network within each keep alive period. In the absence of a - * data-related message during the time period, the client sends a very small ping message, which the - * server will acknowledge. A value of 0 disables keepalive processing in the client. The default - * value is 60 seconds - */ - public fun keepAliveInterval(keepAliveInterval: String) { - it.property("keepAliveInterval", keepAliveInterval) - } - - /** - * Sets the keep alive interval. This value, measured in seconds, defines the maximum time - * interval between messages sent or received. It enables the client to detect if the server is no - * longer available, without having to wait for the TCP/IP timeout. The client will ensure that at - * least one message travels across the network within each keep alive period. In the absence of a - * data-related message during the time period, the client sends a very small ping message, which the - * server will acknowledge. A value of 0 disables keepalive processing in the client. The default - * value is 60 seconds - */ - public fun keepAliveInterval(keepAliveInterval: Int) { - it.property("keepAliveInterval", keepAliveInterval.toString()) - } - - /** - * Sets the max inflight. please increase this value in a high traffic environment. The default - * value is 10 - */ - public fun maxInflight(maxInflight: String) { - it.property("maxInflight", maxInflight) - } - - /** - * Sets the max inflight. please increase this value in a high traffic environment. The default - * value is 10 - */ - public fun maxInflight(maxInflight: Int) { - it.property("maxInflight", maxInflight.toString()) - } - - /** - * Get the maximum time (in millis) to wait between reconnects - */ - public fun maxReconnectDelay(maxReconnectDelay: String) { - it.property("maxReconnectDelay", maxReconnectDelay) - } - - /** - * Get the maximum time (in millis) to wait between reconnects - */ - public fun maxReconnectDelay(maxReconnectDelay: Int) { - it.property("maxReconnectDelay", maxReconnectDelay.toString()) - } - - /** - * Sets the MQTT version. The default action is to connect with version 3.1.1, and to fall back to - * 3.1 if that fails. Version 3.1.1 or 3.1 can be selected specifically, with no fall back, by using - * the MQTT_VERSION_3_1_1 or MQTT_VERSION_3_1 options respectively. - */ - public fun mqttVersion(mqttVersion: String) { - it.property("mqttVersion", mqttVersion) - } - - /** - * Sets the MQTT version. The default action is to connect with version 3.1.1, and to fall back to - * 3.1 if that fails. Version 3.1.1 or 3.1 can be selected specifically, with no fall back, by using - * the MQTT_VERSION_3_1_1 or MQTT_VERSION_3_1 options respectively. - */ - public fun mqttVersion(mqttVersion: Int) { - it.property("mqttVersion", mqttVersion.toString()) - } - - /** - * Client persistence to be used - memory or file. - */ - public fun persistence(persistence: String) { - it.property("persistence", persistence) - } - - /** - * Client quality of service level (0-2). - */ - public fun qos(qos: String) { - it.property("qos", qos) - } - - /** - * Client quality of service level (0-2). - */ - public fun qos(qos: Int) { - it.property("qos", qos.toString()) - } - - /** - * Retain option - */ - public fun retained(retained: String) { - it.property("retained", retained) - } - - /** - * Retain option - */ - public fun retained(retained: Boolean) { - it.property("retained", retained.toString()) - } - - /** - * Set a list of one or more serverURIs the client may connect to. Multiple servers can be - * separated by comma. Each serverURI specifies the address of a server that the client may connect - * to. Two types of connection are supported tcp:// for a TCP connection and ssl:// for a TCP - * connection secured by SSL/TLS. For example: tcp://localhost:1883 ssl://localhost:8883 If the port - * is not specified, it will default to 1883 for tcp:// URIs, and 8883 for ssl:// URIs. If serverURIs - * is set then it overrides the serverURI parameter passed in on the constructor of the MQTT client. - * When an attempt to connect is initiated the client will start with the first serverURI in the list - * and work through the list until a connection is established with a server. If a connection cannot - * be made to any of the servers then the connect attempt fails. Specifying a list of servers that a - * client may connect to has several uses: High Availability and reliable message delivery Some MQTT - * servers support a high availability feature where two or more equal MQTT servers share state. An - * MQTT client can connect to any of the equal servers and be assured that messages are reliably - * delivered and durable subscriptions are maintained no matter which server the client connects to. - * The cleansession flag must be set to false if durable subscriptions and/or reliable message - * delivery is required. Hunt List A set of servers may be specified that are not equal (as in the - * high availability option). As no state is shared across the servers reliable message delivery and - * durable subscriptions are not valid. The cleansession flag must be set to true if the hunt list - * mode is used - */ - public fun serverURIs(serverURIs: String) { - it.property("serverURIs", serverURIs) - } - - /** - * Sets the Last Will and Testament (LWT) for the connection. In the event that this client - * unexpectedly loses its connection to the server, the server will publish a message to itself using - * the supplied details. Sets the message for the LWT. - */ - public fun willPayload(willPayload: String) { - it.property("willPayload", willPayload) - } - - /** - * Sets the Last Will and Testament (LWT) for the connection. In the event that this client - * unexpectedly loses its connection to the server, the server will publish a message to itself using - * the supplied details. Sets the quality of service to publish the message at (0, 1 or 2). - */ - public fun willQos(willQos: String) { - it.property("willQos", willQos) - } - - /** - * Sets the Last Will and Testament (LWT) for the connection. In the event that this client - * unexpectedly loses its connection to the server, the server will publish a message to itself using - * the supplied details. Sets the quality of service to publish the message at (0, 1 or 2). - */ - public fun willQos(willQos: Int) { - it.property("willQos", willQos.toString()) - } - - /** - * Sets the Last Will and Testament (LWT) for the connection. In the event that this client - * unexpectedly loses its connection to the server, the server will publish a message to itself using - * the supplied details. Sets whether or not the message should be retained. - */ - public fun willRetained(willRetained: String) { - it.property("willRetained", willRetained) - } - - /** - * Sets the Last Will and Testament (LWT) for the connection. In the event that this client - * unexpectedly loses its connection to the server, the server will publish a message to itself using - * the supplied details. Sets whether or not the message should be retained. - */ - public fun willRetained(willRetained: Boolean) { - it.property("willRetained", willRetained.toString()) - } - - /** - * Sets the Last Will and Testament (LWT) for the connection. In the event that this client - * unexpectedly loses its connection to the server, the server will publish a message to itself using - * the supplied details. Sets the topic that the willPayload will be published to. - */ - public fun willTopic(willTopic: String) { - it.property("willTopic", willTopic) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing mqtt client - */ - public fun client(client: String) { - it.property("client", client) - } - - /** - * Sets the Custom WebSocket Headers for the WebSocket Connection. - */ - public fun customWebSocketHeaders(customWebSocketHeaders: String) { - it.property("customWebSocketHeaders", customWebSocketHeaders) - } - - /** - * Set the time in seconds that the executor service should wait when terminating before - * forcefully terminating. It is not recommended to change this value unless you are absolutely sure - * that you need to. - */ - public fun executorServiceTimeout(executorServiceTimeout: String) { - it.property("executorServiceTimeout", executorServiceTimeout) - } - - /** - * Set the time in seconds that the executor service should wait when terminating before - * forcefully terminating. It is not recommended to change this value unless you are absolutely sure - * that you need to. - */ - public fun executorServiceTimeout(executorServiceTimeout: Int) { - it.property("executorServiceTimeout", executorServiceTimeout.toString()) - } - - /** - * Whether SSL HostnameVerifier is enabled or not. The default value is true. - */ - public fun httpsHostnameVerificationEnabled(httpsHostnameVerificationEnabled: String) { - it.property("httpsHostnameVerificationEnabled", httpsHostnameVerificationEnabled) - } - - /** - * Whether SSL HostnameVerifier is enabled or not. The default value is true. - */ - public fun httpsHostnameVerificationEnabled(httpsHostnameVerificationEnabled: Boolean) { - it.property("httpsHostnameVerificationEnabled", httpsHostnameVerificationEnabled.toString()) - } - - /** - * Password to be used for authentication against the MQTT broker - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Sets the SocketFactory to use. This allows an application to apply its own policies around the - * creation of network sockets. If using an SSL connection, an SSLSocketFactory can be used to supply - * application-specific security settings. - */ - public fun socketFactory(socketFactory: String) { - it.property("socketFactory", socketFactory) - } - - /** - * Sets the SSL properties for the connection. Note that these properties are only valid if an - * implementation of the Java Secure Socket Extensions (JSSE) is available. These properties are not - * used if a custom SocketFactory has been set. The following properties can be used: - * com.ibm.ssl.protocol One of: SSL, SSLv3, TLS, TLSv1, SSL_TLS. com.ibm.ssl.contextProvider - * Underlying JSSE provider. For example IBMJSSE2 or SunJSSE com.ibm.ssl.keyStore The name of the - * file that contains the KeyStore object that you want the KeyManager to use. For example - * /mydir/etc/key.p12 com.ibm.ssl.keyStorePassword The password for the KeyStore object that you want - * the KeyManager to use. The password can either be in plain-text, or may be obfuscated using the - * static method: com.ibm.micro.security.Password.obfuscate(char password). This obfuscates the - * password using a simple and insecure XOR and Base64 encoding mechanism. Note that this is only a - * simple scrambler to obfuscate clear-text passwords. com.ibm.ssl.keyStoreType Type of key store, - * for example PKCS12, JKS, or JCEKS. com.ibm.ssl.keyStoreProvider Key store provider, for example - * IBMJCE or IBMJCEFIPS. com.ibm.ssl.trustStore The name of the file that contains the KeyStore - * object that you want the TrustManager to use. com.ibm.ssl.trustStorePassword The password for the - * TrustStore object that you want the TrustManager to use. The password can either be in plain-text, - * or may be obfuscated using the static method: com.ibm.micro.security.Password.obfuscate(char - * password). This obfuscates the password using a simple and insecure XOR and Base64 encoding - * mechanism. Note that this is only a simple scrambler to obfuscate clear-text passwords. - * com.ibm.ssl.trustStoreType The type of KeyStore object that you want the default TrustManager to - * use. Same possible values as keyStoreType. com.ibm.ssl.trustStoreProvider Trust store provider, - * for example IBMJCE or IBMJCEFIPS. com.ibm.ssl.enabledCipherSuites A list of which ciphers are - * enabled. Values are dependent on the provider, for example: - * SSL_RSA_WITH_AES_128_CBC_SHA;SSL_RSA_WITH_3DES_EDE_CBC_SHA. com.ibm.ssl.keyManager Sets the - * algorithm that will be used to instantiate a KeyManagerFactory object instead of using the default - * algorithm available in the platform. Example values: IbmX509 or IBMJ9X509. - * com.ibm.ssl.trustManager Sets the algorithm that will be used to instantiate a TrustManagerFactory - * object instead of using the default algorithm available in the platform. Example values: PKIX or - * IBMJ9X509. - */ - public fun sslClientProps(sslClientProps: String) { - it.property("sslClientProps", sslClientProps) - } - - /** - * Sets the HostnameVerifier for the SSL connection. Note that it will be used after handshake on - * a connection and you should do actions by yourself when hostname is verified error. There is no - * default HostnameVerifier - */ - public fun sslHostnameVerifier(sslHostnameVerifier: String) { - it.property("sslHostnameVerifier", sslHostnameVerifier) - } - - /** - * Username to be used for authentication against the MQTT broker - */ - public fun userName(userName: String) { - it.property("userName", userName) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PdfUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PdfUriDsl.kt deleted file mode 100644 index 05263826f9044..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PdfUriDsl.kt +++ /dev/null @@ -1,173 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Double -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Create, modify or extract content from PDF documents. - */ -public fun UriDsl.pdf(i: PdfUriDsl.() -> Unit) { - PdfUriDsl(this).apply(i) -} - -@CamelDslMarker -public class PdfUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("pdf") - } - - private var operation: String = "" - - /** - * Operation type - */ - public fun operation(operation: String) { - this.operation = operation - it.url("$operation") - } - - /** - * Font - */ - public fun font(font: String) { - it.property("font", font) - } - - /** - * Font size in pixels - */ - public fun fontSize(fontSize: String) { - it.property("fontSize", fontSize) - } - - /** - * Font size in pixels - */ - public fun fontSize(fontSize: Double) { - it.property("fontSize", fontSize.toString()) - } - - /** - * Margin bottom in pixels - */ - public fun marginBottom(marginBottom: String) { - it.property("marginBottom", marginBottom) - } - - /** - * Margin bottom in pixels - */ - public fun marginBottom(marginBottom: Int) { - it.property("marginBottom", marginBottom.toString()) - } - - /** - * Margin left in pixels - */ - public fun marginLeft(marginLeft: String) { - it.property("marginLeft", marginLeft) - } - - /** - * Margin left in pixels - */ - public fun marginLeft(marginLeft: Int) { - it.property("marginLeft", marginLeft.toString()) - } - - /** - * Margin right in pixels - */ - public fun marginRight(marginRight: String) { - it.property("marginRight", marginRight) - } - - /** - * Margin right in pixels - */ - public fun marginRight(marginRight: Int) { - it.property("marginRight", marginRight.toString()) - } - - /** - * Margin top in pixels - */ - public fun marginTop(marginTop: String) { - it.property("marginTop", marginTop) - } - - /** - * Margin top in pixels - */ - public fun marginTop(marginTop: Int) { - it.property("marginTop", marginTop.toString()) - } - - /** - * Page size - */ - public fun pageSize(pageSize: String) { - it.property("pageSize", pageSize) - } - - /** - * Text processing to use. autoFormatting: Text is getting sliced by words, then max amount of - * words that fits in the line will be written into pdf document. With this strategy all words that - * doesn't fit in the line will be moved to the new line. lineTermination: Builds set of classes for - * line-termination writing strategy. Text getting sliced by line termination symbol and then it will - * be written regardless it fits in the line or not. - */ - public fun textProcessingFactory(textProcessingFactory: String) { - it.property("textProcessingFactory", textProcessingFactory) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PgReplicationSlotUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PgReplicationSlotUriDsl.kt deleted file mode 100644 index e7014db6dbd4f..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PgReplicationSlotUriDsl.kt +++ /dev/null @@ -1,402 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Poll for PostgreSQL Write-Ahead Log (WAL) records using Streaming Replication Slots. - */ -public fun UriDsl.`pg-replication-slot`(i: PgReplicationSlotUriDsl.() -> Unit) { - PgReplicationSlotUriDsl(this).apply(i) -} - -@CamelDslMarker -public class PgReplicationSlotUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("pg-replication-slot") - } - - private var slot: String = "" - - private var host: String = "" - - private var port: String = "" - - private var database: String = "" - - private var outputPlugin: String = "" - - /** - * Replication Slot name - */ - public fun slot(slot: String) { - this.slot = slot - it.url("$host:$port/$database/$slot:$outputPlugin") - } - - /** - * Postgres host - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port/$database/$slot:$outputPlugin") - } - - /** - * Postgres port - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port/$database/$slot:$outputPlugin") - } - - /** - * Postgres port - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port/$database/$slot:$outputPlugin") - } - - /** - * Postgres database name - */ - public fun database(database: String) { - this.database = database - it.url("$host:$port/$database/$slot:$outputPlugin") - } - - /** - * Output plugin name - */ - public fun outputPlugin(outputPlugin: String) { - this.outputPlugin = outputPlugin - it.url("$host:$port/$database/$slot:$outputPlugin") - } - - /** - * Postgres password - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Postgres user - */ - public fun user(user: String) { - it.property("user", user) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Auto create slot if it does not exist - */ - public fun autoCreateSlot(autoCreateSlot: String) { - it.property("autoCreateSlot", autoCreateSlot) - } - - /** - * Auto create slot if it does not exist - */ - public fun autoCreateSlot(autoCreateSlot: Boolean) { - it.property("autoCreateSlot", autoCreateSlot.toString()) - } - - /** - * Slot options to be passed to the output plugin. - */ - public fun slotOptions(slotOptions: String) { - it.property("slotOptions", slotOptions) - } - - /** - * Specifies the number of seconds between status packets sent back to Postgres server. - */ - public fun statusInterval(statusInterval: String) { - it.property("statusInterval", statusInterval) - } - - /** - * Specifies the number of seconds between status packets sent back to Postgres server. - */ - public fun statusInterval(statusInterval: Int) { - it.property("statusInterval", statusInterval.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PgeventUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PgeventUriDsl.kt deleted file mode 100644 index 9ea8e62264dde..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PgeventUriDsl.kt +++ /dev/null @@ -1,184 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive PostgreSQL events via LISTEN and NOTIFY commands. - */ -public fun UriDsl.pgevent(i: PgeventUriDsl.() -> Unit) { - PgeventUriDsl(this).apply(i) -} - -@CamelDslMarker -public class PgeventUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("pgevent") - } - - private var host: String = "" - - private var port: String = "" - - private var database: String = "" - - private var channel: String = "" - - /** - * To connect using hostname and port to the database. - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port/$database/$channel") - } - - /** - * To connect using hostname and port to the database. - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port/$database/$channel") - } - - /** - * To connect using hostname and port to the database. - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port/$database/$channel") - } - - /** - * The database name. The database name can take any characters because it is sent as a quoted - * identifier. It is part of the endpoint URI, so diacritical marks and non-Latin letters have to be - * URL encoded. - */ - public fun database(database: String) { - this.database = database - it.url("$host:$port/$database/$channel") - } - - /** - * The channel name - */ - public fun channel(channel: String) { - this.channel = channel - it.url("$host:$port/$database/$channel") - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To connect using the given javax.sql.DataSource instead of using hostname and port. - */ - public fun datasource(datasource: String) { - it.property("datasource", datasource) - } - - /** - * Password for login - */ - public fun pass(pass: String) { - it.property("pass", pass) - } - - /** - * Username for login - */ - public fun user(user: String) { - it.property("user", user) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PineconeUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PineconeUriDsl.kt deleted file mode 100644 index 14495b53d289a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PineconeUriDsl.kt +++ /dev/null @@ -1,83 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on the Pinecone Vector Database. - */ -public fun UriDsl.pinecone(i: PineconeUriDsl.() -> Unit) { - PineconeUriDsl(this).apply(i) -} - -@CamelDslMarker -public class PineconeUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("pinecone") - } - - private var collection: String = "" - - /** - * The collection Name - */ - public fun collection(collection: String) { - this.collection = collection - it.url("$collection") - } - - /** - * Sets the API key to use for authentication - */ - public fun token(token: String) { - it.property("token", token) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PlatformHttpUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PlatformHttpUriDsl.kt deleted file mode 100644 index 21c0ab1180df8..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PlatformHttpUriDsl.kt +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Expose HTTP endpoints using the HTTP server available in the current platform. - */ -public fun UriDsl.`platform-http`(i: PlatformHttpUriDsl.() -> Unit) { - PlatformHttpUriDsl(this).apply(i) -} - -@CamelDslMarker -public class PlatformHttpUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("platform-http") - } - - private var path: String = "" - - /** - * The path under which this endpoint serves the HTTP requests, for proxy use 'proxy' - */ - public fun path(path: String) { - this.path = path - it.url("$path") - } - - /** - * The content type this endpoint accepts as an input, such as application/xml or - * application/json. null or */* mean no restriction. - */ - public fun consumes(consumes: String) { - it.property("consumes", consumes) - } - - /** - * Sets which server can receive cookies. - */ - public fun cookieDomain(cookieDomain: String) { - it.property("cookieDomain", cookieDomain) - } - - /** - * Sets whether to prevent client side scripts from accessing created cookies. - */ - public fun cookieHttpOnly(cookieHttpOnly: String) { - it.property("cookieHttpOnly", cookieHttpOnly) - } - - /** - * Sets whether to prevent client side scripts from accessing created cookies. - */ - public fun cookieHttpOnly(cookieHttpOnly: Boolean) { - it.property("cookieHttpOnly", cookieHttpOnly.toString()) - } - - /** - * Sets the maximum cookie age in seconds. - */ - public fun cookieMaxAge(cookieMaxAge: String) { - it.property("cookieMaxAge", cookieMaxAge) - } - - /** - * Sets the maximum cookie age in seconds. - */ - public fun cookieMaxAge(cookieMaxAge: Int) { - it.property("cookieMaxAge", cookieMaxAge.toString()) - } - - /** - * Sets the URL path that must exist in the requested URL in order to send the Cookie. - */ - public fun cookiePath(cookiePath: String) { - it.property("cookiePath", cookiePath) - } - - /** - * Sets whether to prevent the browser from sending cookies along with cross-site requests. - */ - public fun cookieSameSite(cookieSameSite: String) { - it.property("cookieSameSite", cookieSameSite) - } - - /** - * Sets whether the cookie is only sent to the server with an encrypted request over HTTPS. - */ - public fun cookieSecure(cookieSecure: String) { - it.property("cookieSecure", cookieSecure) - } - - /** - * Sets whether the cookie is only sent to the server with an encrypted request over HTTPS. - */ - public fun cookieSecure(cookieSecure: Boolean) { - it.property("cookieSecure", cookieSecure.toString()) - } - - /** - * A comma separated list of HTTP methods to serve, e.g. GET,POST . If no methods are specified, - * all methods will be served. - */ - public fun httpMethodRestrict(httpMethodRestrict: String) { - it.property("httpMethodRestrict", httpMethodRestrict) - } - - /** - * Whether or not the consumer should try to find a target consumer by matching the URI prefix if - * no exact match is found. - */ - public fun matchOnUriPrefix(matchOnUriPrefix: String) { - it.property("matchOnUriPrefix", matchOnUriPrefix) - } - - /** - * Whether or not the consumer should try to find a target consumer by matching the URI prefix if - * no exact match is found. - */ - public fun matchOnUriPrefix(matchOnUriPrefix: Boolean) { - it.property("matchOnUriPrefix", matchOnUriPrefix.toString()) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the response's body won't - * contain the exception's stack trace. - */ - public fun muteException(muteException: String) { - it.property("muteException", muteException) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the response's body won't - * contain the exception's stack trace. - */ - public fun muteException(muteException: Boolean) { - it.property("muteException", muteException.toString()) - } - - /** - * The content type this endpoint produces, such as application/xml or application/json. - */ - public fun produces(produces: String) { - it.property("produces", produces) - } - - /** - * Whether to include HTTP request headers (Accept, User-Agent, etc.) into HTTP response produced - * by this endpoint. - */ - public fun returnHttpRequestHeaders(returnHttpRequestHeaders: String) { - it.property("returnHttpRequestHeaders", returnHttpRequestHeaders) - } - - /** - * Whether to include HTTP request headers (Accept, User-Agent, etc.) into HTTP response produced - * by this endpoint. - */ - public fun returnHttpRequestHeaders(returnHttpRequestHeaders: Boolean) { - it.property("returnHttpRequestHeaders", returnHttpRequestHeaders.toString()) - } - - /** - * Whether to enable the Cookie Handler that allows Cookie addition, expiry, and retrieval - * (currently only supported by camel-platform-http-vertx) - */ - public fun useCookieHandler(useCookieHandler: String) { - it.property("useCookieHandler", useCookieHandler) - } - - /** - * Whether to enable the Cookie Handler that allows Cookie addition, expiry, and retrieval - * (currently only supported by camel-platform-http-vertx) - */ - public fun useCookieHandler(useCookieHandler: Boolean) { - it.property("useCookieHandler", useCookieHandler.toString()) - } - - /** - * Whether to use streaming for large requests and responses (currently only supported by - * camel-platform-http-vertx) - */ - public fun useStreaming(useStreaming: String) { - it.property("useStreaming", useStreaming) - } - - /** - * Whether to use streaming for large requests and responses (currently only supported by - * camel-platform-http-vertx) - */ - public fun useStreaming(useStreaming: Boolean) { - it.property("useStreaming", useStreaming.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A comma or whitespace separated list of file extensions. Uploads having these extensions will - * be stored locally. Null value or asterisk () will allow all files. - */ - public fun fileNameExtWhitelist(fileNameExtWhitelist: String) { - it.property("fileNameExtWhitelist", fileNameExtWhitelist) - } - - /** - * To use a custom HeaderFilterStrategy to filter headers to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * An HTTP Server engine implementation to serve the requests of this endpoint. - */ - public fun platformHttpEngine(platformHttpEngine: String) { - it.property("platformHttpEngine", platformHttpEngine) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Plc4xUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Plc4xUriDsl.kt deleted file mode 100644 index 7ebc1923bc03b..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Plc4xUriDsl.kt +++ /dev/null @@ -1,165 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Read and write to PLC devices - */ -public fun UriDsl.plc4x(i: Plc4xUriDsl.() -> Unit) { - Plc4xUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Plc4xUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("plc4x") - } - - private var driver: String = "" - - /** - * PLC4X connection string for the connection to the target - */ - public fun driver(driver: String) { - this.driver = driver - it.url("$driver") - } - - /** - * Whether to reconnect when no connection is present upon doing a request - */ - public fun autoReconnect(autoReconnect: String) { - it.property("autoReconnect", autoReconnect) - } - - /** - * Whether to reconnect when no connection is present upon doing a request - */ - public fun autoReconnect(autoReconnect: Boolean) { - it.property("autoReconnect", autoReconnect.toString()) - } - - /** - * Interval on which the Trigger should be checked - */ - public fun period(period: String) { - it.property("period", period) - } - - /** - * Interval on which the Trigger should be checked - */ - public fun period(period: Int) { - it.property("period", period.toString()) - } - - /** - * Tags as key/values from the Map to use in query - */ - public fun tags(tags: String) { - it.property("tags", tags) - } - - /** - * Query to a trigger. On a rising edge of the trigger, the tags will be read once - */ - public fun trigger(trigger: String) { - it.property("trigger", trigger) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PubnubUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PubnubUriDsl.kt deleted file mode 100644 index c80f637175470..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PubnubUriDsl.kt +++ /dev/null @@ -1,214 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from PubNub data stream network for connected devices. - */ -public fun UriDsl.pubnub(i: PubnubUriDsl.() -> Unit) { - PubnubUriDsl(this).apply(i) -} - -@CamelDslMarker -public class PubnubUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("pubnub") - } - - private var channel: String = "" - - /** - * The channel used for subscribing/publishing events - */ - public fun channel(channel: String) { - this.channel = channel - it.url("$channel") - } - - /** - * UUID to be used as a device identifier, a default UUID is generated if not passed. - */ - public fun uuid(uuid: String) { - it.property("uuid", uuid) - } - - /** - * Also subscribe to related presence information - */ - public fun withPresence(withPresence: String) { - it.property("withPresence", withPresence) - } - - /** - * Also subscribe to related presence information - */ - public fun withPresence(withPresence: Boolean) { - it.property("withPresence", withPresence.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * The operation to perform. PUBLISH: Default. Send a message to all subscribers of a channel. - * FIRE: allows the client to send a message to BLOCKS Event Handlers. These messages will go - * directly to any Event Handlers registered on the channel. HERENOW: Obtain information about the - * current state of a channel including a list of unique user-ids currently subscribed to the channel - * and the total occupancy count. GETSTATE: Used to get key/value pairs specific to a subscriber - * uuid. State information is supplied as a JSON object of key/value pairs SETSTATE: Used to set - * key/value pairs specific to a subscriber uuid GETHISTORY: Fetches historical messages of a - * channel. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Reference to a Pubnub client in the registry. - */ - public fun pubnub(pubnub: String) { - it.property("pubnub", pubnub) - } - - /** - * If Access Manager is utilized, client will use this authKey in all restricted requests. - */ - public fun authKey(authKey: String) { - it.property("authKey", authKey) - } - - /** - * If cipher is passed, all communications to/from PubNub will be encrypted. - */ - public fun cipherKey(cipherKey: String) { - it.property("cipherKey", cipherKey) - } - - /** - * The publish key obtained from your PubNub account. Required when publishing messages. - */ - public fun publishKey(publishKey: String) { - it.property("publishKey", publishKey) - } - - /** - * The secret key used for message signing. - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } - - /** - * Use SSL for secure transmission. - */ - public fun secure(secure: String) { - it.property("secure", secure) - } - - /** - * Use SSL for secure transmission. - */ - public fun secure(secure: Boolean) { - it.property("secure", secure.toString()) - } - - /** - * The subscribe key obtained from your PubNub account. Required when subscribing to channels or - * listening for presence events - */ - public fun subscribeKey(subscribeKey: String) { - it.property("subscribeKey", subscribeKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PulsarUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PulsarUriDsl.kt deleted file mode 100644 index 4ea9a2c76f0b8..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/PulsarUriDsl.kt +++ /dev/null @@ -1,615 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages from/to Apache Pulsar messaging system. - */ -public fun UriDsl.pulsar(i: PulsarUriDsl.() -> Unit) { - PulsarUriDsl(this).apply(i) -} - -@CamelDslMarker -public class PulsarUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("pulsar") - } - - private var persistence: String = "" - - private var tenant: String = "" - - private var namespace: String = "" - - private var topic: String = "" - - /** - * Whether the topic is persistent or non-persistent - */ - public fun persistence(persistence: String) { - this.persistence = persistence - it.url("$persistence://$tenant/$namespace/$topic") - } - - /** - * The tenant - */ - public fun tenant(tenant: String) { - this.tenant = tenant - it.url("$persistence://$tenant/$namespace/$topic") - } - - /** - * The namespace - */ - public fun namespace(namespace: String) { - this.namespace = namespace - it.url("$persistence://$tenant/$namespace/$topic") - } - - /** - * The topic - */ - public fun topic(topic: String) { - this.topic = topic - it.url("$persistence://$tenant/$namespace/$topic") - } - - /** - * The Authentication FQCN to be used while creating the client from URI - */ - public fun authenticationClass(authenticationClass: String) { - it.property("authenticationClass", authenticationClass) - } - - /** - * The Authentication Parameters to be used while creating the client from URI - */ - public fun authenticationParams(authenticationParams: String) { - it.property("authenticationParams", authenticationParams) - } - - /** - * The Pulsar Service URL to point while creating the client from URI - */ - public fun serviceUrl(serviceUrl: String) { - it.property("serviceUrl", serviceUrl) - } - - /** - * Group the consumer acknowledgments for the specified time in milliseconds - defaults to 100 - */ - public fun ackGroupTimeMillis(ackGroupTimeMillis: String) { - it.property("ackGroupTimeMillis", ackGroupTimeMillis) - } - - /** - * Group the consumer acknowledgments for the specified time in milliseconds - defaults to 100 - */ - public fun ackGroupTimeMillis(ackGroupTimeMillis: Int) { - it.property("ackGroupTimeMillis", ackGroupTimeMillis.toString()) - } - - /** - * Timeout for unacknowledged messages in milliseconds - defaults to 10000 - */ - public fun ackTimeoutMillis(ackTimeoutMillis: String) { - it.property("ackTimeoutMillis", ackTimeoutMillis) - } - - /** - * Timeout for unacknowledged messages in milliseconds - defaults to 10000 - */ - public fun ackTimeoutMillis(ackTimeoutMillis: Int) { - it.property("ackTimeoutMillis", ackTimeoutMillis.toString()) - } - - /** - * RedeliveryBackoff to use for ack timeout redelivery backoff. - */ - public fun ackTimeoutRedeliveryBackoff(ackTimeoutRedeliveryBackoff: String) { - it.property("ackTimeoutRedeliveryBackoff", ackTimeoutRedeliveryBackoff) - } - - /** - * Whether to allow manual message acknowledgements. If this option is enabled, then messages are - * not acknowledged automatically after successful route completion. Instead, an instance of - * PulsarMessageReceipt is stored as a header on the org.apache.camel.Exchange. Messages can then be - * acknowledged using PulsarMessageReceipt at any time before the ackTimeout occurs. - */ - public fun allowManualAcknowledgement(allowManualAcknowledgement: String) { - it.property("allowManualAcknowledgement", allowManualAcknowledgement) - } - - /** - * Whether to allow manual message acknowledgements. If this option is enabled, then messages are - * not acknowledged automatically after successful route completion. Instead, an instance of - * PulsarMessageReceipt is stored as a header on the org.apache.camel.Exchange. Messages can then be - * acknowledged using PulsarMessageReceipt at any time before the ackTimeout occurs. - */ - public fun allowManualAcknowledgement(allowManualAcknowledgement: Boolean) { - it.property("allowManualAcknowledgement", allowManualAcknowledgement.toString()) - } - - /** - * Name of the consumer when subscription is EXCLUSIVE - */ - public fun consumerName(consumerName: String) { - it.property("consumerName", consumerName) - } - - /** - * Prefix to add to consumer names when a SHARED or FAILOVER subscription is used - */ - public fun consumerNamePrefix(consumerNamePrefix: String) { - it.property("consumerNamePrefix", consumerNamePrefix) - } - - /** - * Size of the consumer queue - defaults to 10 - */ - public fun consumerQueueSize(consumerQueueSize: String) { - it.property("consumerQueueSize", consumerQueueSize) - } - - /** - * Size of the consumer queue - defaults to 10 - */ - public fun consumerQueueSize(consumerQueueSize: Int) { - it.property("consumerQueueSize", consumerQueueSize.toString()) - } - - /** - * Name of the topic where the messages which fail maxRedeliverCount times will be sent. Note: if - * not set, default topic name will be topicName-subscriptionName-DLQ - */ - public fun deadLetterTopic(deadLetterTopic: String) { - it.property("deadLetterTopic", deadLetterTopic) - } - - /** - * To enable retry letter topic mode. The default retry letter topic uses this format: - * topicname-subscriptionname-RETRY - */ - public fun enableRetry(enableRetry: String) { - it.property("enableRetry", enableRetry) - } - - /** - * To enable retry letter topic mode. The default retry letter topic uses this format: - * topicname-subscriptionname-RETRY - */ - public fun enableRetry(enableRetry: Boolean) { - it.property("enableRetry", enableRetry.toString()) - } - - /** - * Policy to use by consumer when using key-shared subscription type. - */ - public fun keySharedPolicy(keySharedPolicy: String) { - it.property("keySharedPolicy", keySharedPolicy) - } - - /** - * Maximum number of times that a message will be redelivered before being sent to the dead letter - * queue. If this value is not set, no Dead Letter Policy will be created - */ - public fun maxRedeliverCount(maxRedeliverCount: String) { - it.property("maxRedeliverCount", maxRedeliverCount) - } - - /** - * Maximum number of times that a message will be redelivered before being sent to the dead letter - * queue. If this value is not set, no Dead Letter Policy will be created - */ - public fun maxRedeliverCount(maxRedeliverCount: Int) { - it.property("maxRedeliverCount", maxRedeliverCount.toString()) - } - - /** - * Whether to use the messageListener interface, or to receive messages using a separate thread - * pool - */ - public fun messageListener(messageListener: String) { - it.property("messageListener", messageListener) - } - - /** - * Whether to use the messageListener interface, or to receive messages using a separate thread - * pool - */ - public fun messageListener(messageListener: Boolean) { - it.property("messageListener", messageListener.toString()) - } - - /** - * RedeliveryBackoff to use for negative ack redelivery backoff. - */ - public fun negativeAckRedeliveryBackoff(negativeAckRedeliveryBackoff: String) { - it.property("negativeAckRedeliveryBackoff", negativeAckRedeliveryBackoff) - } - - /** - * Set the negative acknowledgement delay - */ - public fun negativeAckRedeliveryDelayMicros(negativeAckRedeliveryDelayMicros: String) { - it.property("negativeAckRedeliveryDelayMicros", negativeAckRedeliveryDelayMicros) - } - - /** - * Set the negative acknowledgement delay - */ - public fun negativeAckRedeliveryDelayMicros(negativeAckRedeliveryDelayMicros: Int) { - it.property("negativeAckRedeliveryDelayMicros", negativeAckRedeliveryDelayMicros.toString()) - } - - /** - * Number of consumers - defaults to 1 - */ - public fun numberOfConsumers(numberOfConsumers: String) { - it.property("numberOfConsumers", numberOfConsumers) - } - - /** - * Number of consumers - defaults to 1 - */ - public fun numberOfConsumers(numberOfConsumers: Int) { - it.property("numberOfConsumers", numberOfConsumers.toString()) - } - - /** - * Number of threads to receive and handle messages when using a separate thread pool - */ - public fun numberOfConsumerThreads(numberOfConsumerThreads: String) { - it.property("numberOfConsumerThreads", numberOfConsumerThreads) - } - - /** - * Number of threads to receive and handle messages when using a separate thread pool - */ - public fun numberOfConsumerThreads(numberOfConsumerThreads: Int) { - it.property("numberOfConsumerThreads", numberOfConsumerThreads.toString()) - } - - /** - * Enable compacted topic reading. - */ - public fun readCompacted(readCompacted: String) { - it.property("readCompacted", readCompacted) - } - - /** - * Enable compacted topic reading. - */ - public fun readCompacted(readCompacted: Boolean) { - it.property("readCompacted", readCompacted.toString()) - } - - /** - * Name of the topic to use in retry mode. Note: if not set, default topic name will be - * topicName-subscriptionName-RETRY - */ - public fun retryLetterTopic(retryLetterTopic: String) { - it.property("retryLetterTopic", retryLetterTopic) - } - - /** - * Control the initial position in the topic of a newly created subscription. Default is latest - * message. - */ - public fun subscriptionInitialPosition(subscriptionInitialPosition: String) { - it.property("subscriptionInitialPosition", subscriptionInitialPosition) - } - - /** - * Name of the subscription to use - */ - public fun subscriptionName(subscriptionName: String) { - it.property("subscriptionName", subscriptionName) - } - - /** - * Determines to which topics this consumer should be subscribed to - Persistent, Non-Persistent, - * or both. Only used with pattern subscriptions. - */ - public fun subscriptionTopicsMode(subscriptionTopicsMode: String) { - it.property("subscriptionTopicsMode", subscriptionTopicsMode) - } - - /** - * Type of the subscription EXCLUSIVESHAREDFAILOVERKEY_SHARED, defaults to EXCLUSIVE - */ - public fun subscriptionType(subscriptionType: String) { - it.property("subscriptionType", subscriptionType) - } - - /** - * Whether the topic is a pattern (regular expression) that allows the consumer to subscribe to - * all matching topics in the namespace - */ - public fun topicsPattern(topicsPattern: String) { - it.property("topicsPattern", topicsPattern) - } - - /** - * Whether the topic is a pattern (regular expression) that allows the consumer to subscribe to - * all matching topics in the namespace - */ - public fun topicsPattern(topicsPattern: Boolean) { - it.property("topicsPattern", topicsPattern.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Control batching method used by the producer. - */ - public fun batcherBuilder(batcherBuilder: String) { - it.property("batcherBuilder", batcherBuilder) - } - - /** - * Control whether automatic batching of messages is enabled for the producer. - */ - public fun batchingEnabled(batchingEnabled: String) { - it.property("batchingEnabled", batchingEnabled) - } - - /** - * Control whether automatic batching of messages is enabled for the producer. - */ - public fun batchingEnabled(batchingEnabled: Boolean) { - it.property("batchingEnabled", batchingEnabled.toString()) - } - - /** - * The maximum size to batch messages. - */ - public fun batchingMaxMessages(batchingMaxMessages: String) { - it.property("batchingMaxMessages", batchingMaxMessages) - } - - /** - * The maximum size to batch messages. - */ - public fun batchingMaxMessages(batchingMaxMessages: Int) { - it.property("batchingMaxMessages", batchingMaxMessages.toString()) - } - - /** - * The maximum time period within which the messages sent will be batched if batchingEnabled is - * true. - */ - public fun batchingMaxPublishDelayMicros(batchingMaxPublishDelayMicros: String) { - it.property("batchingMaxPublishDelayMicros", batchingMaxPublishDelayMicros) - } - - /** - * The maximum time period within which the messages sent will be batched if batchingEnabled is - * true. - */ - public fun batchingMaxPublishDelayMicros(batchingMaxPublishDelayMicros: Int) { - it.property("batchingMaxPublishDelayMicros", batchingMaxPublishDelayMicros.toString()) - } - - /** - * Whether to block the producing thread if pending messages queue is full or to throw a - * ProducerQueueIsFullError - */ - public fun blockIfQueueFull(blockIfQueueFull: String) { - it.property("blockIfQueueFull", blockIfQueueFull) - } - - /** - * Whether to block the producing thread if pending messages queue is full or to throw a - * ProducerQueueIsFullError - */ - public fun blockIfQueueFull(blockIfQueueFull: Boolean) { - it.property("blockIfQueueFull", blockIfQueueFull.toString()) - } - - /** - * Control whether chunking of messages is enabled for the producer. - */ - public fun chunkingEnabled(chunkingEnabled: String) { - it.property("chunkingEnabled", chunkingEnabled) - } - - /** - * Control whether chunking of messages is enabled for the producer. - */ - public fun chunkingEnabled(chunkingEnabled: Boolean) { - it.property("chunkingEnabled", chunkingEnabled.toString()) - } - - /** - * Compression type to use - */ - public fun compressionType(compressionType: String) { - it.property("compressionType", compressionType) - } - - /** - * Hashing function to use when choosing the partition to use for a particular message - */ - public fun hashingScheme(hashingScheme: String) { - it.property("hashingScheme", hashingScheme) - } - - /** - * The first message published will have a sequence Id of initialSequenceId 1. - */ - public fun initialSequenceId(initialSequenceId: String) { - it.property("initialSequenceId", initialSequenceId) - } - - /** - * The first message published will have a sequence Id of initialSequenceId 1. - */ - public fun initialSequenceId(initialSequenceId: Int) { - it.property("initialSequenceId", initialSequenceId.toString()) - } - - /** - * Size of the pending massages queue. When the queue is full, by default, any further sends will - * fail unless blockIfQueueFull=true - */ - public fun maxPendingMessages(maxPendingMessages: String) { - it.property("maxPendingMessages", maxPendingMessages) - } - - /** - * Size of the pending massages queue. When the queue is full, by default, any further sends will - * fail unless blockIfQueueFull=true - */ - public fun maxPendingMessages(maxPendingMessages: Int) { - it.property("maxPendingMessages", maxPendingMessages.toString()) - } - - /** - * The maximum number of pending messages for partitioned topics. The maxPendingMessages value - * will be reduced if (number of partitions maxPendingMessages) exceeds this value. Partitioned - * topics have a pending message queue for each partition. - */ - public fun maxPendingMessagesAcrossPartitions(maxPendingMessagesAcrossPartitions: String) { - it.property("maxPendingMessagesAcrossPartitions", maxPendingMessagesAcrossPartitions) - } - - /** - * The maximum number of pending messages for partitioned topics. The maxPendingMessages value - * will be reduced if (number of partitions maxPendingMessages) exceeds this value. Partitioned - * topics have a pending message queue for each partition. - */ - public fun maxPendingMessagesAcrossPartitions(maxPendingMessagesAcrossPartitions: Int) { - it.property("maxPendingMessagesAcrossPartitions", maxPendingMessagesAcrossPartitions.toString()) - } - - /** - * Custom Message Router to use - */ - public fun messageRouter(messageRouter: String) { - it.property("messageRouter", messageRouter) - } - - /** - * Message Routing Mode to use - */ - public fun messageRoutingMode(messageRoutingMode: String) { - it.property("messageRoutingMode", messageRoutingMode) - } - - /** - * Name of the producer. If unset, lets Pulsar select a unique identifier. - */ - public fun producerName(producerName: String) { - it.property("producerName", producerName) - } - - /** - * Send timeout in milliseconds - */ - public fun sendTimeoutMs(sendTimeoutMs: String) { - it.property("sendTimeoutMs", sendTimeoutMs) - } - - /** - * Send timeout in milliseconds - */ - public fun sendTimeoutMs(sendTimeoutMs: Int) { - it.property("sendTimeoutMs", sendTimeoutMs.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/QdrantUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/QdrantUriDsl.kt deleted file mode 100644 index 9e87cf4613215..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/QdrantUriDsl.kt +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations on the Qdrant Vector Database. - */ -public fun UriDsl.qdrant(i: QdrantUriDsl.() -> Unit) { - QdrantUriDsl(this).apply(i) -} - -@CamelDslMarker -public class QdrantUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("qdrant") - } - - private var collection: String = "" - - /** - * The collection Name - */ - public fun collection(collection: String) { - this.collection = collection - it.url("$collection") - } - - /** - * Sets the API key to use for authentication - */ - public fun apiKey(apiKey: String) { - it.property("apiKey", apiKey) - } - - /** - * The host to connect to. - */ - public fun host(host: String) { - it.property("host", host) - } - - /** - * The port to connect to. - */ - public fun port(port: String) { - it.property("port", port) - } - - /** - * The port to connect to. - */ - public fun port(port: Int) { - it.property("port", port.toString()) - } - - /** - * Sets a default timeout for all requests - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Whether the client uses Transport Layer Security (TLS) to secure communications - */ - public fun tls(tls: String) { - it.property("tls", tls) - } - - /** - * Whether the client uses Transport Layer Security (TLS) to secure communications - */ - public fun tls(tls: Boolean) { - it.property("tls", tls.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/QuartzUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/QuartzUriDsl.kt deleted file mode 100644 index 2bdcd11fca9ef..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/QuartzUriDsl.kt +++ /dev/null @@ -1,303 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Schedule sending of messages using the Quartz 2.x scheduler. - */ -public fun UriDsl.quartz(i: QuartzUriDsl.() -> Unit) { - QuartzUriDsl(this).apply(i) -} - -@CamelDslMarker -public class QuartzUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("quartz") - } - - private var groupName: String = "" - - private var triggerName: String = "" - - /** - * The quartz group name to use. The combination of group name and trigger name should be unique. - */ - public fun groupName(groupName: String) { - this.groupName = groupName - it.url("$groupName/$triggerName") - } - - /** - * The quartz trigger name to use. The combination of group name and trigger name should be - * unique. - */ - public fun triggerName(triggerName: String) { - this.triggerName = triggerName - it.url("$groupName/$triggerName") - } - - /** - * Specifies a cron expression to define when to trigger. - */ - public fun cron(cron: String) { - it.property("cron", cron) - } - - /** - * If set to true, then the trigger automatically delete when route stop. Else if set to false, it - * will remain in scheduler. When set to false, it will also mean user may reuse pre-configured - * trigger with camel Uri. Just ensure the names match. Notice you cannot have both deleteJob and - * pauseJob set to true. - */ - public fun deleteJob(deleteJob: String) { - it.property("deleteJob", deleteJob) - } - - /** - * If set to true, then the trigger automatically delete when route stop. Else if set to false, it - * will remain in scheduler. When set to false, it will also mean user may reuse pre-configured - * trigger with camel Uri. Just ensure the names match. Notice you cannot have both deleteJob and - * pauseJob set to true. - */ - public fun deleteJob(deleteJob: Boolean) { - it.property("deleteJob", deleteJob.toString()) - } - - /** - * Whether or not the job should remain stored after it is orphaned (no triggers point to it). - */ - public fun durableJob(durableJob: String) { - it.property("durableJob", durableJob) - } - - /** - * Whether or not the job should remain stored after it is orphaned (no triggers point to it). - */ - public fun durableJob(durableJob: Boolean) { - it.property("durableJob", durableJob.toString()) - } - - /** - * If set to true, then the trigger automatically pauses when route stop. Else if set to false, it - * will remain in scheduler. When set to false, it will also mean user may reuse pre-configured - * trigger with camel Uri. Just ensure the names match. Notice you cannot have both deleteJob and - * pauseJob set to true. - */ - public fun pauseJob(pauseJob: String) { - it.property("pauseJob", pauseJob) - } - - /** - * If set to true, then the trigger automatically pauses when route stop. Else if set to false, it - * will remain in scheduler. When set to false, it will also mean user may reuse pre-configured - * trigger with camel Uri. Just ensure the names match. Notice you cannot have both deleteJob and - * pauseJob set to true. - */ - public fun pauseJob(pauseJob: Boolean) { - it.property("pauseJob", pauseJob.toString()) - } - - /** - * Instructs the scheduler whether or not the job should be re-executed if a 'recovery' or - * 'fail-over' situation is encountered. - */ - public fun recoverableJob(recoverableJob: String) { - it.property("recoverableJob", recoverableJob) - } - - /** - * Instructs the scheduler whether or not the job should be re-executed if a 'recovery' or - * 'fail-over' situation is encountered. - */ - public fun recoverableJob(recoverableJob: Boolean) { - it.property("recoverableJob", recoverableJob.toString()) - } - - /** - * Uses a Quartz PersistJobDataAfterExecution and DisallowConcurrentExecution instead of the - * default job. - */ - public fun stateful(stateful: String) { - it.property("stateful", stateful) - } - - /** - * Uses a Quartz PersistJobDataAfterExecution and DisallowConcurrentExecution instead of the - * default job. - */ - public fun stateful(stateful: Boolean) { - it.property("stateful", stateful.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Specifies a custom calendar to avoid specific range of date - */ - public fun customCalendar(customCalendar: String) { - it.property("customCalendar", customCalendar) - } - - /** - * Whether to ignore quartz cannot schedule a trigger because the trigger will never fire in the - * future. This can happen when using a cron trigger that are configured to only run in the past. By - * default, Quartz will fail to schedule the trigger and therefore fail to start the Camel route. You - * can set this to true which then logs a WARN and then ignore the problem, meaning that the route - * will never fire in the future. - */ - public fun ignoreExpiredNextFireTime(ignoreExpiredNextFireTime: String) { - it.property("ignoreExpiredNextFireTime", ignoreExpiredNextFireTime) - } - - /** - * Whether to ignore quartz cannot schedule a trigger because the trigger will never fire in the - * future. This can happen when using a cron trigger that are configured to only run in the past. By - * default, Quartz will fail to schedule the trigger and therefore fail to start the Camel route. You - * can set this to true which then logs a WARN and then ignore the problem, meaning that the route - * will never fire in the future. - */ - public fun ignoreExpiredNextFireTime(ignoreExpiredNextFireTime: Boolean) { - it.property("ignoreExpiredNextFireTime", ignoreExpiredNextFireTime.toString()) - } - - /** - * To configure additional options on the job. - */ - public fun jobParameters(jobParameters: String) { - it.property("jobParameters", jobParameters) - } - - /** - * Whether the job name should be prefixed with endpoint id - */ - public fun prefixJobNameWithEndpointId(prefixJobNameWithEndpointId: String) { - it.property("prefixJobNameWithEndpointId", prefixJobNameWithEndpointId) - } - - /** - * Whether the job name should be prefixed with endpoint id - */ - public fun prefixJobNameWithEndpointId(prefixJobNameWithEndpointId: Boolean) { - it.property("prefixJobNameWithEndpointId", prefixJobNameWithEndpointId.toString()) - } - - /** - * To configure additional options on the trigger. The parameter timeZone is supported if the cron - * option is present. Otherwise the parameters repeatInterval and repeatCount are supported. Note: - * When using repeatInterval values of 1000 or less, the first few events after starting the camel - * context may be fired more rapidly than expected. - */ - public fun triggerParameters(triggerParameters: String) { - it.property("triggerParameters", triggerParameters) - } - - /** - * If it is true, JobDataMap uses the CamelContext name directly to reference the CamelContext, if - * it is false, JobDataMap uses use the CamelContext management name which could be changed during - * the deploy time. - */ - public fun usingFixedCamelContextName(usingFixedCamelContextName: String) { - it.property("usingFixedCamelContextName", usingFixedCamelContextName) - } - - /** - * If it is true, JobDataMap uses the CamelContext name directly to reference the CamelContext, if - * it is false, JobDataMap uses use the CamelContext management name which could be changed during - * the deploy time. - */ - public fun usingFixedCamelContextName(usingFixedCamelContextName: Boolean) { - it.property("usingFixedCamelContextName", usingFixedCamelContextName.toString()) - } - - /** - * Whether or not the scheduler should be auto started. - */ - public fun autoStartScheduler(autoStartScheduler: String) { - it.property("autoStartScheduler", autoStartScheduler) - } - - /** - * Whether or not the scheduler should be auto started. - */ - public fun autoStartScheduler(autoStartScheduler: Boolean) { - it.property("autoStartScheduler", autoStartScheduler.toString()) - } - - /** - * In case of scheduler has already started, we want the trigger start slightly after current time - * to ensure endpoint is fully started before the job kicks in. Negative value shifts trigger start - * time in the past. - */ - public fun triggerStartDelay(triggerStartDelay: String) { - it.property("triggerStartDelay", triggerStartDelay) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/QuickfixUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/QuickfixUriDsl.kt deleted file mode 100644 index 4764d347e38a7..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/QuickfixUriDsl.kt +++ /dev/null @@ -1,154 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Open a Financial Interchange (FIX) session using an embedded QuickFix/J engine. - */ -public fun UriDsl.quickfix(i: QuickfixUriDsl.() -> Unit) { - QuickfixUriDsl(this).apply(i) -} - -@CamelDslMarker -public class QuickfixUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("quickfix") - } - - private var configurationName: String = "" - - /** - * Path to the quickfix configuration file. You can prefix with: classpath, file, http, ref, or - * bean. classpath, file and http loads the configuration file using these protocols (classpath is - * default). ref will lookup the configuration file in the registry. bean will call a method on a - * bean to be used as the configuration. For bean you can specify the method name after dot, eg - * bean:myBean.myMethod - */ - public fun configurationName(configurationName: String) { - this.configurationName = configurationName - it.url("$configurationName") - } - - /** - * This option allows creating QuickFIX/J engine on demand. Value true means the engine is started - * when first message is send or there's consumer configured in route definition. When false value is - * used, the engine is started at the endpoint creation. When this parameter is missing, the value of - * component's property lazyCreateEngines is being used. - */ - public fun lazyCreateEngine(lazyCreateEngine: String) { - it.property("lazyCreateEngine", lazyCreateEngine) - } - - /** - * This option allows creating QuickFIX/J engine on demand. Value true means the engine is started - * when first message is send or there's consumer configured in route definition. When false value is - * used, the engine is started at the endpoint creation. When this parameter is missing, the value of - * component's property lazyCreateEngines is being used. - */ - public fun lazyCreateEngine(lazyCreateEngine: Boolean) { - it.property("lazyCreateEngine", lazyCreateEngine.toString()) - } - - /** - * The optional sessionID identifies a specific FIX session. The format of the sessionID is: - * (BeginString):(SenderCompID)/(SenderSubID)/(SenderLocationID)-(TargetCompID)/(TargetSubID)/(TargetLocationID) - */ - public fun sessionID(sessionID: String) { - it.property("sessionID", sessionID) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ReactiveStreamsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ReactiveStreamsUriDsl.kt deleted file mode 100644 index 2814fc4e10f4f..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ReactiveStreamsUriDsl.kt +++ /dev/null @@ -1,216 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Double -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Exchange messages with reactive stream processing libraries compatible with the reactive streams - * standard. - */ -public fun UriDsl.`reactive-streams`(i: ReactiveStreamsUriDsl.() -> Unit) { - ReactiveStreamsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ReactiveStreamsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("reactive-streams") - } - - private var stream: String = "" - - /** - * Name of the stream channel used by the endpoint to exchange messages. - */ - public fun stream(stream: String) { - this.stream = stream - it.url("$stream") - } - - /** - * Number of threads used to process exchanges in the Camel route. - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * Number of threads used to process exchanges in the Camel route. - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * Set the low watermark of requested exchanges to the active subscription as percentage of the - * maxInflightExchanges. When the number of pending items from the upstream source is lower than the - * watermark, new items can be requested to the subscription. If set to 0, the subscriber will - * request items in batches of maxInflightExchanges, only after all items of the previous batch have - * been processed. If set to 1, the subscriber can request a new item each time an exchange is - * processed (chatty). Any intermediate value can be used. - */ - public fun exchangesRefillLowWatermark(exchangesRefillLowWatermark: String) { - it.property("exchangesRefillLowWatermark", exchangesRefillLowWatermark) - } - - /** - * Set the low watermark of requested exchanges to the active subscription as percentage of the - * maxInflightExchanges. When the number of pending items from the upstream source is lower than the - * watermark, new items can be requested to the subscription. If set to 0, the subscriber will - * request items in batches of maxInflightExchanges, only after all items of the previous batch have - * been processed. If set to 1, the subscriber can request a new item each time an exchange is - * processed (chatty). Any intermediate value can be used. - */ - public fun exchangesRefillLowWatermark(exchangesRefillLowWatermark: Double) { - it.property("exchangesRefillLowWatermark", exchangesRefillLowWatermark.toString()) - } - - /** - * Determines if onComplete events should be pushed to the Camel route. - */ - public fun forwardOnComplete(forwardOnComplete: String) { - it.property("forwardOnComplete", forwardOnComplete) - } - - /** - * Determines if onComplete events should be pushed to the Camel route. - */ - public fun forwardOnComplete(forwardOnComplete: Boolean) { - it.property("forwardOnComplete", forwardOnComplete.toString()) - } - - /** - * Determines if onError events should be pushed to the Camel route. Exceptions will be set as - * message body. - */ - public fun forwardOnError(forwardOnError: String) { - it.property("forwardOnError", forwardOnError) - } - - /** - * Determines if onError events should be pushed to the Camel route. Exceptions will be set as - * message body. - */ - public fun forwardOnError(forwardOnError: Boolean) { - it.property("forwardOnError", forwardOnError.toString()) - } - - /** - * Maximum number of exchanges concurrently being processed by Camel. This parameter controls - * backpressure on the stream. Setting a non-positive value will disable backpressure. - */ - public fun maxInflightExchanges(maxInflightExchanges: String) { - it.property("maxInflightExchanges", maxInflightExchanges) - } - - /** - * Maximum number of exchanges concurrently being processed by Camel. This parameter controls - * backpressure on the stream. Setting a non-positive value will disable backpressure. - */ - public fun maxInflightExchanges(maxInflightExchanges: Int) { - it.property("maxInflightExchanges", maxInflightExchanges.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * The backpressure strategy to use when pushing events to a slow subscriber. - */ - public fun backpressureStrategy(backpressureStrategy: String) { - it.property("backpressureStrategy", backpressureStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RefUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RefUriDsl.kt deleted file mode 100644 index abb6f5479c412..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RefUriDsl.kt +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Route messages to an endpoint looked up dynamically by name in the Camel Registry. - */ -public fun UriDsl.ref(i: RefUriDsl.() -> Unit) { - RefUriDsl(this).apply(i) -} - -@CamelDslMarker -public class RefUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("ref") - } - - private var name: String = "" - - /** - * Name of endpoint to lookup in the registry. - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestApiUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestApiUriDsl.kt deleted file mode 100644 index 8ddf399f1ebd7..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestApiUriDsl.kt +++ /dev/null @@ -1,117 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Expose OpenAPI Specification of the REST services defined using Camel REST DSL. - */ -public fun UriDsl.`rest-api`(i: RestApiUriDsl.() -> Unit) { - RestApiUriDsl(this).apply(i) -} - -@CamelDslMarker -public class RestApiUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("rest-api") - } - - private var path: String = "" - - /** - * The base path - */ - public fun path(path: String) { - this.path = path - it.url("$path") - } - - /** - * The Camel Rest API component to use for generating the API of the REST services, such as - * openapi. - */ - public fun apiComponentName(apiComponentName: String) { - it.property("apiComponentName", apiComponentName) - } - - /** - * The Camel Rest component to use for the consumer REST transport, such as jetty, servlet, - * undertow. If no component has been explicitly configured, then Camel will lookup if there is a - * Camel component that integrates with the Rest DSL, or if a - * org.apache.camel.spi.RestConsumerFactory is registered in the registry. If either one is found, - * then that is being used. - */ - public fun consumerComponentName(consumerComponentName: String) { - it.property("consumerComponentName", consumerComponentName) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestOpenapiUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestOpenapiUriDsl.kt deleted file mode 100644 index 6d209ef10580e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestOpenapiUriDsl.kt +++ /dev/null @@ -1,260 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * To call REST services using OpenAPI specification as contract. - */ -public fun UriDsl.`rest-openapi`(i: RestOpenapiUriDsl.() -> Unit) { - RestOpenapiUriDsl(this).apply(i) -} - -@CamelDslMarker -public class RestOpenapiUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("rest-openapi") - } - - private var specificationUri: String = "" - - private var operationId: String = "" - - /** - * Path to the OpenApi specification file. The scheme, host base path are taken from this - * specification, but these can be overridden with properties on the component or endpoint level. If - * not given the component tries to load openapi.json resource from the classpath. Note that the host - * defined on the component and endpoint of this Component should contain the scheme, hostname and - * optionally the port in the URI syntax (i.e. http://api.example.com:8080). Overrides component - * configuration. The OpenApi specification can be loaded from different sources by prefixing with - * file: classpath: http: https:. Support for https is limited to using the JDK installed UrlHandler, - * and as such it can be cumbersome to setup TLS/SSL certificates for https (such as setting a number - * of javax.net.ssl JVM system properties). How to do that consult the JDK documentation for - * UrlHandler. Default value notice: By default loads openapi.json file - */ - public fun specificationUri(specificationUri: String) { - this.specificationUri = specificationUri - it.url("$specificationUri#$operationId") - } - - /** - * ID of the operation from the OpenApi specification. This is required when using producer - */ - public fun operationId(operationId: String) { - this.operationId = operationId - it.url("$specificationUri#$operationId") - } - - /** - * Sets the context-path to use for servicing the OpenAPI specification - */ - public fun apiContextPath(apiContextPath: String) { - it.property("apiContextPath", apiContextPath) - } - - /** - * Whether to enable validation of the client request to check if the incoming request is valid - * according to the OpenAPI specification - */ - public fun clientRequestValidation(clientRequestValidation: String) { - it.property("clientRequestValidation", clientRequestValidation) - } - - /** - * Whether to enable validation of the client request to check if the incoming request is valid - * according to the OpenAPI specification - */ - public fun clientRequestValidation(clientRequestValidation: Boolean) { - it.property("clientRequestValidation", clientRequestValidation.toString()) - } - - /** - * What payload type this component capable of consuming. Could be one type, like application/json - * or multiple types as application/json, application/xml; q=0.5 according to the RFC7231. This - * equates or multiple types as application/json, application/xml; q=0.5 according to the RFC7231. - * This equates to the value of Accept HTTP header. If set overrides any value found in the OpenApi - * specification and. in the component configuration - */ - public fun consumes(consumes: String) { - it.property("consumes", consumes) - } - - /** - * Whether the consumer should fail,ignore or return a mock response for OpenAPI operations that - * are not mapped to a corresponding route. - */ - public fun missingOperation(missingOperation: String) { - it.property("missingOperation", missingOperation) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Name of the Camel component that will service the requests. The component must be present in - * Camel registry and it must implement RestOpenApiConsumerFactory service provider interface. If not - * set CLASSPATH is searched for single component that implements RestOpenApiConsumerFactory SPI. - * Overrides component configuration. - */ - public fun consumerComponentName(consumerComponentName: String) { - it.property("consumerComponentName", consumerComponentName) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Used for inclusive filtering of mock data from directories. The pattern is using Ant-path style - * pattern. Multiple patterns can be specified separated by comma. - */ - public fun mockIncludePattern(mockIncludePattern: String) { - it.property("mockIncludePattern", mockIncludePattern) - } - - /** - * To use a custom strategy for how to process Rest DSL requests - */ - public fun restOpenapiProcessorStrategy(restOpenapiProcessorStrategy: String) { - it.property("restOpenapiProcessorStrategy", restOpenapiProcessorStrategy) - } - - /** - * API basePath, for example /v3. Default is unset, if set overrides the value present in OpenApi - * specification and in the component configuration. - */ - public fun basePath(basePath: String) { - it.property("basePath", basePath) - } - - /** - * Scheme hostname and port to direct the HTTP requests to in the form of https://hostname:port. - * Can be configured at the endpoint, component or in the corresponding REST configuration in the - * Camel Context. If you give this component a name (e.g. petstore) that REST configuration is - * consulted first, rest-openapi next, and global configuration last. If set overrides any value - * found in the OpenApi specification, RestConfiguration. Overrides all other configuration. - */ - public fun host(host: String) { - it.property("host", host) - } - - /** - * What payload type this component is producing. For example application/json according to the - * RFC7231. This equates to the value of Content-Type HTTP header. If set overrides any value present - * in the OpenApi specification. Overrides all other configuration. - */ - public fun produces(produces: String) { - it.property("produces", produces) - } - - /** - * Enable validation of requests against the configured OpenAPI specification - */ - public fun requestValidationEnabled(requestValidationEnabled: String) { - it.property("requestValidationEnabled", requestValidationEnabled) - } - - /** - * Enable validation of requests against the configured OpenAPI specification - */ - public fun requestValidationEnabled(requestValidationEnabled: Boolean) { - it.property("requestValidationEnabled", requestValidationEnabled.toString()) - } - - /** - * Name of the Camel component that will perform the requests. The component must be present in - * Camel registry and it must implement RestProducerFactory service provider interface. If not set - * CLASSPATH is searched for single component that implements RestProducerFactory SPI. Overrides - * component configuration. - */ - public fun componentName(componentName: String) { - it.property("componentName", componentName) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestUriDsl.kt deleted file mode 100644 index ab37afee3eac2..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RestUriDsl.kt +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Expose REST services or call external REST services. - */ -public fun UriDsl.rest(i: RestUriDsl.() -> Unit) { - RestUriDsl(this).apply(i) -} - -@CamelDslMarker -public class RestUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("rest") - } - - private var method: String = "" - - private var path: String = "" - - private var uriTemplate: String = "" - - /** - * HTTP method to use. - */ - public fun method(method: String) { - this.method = method - it.url("$method:$path:$uriTemplate") - } - - /** - * The base path, can use * as path suffix to support wildcard HTTP route matching. - */ - public fun path(path: String) { - this.path = path - it.url("$method:$path:$uriTemplate") - } - - /** - * The uri template - */ - public fun uriTemplate(uriTemplate: String) { - this.uriTemplate = uriTemplate - it.url("$method:$path:$uriTemplate") - } - - /** - * Media type such as: 'text/xml', or 'application/json' this REST service accepts. By default we - * accept all kinds of types. - */ - public fun consumes(consumes: String) { - it.property("consumes", consumes) - } - - /** - * To declare the incoming POJO binding type as a FQN class name - */ - public fun inType(inType: String) { - it.property("inType", inType) - } - - /** - * To declare the outgoing POJO binding type as a FQN class name - */ - public fun outType(outType: String) { - it.property("outType", outType) - } - - /** - * Media type such as: 'text/xml', or 'application/json' this REST service returns. - */ - public fun produces(produces: String) { - it.property("produces", produces) - } - - /** - * Name of the route this REST services creates - */ - public fun routeId(routeId: String) { - it.property("routeId", routeId) - } - - /** - * The Camel Rest component to use for the consumer REST transport, such as jetty, servlet, - * undertow. If no component has been explicitly configured, then Camel will lookup if there is a - * Camel component that integrates with the Rest DSL, or if a - * org.apache.camel.spi.RestConsumerFactory is registered in the registry. If either one is found, - * then that is being used. - */ - public fun consumerComponentName(consumerComponentName: String) { - it.property("consumerComponentName", consumerComponentName) - } - - /** - * Human description to document this REST service - */ - public fun description(description: String) { - it.property("description", description) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * The openapi api doc resource to use. The resource is loaded from classpath by default and must - * be in JSON format. - */ - public fun apiDoc(apiDoc: String) { - it.property("apiDoc", apiDoc) - } - - /** - * Configures the binding mode for the producer. If set to anything other than 'off' the producer - * will try to convert the body of the incoming message from inType to the json or xml, and the - * response from json or xml to outType. - */ - public fun bindingMode(bindingMode: String) { - it.property("bindingMode", bindingMode) - } - - /** - * Host and port of HTTP service to use (override host in openapi schema) - */ - public fun host(host: String) { - it.property("host", host) - } - - /** - * The Camel Rest component to use for the producer REST transport, such as http, undertow. If no - * component has been explicitly configured, then Camel will lookup if there is a Camel component - * that integrates with the Rest DSL, or if a org.apache.camel.spi.RestProducerFactory is registered - * in the registry. If either one is found, then that is being used. - */ - public fun producerComponentName(producerComponentName: String) { - it.property("producerComponentName", producerComponentName) - } - - /** - * Query parameters for the HTTP service to call. The query parameters can contain multiple - * parameters separated by ampersand such such as foo=123&bar=456. - */ - public fun queryParameters(queryParameters: String) { - it.property("queryParameters", queryParameters) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RobotframeworkUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RobotframeworkUriDsl.kt deleted file mode 100644 index 325900bde32c8..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RobotframeworkUriDsl.kt +++ /dev/null @@ -1,764 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Pass camel exchanges to acceptance test written in Robot DSL. - */ -public fun UriDsl.robotframework(i: RobotframeworkUriDsl.() -> Unit) { - RobotframeworkUriDsl(this).apply(i) -} - -@CamelDslMarker -public class RobotframeworkUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("robotframework") - } - - private var resourceUri: String = "" - - /** - * Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file - * and http loads the resource using these protocols (classpath is default). ref will lookup the - * resource in the registry. bean will call a method on a bean to be used as the resource. For bean - * you can specify the method name after dot, eg bean:myBean.myMethod. - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: String) { - it.property("allowContextMapAll", allowContextMapAll) - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: Boolean) { - it.property("allowContextMapAll", allowContextMapAll.toString()) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: String) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: Boolean) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader.toString()) - } - - /** - * A text String to read more arguments from. - */ - public fun argumentFiles(argumentFiles: String) { - it.property("argumentFiles", argumentFiles) - } - - /** - * Creates combined statistics based on tags. Use the format tags:title List - */ - public fun combinedTagStats(combinedTagStats: String) { - it.property("combinedTagStats", combinedTagStats) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * Tests that have the given tags are considered critical. List - */ - public fun criticalTags(criticalTags: String) { - it.property("criticalTags", criticalTags) - } - - /** - * A debug String that is written during execution. - */ - public fun debugFile(debugFile: String) { - it.property("debugFile", debugFile) - } - - /** - * Sets the documentation of the top-level tests suites. - */ - public fun document(document: String) { - it.property("document", document) - } - - /** - * Sets dryrun mode on use. In the dry run mode tests are run without executing keywords - * originating from test libraries. Useful for validating test data syntax. - */ - public fun dryrun(dryrun: String) { - it.property("dryrun", dryrun) - } - - /** - * Sets dryrun mode on use. In the dry run mode tests are run without executing keywords - * originating from test libraries. Useful for validating test data syntax. - */ - public fun dryrun(dryrun: Boolean) { - it.property("dryrun", dryrun.toString()) - } - - /** - * Selects the tests cases by tags. List - */ - public fun excludes(excludes: String) { - it.property("excludes", excludes) - } - - /** - * Sets robot to stop execution immediately if a critical test fails. - */ - public fun exitOnFailure(exitOnFailure: String) { - it.property("exitOnFailure", exitOnFailure) - } - - /** - * Sets robot to stop execution immediately if a critical test fails. - */ - public fun exitOnFailure(exitOnFailure: Boolean) { - it.property("exitOnFailure", exitOnFailure.toString()) - } - - /** - * Selects the tests cases by tags. List - */ - public fun includes(includes: String) { - it.property("includes", includes) - } - - /** - * Sets a single listener for monitoring tests execution - */ - public fun listener(listener: String) { - it.property("listener", listener) - } - - /** - * Sets multiple listeners for monitoring tests execution. Use the format - * ListenerWithArgs:arg1:arg2 or simply ListenerWithoutArgs List - */ - public fun listeners(listeners: String) { - it.property("listeners", listeners) - } - - /** - * Sets the path to the generated log String. - */ - public fun log(log: String) { - it.property("log", log) - } - - /** - * Sets the threshold level for logging. - */ - public fun logLevel(logLevel: String) { - it.property("logLevel", logLevel) - } - - /** - * Sets a title for the generated tests log. - */ - public fun logTitle(logTitle: String) { - it.property("logTitle", logTitle) - } - - /** - * Sets free metadata for the top level tests suites. comma seperated list of string resulting as - * List - */ - public fun metadata(metadata: String) { - it.property("metadata", metadata) - } - - /** - * Using ANSI colors in console. Normally colors work in unixes but not in Windows. Default is - * 'on'. 'on' - use colors in unixes but not in Windows 'off' - never use colors 'force' - always use - * colors (also in Windows) - */ - public fun monitorColors(monitorColors: String) { - it.property("monitorColors", monitorColors) - } - - /** - * Width of the monitor output. Default is 78. - */ - public fun monitorWidth(monitorWidth: String) { - it.property("monitorWidth", monitorWidth) - } - - /** - * Sets the name of the top-level tests suites. - */ - public fun name(name: String) { - it.property("name", name) - } - - /** - * Tests that have the given tags are not critical. List - */ - public fun nonCriticalTags(nonCriticalTags: String) { - it.property("nonCriticalTags", nonCriticalTags) - } - - /** - * If true, sets the return code to zero regardless of failures in test cases. Error codes are - * returned normally. - */ - public fun noStatusReturnCode(noStatusReturnCode: String) { - it.property("noStatusReturnCode", noStatusReturnCode) - } - - /** - * If true, sets the return code to zero regardless of failures in test cases. Error codes are - * returned normally. - */ - public fun noStatusReturnCode(noStatusReturnCode: Boolean) { - it.property("noStatusReturnCode", noStatusReturnCode.toString()) - } - - /** - * Sets the path to the generated output String. - */ - public fun output(output: String) { - it.property("output", output) - } - - /** - * Configures where generated reports are to be placed. - */ - public fun outputDirectory(outputDirectory: String) { - it.property("outputDirectory", outputDirectory) - } - - /** - * Sets the test execution order to be randomized. Valid values are all, suite, and test - */ - public fun randomize(randomize: String) { - it.property("randomize", randomize) - } - - /** - * Sets the path to the generated report String. - */ - public fun report(report: String) { - it.property("report", report) - } - - /** - * Sets background colors for the generated report and summary. - */ - public fun reportBackground(reportBackground: String) { - it.property("reportBackground", reportBackground) - } - - /** - * Sets a title for the generated tests report. - */ - public fun reportTitle(reportTitle: String) { - it.property("reportTitle", reportTitle) - } - - /** - * Executes tests also if the top level test suite is empty. Useful e.g. with --include/--exclude - * when it is not an error that no test matches the condition. - */ - public fun runEmptySuite(runEmptySuite: String) { - it.property("runEmptySuite", runEmptySuite) - } - - /** - * Executes tests also if the top level test suite is empty. Useful e.g. with --include/--exclude - * when it is not an error that no test matches the condition. - */ - public fun runEmptySuite(runEmptySuite: Boolean) { - it.property("runEmptySuite", runEmptySuite.toString()) - } - - /** - * Re-run failed tests, based on output.xml String. - */ - public fun runFailed(runFailed: String) { - it.property("runFailed", runFailed) - } - - /** - * Sets the execution mode for this tests run. Note that this setting has been deprecated in Robot - * Framework 2.8. Use separate dryryn, skipTeardownOnExit, exitOnFailure, and randomize settings - * instead. - */ - public fun runMode(runMode: String) { - it.property("runMode", runMode) - } - - /** - * Sets whether the teardowns are skipped if the test execution is prematurely stopped. - */ - public fun skipTeardownOnExit(skipTeardownOnExit: String) { - it.property("skipTeardownOnExit", skipTeardownOnExit) - } - - /** - * Sets whether the teardowns are skipped if the test execution is prematurely stopped. - */ - public fun skipTeardownOnExit(skipTeardownOnExit: Boolean) { - it.property("skipTeardownOnExit", skipTeardownOnExit.toString()) - } - - /** - * Splits output and log files. - */ - public fun splitOutputs(splitOutputs: String) { - it.property("splitOutputs", splitOutputs) - } - - /** - * Selects the tests suites by name. List - */ - public fun suites(suites: String) { - it.property("suites", suites) - } - - /** - * Defines how many levels to show in the Statistics by Suite table in outputs. - */ - public fun suiteStatLevel(suiteStatLevel: String) { - it.property("suiteStatLevel", suiteStatLevel) - } - - /** - * Sets a title for the generated summary report. - */ - public fun summaryTitle(summaryTitle: String) { - it.property("summaryTitle", summaryTitle) - } - - /** - * Adds documentation to the specified tags. List - */ - public fun tagDocs(tagDocs: String) { - it.property("tagDocs", tagDocs) - } - - /** - * Sets the tags(s) to all executed tests cases. List - */ - public fun tags(tags: String) { - it.property("tags", tags) - } - - /** - * Excludes these tags from the Statistics by Tag and Test Details by Tag tables in outputs. List - */ - public fun tagStatExcludes(tagStatExcludes: String) { - it.property("tagStatExcludes", tagStatExcludes) - } - - /** - * Includes only these tags in the Statistics by Tag and Test Details by Tag tables in outputs. - * List - */ - public fun tagStatIncludes(tagStatIncludes: String) { - it.property("tagStatIncludes", tagStatIncludes) - } - - /** - * Adds external links to the Statistics by Tag table in outputs. Use the format - * pattern:link:title List - */ - public fun tagStatLinks(tagStatLinks: String) { - it.property("tagStatLinks", tagStatLinks) - } - - /** - * Selects the tests cases by name. List - */ - public fun tests(tests: String) { - it.property("tests", tests) - } - - /** - * Adds a timestamp to all output files. - */ - public fun timestampOutputs(timestampOutputs: String) { - it.property("timestampOutputs", timestampOutputs) - } - - /** - * Adds a timestamp to all output files. - */ - public fun timestampOutputs(timestampOutputs: Boolean) { - it.property("timestampOutputs", timestampOutputs.toString()) - } - - /** - * Sets variables using variables files. Use the format path:args List - */ - public fun variableFiles(variableFiles: String) { - it.property("variableFiles", variableFiles) - } - - /** - * Sets individual variables. Use the format name:value List - */ - public fun variables(variables: String) { - it.property("variables", variables) - } - - /** - * Show a warning when an invalid String is skipped. - */ - public fun warnOnSkippedFiles(warnOnSkippedFiles: String) { - it.property("warnOnSkippedFiles", warnOnSkippedFiles) - } - - /** - * Show a warning when an invalid String is skipped. - */ - public fun warnOnSkippedFiles(warnOnSkippedFiles: Boolean) { - it.property("warnOnSkippedFiles", warnOnSkippedFiles.toString()) - } - - /** - * Sets the path to the generated XUnit compatible result String, relative to outputDirectory. The - * String is in xml format. By default, the String name is derived from the testCasesDirectory - * parameter, replacing blanks in the directory name by underscores. - */ - public fun xunitFile(xunitFile: String) { - it.property("xunitFile", xunitFile) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RocketmqUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RocketmqUriDsl.kt deleted file mode 100644 index ce813ce998c04..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RocketmqUriDsl.kt +++ /dev/null @@ -1,229 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages from RocketMQ cluster. - */ -public fun UriDsl.rocketmq(i: RocketmqUriDsl.() -> Unit) { - RocketmqUriDsl(this).apply(i) -} - -@CamelDslMarker -public class RocketmqUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("rocketmq") - } - - private var topicName: String = "" - - /** - * Topic name of this endpoint. - */ - public fun topicName(topicName: String) { - this.topicName = topicName - it.url("$topicName") - } - - /** - * Name server address of RocketMQ cluster. - */ - public fun namesrvAddr(namesrvAddr: String) { - it.property("namesrvAddr", namesrvAddr) - } - - /** - * Consumer group name. - */ - public fun consumerGroup(consumerGroup: String) { - it.property("consumerGroup", consumerGroup) - } - - /** - * Subscribe tags of consumer. Multiple tags could be split by , such as TagATagB - */ - public fun subscribeTags(subscribeTags: String) { - it.property("subscribeTags", subscribeTags) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Producer group name. - */ - public fun producerGroup(producerGroup: String) { - it.property("producerGroup", producerGroup) - } - - /** - * Consumer group name used for receiving response. - */ - public fun replyToConsumerGroup(replyToConsumerGroup: String) { - it.property("replyToConsumerGroup", replyToConsumerGroup) - } - - /** - * Topic used for receiving response when using in-out pattern. - */ - public fun replyToTopic(replyToTopic: String) { - it.property("replyToTopic", replyToTopic) - } - - /** - * Each message would be sent with this tag. - */ - public fun sendTag(sendTag: String) { - it.property("sendTag", sendTag) - } - - /** - * Whether waiting for send result before routing to next endpoint. - */ - public fun waitForSendResult(waitForSendResult: String) { - it.property("waitForSendResult", waitForSendResult) - } - - /** - * Whether waiting for send result before routing to next endpoint. - */ - public fun waitForSendResult(waitForSendResult: Boolean) { - it.property("waitForSendResult", waitForSendResult.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Check interval milliseconds of request timeout. - */ - public fun requestTimeoutCheckerIntervalMillis(requestTimeoutCheckerIntervalMillis: String) { - it.property("requestTimeoutCheckerIntervalMillis", requestTimeoutCheckerIntervalMillis) - } - - /** - * Check interval milliseconds of request timeout. - */ - public fun requestTimeoutCheckerIntervalMillis(requestTimeoutCheckerIntervalMillis: Int) { - it.property("requestTimeoutCheckerIntervalMillis", - requestTimeoutCheckerIntervalMillis.toString()) - } - - /** - * Timeout milliseconds of receiving response when using in-out pattern. - */ - public fun requestTimeoutMillis(requestTimeoutMillis: String) { - it.property("requestTimeoutMillis", requestTimeoutMillis) - } - - /** - * Timeout milliseconds of receiving response when using in-out pattern. - */ - public fun requestTimeoutMillis(requestTimeoutMillis: Int) { - it.property("requestTimeoutMillis", requestTimeoutMillis.toString()) - } - - /** - * Access key for RocketMQ ACL. - */ - public fun accessKey(accessKey: String) { - it.property("accessKey", accessKey) - } - - /** - * Secret key for RocketMQ ACL. - */ - public fun secretKey(secretKey: String) { - it.property("secretKey", secretKey) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RssUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RssUriDsl.kt deleted file mode 100644 index 6473951eb1343..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/RssUriDsl.kt +++ /dev/null @@ -1,365 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Poll RSS feeds. - */ -public fun UriDsl.rss(i: RssUriDsl.() -> Unit) { - RssUriDsl(this).apply(i) -} - -@CamelDslMarker -public class RssUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("rss") - } - - private var feedUri: String = "" - - /** - * The URI to the feed to poll. - */ - public fun feedUri(feedUri: String) { - this.feedUri = feedUri - it.url("$feedUri") - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Sets whether to sort entries by published date. Only works when splitEntries = true. - */ - public fun sortEntries(sortEntries: String) { - it.property("sortEntries", sortEntries) - } - - /** - * Sets whether to sort entries by published date. Only works when splitEntries = true. - */ - public fun sortEntries(sortEntries: Boolean) { - it.property("sortEntries", sortEntries.toString()) - } - - /** - * Sets whether or not entries should be sent individually or whether the entire feed should be - * sent as a single message - */ - public fun splitEntries(splitEntries: String) { - it.property("splitEntries", splitEntries) - } - - /** - * Sets whether or not entries should be sent individually or whether the entire feed should be - * sent as a single message - */ - public fun splitEntries(splitEntries: Boolean) { - it.property("splitEntries", splitEntries.toString()) - } - - /** - * Sets whether all entries identified in a single feed poll should be delivered immediately. If - * true, only one entry is processed per delay. Only applicable when splitEntries = true. - */ - public fun throttleEntries(throttleEntries: String) { - it.property("throttleEntries", throttleEntries) - } - - /** - * Sets whether all entries identified in a single feed poll should be delivered immediately. If - * true, only one entry is processed per delay. Only applicable when splitEntries = true. - */ - public fun throttleEntries(throttleEntries: Boolean) { - it.property("throttleEntries", throttleEntries.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Sets whether to add the feed object as a header. - */ - public fun feedHeader(feedHeader: String) { - it.property("feedHeader", feedHeader) - } - - /** - * Sets whether to add the feed object as a header. - */ - public fun feedHeader(feedHeader: Boolean) { - it.property("feedHeader", feedHeader.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SagaUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SagaUriDsl.kt deleted file mode 100644 index 2291cbf24f4dd..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SagaUriDsl.kt +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Execute custom actions within a route using the Saga EIP. - */ -public fun UriDsl.saga(i: SagaUriDsl.() -> Unit) { - SagaUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SagaUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("saga") - } - - private var action: String = "" - - /** - * Action to execute (complete or compensate) - */ - public fun action(action: String) { - this.action = action - it.url("$action") - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SalesforceUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SalesforceUriDsl.kt deleted file mode 100644 index e0ba3a0c63aba..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SalesforceUriDsl.kt +++ /dev/null @@ -1,720 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Communicate with Salesforce using Java DTOs. - */ -public fun UriDsl.salesforce(i: SalesforceUriDsl.() -> Unit) { - SalesforceUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SalesforceUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("salesforce") - } - - private var operationName: String = "" - - private var topicName: String = "" - - /** - * The operation to use - */ - public fun operationName(operationName: String) { - this.operationName = operationName - it.url("$operationName:$topicName") - } - - /** - * The name of the topic/channel to use - */ - public fun topicName(topicName: String) { - this.topicName = topicName - it.url("$operationName:$topicName") - } - - /** - * APEX method name - */ - public fun apexMethod(apexMethod: String) { - it.property("apexMethod", apexMethod) - } - - /** - * Query params for APEX method - */ - public fun apexQueryParams(apexQueryParams: String) { - it.property("apexQueryParams", apexQueryParams) - } - - /** - * Salesforce API version. - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * Backoff interval increment for Streaming connection restart attempts for failures beyond CometD - * auto-reconnect. - */ - public fun backoffIncrement(backoffIncrement: String) { - it.property("backoffIncrement", backoffIncrement) - } - - /** - * Bulk API Batch ID - */ - public fun batchId(batchId: String) { - it.property("batchId", batchId) - } - - /** - * Bulk API content type, one of XML, CSV, ZIP_XML, ZIP_CSV - */ - public fun contentType(contentType: String) { - it.property("contentType", contentType) - } - - /** - * Default replayId setting if no value is found in initialReplayIdMap - */ - public fun defaultReplayId(defaultReplayId: String) { - it.property("defaultReplayId", defaultReplayId) - } - - /** - * Default replayId setting if no value is found in initialReplayIdMap - */ - public fun defaultReplayId(defaultReplayId: Int) { - it.property("defaultReplayId", defaultReplayId.toString()) - } - - /** - * ReplayId to fall back to after an Invalid Replay Id response - */ - public fun fallBackReplayId(fallBackReplayId: String) { - it.property("fallBackReplayId", fallBackReplayId) - } - - /** - * ReplayId to fall back to after an Invalid Replay Id response - */ - public fun fallBackReplayId(fallBackReplayId: Int) { - it.property("fallBackReplayId", fallBackReplayId.toString()) - } - - /** - * Payload format to use for Salesforce API calls, either JSON or XML, defaults to JSON. As of - * Camel 3.12, this option only applies to the Raw operation. - */ - public fun format(format: String) { - it.property("format", format) - } - - /** - * Custom Jetty Http Client to use to connect to Salesforce. - */ - public fun httpClient(httpClient: String) { - it.property("httpClient", httpClient) - } - - /** - * Include details in Salesforce1 Analytics report, defaults to false. - */ - public fun includeDetails(includeDetails: String) { - it.property("includeDetails", includeDetails) - } - - /** - * Include details in Salesforce1 Analytics report, defaults to false. - */ - public fun includeDetails(includeDetails: Boolean) { - it.property("includeDetails", includeDetails.toString()) - } - - /** - * Replay IDs to start from per channel name. - */ - public fun initialReplayIdMap(initialReplayIdMap: String) { - it.property("initialReplayIdMap", initialReplayIdMap) - } - - /** - * Salesforce1 Analytics report execution instance ID - */ - public fun instanceId(instanceId: String) { - it.property("instanceId", instanceId) - } - - /** - * Bulk API Job ID - */ - public fun jobId(jobId: String) { - it.property("jobId", jobId) - } - - /** - * Limit on number of returned records. Applicable to some of the API, check the Salesforce - * documentation. - */ - public fun limit(limit: String) { - it.property("limit", limit) - } - - /** - * Limit on number of returned records. Applicable to some of the API, check the Salesforce - * documentation. - */ - public fun limit(limit: Int) { - it.property("limit", limit.toString()) - } - - /** - * Locator provided by salesforce Bulk 2.0 API for use in getting results for a Query job. - */ - public fun locator(locator: String) { - it.property("locator", locator) - } - - /** - * Maximum backoff interval for Streaming connection restart attempts for failures beyond CometD - * auto-reconnect. - */ - public fun maxBackoff(maxBackoff: String) { - it.property("maxBackoff", maxBackoff) - } - - /** - * The maximum number of records to retrieve per set of results for a Bulk 2.0 Query. The request - * is still subject to the size limits. If you are working with a very large number of query results, - * you may experience a timeout before receiving all the data from Salesforce. To prevent a timeout, - * specify the maximum number of records your client is expecting to receive in the maxRecords - * parameter. This splits the results into smaller sets with this value as the maximum size. - */ - public fun maxRecords(maxRecords: String) { - it.property("maxRecords", maxRecords) - } - - /** - * The maximum number of records to retrieve per set of results for a Bulk 2.0 Query. The request - * is still subject to the size limits. If you are working with a very large number of query results, - * you may experience a timeout before receiving all the data from Salesforce. To prevent a timeout, - * specify the maximum number of records your client is expecting to receive in the maxRecords - * parameter. This splits the results into smaller sets with this value as the maximum size. - */ - public fun maxRecords(maxRecords: Int) { - it.property("maxRecords", maxRecords.toString()) - } - - /** - * Sets the behaviour of 404 not found status received from Salesforce API. Should the body be set - * to NULL NotFoundBehaviour#NULL or should a exception be signaled on the exchange - * NotFoundBehaviour#EXCEPTION - the default. - */ - public fun notFoundBehaviour(notFoundBehaviour: String) { - it.property("notFoundBehaviour", notFoundBehaviour) - } - - /** - * Notify for fields, options are ALL, REFERENCED, SELECT, WHERE - */ - public fun notifyForFields(notifyForFields: String) { - it.property("notifyForFields", notifyForFields) - } - - /** - * Notify for create operation, defaults to false (API version >= 29.0) - */ - public fun notifyForOperationCreate(notifyForOperationCreate: String) { - it.property("notifyForOperationCreate", notifyForOperationCreate) - } - - /** - * Notify for create operation, defaults to false (API version >= 29.0) - */ - public fun notifyForOperationCreate(notifyForOperationCreate: Boolean) { - it.property("notifyForOperationCreate", notifyForOperationCreate.toString()) - } - - /** - * Notify for delete operation, defaults to false (API version >= 29.0) - */ - public fun notifyForOperationDelete(notifyForOperationDelete: String) { - it.property("notifyForOperationDelete", notifyForOperationDelete) - } - - /** - * Notify for delete operation, defaults to false (API version >= 29.0) - */ - public fun notifyForOperationDelete(notifyForOperationDelete: Boolean) { - it.property("notifyForOperationDelete", notifyForOperationDelete.toString()) - } - - /** - * Notify for operations, options are ALL, CREATE, EXTENDED, UPDATE (API version < 29.0) - */ - public fun notifyForOperations(notifyForOperations: String) { - it.property("notifyForOperations", notifyForOperations) - } - - /** - * Notify for un-delete operation, defaults to false (API version >= 29.0) - */ - public fun notifyForOperationUndelete(notifyForOperationUndelete: String) { - it.property("notifyForOperationUndelete", notifyForOperationUndelete) - } - - /** - * Notify for un-delete operation, defaults to false (API version >= 29.0) - */ - public fun notifyForOperationUndelete(notifyForOperationUndelete: Boolean) { - it.property("notifyForOperationUndelete", notifyForOperationUndelete.toString()) - } - - /** - * Notify for update operation, defaults to false (API version >= 29.0) - */ - public fun notifyForOperationUpdate(notifyForOperationUpdate: String) { - it.property("notifyForOperationUpdate", notifyForOperationUpdate) - } - - /** - * Notify for update operation, defaults to false (API version >= 29.0) - */ - public fun notifyForOperationUpdate(notifyForOperationUpdate: Boolean) { - it.property("notifyForOperationUpdate", notifyForOperationUpdate.toString()) - } - - /** - * Custom Jackson ObjectMapper to use when serializing/deserializing Salesforce objects. - */ - public fun objectMapper(objectMapper: String) { - it.property("objectMapper", objectMapper) - } - - /** - * Use PK Chunking. Only for use in original Bulk API. Bulk 2.0 API performs PK chunking - * automatically, if necessary. - */ - public fun pkChunking(pkChunking: String) { - it.property("pkChunking", pkChunking) - } - - /** - * Use PK Chunking. Only for use in original Bulk API. Bulk 2.0 API performs PK chunking - * automatically, if necessary. - */ - public fun pkChunking(pkChunking: Boolean) { - it.property("pkChunking", pkChunking.toString()) - } - - /** - * Chunk size for use with PK Chunking. If unspecified, salesforce default is 100,000. Maximum - * size is 250,000. - */ - public fun pkChunkingChunkSize(pkChunkingChunkSize: String) { - it.property("pkChunkingChunkSize", pkChunkingChunkSize) - } - - /** - * Chunk size for use with PK Chunking. If unspecified, salesforce default is 100,000. Maximum - * size is 250,000. - */ - public fun pkChunkingChunkSize(pkChunkingChunkSize: Int) { - it.property("pkChunkingChunkSize", pkChunkingChunkSize.toString()) - } - - /** - * Specifies the parent object when you're enabling PK chunking for queries on sharing objects. - * The chunks are based on the parent object's records rather than the sharing object's records. For - * example, when querying on AccountShare, specify Account as the parent object. PK chunking is - * supported for sharing objects as long as the parent object is supported. - */ - public fun pkChunkingParent(pkChunkingParent: String) { - it.property("pkChunkingParent", pkChunkingParent) - } - - /** - * Specifies the 15-character or 18-character record ID to be used as the lower boundary for the - * first chunk. Use this parameter to specify a starting ID when restarting a job that failed between - * batches. - */ - public fun pkChunkingStartRow(pkChunkingStartRow: String) { - it.property("pkChunkingStartRow", pkChunkingStartRow) - } - - /** - * Query Locator provided by salesforce for use when a query results in more records than can be - * retrieved in a single call. Use this value in a subsequent call to retrieve additional records. - */ - public fun queryLocator(queryLocator: String) { - it.property("queryLocator", queryLocator) - } - - /** - * Use raw payload String for request and response (either JSON or XML depending on format), - * instead of DTOs, false by default - */ - public fun rawPayload(rawPayload: String) { - it.property("rawPayload", rawPayload) - } - - /** - * Use raw payload String for request and response (either JSON or XML depending on format), - * instead of DTOs, false by default - */ - public fun rawPayload(rawPayload: Boolean) { - it.property("rawPayload", rawPayload.toString()) - } - - /** - * Salesforce1 Analytics report Id - */ - public fun reportId(reportId: String) { - it.property("reportId", reportId) - } - - /** - * Salesforce1 Analytics report metadata for filtering - */ - public fun reportMetadata(reportMetadata: String) { - it.property("reportMetadata", reportMetadata) - } - - /** - * Bulk API Result ID - */ - public fun resultId(resultId: String) { - it.property("resultId", resultId) - } - - /** - * SObject blob field name - */ - public fun sObjectBlobFieldName(sObjectBlobFieldName: String) { - it.property("sObjectBlobFieldName", sObjectBlobFieldName) - } - - /** - * Fully qualified SObject class name, usually generated using camel-salesforce-maven-plugin - */ - public fun sObjectClass(sObjectClass: String) { - it.property("sObjectClass", sObjectClass) - } - - /** - * SObject fields to retrieve - */ - public fun sObjectFields(sObjectFields: String) { - it.property("sObjectFields", sObjectFields) - } - - /** - * SObject ID if required by API - */ - public fun sObjectId(sObjectId: String) { - it.property("sObjectId", sObjectId) - } - - /** - * SObject external ID field name - */ - public fun sObjectIdName(sObjectIdName: String) { - it.property("sObjectIdName", sObjectIdName) - } - - /** - * SObject external ID field value - */ - public fun sObjectIdValue(sObjectIdValue: String) { - it.property("sObjectIdValue", sObjectIdValue) - } - - /** - * SObject name if required or supported by API - */ - public fun sObjectName(sObjectName: String) { - it.property("sObjectName", sObjectName) - } - - /** - * Salesforce SOQL query string - */ - public fun sObjectQuery(sObjectQuery: String) { - it.property("sObjectQuery", sObjectQuery) - } - - /** - * Salesforce SOSL search string - */ - public fun sObjectSearch(sObjectSearch: String) { - it.property("sObjectSearch", sObjectSearch) - } - - /** - * If true, streams SOQL query result and transparently handles subsequent requests if there are - * multiple pages. Otherwise, results are returned one page at a time. - */ - public fun streamQueryResult(streamQueryResult: String) { - it.property("streamQueryResult", streamQueryResult) - } - - /** - * If true, streams SOQL query result and transparently handles subsequent requests if there are - * multiple pages. Otherwise, results are returned one page at a time. - */ - public fun streamQueryResult(streamQueryResult: Boolean) { - it.property("streamQueryResult", streamQueryResult.toString()) - } - - /** - * Whether to update an existing Push Topic when using the Streaming API, defaults to false - */ - public fun updateTopic(updateTopic: String) { - it.property("updateTopic", updateTopic) - } - - /** - * Whether to update an existing Push Topic when using the Streaming API, defaults to false - */ - public fun updateTopic(updateTopic: Boolean) { - it.property("updateTopic", updateTopic.toString()) - } - - /** - * Max number of events to receive in a batch from the Pub/Sub API. - */ - public fun pubSubBatchSize(pubSubBatchSize: String) { - it.property("pubSubBatchSize", pubSubBatchSize) - } - - /** - * Max number of events to receive in a batch from the Pub/Sub API. - */ - public fun pubSubBatchSize(pubSubBatchSize: Int) { - it.property("pubSubBatchSize", pubSubBatchSize.toString()) - } - - /** - * How to deserialize events consume from the Pub/Sub API. AVRO will try a SpecificRecord subclass - * if found, otherwise GenericRecord. - */ - public fun pubSubDeserializeType(pubSubDeserializeType: String) { - it.property("pubSubDeserializeType", pubSubDeserializeType) - } - - /** - * Fully qualified class name to deserialize Pub/Sub API event to. - */ - public fun pubSubPojoClass(pubSubPojoClass: String) { - it.property("pubSubPojoClass", pubSubPojoClass) - } - - /** - * The replayId value to use when subscribing to the Pub/Sub API. - */ - public fun pubSubReplayId(pubSubReplayId: String) { - it.property("pubSubReplayId", pubSubReplayId) - } - - /** - * The replayId value to use when subscribing to the Streaming API. - */ - public fun replayId(replayId: String) { - it.property("replayId", replayId) - } - - /** - * The replayId value to use when subscribing to the Streaming API. - */ - public fun replayId(replayId: Int) { - it.property("replayId", replayId.toString()) - } - - /** - * Replay preset for Pub/Sub API. - */ - public fun replayPreset(replayPreset: String) { - it.property("replayPreset", replayPreset) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Composite API option to indicate to rollback all records if any are not successful. - */ - public fun allOrNone(allOrNone: String) { - it.property("allOrNone", allOrNone) - } - - /** - * Composite API option to indicate to rollback all records if any are not successful. - */ - public fun allOrNone(allOrNone: Boolean) { - it.property("allOrNone", allOrNone.toString()) - } - - /** - * APEX method URL - */ - public fun apexUrl(apexUrl: String) { - it.property("apexUrl", apexUrl) - } - - /** - * Composite (raw) method. - */ - public fun compositeMethod(compositeMethod: String) { - it.property("compositeMethod", compositeMethod) - } - - /** - * Name of Platform Event, Change Data Capture Event, custom event, etc. - */ - public fun eventName(eventName: String) { - it.property("eventName", eventName) - } - - /** - * EXPANDED: Apache Avro format but doesn't strictly adhere to the record complex type. COMPACT: - * Apache Avro, adheres to the specification for the record complex type. This parameter is available - * in API version 43.0 and later. - */ - public fun eventSchemaFormat(eventSchemaFormat: String) { - it.property("eventSchemaFormat", eventSchemaFormat) - } - - /** - * The ID of the event schema. - */ - public fun eventSchemaId(eventSchemaId: String) { - it.property("eventSchemaId", eventSchemaId) - } - - /** - * Comma separated list of message headers to include as HTTP parameters for Raw operation. - */ - public fun rawHttpHeaders(rawHttpHeaders: String) { - it.property("rawHttpHeaders", rawHttpHeaders) - } - - /** - * HTTP method to use for the Raw operation - */ - public fun rawMethod(rawMethod: String) { - it.property("rawMethod", rawMethod) - } - - /** - * The portion of the endpoint URL after the domain name. E.g., - * '/services/data/v52.0/sobjects/Account/' - */ - public fun rawPath(rawPath: String) { - it.property("rawPath", rawPath) - } - - /** - * Comma separated list of message headers to include as query parameters for Raw operation. Do - * not url-encode values as this will be done automatically. - */ - public fun rawQueryParameters(rawQueryParameters: String) { - it.property("rawQueryParameters", rawQueryParameters) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SapNetweaverUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SapNetweaverUriDsl.kt deleted file mode 100644 index 19073dd5deb48..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SapNetweaverUriDsl.kt +++ /dev/null @@ -1,136 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send requests to SAP NetWeaver Gateway using HTTP. - */ -public fun UriDsl.`sap-netweaver`(i: SapNetweaverUriDsl.() -> Unit) { - SapNetweaverUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SapNetweaverUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("sap-netweaver") - } - - private var url: String = "" - - /** - * Url to the SAP net-weaver gateway server. - */ - public fun url(url: String) { - this.url = url - it.url("$url") - } - - /** - * If the JSON Map contains only a single entry, then flattern by storing that single entry value - * as the message body. - */ - public fun flatternMap(flatternMap: String) { - it.property("flatternMap", flatternMap) - } - - /** - * If the JSON Map contains only a single entry, then flattern by storing that single entry value - * as the message body. - */ - public fun flatternMap(flatternMap: Boolean) { - it.property("flatternMap", flatternMap.toString()) - } - - /** - * Whether to return data in JSON format. If this option is false, then XML is returned in Atom - * format. - */ - public fun json(json: String) { - it.property("json", json) - } - - /** - * Whether to return data in JSON format. If this option is false, then XML is returned in Atom - * format. - */ - public fun json(json: Boolean) { - it.property("json", json.toString()) - } - - /** - * To transform the JSON from a String to a Map in the message body. - */ - public fun jsonAsMap(jsonAsMap: String) { - it.property("jsonAsMap", jsonAsMap) - } - - /** - * To transform the JSON from a String to a Map in the message body. - */ - public fun jsonAsMap(jsonAsMap: Boolean) { - it.property("jsonAsMap", jsonAsMap.toString()) - } - - /** - * Password for account. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Username for account. - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SchedulerUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SchedulerUriDsl.kt deleted file mode 100644 index 2a44f49cb0032..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SchedulerUriDsl.kt +++ /dev/null @@ -1,349 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Generate messages in specified intervals using java.util.concurrent.ScheduledExecutorService. - */ -public fun UriDsl.scheduler(i: SchedulerUriDsl.() -> Unit) { - SchedulerUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SchedulerUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("scheduler") - } - - private var name: String = "" - - /** - * The name of the scheduler - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * Whether to include metadata in the exchange such as fired time, timer name, timer count etc. - */ - public fun includeMetadata(includeMetadata: String) { - it.property("includeMetadata", includeMetadata) - } - - /** - * Whether to include metadata in the exchange such as fired time, timer name, timer count etc. - */ - public fun includeMetadata(includeMetadata: Boolean) { - it.property("includeMetadata", includeMetadata.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Number of core threads in the thread pool used by the scheduling thread pool. Is by default - * using a single thread - */ - public fun poolSize(poolSize: String) { - it.property("poolSize", poolSize) - } - - /** - * Number of core threads in the thread pool used by the scheduling thread pool. Is by default - * using a single thread - */ - public fun poolSize(poolSize: Int) { - it.property("poolSize", poolSize.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SchematronUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SchematronUriDsl.kt deleted file mode 100644 index 9c2d68144abb8..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SchematronUriDsl.kt +++ /dev/null @@ -1,105 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Validate XML payload using the Schematron Library. - */ -public fun UriDsl.schematron(i: SchematronUriDsl.() -> Unit) { - SchematronUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SchematronUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("schematron") - } - - private var path: String = "" - - /** - * The path to the schematron rules file. Can either be in class path or location in the file - * system. - */ - public fun path(path: String) { - this.path = path - it.url("$path") - } - - /** - * Flag to abort the route and throw a schematron validation exception. - */ - public fun abort(abort: String) { - it.property("abort", abort) - } - - /** - * Flag to abort the route and throw a schematron validation exception. - */ - public fun abort(abort: Boolean) { - it.property("abort", abort.toString()) - } - - /** - * To use the given schematron rules instead of loading from the path - */ - public fun rules(rules: String) { - it.property("rules", rules) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Set the URIResolver to be used for resolving schematron includes in the rules file. - */ - public fun uriResolver(uriResolver: String) { - it.property("uriResolver", uriResolver) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ScpUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ScpUriDsl.kt deleted file mode 100644 index be83e658bf69c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ScpUriDsl.kt +++ /dev/null @@ -1,357 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Copy files to/from remote hosts using the secure copy protocol (SCP). - */ -public fun UriDsl.scp(i: ScpUriDsl.() -> Unit) { - ScpUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ScpUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("scp") - } - - private var host: String = "" - - private var port: String = "" - - private var directoryName: String = "" - - /** - * Hostname of the FTP server - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port/$directoryName") - } - - /** - * Port of the FTP server - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port/$directoryName") - } - - /** - * Port of the FTP server - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port/$directoryName") - } - - /** - * The starting directory - */ - public fun directoryName(directoryName: String) { - this.directoryName = directoryName - it.url("$host:$port/$directoryName") - } - - /** - * Allows you to set chmod on the stored file. For example chmod=664. - */ - public fun chmod(chmod: String) { - it.property("chmod", chmod) - } - - /** - * Whether or not to disconnect from remote FTP server right after use. Disconnect will only - * disconnect the current connection to the FTP server. If you have a consumer which you want to - * stop, then you need to stop the consumer/route instead. - */ - public fun disconnect(disconnect: String) { - it.property("disconnect", disconnect) - } - - /** - * Whether or not to disconnect from remote FTP server right after use. Disconnect will only - * disconnect the current connection to the FTP server. If you have a consumer which you want to - * stop, then you need to stop the consumer/route instead. - */ - public fun disconnect(disconnect: Boolean) { - it.property("disconnect", disconnect.toString()) - } - - /** - * If provided, then Camel will write a checksum file when the original file has been written. The - * checksum file will contain the checksum created with the provided algorithm for the original file. - * The checksum file will always be written in the same folder as the original file. - */ - public fun checksumFileAlgorithm(checksumFileAlgorithm: String) { - it.property("checksumFileAlgorithm", checksumFileAlgorithm) - } - - /** - * Use Expression such as File Language to dynamically set the filename. For consumers, it's used - * as a filename filter. For producers, it's used to evaluate the filename to write. If an expression - * is set, it take precedence over the CamelFileName header. (Note: The header itself can also be an - * Expression). The expression options support both String and Expression types. If the expression is - * a String type, it is always evaluated using the File Language. If the expression is an Expression - * type, the specified Expression type is used - this allows you, for instance, to use OGNL - * expressions. For the consumer, you can use it to filter filenames, so you can for instance consume - * today's file using the File Language syntax: mydata-${date:now:yyyyMMdd}.txt. The producers - * support the CamelOverruleFileName header which takes precedence over any existing CamelFileName - * header; the CamelOverruleFileName is a header that is used only once, and makes it easier as this - * avoids to temporary store CamelFileName and have to restore it afterwards. - */ - public fun fileName(fileName: String) { - it.property("fileName", fileName) - } - - /** - * Flatten is used to flatten the file name path to strip any leading paths, so it's just the file - * name. This allows you to consume recursively into sub-directories, but when you eg write the files - * to another directory they will be written in a single directory. Setting this to true on the - * producer enforces that any file name in CamelFileName header will be stripped for any leading - * paths. - */ - public fun flatten(flatten: String) { - it.property("flatten", flatten) - } - - /** - * Flatten is used to flatten the file name path to strip any leading paths, so it's just the file - * name. This allows you to consume recursively into sub-directories, but when you eg write the files - * to another directory they will be written in a single directory. Setting this to true on the - * producer enforces that any file name in CamelFileName header will be stripped for any leading - * paths. - */ - public fun flatten(flatten: Boolean) { - it.property("flatten", flatten.toString()) - } - - /** - * Used for jailing (restricting) writing files to the starting directory (and sub) only. This is - * enabled by default to not allow Camel to write files to outside directories (to be more secured - * out of the box). You can turn this off to allow writing files to directories outside the starting - * directory, such as parent or root folders. - */ - public fun jailStartingDirectory(jailStartingDirectory: String) { - it.property("jailStartingDirectory", jailStartingDirectory) - } - - /** - * Used for jailing (restricting) writing files to the starting directory (and sub) only. This is - * enabled by default to not allow Camel to write files to outside directories (to be more secured - * out of the box). You can turn this off to allow writing files to directories outside the starting - * directory, such as parent or root folders. - */ - public fun jailStartingDirectory(jailStartingDirectory: Boolean) { - it.property("jailStartingDirectory", jailStartingDirectory.toString()) - } - - /** - * Sets whether to use strict host key checking. Possible values are: no, yes - */ - public fun strictHostKeyChecking(strictHostKeyChecking: String) { - it.property("strictHostKeyChecking", strictHostKeyChecking) - } - - /** - * Used to specify if a null body is allowed during file writing. If set to true then an empty - * file will be created, when set to false, and attempting to send a null body to the file component, - * a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist - * option is set to 'Override', then the file will be truncated, and if set to append the file will - * remain unchanged. - */ - public fun allowNullBody(allowNullBody: String) { - it.property("allowNullBody", allowNullBody) - } - - /** - * Used to specify if a null body is allowed during file writing. If set to true then an empty - * file will be created, when set to false, and attempting to send a null body to the file component, - * a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist - * option is set to 'Override', then the file will be truncated, and if set to append the file will - * remain unchanged. - */ - public fun allowNullBody(allowNullBody: Boolean) { - it.property("allowNullBody", allowNullBody.toString()) - } - - /** - * Whether or not to disconnect from remote FTP server right after a Batch upload is complete. - * disconnectOnBatchComplete will only disconnect the current connection to the FTP server. - */ - public fun disconnectOnBatchComplete(disconnectOnBatchComplete: String) { - it.property("disconnectOnBatchComplete", disconnectOnBatchComplete) - } - - /** - * Whether or not to disconnect from remote FTP server right after a Batch upload is complete. - * disconnectOnBatchComplete will only disconnect the current connection to the FTP server. - */ - public fun disconnectOnBatchComplete(disconnectOnBatchComplete: Boolean) { - it.property("disconnectOnBatchComplete", disconnectOnBatchComplete.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Strategy (Custom Strategy) used to move file with special naming token to use when - * fileExist=Move is configured. By default, there is an implementation used if no custom strategy is - * provided - */ - public fun moveExistingFileStrategy(moveExistingFileStrategy: String) { - it.property("moveExistingFileStrategy", moveExistingFileStrategy) - } - - /** - * Sets the connect timeout for waiting for a connection to be established Used by both FTPClient - * and JSCH - */ - public fun connectTimeout(connectTimeout: String) { - it.property("connectTimeout", connectTimeout) - } - - /** - * Sets the so timeout FTP and FTPS Is the SocketOptions.SO_TIMEOUT value in millis. Recommended - * option is to set this to 300000 so as not have a hanged connection. On SFTP this option is set as - * timeout on the JSCH Session instance. - */ - public fun soTimeout(soTimeout: String) { - it.property("soTimeout", soTimeout) - } - - /** - * Sets the data timeout for waiting for reply Used only by FTPClient - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Sets the known_hosts file, so that the jsch endpoint can do host key verification. You can - * prefix with classpath: to load the file from classpath instead of file system. - */ - public fun knownHostsFile(knownHostsFile: String) { - it.property("knownHostsFile", knownHostsFile) - } - - /** - * Password to use for login - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Set a comma separated list of authentications that will be used in order of preference. - * Possible authentication methods are defined by JCraft JSCH. Some examples include: - * gssapi-with-mic,publickey,keyboard-interactive,password If not specified the JSCH and/or system - * defaults will be used. - */ - public fun preferredAuthentications(preferredAuthentications: String) { - it.property("preferredAuthentications", preferredAuthentications) - } - - /** - * Set the private key bytes to that the endpoint can do private key verification. This must be - * used only if privateKeyFile wasn't set. Otherwise the file will have the priority. - */ - public fun privateKeyBytes(privateKeyBytes: String) { - it.property("privateKeyBytes", privateKeyBytes) - } - - /** - * Set the private key file to that the endpoint can do private key verification. You can prefix - * with classpath: to load the file from classpath instead of file system. - */ - public fun privateKeyFile(privateKeyFile: String) { - it.property("privateKeyFile", privateKeyFile) - } - - /** - * Set the private key file passphrase to that the endpoint can do private key verification. - */ - public fun privateKeyFilePassphrase(privateKeyFilePassphrase: String) { - it.property("privateKeyFilePassphrase", privateKeyFilePassphrase) - } - - /** - * Username to use for login - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * If knownHostFile has not been explicit configured, then use the host file from - * System.getProperty(user.home) /.ssh/known_hosts - */ - public fun useUserKnownHostsFile(useUserKnownHostsFile: String) { - it.property("useUserKnownHostsFile", useUserKnownHostsFile) - } - - /** - * If knownHostFile has not been explicit configured, then use the host file from - * System.getProperty(user.home) /.ssh/known_hosts - */ - public fun useUserKnownHostsFile(useUserKnownHostsFile: Boolean) { - it.property("useUserKnownHostsFile", useUserKnownHostsFile.toString()) - } - - /** - * Set a comma separated list of ciphers that will be used in order of preference. Possible cipher - * names are defined by JCraft JSCH. Some examples include: - * aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-cbc,aes256-cbc. If not specified the - * default list from JSCH will be used. - */ - public fun ciphers(ciphers: String) { - it.property("ciphers", ciphers) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SedaUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SedaUriDsl.kt deleted file mode 100644 index e572fb9ec2730..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SedaUriDsl.kt +++ /dev/null @@ -1,332 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Asynchronously call another endpoint from any Camel Context in the same JVM. - */ -public fun UriDsl.seda(i: SedaUriDsl.() -> Unit) { - SedaUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SedaUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("seda") - } - - private var name: String = "" - - /** - * Name of queue - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * The maximum capacity of the SEDA queue (i.e., the number of messages it can hold). Will by - * default use the defaultSize set on the SEDA component. - */ - public fun size(size: String) { - it.property("size", size) - } - - /** - * The maximum capacity of the SEDA queue (i.e., the number of messages it can hold). Will by - * default use the defaultSize set on the SEDA component. - */ - public fun size(size: Int) { - it.property("size", size.toString()) - } - - /** - * Number of concurrent threads processing exchanges. - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * Number of concurrent threads processing exchanges. - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Whether to limit the number of concurrentConsumers to the maximum of 500. By default, an - * exception will be thrown if an endpoint is configured with a greater number. You can disable that - * check by turning this option off. - */ - public fun limitConcurrentConsumers(limitConcurrentConsumers: String) { - it.property("limitConcurrentConsumers", limitConcurrentConsumers) - } - - /** - * Whether to limit the number of concurrentConsumers to the maximum of 500. By default, an - * exception will be thrown if an endpoint is configured with a greater number. You can disable that - * check by turning this option off. - */ - public fun limitConcurrentConsumers(limitConcurrentConsumers: Boolean) { - it.property("limitConcurrentConsumers", limitConcurrentConsumers.toString()) - } - - /** - * Specifies whether multiple consumers are allowed. If enabled, you can use SEDA for - * Publish-Subscribe messaging. That is, you can send a message to the SEDA queue and have each - * consumer receive a copy of the message. When enabled, this option should be specified on every - * consumer endpoint. - */ - public fun multipleConsumers(multipleConsumers: String) { - it.property("multipleConsumers", multipleConsumers) - } - - /** - * Specifies whether multiple consumers are allowed. If enabled, you can use SEDA for - * Publish-Subscribe messaging. That is, you can send a message to the SEDA queue and have each - * consumer receive a copy of the message. When enabled, this option should be specified on every - * consumer endpoint. - */ - public fun multipleConsumers(multipleConsumers: Boolean) { - it.property("multipleConsumers", multipleConsumers.toString()) - } - - /** - * The timeout (in milliseconds) used when polling. When a timeout occurs, the consumer can check - * whether it is allowed to continue running. Setting a lower value allows the consumer to react more - * quickly upon shutdown. - */ - public fun pollTimeout(pollTimeout: String) { - it.property("pollTimeout", pollTimeout) - } - - /** - * The timeout (in milliseconds) used when polling. When a timeout occurs, the consumer can check - * whether it is allowed to continue running. Setting a lower value allows the consumer to react more - * quickly upon shutdown. - */ - public fun pollTimeout(pollTimeout: Int) { - it.property("pollTimeout", pollTimeout.toString()) - } - - /** - * Whether to purge the task queue when stopping the consumer/route. This allows to stop faster, - * as any pending messages on the queue is discarded. - */ - public fun purgeWhenStopping(purgeWhenStopping: String) { - it.property("purgeWhenStopping", purgeWhenStopping) - } - - /** - * Whether to purge the task queue when stopping the consumer/route. This allows to stop faster, - * as any pending messages on the queue is discarded. - */ - public fun purgeWhenStopping(purgeWhenStopping: Boolean) { - it.property("purgeWhenStopping", purgeWhenStopping.toString()) - } - - /** - * Whether a thread that sends messages to a full SEDA queue will block until the queue's capacity - * is no longer exhausted. By default, an exception will be thrown stating that the queue is full. By - * enabling this option, the calling thread will instead block and wait until the message can be - * accepted. - */ - public fun blockWhenFull(blockWhenFull: String) { - it.property("blockWhenFull", blockWhenFull) - } - - /** - * Whether a thread that sends messages to a full SEDA queue will block until the queue's capacity - * is no longer exhausted. By default, an exception will be thrown stating that the queue is full. By - * enabling this option, the calling thread will instead block and wait until the message can be - * accepted. - */ - public fun blockWhenFull(blockWhenFull: Boolean) { - it.property("blockWhenFull", blockWhenFull.toString()) - } - - /** - * Whether the producer should discard the message (do not add the message to the queue), when - * sending to a queue with no active consumers. Only one of the options discardIfNoConsumers and - * failIfNoConsumers can be enabled at the same time. - */ - public fun discardIfNoConsumers(discardIfNoConsumers: String) { - it.property("discardIfNoConsumers", discardIfNoConsumers) - } - - /** - * Whether the producer should discard the message (do not add the message to the queue), when - * sending to a queue with no active consumers. Only one of the options discardIfNoConsumers and - * failIfNoConsumers can be enabled at the same time. - */ - public fun discardIfNoConsumers(discardIfNoConsumers: Boolean) { - it.property("discardIfNoConsumers", discardIfNoConsumers.toString()) - } - - /** - * Whether a thread that sends messages to a full SEDA queue will be discarded. By default, an - * exception will be thrown stating that the queue is full. By enabling this option, the calling - * thread will give up sending and continue, meaning that the message was not sent to the SEDA queue. - */ - public fun discardWhenFull(discardWhenFull: String) { - it.property("discardWhenFull", discardWhenFull) - } - - /** - * Whether a thread that sends messages to a full SEDA queue will be discarded. By default, an - * exception will be thrown stating that the queue is full. By enabling this option, the calling - * thread will give up sending and continue, meaning that the message was not sent to the SEDA queue. - */ - public fun discardWhenFull(discardWhenFull: Boolean) { - it.property("discardWhenFull", discardWhenFull.toString()) - } - - /** - * Whether the producer should fail by throwing an exception, when sending to a queue with no - * active consumers. Only one of the options discardIfNoConsumers and failIfNoConsumers can be - * enabled at the same time. - */ - public fun failIfNoConsumers(failIfNoConsumers: String) { - it.property("failIfNoConsumers", failIfNoConsumers) - } - - /** - * Whether the producer should fail by throwing an exception, when sending to a queue with no - * active consumers. Only one of the options discardIfNoConsumers and failIfNoConsumers can be - * enabled at the same time. - */ - public fun failIfNoConsumers(failIfNoConsumers: Boolean) { - it.property("failIfNoConsumers", failIfNoConsumers.toString()) - } - - /** - * Offer timeout (in milliseconds) can be added to the block case when queue is full. You can - * disable timeout by using 0 or a negative value. - */ - public fun offerTimeout(offerTimeout: String) { - it.property("offerTimeout", offerTimeout) - } - - /** - * Timeout (in milliseconds) before a SEDA producer will stop waiting for an asynchronous task to - * complete. You can disable timeout by using 0 or a negative value. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Option to specify whether the caller should wait for the async task to complete or not before - * continuing. The following three options are supported: Always, Never or IfReplyExpected. The first - * two values are self-explanatory. The last value, IfReplyExpected, will only wait if the message is - * Request Reply based. The default option is IfReplyExpected. - */ - public fun waitForTaskToComplete(waitForTaskToComplete: String) { - it.property("waitForTaskToComplete", waitForTaskToComplete) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Define the queue instance which will be used by the endpoint - */ - public fun queue(queue: String) { - it.property("queue", queue) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ServiceUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ServiceUriDsl.kt deleted file mode 100644 index fef2c31cf599d..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ServiceUriDsl.kt +++ /dev/null @@ -1,98 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Register a Camel endpoint to a Service Registry (such as Consul, Etcd) and delegate to it. - */ -public fun UriDsl.service(i: ServiceUriDsl.() -> Unit) { - ServiceUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ServiceUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("service") - } - - private var delegateUri: String = "" - - /** - * The endpoint uri to expose as service - */ - public fun delegateUri(delegateUri: String) { - this.delegateUri = delegateUri - it.url("$delegateUri") - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ServicenowUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ServicenowUriDsl.kt deleted file mode 100644 index ffcaab52b4b7b..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ServicenowUriDsl.kt +++ /dev/null @@ -1,517 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Interact with ServiceNow via its REST API. - */ -public fun UriDsl.servicenow(i: ServicenowUriDsl.() -> Unit) { - ServicenowUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ServicenowUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("servicenow") - } - - private var instanceName: String = "" - - /** - * The ServiceNow instance name - */ - public fun instanceName(instanceName: String) { - this.instanceName = instanceName - it.url("$instanceName") - } - - /** - * Set this parameter to true to return only scorecards where the indicator Display field is - * selected. Set this parameter to all to return scorecards with any Display field value. This - * parameter is true by default. - */ - public fun display(display: String) { - it.property("display", display) - } - - /** - * Return the display value (true), actual value (false), or both (all) for reference fields - * (default: false) - */ - public fun displayValue(displayValue: String) { - it.property("displayValue", displayValue) - } - - /** - * True to exclude Table API links for reference fields (default: false) - */ - public fun excludeReferenceLink(excludeReferenceLink: String) { - it.property("excludeReferenceLink", excludeReferenceLink) - } - - /** - * True to exclude Table API links for reference fields (default: false) - */ - public fun excludeReferenceLink(excludeReferenceLink: Boolean) { - it.property("excludeReferenceLink", excludeReferenceLink.toString()) - } - - /** - * Set this parameter to true to return only scorecards that are favorites of the querying user. - */ - public fun favorites(favorites: String) { - it.property("favorites", favorites) - } - - /** - * Set this parameter to true to return only scorecards that are favorites of the querying user. - */ - public fun favorites(favorites: Boolean) { - it.property("favorites", favorites.toString()) - } - - /** - * Set this parameter to true to always return all available aggregates for an indicator, - * including when an aggregate has already been applied. If a value is not specified, this parameter - * defaults to false and returns no aggregates. - */ - public fun includeAggregates(includeAggregates: String) { - it.property("includeAggregates", includeAggregates) - } - - /** - * Set this parameter to true to always return all available aggregates for an indicator, - * including when an aggregate has already been applied. If a value is not specified, this parameter - * defaults to false and returns no aggregates. - */ - public fun includeAggregates(includeAggregates: Boolean) { - it.property("includeAggregates", includeAggregates.toString()) - } - - /** - * Set this parameter to true to return all available aggregates for an indicator when no - * aggregate has been applied. If a value is not specified, this parameter defaults to false and - * returns no aggregates. - */ - public fun includeAvailableAggregates(includeAvailableAggregates: String) { - it.property("includeAvailableAggregates", includeAvailableAggregates) - } - - /** - * Set this parameter to true to return all available aggregates for an indicator when no - * aggregate has been applied. If a value is not specified, this parameter defaults to false and - * returns no aggregates. - */ - public fun includeAvailableAggregates(includeAvailableAggregates: Boolean) { - it.property("includeAvailableAggregates", includeAvailableAggregates.toString()) - } - - /** - * Set this parameter to true to return all available breakdowns for an indicator. If a value is - * not specified, this parameter defaults to false and returns no breakdowns. - */ - public fun includeAvailableBreakdowns(includeAvailableBreakdowns: String) { - it.property("includeAvailableBreakdowns", includeAvailableBreakdowns) - } - - /** - * Set this parameter to true to return all available breakdowns for an indicator. If a value is - * not specified, this parameter defaults to false and returns no breakdowns. - */ - public fun includeAvailableBreakdowns(includeAvailableBreakdowns: Boolean) { - it.property("includeAvailableBreakdowns", includeAvailableBreakdowns.toString()) - } - - /** - * Set this parameter to true to return all notes associated with the score. The note element - * contains the note text as well as the author and timestamp when the note was added. - */ - public fun includeScoreNotes(includeScoreNotes: String) { - it.property("includeScoreNotes", includeScoreNotes) - } - - /** - * Set this parameter to true to return all notes associated with the score. The note element - * contains the note text as well as the author and timestamp when the note was added. - */ - public fun includeScoreNotes(includeScoreNotes: Boolean) { - it.property("includeScoreNotes", includeScoreNotes.toString()) - } - - /** - * Set this parameter to true to return all scores for a scorecard. If a value is not specified, - * this parameter defaults to false and returns only the most recent score value. - */ - public fun includeScores(includeScores: String) { - it.property("includeScores", includeScores) - } - - /** - * Set this parameter to true to return all scores for a scorecard. If a value is not specified, - * this parameter defaults to false and returns only the most recent score value. - */ - public fun includeScores(includeScores: Boolean) { - it.property("includeScores", includeScores.toString()) - } - - /** - * True to set raw value of input fields (default: false) - */ - public fun inputDisplayValue(inputDisplayValue: String) { - it.property("inputDisplayValue", inputDisplayValue) - } - - /** - * True to set raw value of input fields (default: false) - */ - public fun inputDisplayValue(inputDisplayValue: Boolean) { - it.property("inputDisplayValue", inputDisplayValue.toString()) - } - - /** - * Set this parameter to true to return only scorecards for key indicators. - */ - public fun key(key: String) { - it.property("key", key) - } - - /** - * Set this parameter to true to return only scorecards for key indicators. - */ - public fun key(key: Boolean) { - it.property("key", key.toString()) - } - - /** - * Defines both request and response models - */ - public fun models(models: String) { - it.property("models", models) - } - - /** - * Enter the maximum number of scorecards each query can return. By default this value is 10, and - * the maximum is 100. - */ - public fun perPage(perPage: String) { - it.property("perPage", perPage) - } - - /** - * Enter the maximum number of scorecards each query can return. By default this value is 10, and - * the maximum is 100. - */ - public fun perPage(perPage: Int) { - it.property("perPage", perPage.toString()) - } - - /** - * The ServiceNow release to target, default to Helsinki See https://docs.servicenow.com - */ - public fun release(release: String) { - it.property("release", release) - } - - /** - * Defines the request model - */ - public fun requestModels(requestModels: String) { - it.property("requestModels", requestModels) - } - - /** - * The default resource, can be overridden by header CamelServiceNowResource - */ - public fun resource(resource: String) { - it.property("resource", resource) - } - - /** - * Defines the response model - */ - public fun responseModels(responseModels: String) { - it.property("responseModels", responseModels) - } - - /** - * Specify the value to use when sorting results. By default, queries sort records by value. - */ - public fun sortBy(sortBy: String) { - it.property("sortBy", sortBy) - } - - /** - * Specify the sort direction, ascending or descending. By default, queries sort records in - * descending order. Use sysparm_sortdir=asc to sort in ascending order. - */ - public fun sortDir(sortDir: String) { - it.property("sortDir", sortDir) - } - - /** - * True to suppress auto generation of system fields (default: false) - */ - public fun suppressAutoSysField(suppressAutoSysField: String) { - it.property("suppressAutoSysField", suppressAutoSysField) - } - - /** - * True to suppress auto generation of system fields (default: false) - */ - public fun suppressAutoSysField(suppressAutoSysField: Boolean) { - it.property("suppressAutoSysField", suppressAutoSysField.toString()) - } - - /** - * Set this value to true to remove the Link header from the response. The Link header allows you - * to request additional pages of data when the number of records matching your query exceeds the - * query limit - */ - public fun suppressPaginationHeader(suppressPaginationHeader: String) { - it.property("suppressPaginationHeader", suppressPaginationHeader) - } - - /** - * Set this value to true to remove the Link header from the response. The Link header allows you - * to request additional pages of data when the number of records matching your query exceeds the - * query limit - */ - public fun suppressPaginationHeader(suppressPaginationHeader: Boolean) { - it.property("suppressPaginationHeader", suppressPaginationHeader.toString()) - } - - /** - * The default table, can be overridden by header CamelServiceNowTable - */ - public fun table(table: String) { - it.property("table", table) - } - - /** - * Set this parameter to true to return only scorecards that have a target. - */ - public fun target(target: String) { - it.property("target", target) - } - - /** - * Set this parameter to true to return only scorecards that have a target. - */ - public fun target(target: Boolean) { - it.property("target", target.toString()) - } - - /** - * Gets only those categories whose parent is a catalog. - */ - public fun topLevelOnly(topLevelOnly: String) { - it.property("topLevelOnly", topLevelOnly) - } - - /** - * Gets only those categories whose parent is a catalog. - */ - public fun topLevelOnly(topLevelOnly: Boolean) { - it.property("topLevelOnly", topLevelOnly.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The ServiceNow REST API version, default latest - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The date format used for Json serialization/deserialization - */ - public fun dateFormat(dateFormat: String) { - it.property("dateFormat", dateFormat) - } - - /** - * The date-time format used for Json serialization/deserialization - */ - public fun dateTimeFormat(dateTimeFormat: String) { - it.property("dateTimeFormat", dateTimeFormat) - } - - /** - * To configure http-client - */ - public fun httpClientPolicy(httpClientPolicy: String) { - it.property("httpClientPolicy", httpClientPolicy) - } - - /** - * Sets Jackson's ObjectMapper to use for request/reply - */ - public fun mapper(mapper: String) { - it.property("mapper", mapper) - } - - /** - * To configure proxy authentication - */ - public fun proxyAuthorizationPolicy(proxyAuthorizationPolicy: String) { - it.property("proxyAuthorizationPolicy", proxyAuthorizationPolicy) - } - - /** - * Set this parameter to true to retrieve the target record when using import set api. The import - * set result is then replaced by the target record - */ - public fun retrieveTargetRecordOnImport(retrieveTargetRecordOnImport: String) { - it.property("retrieveTargetRecordOnImport", retrieveTargetRecordOnImport) - } - - /** - * Set this parameter to true to retrieve the target record when using import set api. The import - * set result is then replaced by the target record - */ - public fun retrieveTargetRecordOnImport(retrieveTargetRecordOnImport: Boolean) { - it.property("retrieveTargetRecordOnImport", retrieveTargetRecordOnImport.toString()) - } - - /** - * The time format used for Json serialization/deserialization - */ - public fun timeFormat(timeFormat: String) { - it.property("timeFormat", timeFormat) - } - - /** - * The proxy host name - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * The proxy port number - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * The proxy port number - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * The ServiceNow REST API url - */ - public fun apiUrl(apiUrl: String) { - it.property("apiUrl", apiUrl) - } - - /** - * OAuth2 ClientID - */ - public fun oauthClientId(oauthClientId: String) { - it.property("oauthClientId", oauthClientId) - } - - /** - * OAuth2 ClientSecret - */ - public fun oauthClientSecret(oauthClientSecret: String) { - it.property("oauthClientSecret", oauthClientSecret) - } - - /** - * OAuth token Url - */ - public fun oauthTokenUrl(oauthTokenUrl: String) { - it.property("oauthTokenUrl", oauthTokenUrl) - } - - /** - * ServiceNow account password, MUST be provided - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Password for proxy authentication - */ - public fun proxyPassword(proxyPassword: String) { - it.property("proxyPassword", proxyPassword) - } - - /** - * Username for proxy authentication - */ - public fun proxyUserName(proxyUserName: String) { - it.property("proxyUserName", proxyUserName) - } - - /** - * To configure security using SSLContextParameters. See - * http://camel.apache.org/camel-configuration-utilities.html - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * ServiceNow user account name, MUST be provided - */ - public fun userName(userName: String) { - it.property("userName", userName) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ServletUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ServletUriDsl.kt deleted file mode 100644 index a2f2d3a5fe7a4..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ServletUriDsl.kt +++ /dev/null @@ -1,402 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Serve HTTP requests by a Servlet. - */ -public fun UriDsl.servlet(i: ServletUriDsl.() -> Unit) { - ServletUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ServletUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("servlet") - } - - private var contextPath: String = "" - - /** - * The context-path to use - */ - public fun contextPath(contextPath: String) { - this.contextPath = contextPath - it.url("$contextPath") - } - - /** - * Determines whether or not the raw input stream is cached or not. The Camel consumer - * (camel-servlet, camel-jetty etc.) will by default cache the input stream to support reading it - * multiple times to ensure it Camel can retrieve all data from the stream. However you can set this - * option to true when you for example need to access the raw stream, such as streaming it directly - * to a file or other persistent store. DefaultHttpBinding will copy the request input stream into a - * stream cache and put it into message body if this option is false to support reading the stream - * multiple times. If you use Servlet to bridge/proxy an endpoint then consider enabling this option - * to improve performance, in case you do not need to read the message payload multiple times. The - * producer (camel-http) will by default cache the response body stream. If setting this option to - * true, then the producers will not cache the response body stream but use the response stream as-is - * (the stream can only be read once) as the message body. - */ - public fun disableStreamCache(disableStreamCache: String) { - it.property("disableStreamCache", disableStreamCache) - } - - /** - * Determines whether or not the raw input stream is cached or not. The Camel consumer - * (camel-servlet, camel-jetty etc.) will by default cache the input stream to support reading it - * multiple times to ensure it Camel can retrieve all data from the stream. However you can set this - * option to true when you for example need to access the raw stream, such as streaming it directly - * to a file or other persistent store. DefaultHttpBinding will copy the request input stream into a - * stream cache and put it into message body if this option is false to support reading the stream - * multiple times. If you use Servlet to bridge/proxy an endpoint then consider enabling this option - * to improve performance, in case you do not need to read the message payload multiple times. The - * producer (camel-http) will by default cache the response body stream. If setting this option to - * true, then the producers will not cache the response body stream but use the response stream as-is - * (the stream can only be read once) as the message body. - */ - public fun disableStreamCache(disableStreamCache: Boolean) { - it.property("disableStreamCache", disableStreamCache.toString()) - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * To use a custom HttpBinding to control the mapping between Camel message and HttpClient. - */ - public fun httpBinding(httpBinding: String) { - it.property("httpBinding", httpBinding) - } - - /** - * If this option is false the Servlet will disable the HTTP streaming and set the content-length - * header on the response - */ - public fun chunked(chunked: String) { - it.property("chunked", chunked) - } - - /** - * If this option is false the Servlet will disable the HTTP streaming and set the content-length - * header on the response - */ - public fun chunked(chunked: Boolean) { - it.property("chunked", chunked.toString()) - } - - /** - * If enabled and an Exchange failed processing on the consumer side, and if the caused Exception - * was send back serialized in the response as a application/x-java-serialized-object content type. - * On the producer side the exception will be deserialized and thrown as is, instead of the - * HttpOperationFailedException. The caused exception is required to be serialized. This is by - * default turned off. If you enable this then be aware that Java will deserialize the incoming data - * from the request to Java and that can be a potential security risk. - */ - public fun transferException(transferException: String) { - it.property("transferException", transferException) - } - - /** - * If enabled and an Exchange failed processing on the consumer side, and if the caused Exception - * was send back serialized in the response as a application/x-java-serialized-object content type. - * On the producer side the exception will be deserialized and thrown as is, instead of the - * HttpOperationFailedException. The caused exception is required to be serialized. This is by - * default turned off. If you enable this then be aware that Java will deserialize the incoming data - * from the request to Java and that can be a potential security risk. - */ - public fun transferException(transferException: Boolean) { - it.property("transferException", transferException.toString()) - } - - /** - * Configure the consumer to work in async mode - */ - public fun async(async: String) { - it.property("async", async) - } - - /** - * Configure the consumer to work in async mode - */ - public fun async(async: Boolean) { - it.property("async", async.toString()) - } - - /** - * Used to only allow consuming if the HttpMethod matches, such as GET/POST/PUT etc. Multiple - * methods can be specified separated by comma. - */ - public fun httpMethodRestrict(httpMethodRestrict: String) { - it.property("httpMethodRestrict", httpMethodRestrict) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the exception's stack trace - * will be logged when the exception stack trace is not sent in the response's body. - */ - public fun logException(logException: String) { - it.property("logException", logException) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the exception's stack trace - * will be logged when the exception stack trace is not sent in the response's body. - */ - public fun logException(logException: Boolean) { - it.property("logException", logException.toString()) - } - - /** - * Whether or not the consumer should try to find a target consumer by matching the URI prefix if - * no exact match is found. - */ - public fun matchOnUriPrefix(matchOnUriPrefix: String) { - it.property("matchOnUriPrefix", matchOnUriPrefix) - } - - /** - * Whether or not the consumer should try to find a target consumer by matching the URI prefix if - * no exact match is found. - */ - public fun matchOnUriPrefix(matchOnUriPrefix: Boolean) { - it.property("matchOnUriPrefix", matchOnUriPrefix.toString()) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the response's body won't - * contain the exception's stack trace. - */ - public fun muteException(muteException: String) { - it.property("muteException", muteException) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the response's body won't - * contain the exception's stack trace. - */ - public fun muteException(muteException: Boolean) { - it.property("muteException", muteException.toString()) - } - - /** - * To use a custom buffer size on the jakarta.servlet.ServletResponse. - */ - public fun responseBufferSize(responseBufferSize: String) { - it.property("responseBufferSize", responseBufferSize) - } - - /** - * To use a custom buffer size on the jakarta.servlet.ServletResponse. - */ - public fun responseBufferSize(responseBufferSize: Int) { - it.property("responseBufferSize", responseBufferSize.toString()) - } - - /** - * Name of the servlet to use - */ - public fun servletName(servletName: String) { - it.property("servletName", servletName) - } - - /** - * Whether to automatic bind multipart/form-data as attachments on the Camel Exchange. The options - * attachmentMultipartBinding=true and disableStreamCache=false cannot work together. Remove - * disableStreamCache to use AttachmentMultipartBinding. This is turn off by default as this may - * require servlet specific configuration to enable this when using Servlet's. - */ - public fun attachmentMultipartBinding(attachmentMultipartBinding: String) { - it.property("attachmentMultipartBinding", attachmentMultipartBinding) - } - - /** - * Whether to automatic bind multipart/form-data as attachments on the Camel Exchange. The options - * attachmentMultipartBinding=true and disableStreamCache=false cannot work together. Remove - * disableStreamCache to use AttachmentMultipartBinding. This is turn off by default as this may - * require servlet specific configuration to enable this when using Servlet's. - */ - public fun attachmentMultipartBinding(attachmentMultipartBinding: Boolean) { - it.property("attachmentMultipartBinding", attachmentMultipartBinding.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Whether to eager check whether the HTTP requests has content if the content-length header is 0 - * or not present. This can be turned on in case HTTP clients do not send streamed data. - */ - public fun eagerCheckContentAvailable(eagerCheckContentAvailable: String) { - it.property("eagerCheckContentAvailable", eagerCheckContentAvailable) - } - - /** - * Whether to eager check whether the HTTP requests has content if the content-length header is 0 - * or not present. This can be turned on in case HTTP clients do not send streamed data. - */ - public fun eagerCheckContentAvailable(eagerCheckContentAvailable: Boolean) { - it.property("eagerCheckContentAvailable", eagerCheckContentAvailable.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Whitelist of accepted filename extensions for accepting uploaded files. Multiple extensions can - * be separated by comma, such as txt,xml. - */ - public fun fileNameExtWhitelist(fileNameExtWhitelist: String) { - it.property("fileNameExtWhitelist", fileNameExtWhitelist) - } - - /** - * If this option is true then IN exchange Body of the exchange will be mapped to HTTP body. - * Setting this to false will avoid the HTTP mapping. - */ - public fun mapHttpMessageBody(mapHttpMessageBody: String) { - it.property("mapHttpMessageBody", mapHttpMessageBody) - } - - /** - * If this option is true then IN exchange Body of the exchange will be mapped to HTTP body. - * Setting this to false will avoid the HTTP mapping. - */ - public fun mapHttpMessageBody(mapHttpMessageBody: Boolean) { - it.property("mapHttpMessageBody", mapHttpMessageBody.toString()) - } - - /** - * If this option is true then IN exchange Form Encoded body of the exchange will be mapped to - * HTTP. Setting this to false will avoid the HTTP Form Encoded body mapping. - */ - public fun mapHttpMessageFormUrlEncodedBody(mapHttpMessageFormUrlEncodedBody: String) { - it.property("mapHttpMessageFormUrlEncodedBody", mapHttpMessageFormUrlEncodedBody) - } - - /** - * If this option is true then IN exchange Form Encoded body of the exchange will be mapped to - * HTTP. Setting this to false will avoid the HTTP Form Encoded body mapping. - */ - public fun mapHttpMessageFormUrlEncodedBody(mapHttpMessageFormUrlEncodedBody: Boolean) { - it.property("mapHttpMessageFormUrlEncodedBody", mapHttpMessageFormUrlEncodedBody.toString()) - } - - /** - * If this option is true then IN exchange Headers of the exchange will be mapped to HTTP headers. - * Setting this to false will avoid the HTTP Headers mapping. - */ - public fun mapHttpMessageHeaders(mapHttpMessageHeaders: String) { - it.property("mapHttpMessageHeaders", mapHttpMessageHeaders) - } - - /** - * If this option is true then IN exchange Headers of the exchange will be mapped to HTTP headers. - * Setting this to false will avoid the HTTP Headers mapping. - */ - public fun mapHttpMessageHeaders(mapHttpMessageHeaders: Boolean) { - it.property("mapHttpMessageHeaders", mapHttpMessageHeaders.toString()) - } - - /** - * Specifies whether to enable HTTP OPTIONS for this Servlet consumer. By default OPTIONS is - * turned off. - */ - public fun optionsEnabled(optionsEnabled: String) { - it.property("optionsEnabled", optionsEnabled) - } - - /** - * Specifies whether to enable HTTP OPTIONS for this Servlet consumer. By default OPTIONS is - * turned off. - */ - public fun optionsEnabled(optionsEnabled: Boolean) { - it.property("optionsEnabled", optionsEnabled.toString()) - } - - /** - * Specifies whether to enable HTTP TRACE for this Servlet consumer. By default TRACE is turned - * off. - */ - public fun traceEnabled(traceEnabled: String) { - it.property("traceEnabled", traceEnabled) - } - - /** - * Specifies whether to enable HTTP TRACE for this Servlet consumer. By default TRACE is turned - * off. - */ - public fun traceEnabled(traceEnabled: Boolean) { - it.property("traceEnabled", traceEnabled.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SftpUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SftpUriDsl.kt deleted file mode 100644 index 5eab644a71dbf..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SftpUriDsl.kt +++ /dev/null @@ -1,1872 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Upload and download files to/from SFTP servers. - */ -public fun UriDsl.sftp(i: SftpUriDsl.() -> Unit) { - SftpUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SftpUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("sftp") - } - - private var host: String = "" - - private var port: String = "" - - private var directoryName: String = "" - - /** - * Hostname of the FTP server - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port/$directoryName") - } - - /** - * Port of the FTP server - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port/$directoryName") - } - - /** - * Port of the FTP server - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port/$directoryName") - } - - /** - * The starting directory - */ - public fun directoryName(directoryName: String) { - this.directoryName = directoryName - it.url("$host:$port/$directoryName") - } - - /** - * Specifies the file transfer mode, BINARY or ASCII. Default is ASCII (false). - */ - public fun binary(binary: String) { - it.property("binary", binary) - } - - /** - * Specifies the file transfer mode, BINARY or ASCII. Default is ASCII (false). - */ - public fun binary(binary: Boolean) { - it.property("binary", binary.toString()) - } - - /** - * This option is used to specify the encoding of the file. You can use this on the consumer, to - * specify the encodings of the files, which allow Camel to know the charset it should load the file - * content in case the file content is being accessed. Likewise when writing a file, you can use this - * option to specify which charset to write the file as well. Do mind that when writing the file - * Camel may have to read the message content into memory to be able to convert the data into the - * configured charset, so do not use this if you have big messages. - */ - public fun charset(charset: String) { - it.property("charset", charset) - } - - /** - * Whether or not to disconnect from remote FTP server right after use. Disconnect will only - * disconnect the current connection to the FTP server. If you have a consumer which you want to - * stop, then you need to stop the consumer/route instead. - */ - public fun disconnect(disconnect: String) { - it.property("disconnect", disconnect) - } - - /** - * Whether or not to disconnect from remote FTP server right after use. Disconnect will only - * disconnect the current connection to the FTP server. If you have a consumer which you want to - * stop, then you need to stop the consumer/route instead. - */ - public fun disconnect(disconnect: Boolean) { - it.property("disconnect", disconnect.toString()) - } - - /** - * Producer: If provided, then Camel will write a 2nd done file when the original file has been - * written. The done file will be empty. This option configures what file name to use. Either you can - * specify a fixed name. Or you can use dynamic placeholders. The done file will always be written in - * the same folder as the original file. Consumer: If provided, Camel will only consume files if a - * done file exists. This option configures what file name to use. Either you can specify a fixed - * name. Or you can use dynamic placeholders.The done file is always expected in the same folder as - * the original file. Only ${file.name} and ${file.name.next} is supported as dynamic placeholders. - */ - public fun doneFileName(doneFileName: String) { - it.property("doneFileName", doneFileName) - } - - /** - * Use Expression such as File Language to dynamically set the filename. For consumers, it's used - * as a filename filter. For producers, it's used to evaluate the filename to write. If an expression - * is set, it take precedence over the CamelFileName header. (Note: The header itself can also be an - * Expression). The expression options support both String and Expression types. If the expression is - * a String type, it is always evaluated using the File Language. If the expression is an Expression - * type, the specified Expression type is used - this allows you, for instance, to use OGNL - * expressions. For the consumer, you can use it to filter filenames, so you can for instance consume - * today's file using the File Language syntax: mydata-${date:now:yyyyMMdd}.txt. The producers - * support the CamelOverruleFileName header which takes precedence over any existing CamelFileName - * header; the CamelOverruleFileName is a header that is used only once, and makes it easier as this - * avoids to temporary store CamelFileName and have to restore it afterwards. - */ - public fun fileName(fileName: String) { - it.property("fileName", fileName) - } - - /** - * The logging level to use for JSCH activity logging. As JSCH is verbose at by default at INFO - * level the threshold is WARN by default. - */ - public fun jschLoggingLevel(jschLoggingLevel: String) { - it.property("jschLoggingLevel", jschLoggingLevel) - } - - /** - * Sets passive mode connections. Default is active mode connections. - */ - public fun passiveMode(passiveMode: String) { - it.property("passiveMode", passiveMode) - } - - /** - * Sets passive mode connections. Default is active mode connections. - */ - public fun passiveMode(passiveMode: Boolean) { - it.property("passiveMode", passiveMode.toString()) - } - - /** - * Sets the path separator to be used. UNIX = Uses unix style path separator Windows = Uses - * windows style path separator Auto = (is default) Use existing path separator in file name - */ - public fun separator(separator: String) { - it.property("separator", separator) - } - - /** - * If set this option to be true, camel-ftp will use the list file directly to check if the file - * exists. Since some FTP server may not support to list the file directly, if the option is false, - * camel-ftp will use the old way to list the directory and check if the file exists. This option - * also influences readLock=changed to control whether it performs a fast check to update file - * information or not. This can be used to speed up the process if the FTP server has a lot of files. - */ - public fun fastExistsCheck(fastExistsCheck: String) { - it.property("fastExistsCheck", fastExistsCheck) - } - - /** - * If set this option to be true, camel-ftp will use the list file directly to check if the file - * exists. Since some FTP server may not support to list the file directly, if the option is false, - * camel-ftp will use the old way to list the directory and check if the file exists. This option - * also influences readLock=changed to control whether it performs a fast check to update file - * information or not. This can be used to speed up the process if the FTP server has a lot of files. - */ - public fun fastExistsCheck(fastExistsCheck: Boolean) { - it.property("fastExistsCheck", fastExistsCheck.toString()) - } - - /** - * If true, the file will be deleted after it is processed successfully. - */ - public fun delete(delete: String) { - it.property("delete", delete) - } - - /** - * If true, the file will be deleted after it is processed successfully. - */ - public fun delete(delete: Boolean) { - it.property("delete", delete.toString()) - } - - /** - * Sets the move failure expression based on Simple language. For example, to move files into a - * .error subdirectory use: .error. Note: When moving the files to the fail location Camel will - * handle the error and will not pick up the file again. - */ - public fun moveFailed(moveFailed: String) { - it.property("moveFailed", moveFailed) - } - - /** - * If true, the file is not moved or deleted in any way. This option is good for readonly data, or - * for ETL type requirements. If noop=true, Camel will set idempotent=true as well, to avoid - * consuming the same files over and over again. - */ - public fun noop(noop: String) { - it.property("noop", noop) - } - - /** - * If true, the file is not moved or deleted in any way. This option is good for readonly data, or - * for ETL type requirements. If noop=true, Camel will set idempotent=true as well, to avoid - * consuming the same files over and over again. - */ - public fun noop(noop: Boolean) { - it.property("noop", noop.toString()) - } - - /** - * Expression (such as File Language) used to dynamically set the filename when moving it before - * processing. For example to move in-progress files into the order directory set this value to - * order. - */ - public fun preMove(preMove: String) { - it.property("preMove", preMove) - } - - /** - * When pre-sort is enabled then the consumer will sort the file and directory names during - * polling, that was retrieved from the file system. You may want to do this in case you need to - * operate on the files in a sorted order. The pre-sort is executed before the consumer starts to - * filter, and accept files to process by Camel. This option is default=false meaning disabled. - */ - public fun preSort(preSort: String) { - it.property("preSort", preSort) - } - - /** - * When pre-sort is enabled then the consumer will sort the file and directory names during - * polling, that was retrieved from the file system. You may want to do this in case you need to - * operate on the files in a sorted order. The pre-sort is executed before the consumer starts to - * filter, and accept files to process by Camel. This option is default=false meaning disabled. - */ - public fun preSort(preSort: Boolean) { - it.property("preSort", preSort.toString()) - } - - /** - * If a directory, will look for files in all the sub-directories as well. - */ - public fun recursive(recursive: String) { - it.property("recursive", recursive) - } - - /** - * If a directory, will look for files in all the sub-directories as well. - */ - public fun recursive(recursive: Boolean) { - it.property("recursive", recursive.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Sets the download method to use when not using a local working directory. If set to true, the - * remote files are streamed to the route as they are read. When set to false, the remote files are - * loaded into memory before being sent into the route. If enabling this option then you must set - * stepwise=false as both cannot be enabled at the same time. - */ - public fun streamDownload(streamDownload: String) { - it.property("streamDownload", streamDownload) - } - - /** - * Sets the download method to use when not using a local working directory. If set to true, the - * remote files are streamed to the route as they are read. When set to false, the remote files are - * loaded into memory before being sent into the route. If enabling this option then you must set - * stepwise=false as both cannot be enabled at the same time. - */ - public fun streamDownload(streamDownload: Boolean) { - it.property("streamDownload", streamDownload.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Whether the FTP consumer should download the file. If this option is set to false, then the - * message body will be null, but the consumer will still trigger a Camel Exchange that has details - * about the file such as file name, file size, etc. It's just that the file will not be downloaded. - */ - public fun download(download: String) { - it.property("download", download) - } - - /** - * Whether the FTP consumer should download the file. If this option is set to false, then the - * message body will be null, but the consumer will still trigger a Camel Exchange that has details - * about the file such as file name, file size, etc. It's just that the file will not be downloaded. - */ - public fun download(download: Boolean) { - it.property("download", download.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Whether to ignore when (trying to list files in directories or when downloading a file), which - * does not exist or due to permission error. By default when a directory or file does not exist or - * insufficient permission, then an exception is thrown. Setting this option to true allows to ignore - * that instead. - */ - public fun ignoreFileNotFoundOrPermissionError(ignoreFileNotFoundOrPermissionError: String) { - it.property("ignoreFileNotFoundOrPermissionError", ignoreFileNotFoundOrPermissionError) - } - - /** - * Whether to ignore when (trying to list files in directories or when downloading a file), which - * does not exist or due to permission error. By default when a directory or file does not exist or - * insufficient permission, then an exception is thrown. Setting this option to true allows to ignore - * that instead. - */ - public fun ignoreFileNotFoundOrPermissionError(ignoreFileNotFoundOrPermissionError: Boolean) { - it.property("ignoreFileNotFoundOrPermissionError", - ignoreFileNotFoundOrPermissionError.toString()) - } - - /** - * A pluggable in-progress repository org.apache.camel.spi.IdempotentRepository. The in-progress - * repository is used to account the current in progress files being consumed. By default a memory - * based repository is used. - */ - public fun inProgressRepository(inProgressRepository: String) { - it.property("inProgressRepository", inProgressRepository) - } - - /** - * When consuming, a local work directory can be used to store the remote file content directly in - * local files, to avoid loading the content into memory. This is beneficial, if you consume a very - * big remote file and thus can conserve memory. - */ - public fun localWorkDirectory(localWorkDirectory: String) { - it.property("localWorkDirectory", localWorkDirectory) - } - - /** - * To use a custom org.apache.camel.spi.ExceptionHandler to handle any thrown exceptions that - * happens during the file on completion process where the consumer does either a commit or rollback. - * The default implementation will log any exception at WARN level and ignore. - */ - public fun onCompletionExceptionHandler(onCompletionExceptionHandler: String) { - it.property("onCompletionExceptionHandler", onCompletionExceptionHandler) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * A pluggable org.apache.camel.component.file.GenericFileProcessStrategy allowing you to - * implement your own readLock option or similar. Can also be used when special conditions must be - * met before a file can be consumed, such as a special ready file exists. If this option is set then - * the readLock option does not apply. - */ - public fun processStrategy(processStrategy: String) { - it.property("processStrategy", processStrategy) - } - - /** - * Whether to allow using LIST command when downloading a file. Default is true. In some use cases - * you may want to download a specific file and are not allowed to use the LIST command, and - * therefore you can set this option to false. Notice when using this option, then the specific file - * to download does not include meta-data information such as file size, timestamp, permissions etc, - * because those information is only possible to retrieve when LIST command is in use. - */ - public fun useList(useList: String) { - it.property("useList", useList) - } - - /** - * Whether to allow using LIST command when downloading a file. Default is true. In some use cases - * you may want to download a specific file and are not allowed to use the LIST command, and - * therefore you can set this option to false. Notice when using this option, then the specific file - * to download does not include meta-data information such as file size, timestamp, permissions etc, - * because those information is only possible to retrieve when LIST command is in use. - */ - public fun useList(useList: Boolean) { - it.property("useList", useList.toString()) - } - - /** - * If provided, then Camel will write a checksum file when the original file has been written. The - * checksum file will contain the checksum created with the provided algorithm for the original file. - * The checksum file will always be written in the same folder as the original file. - */ - public fun checksumFileAlgorithm(checksumFileAlgorithm: String) { - it.property("checksumFileAlgorithm", checksumFileAlgorithm) - } - - /** - * What to do if a file already exists with the same name. Override, which is the default, - * replaces the existing file. - Append - adds content to the existing file. - Fail - throws a - * GenericFileOperationException, indicating that there is already an existing file. - Ignore - - * silently ignores the problem and does not override the existing file, but assumes everything is - * okay. - Move - option requires to use the moveExisting option to be configured as well. The option - * eagerDeleteTargetFile can be used to control what to do if an moving the file, and there exists - * already an existing file, otherwise causing the move operation to fail. The Move option will move - * any existing files, before writing the target file. - TryRename is only applicable if tempFileName - * option is in use. This allows to try renaming the file from the temporary name to the actual name, - * without doing any exists check. This check may be faster on some file systems and especially FTP - * servers. - */ - public fun fileExist(fileExist: String) { - it.property("fileExist", fileExist) - } - - /** - * Flatten is used to flatten the file name path to strip any leading paths, so it's just the file - * name. This allows you to consume recursively into sub-directories, but when you eg write the files - * to another directory they will be written in a single directory. Setting this to true on the - * producer enforces that any file name in CamelFileName header will be stripped for any leading - * paths. - */ - public fun flatten(flatten: String) { - it.property("flatten", flatten) - } - - /** - * Flatten is used to flatten the file name path to strip any leading paths, so it's just the file - * name. This allows you to consume recursively into sub-directories, but when you eg write the files - * to another directory they will be written in a single directory. Setting this to true on the - * producer enforces that any file name in CamelFileName header will be stripped for any leading - * paths. - */ - public fun flatten(flatten: Boolean) { - it.property("flatten", flatten.toString()) - } - - /** - * Used for jailing (restricting) writing files to the starting directory (and sub) only. This is - * enabled by default to not allow Camel to write files to outside directories (to be more secured - * out of the box). You can turn this off to allow writing files to directories outside the starting - * directory, such as parent or root folders. - */ - public fun jailStartingDirectory(jailStartingDirectory: String) { - it.property("jailStartingDirectory", jailStartingDirectory) - } - - /** - * Used for jailing (restricting) writing files to the starting directory (and sub) only. This is - * enabled by default to not allow Camel to write files to outside directories (to be more secured - * out of the box). You can turn this off to allow writing files to directories outside the starting - * directory, such as parent or root folders. - */ - public fun jailStartingDirectory(jailStartingDirectory: Boolean) { - it.property("jailStartingDirectory", jailStartingDirectory.toString()) - } - - /** - * Expression (such as File Language) used to compute file name to use when fileExist=Move is - * configured. To move files into a backup subdirectory just enter backup. This option only supports - * the following File Language tokens: file:name, file:name.ext, file:name.noext, file:onlyname, - * file:onlyname.noext, file:ext, and file:parent. Notice the file:parent is not supported by the FTP - * component, as the FTP component can only move any existing files to a relative directory based on - * current dir as base. - */ - public fun moveExisting(moveExisting: String) { - it.property("moveExisting", moveExisting) - } - - /** - * The same as tempPrefix option but offering a more fine grained control on the naming of the - * temporary filename as it uses the File Language. The location for tempFilename is relative to the - * final file location in the option 'fileName', not the target directory in the base uri. For - * example if option fileName includes a directory prefix: dir/finalFilename then tempFileName is - * relative to that subdirectory dir. - */ - public fun tempFileName(tempFileName: String) { - it.property("tempFileName", tempFileName) - } - - /** - * This option is used to write the file using a temporary name and then, after the write is - * complete, rename it to the real name. Can be used to identify files being written and also avoid - * consumers (not using exclusive read locks) reading in progress files. Is often used by FTP when - * uploading big files. - */ - public fun tempPrefix(tempPrefix: String) { - it.property("tempPrefix", tempPrefix) - } - - /** - * Used to specify if a null body is allowed during file writing. If set to true then an empty - * file will be created, when set to false, and attempting to send a null body to the file component, - * a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist - * option is set to 'Override', then the file will be truncated, and if set to append the file will - * remain unchanged. - */ - public fun allowNullBody(allowNullBody: String) { - it.property("allowNullBody", allowNullBody) - } - - /** - * Used to specify if a null body is allowed during file writing. If set to true then an empty - * file will be created, when set to false, and attempting to send a null body to the file component, - * a GenericFileWriteException of 'Cannot write null body to file.' will be thrown. If the fileExist - * option is set to 'Override', then the file will be truncated, and if set to append the file will - * remain unchanged. - */ - public fun allowNullBody(allowNullBody: Boolean) { - it.property("allowNullBody", allowNullBody.toString()) - } - - /** - * Allows you to set chmod on the stored file. For example chmod=640. - */ - public fun chmod(chmod: String) { - it.property("chmod", chmod) - } - - /** - * Allows you to set chmod during path creation. For example chmod=640. - */ - public fun chmodDirectory(chmodDirectory: String) { - it.property("chmodDirectory", chmodDirectory) - } - - /** - * Whether or not to disconnect from remote FTP server right after a Batch upload is complete. - * disconnectOnBatchComplete will only disconnect the current connection to the FTP server. - */ - public fun disconnectOnBatchComplete(disconnectOnBatchComplete: String) { - it.property("disconnectOnBatchComplete", disconnectOnBatchComplete) - } - - /** - * Whether or not to disconnect from remote FTP server right after a Batch upload is complete. - * disconnectOnBatchComplete will only disconnect the current connection to the FTP server. - */ - public fun disconnectOnBatchComplete(disconnectOnBatchComplete: Boolean) { - it.property("disconnectOnBatchComplete", disconnectOnBatchComplete.toString()) - } - - /** - * Whether or not to eagerly delete any existing target file. This option only applies when you - * use fileExists=Override and the tempFileName option as well. You can use this to disable (set it - * to false) deleting the target file before the temp file is written. For example you may write big - * files and want the target file to exists during the temp file is being written. This ensure the - * target file is only deleted until the very last moment, just before the temp file is being renamed - * to the target filename. This option is also used to control whether to delete any existing files - * when fileExist=Move is enabled, and an existing file exists. If this option - * copyAndDeleteOnRenameFails false, then an exception will be thrown if an existing file existed, if - * its true, then the existing file is deleted before the move operation. - */ - public fun eagerDeleteTargetFile(eagerDeleteTargetFile: String) { - it.property("eagerDeleteTargetFile", eagerDeleteTargetFile) - } - - /** - * Whether or not to eagerly delete any existing target file. This option only applies when you - * use fileExists=Override and the tempFileName option as well. You can use this to disable (set it - * to false) deleting the target file before the temp file is written. For example you may write big - * files and want the target file to exists during the temp file is being written. This ensure the - * target file is only deleted until the very last moment, just before the temp file is being renamed - * to the target filename. This option is also used to control whether to delete any existing files - * when fileExist=Move is enabled, and an existing file exists. If this option - * copyAndDeleteOnRenameFails false, then an exception will be thrown if an existing file existed, if - * its true, then the existing file is deleted before the move operation. - */ - public fun eagerDeleteTargetFile(eagerDeleteTargetFile: Boolean) { - it.property("eagerDeleteTargetFile", eagerDeleteTargetFile.toString()) - } - - /** - * Will keep the last modified timestamp from the source file (if any). Will use the - * FileConstants.FILE_LAST_MODIFIED header to located the timestamp. This header can contain either a - * java.util.Date or long with the timestamp. If the timestamp exists and the option is enabled it - * will set this timestamp on the written file. Note: This option only applies to the file producer. - * You cannot use this option with any of the ftp producers. - */ - public fun keepLastModified(keepLastModified: String) { - it.property("keepLastModified", keepLastModified) - } - - /** - * Will keep the last modified timestamp from the source file (if any). Will use the - * FileConstants.FILE_LAST_MODIFIED header to located the timestamp. This header can contain either a - * java.util.Date or long with the timestamp. If the timestamp exists and the option is enabled it - * will set this timestamp on the written file. Note: This option only applies to the file producer. - * You cannot use this option with any of the ftp producers. - */ - public fun keepLastModified(keepLastModified: Boolean) { - it.property("keepLastModified", keepLastModified.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Strategy (Custom Strategy) used to move file with special naming token to use when - * fileExist=Move is configured. By default, there is an implementation used if no custom strategy is - * provided - */ - public fun moveExistingFileStrategy(moveExistingFileStrategy: String) { - it.property("moveExistingFileStrategy", moveExistingFileStrategy) - } - - /** - * Whether to send a noop command as a pre-write check before uploading files to the FTP server. - * This is enabled by default as a validation of the connection is still valid, which allows to - * silently re-connect to be able to upload the file. However if this causes problems, you can turn - * this option off. - */ - public fun sendNoop(sendNoop: String) { - it.property("sendNoop", sendNoop) - } - - /** - * Whether to send a noop command as a pre-write check before uploading files to the FTP server. - * This is enabled by default as a validation of the connection is still valid, which allows to - * silently re-connect to be able to upload the file. However if this causes problems, you can turn - * this option off. - */ - public fun sendNoop(sendNoop: Boolean) { - it.property("sendNoop", sendNoop.toString()) - } - - /** - * Automatically create missing directories in the file's pathname. For the file consumer, that - * means creating the starting directory. For the file producer, it means the directory the files - * should be written to. - */ - public fun autoCreate(autoCreate: String) { - it.property("autoCreate", autoCreate) - } - - /** - * Automatically create missing directories in the file's pathname. For the file consumer, that - * means creating the starting directory. For the file producer, it means the directory the files - * should be written to. - */ - public fun autoCreate(autoCreate: Boolean) { - it.property("autoCreate", autoCreate.toString()) - } - - /** - * Specifies the address of the local interface against which the connection should bind. - */ - public fun bindAddress(bindAddress: String) { - it.property("bindAddress", bindAddress) - } - - /** - * Specifies how many requests may be outstanding at any one time. Increasing this value may - * slightly improve file transfer speed but will increase memory usage. - */ - public fun bulkRequests(bulkRequests: String) { - it.property("bulkRequests", bulkRequests) - } - - /** - * Specifies how many requests may be outstanding at any one time. Increasing this value may - * slightly improve file transfer speed but will increase memory usage. - */ - public fun bulkRequests(bulkRequests: Int) { - it.property("bulkRequests", bulkRequests.toString()) - } - - /** - * To use compression. Specify a level from 1 to 10. Important: You must manually add the needed - * JSCH zlib JAR to the classpath for compression support. - */ - public fun compression(compression: String) { - it.property("compression", compression) - } - - /** - * To use compression. Specify a level from 1 to 10. Important: You must manually add the needed - * JSCH zlib JAR to the classpath for compression support. - */ - public fun compression(compression: Int) { - it.property("compression", compression.toString()) - } - - /** - * Sets the connect timeout for waiting for a connection to be established Used by both FTPClient - * and JSCH - */ - public fun connectTimeout(connectTimeout: String) { - it.property("connectTimeout", connectTimeout) - } - - /** - * Whether to check for existing directory using LS command or CD. By default LS is used which is - * safer as otherwise Camel needs to change the directory back after checking. However LS has been - * reported to cause a problem on windows system in some situations and therefore you can disable - * this option to use CD. - */ - public fun existDirCheckUsingLs(existDirCheckUsingLs: String) { - it.property("existDirCheckUsingLs", existDirCheckUsingLs) - } - - /** - * Whether to check for existing directory using LS command or CD. By default LS is used which is - * safer as otherwise Camel needs to change the directory back after checking. However LS has been - * reported to cause a problem on windows system in some situations and therefore you can disable - * this option to use CD. - */ - public fun existDirCheckUsingLs(existDirCheckUsingLs: Boolean) { - it.property("existDirCheckUsingLs", existDirCheckUsingLs.toString()) - } - - /** - * Encoding to use for FTP client when parsing filenames. By default, UTF-8 is used. - */ - public fun filenameEncoding(filenameEncoding: String) { - it.property("filenameEncoding", filenameEncoding) - } - - /** - * Specifies the maximum reconnect attempts Camel performs when it tries to connect to the remote - * FTP server. Use 0 to disable this behavior. - */ - public fun maximumReconnectAttempts(maximumReconnectAttempts: String) { - it.property("maximumReconnectAttempts", maximumReconnectAttempts) - } - - /** - * Specifies the maximum reconnect attempts Camel performs when it tries to connect to the remote - * FTP server. Use 0 to disable this behavior. - */ - public fun maximumReconnectAttempts(maximumReconnectAttempts: Int) { - it.property("maximumReconnectAttempts", maximumReconnectAttempts.toString()) - } - - /** - * To use a custom configured com.jcraft.jsch.Proxy. This proxy is used to consume/send messages - * from the target SFTP host. - */ - public fun proxy(proxy: String) { - it.property("proxy", proxy) - } - - /** - * Delay in millis Camel will wait before performing a reconnect attempt. - */ - public fun reconnectDelay(reconnectDelay: String) { - it.property("reconnectDelay", reconnectDelay) - } - - /** - * Sets the number of keep-alive messages which may be sent without receiving any messages back - * from the server. If this threshold is reached while keep-alive messages are being sent, the - * connection will be disconnected. The default value is one. - */ - public fun serverAliveCountMax(serverAliveCountMax: String) { - it.property("serverAliveCountMax", serverAliveCountMax) - } - - /** - * Sets the number of keep-alive messages which may be sent without receiving any messages back - * from the server. If this threshold is reached while keep-alive messages are being sent, the - * connection will be disconnected. The default value is one. - */ - public fun serverAliveCountMax(serverAliveCountMax: Int) { - it.property("serverAliveCountMax", serverAliveCountMax.toString()) - } - - /** - * Sets the interval (millis) to send a keep-alive message. If zero is specified, any keep-alive - * message must not be sent. The default interval is zero. - */ - public fun serverAliveInterval(serverAliveInterval: String) { - it.property("serverAliveInterval", serverAliveInterval) - } - - /** - * Sets the interval (millis) to send a keep-alive message. If zero is specified, any keep-alive - * message must not be sent. The default interval is zero. - */ - public fun serverAliveInterval(serverAliveInterval: Int) { - it.property("serverAliveInterval", serverAliveInterval.toString()) - } - - /** - * The logging level used for various human intended log messages from the FTP server. This can be - * used during troubleshooting to raise the logging level and inspect the logs received from the FTP - * server. - */ - public fun serverMessageLoggingLevel(serverMessageLoggingLevel: String) { - it.property("serverMessageLoggingLevel", serverMessageLoggingLevel) - } - - /** - * Sets the so timeout FTP and FTPS Is the SocketOptions.SO_TIMEOUT value in millis. Recommended - * option is to set this to 300000 so as not have a hanged connection. On SFTP this option is set as - * timeout on the JSCH Session instance. - */ - public fun soTimeout(soTimeout: String) { - it.property("soTimeout", soTimeout) - } - - /** - * Sets whether we should stepwise change directories while traversing file structures when - * downloading files, or as well when uploading a file to a directory. You can disable this if you - * for example are in a situation where you cannot change directory on the FTP server due security - * reasons. Stepwise cannot be used together with streamDownload. - */ - public fun stepwise(stepwise: String) { - it.property("stepwise", stepwise) - } - - /** - * Sets whether we should stepwise change directories while traversing file structures when - * downloading files, or as well when uploading a file to a directory. You can disable this if you - * for example are in a situation where you cannot change directory on the FTP server due security - * reasons. Stepwise cannot be used together with streamDownload. - */ - public fun stepwise(stepwise: Boolean) { - it.property("stepwise", stepwise.toString()) - } - - /** - * Should an exception be thrown if connection failed (exhausted)By default exception is not - * thrown and a WARN is logged. You can use this to enable exception being thrown and handle the - * thrown exception from the org.apache.camel.spi.PollingConsumerPollStrategy rollback method. - */ - public fun throwExceptionOnConnectFailed(throwExceptionOnConnectFailed: String) { - it.property("throwExceptionOnConnectFailed", throwExceptionOnConnectFailed) - } - - /** - * Should an exception be thrown if connection failed (exhausted)By default exception is not - * thrown and a WARN is logged. You can use this to enable exception being thrown and handle the - * thrown exception from the org.apache.camel.spi.PollingConsumerPollStrategy rollback method. - */ - public fun throwExceptionOnConnectFailed(throwExceptionOnConnectFailed: Boolean) { - it.property("throwExceptionOnConnectFailed", throwExceptionOnConnectFailed.toString()) - } - - /** - * Sets the data timeout for waiting for reply Used only by FTPClient - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Ant style filter exclusion. If both antInclude and antExclude are used, antExclude takes - * precedence over antInclude. Multiple exclusions may be specified in comma-delimited format. - */ - public fun antExclude(antExclude: String) { - it.property("antExclude", antExclude) - } - - /** - * Sets case sensitive flag on ant filter. - */ - public fun antFilterCaseSensitive(antFilterCaseSensitive: String) { - it.property("antFilterCaseSensitive", antFilterCaseSensitive) - } - - /** - * Sets case sensitive flag on ant filter. - */ - public fun antFilterCaseSensitive(antFilterCaseSensitive: Boolean) { - it.property("antFilterCaseSensitive", antFilterCaseSensitive.toString()) - } - - /** - * Ant style filter inclusion. Multiple inclusions may be specified in comma-delimited format. - */ - public fun antInclude(antInclude: String) { - it.property("antInclude", antInclude) - } - - /** - * Allows for controlling whether the limit from maxMessagesPerPoll is eager or not. If eager then - * the limit is during the scanning of files. Where as false would scan all files, and then perform - * sorting. Setting this option to false allows for sorting all files first, and then limit the poll. - * Mind that this requires a higher memory usage as all file details are in memory to perform the - * sorting. - */ - public fun eagerMaxMessagesPerPoll(eagerMaxMessagesPerPoll: String) { - it.property("eagerMaxMessagesPerPoll", eagerMaxMessagesPerPoll) - } - - /** - * Allows for controlling whether the limit from maxMessagesPerPoll is eager or not. If eager then - * the limit is during the scanning of files. Where as false would scan all files, and then perform - * sorting. Setting this option to false allows for sorting all files first, and then limit the poll. - * Mind that this requires a higher memory usage as all file details are in memory to perform the - * sorting. - */ - public fun eagerMaxMessagesPerPoll(eagerMaxMessagesPerPoll: Boolean) { - it.property("eagerMaxMessagesPerPoll", eagerMaxMessagesPerPoll.toString()) - } - - /** - * Is used to exclude files, if filename matches the regex pattern (matching is case - * in-sensitive). Notice if you use symbols such as plus sign and others you would need to configure - * this using the RAW() syntax if configuring this as an endpoint uri. See more details at - * configuring endpoint uris - */ - public fun exclude(exclude: String) { - it.property("exclude", exclude) - } - - /** - * Is used to exclude files matching file extension name (case insensitive). For example to - * exclude bak files, then use excludeExt=bak. Multiple extensions can be separated by comma, for - * example to exclude bak and dat files, use excludeExt=bak,dat. Note that the file extension - * includes all parts, for example having a file named mydata.tar.gz will have extension as tar.gz. - * For more flexibility then use the include/exclude options. - */ - public fun excludeExt(excludeExt: String) { - it.property("excludeExt", excludeExt) - } - - /** - * Pluggable filter as a org.apache.camel.component.file.GenericFileFilter class. Will skip files - * if filter returns false in its accept() method. - */ - public fun filter(filter: String) { - it.property("filter", filter) - } - - /** - * Filters the directory based on Simple language. For example to filter on current date, you can - * use a simple date pattern such as ${date:now:yyyMMdd} - */ - public fun filterDirectory(filterDirectory: String) { - it.property("filterDirectory", filterDirectory) - } - - /** - * Filters the file based on Simple language. For example to filter on file size, you can use - * ${file:size} 5000 - */ - public fun filterFile(filterFile: String) { - it.property("filterFile", filterFile) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotent(idempotent: String) { - it.property("idempotent", idempotent) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotent(idempotent: Boolean) { - it.property("idempotent", idempotent.toString()) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotentEager(idempotentEager: String) { - it.property("idempotentEager", idempotentEager) - } - - /** - * Option to use the Idempotent Consumer EIP pattern to let Camel skip already processed files. - * Will by default use a memory based LRUCache that holds 1000 entries. If noop=true then idempotent - * will be enabled as well to avoid consuming the same files over and over again. - */ - public fun idempotentEager(idempotentEager: Boolean) { - it.property("idempotentEager", idempotentEager.toString()) - } - - /** - * To use a custom idempotent key. By default the absolute path of the file is used. You can use - * the File Language, for example to use the file name and file size, you can do: - * idempotentKey=${file:name}-${file:size} - */ - public fun idempotentKey(idempotentKey: String) { - it.property("idempotentKey", idempotentKey) - } - - /** - * A pluggable repository org.apache.camel.spi.IdempotentRepository which by default use - * MemoryIdempotentRepository if none is specified and idempotent is true. - */ - public fun idempotentRepository(idempotentRepository: String) { - it.property("idempotentRepository", idempotentRepository) - } - - /** - * Is used to include files, if filename matches the regex pattern (matching is case - * in-sensitive). Notice if you use symbols such as plus sign and others you would need to configure - * this using the RAW() syntax if configuring this as an endpoint uri. See more details at - * configuring endpoint uris - */ - public fun include(include: String) { - it.property("include", include) - } - - /** - * Is used to include files matching file extension name (case insensitive). For example to - * include txt files, then use includeExt=txt. Multiple extensions can be separated by comma, for - * example to include txt and xml files, use includeExt=txt,xml. Note that the file extension - * includes all parts, for example having a file named mydata.tar.gz will have extension as tar.gz. - * For more flexibility then use the include/exclude options. - */ - public fun includeExt(includeExt: String) { - it.property("includeExt", includeExt) - } - - /** - * The maximum depth to traverse when recursively processing a directory. - */ - public fun maxDepth(maxDepth: String) { - it.property("maxDepth", maxDepth) - } - - /** - * The maximum depth to traverse when recursively processing a directory. - */ - public fun maxDepth(maxDepth: Int) { - it.property("maxDepth", maxDepth.toString()) - } - - /** - * To define a maximum messages to gather per poll. By default no maximum is set. Can be used to - * set a limit of e.g. 1000 to avoid when starting up the server that there are thousands of files. - * Set a value of 0 or negative to disabled it. Notice: If this option is in use then the File and - * FTP components will limit before any sorting. For example if you have 100000 files and use - * maxMessagesPerPoll=500, then only the first 500 files will be picked up, and then sorted. You can - * use the eagerMaxMessagesPerPoll option and set this to false to allow to scan all files first and - * then sort afterwards. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * To define a maximum messages to gather per poll. By default no maximum is set. Can be used to - * set a limit of e.g. 1000 to avoid when starting up the server that there are thousands of files. - * Set a value of 0 or negative to disabled it. Notice: If this option is in use then the File and - * FTP components will limit before any sorting. For example if you have 100000 files and use - * maxMessagesPerPoll=500, then only the first 500 files will be picked up, and then sorted. You can - * use the eagerMaxMessagesPerPoll option and set this to false to allow to scan all files first and - * then sort afterwards. - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * The minimum depth to start processing when recursively processing a directory. Using minDepth=1 - * means the base directory. Using minDepth=2 means the first sub directory. - */ - public fun minDepth(minDepth: String) { - it.property("minDepth", minDepth) - } - - /** - * The minimum depth to start processing when recursively processing a directory. Using minDepth=1 - * means the base directory. Using minDepth=2 means the first sub directory. - */ - public fun minDepth(minDepth: Int) { - it.property("minDepth", minDepth.toString()) - } - - /** - * Expression (such as Simple Language) used to dynamically set the filename when moving it after - * processing. To move files into a .done subdirectory just enter .done. - */ - public fun move(move: String) { - it.property("move", move) - } - - /** - * Pluggable read-lock as a org.apache.camel.component.file.GenericFileExclusiveReadLockStrategy - * implementation. - */ - public fun exclusiveReadLockStrategy(exclusiveReadLockStrategy: String) { - it.property("exclusiveReadLockStrategy", exclusiveReadLockStrategy) - } - - /** - * Used by consumer, to only poll the files if it has exclusive read-lock on the file (i.e. the - * file is not in-progress or being written). Camel will wait until the file lock is granted. This - * option provides the build in strategies: - none - No read lock is in use - markerFile - Camel - * creates a marker file (fileName.camelLock) and then holds a lock on it. This option is not - * available for the FTP component - changed - Changed is using file length/modification timestamp to - * detect whether the file is currently being copied or not. Will at least use 1 sec to determine - * this, so this option cannot consume files as fast as the others, but can be more reliable as the - * JDK IO API cannot always determine whether a file is currently being used by another process. The - * option readLockCheckInterval can be used to set the check frequency. - fileLock - is for using - * java.nio.channels.FileLock. This option is not avail for Windows OS and the FTP component. This - * approach should be avoided when accessing a remote file system via a mount/share unless that file - * system supports distributed file locks. - rename - rename is for using a try to rename the file as - * a test if we can get exclusive read-lock. - idempotent - (only for file component) idempotent is - * for using a idempotentRepository as the read-lock. This allows to use read locks that supports - * clustering if the idempotent repository implementation supports that. - idempotent-changed - (only - * for file component) idempotent-changed is for using a idempotentRepository and changed as the - * combined read-lock. This allows to use read locks that supports clustering if the idempotent - * repository implementation supports that. - idempotent-rename - (only for file component) - * idempotent-rename is for using a idempotentRepository and rename as the combined read-lock. This - * allows to use read locks that supports clustering if the idempotent repository implementation - * supports that.Notice: The various read locks is not all suited to work in clustered mode, where - * concurrent consumers on different nodes is competing for the same files on a shared file system. - * The markerFile using a close to atomic operation to create the empty marker file, but its not - * guaranteed to work in a cluster. The fileLock may work better but then the file system need to - * support distributed file locks, and so on. Using the idempotent read lock can support clustering - * if the idempotent repository supports clustering, such as Hazelcast Component or Infinispan. - */ - public fun readLock(readLock: String) { - it.property("readLock", readLock) - } - - /** - * Interval in millis for the read-lock, if supported by the read lock. This interval is used for - * sleeping between attempts to acquire the read lock. For example when using the changed read lock, - * you can set a higher interval period to cater for slow writes. The default of 1 sec. may be too - * fast if the producer is very slow writing the file. Notice: For FTP the default - * readLockCheckInterval is 5000. The readLockTimeout value must be higher than - * readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or more times - * higher than the readLockCheckInterval. This is needed to ensure that ample time is allowed for the - * read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockCheckInterval(readLockCheckInterval: String) { - it.property("readLockCheckInterval", readLockCheckInterval) - } - - /** - * Interval in millis for the read-lock, if supported by the read lock. This interval is used for - * sleeping between attempts to acquire the read lock. For example when using the changed read lock, - * you can set a higher interval period to cater for slow writes. The default of 1 sec. may be too - * fast if the producer is very slow writing the file. Notice: For FTP the default - * readLockCheckInterval is 5000. The readLockTimeout value must be higher than - * readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or more times - * higher than the readLockCheckInterval. This is needed to ensure that ample time is allowed for the - * read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockCheckInterval(readLockCheckInterval: Int) { - it.property("readLockCheckInterval", readLockCheckInterval.toString()) - } - - /** - * Whether or not read lock with marker files should upon startup delete any orphan read lock - * files, which may have been left on the file system, if Camel was not properly shutdown (such as a - * JVM crash). If turning this option to false then any orphaned lock file will cause Camel to not - * attempt to pickup that file, this could also be due another node is concurrently reading files - * from the same shared directory. - */ - public fun readLockDeleteOrphanLockFiles(readLockDeleteOrphanLockFiles: String) { - it.property("readLockDeleteOrphanLockFiles", readLockDeleteOrphanLockFiles) - } - - /** - * Whether or not read lock with marker files should upon startup delete any orphan read lock - * files, which may have been left on the file system, if Camel was not properly shutdown (such as a - * JVM crash). If turning this option to false then any orphaned lock file will cause Camel to not - * attempt to pickup that file, this could also be due another node is concurrently reading files - * from the same shared directory. - */ - public fun readLockDeleteOrphanLockFiles(readLockDeleteOrphanLockFiles: Boolean) { - it.property("readLockDeleteOrphanLockFiles", readLockDeleteOrphanLockFiles.toString()) - } - - /** - * Whether the delayed release task should be synchronous or asynchronous. See more details at the - * readLockIdempotentReleaseDelay option. - */ - public fun readLockIdempotentReleaseAsync(readLockIdempotentReleaseAsync: String) { - it.property("readLockIdempotentReleaseAsync", readLockIdempotentReleaseAsync) - } - - /** - * Whether the delayed release task should be synchronous or asynchronous. See more details at the - * readLockIdempotentReleaseDelay option. - */ - public fun readLockIdempotentReleaseAsync(readLockIdempotentReleaseAsync: Boolean) { - it.property("readLockIdempotentReleaseAsync", readLockIdempotentReleaseAsync.toString()) - } - - /** - * The number of threads in the scheduled thread pool when using asynchronous release tasks. Using - * a default of 1 core threads should be sufficient in almost all use-cases, only set this to a - * higher value if either updating the idempotent repository is slow, or there are a lot of files to - * process. This option is not in-use if you use a shared thread pool by configuring the - * readLockIdempotentReleaseExecutorService option. See more details at the - * readLockIdempotentReleaseDelay option. - */ - public - fun readLockIdempotentReleaseAsyncPoolSize(readLockIdempotentReleaseAsyncPoolSize: String) { - it.property("readLockIdempotentReleaseAsyncPoolSize", readLockIdempotentReleaseAsyncPoolSize) - } - - /** - * The number of threads in the scheduled thread pool when using asynchronous release tasks. Using - * a default of 1 core threads should be sufficient in almost all use-cases, only set this to a - * higher value if either updating the idempotent repository is slow, or there are a lot of files to - * process. This option is not in-use if you use a shared thread pool by configuring the - * readLockIdempotentReleaseExecutorService option. See more details at the - * readLockIdempotentReleaseDelay option. - */ - public fun readLockIdempotentReleaseAsyncPoolSize(readLockIdempotentReleaseAsyncPoolSize: Int) { - it.property("readLockIdempotentReleaseAsyncPoolSize", - readLockIdempotentReleaseAsyncPoolSize.toString()) - } - - /** - * Whether to delay the release task for a period of millis. This can be used to delay the release - * tasks to expand the window when a file is regarded as read-locked, in an active/active cluster - * scenario with a shared idempotent repository, to ensure other nodes cannot potentially scan and - * acquire the same file, due to race-conditions. By expanding the time-window of the release tasks - * helps prevents these situations. Note delaying is only needed if you have configured - * readLockRemoveOnCommit to true. - */ - public fun readLockIdempotentReleaseDelay(readLockIdempotentReleaseDelay: String) { - it.property("readLockIdempotentReleaseDelay", readLockIdempotentReleaseDelay) - } - - /** - * Whether to delay the release task for a period of millis. This can be used to delay the release - * tasks to expand the window when a file is regarded as read-locked, in an active/active cluster - * scenario with a shared idempotent repository, to ensure other nodes cannot potentially scan and - * acquire the same file, due to race-conditions. By expanding the time-window of the release tasks - * helps prevents these situations. Note delaying is only needed if you have configured - * readLockRemoveOnCommit to true. - */ - public fun readLockIdempotentReleaseDelay(readLockIdempotentReleaseDelay: Int) { - it.property("readLockIdempotentReleaseDelay", readLockIdempotentReleaseDelay.toString()) - } - - /** - * To use a custom and shared thread pool for asynchronous release tasks. See more details at the - * readLockIdempotentReleaseDelay option. - */ - public - fun readLockIdempotentReleaseExecutorService(readLockIdempotentReleaseExecutorService: String) { - it.property("readLockIdempotentReleaseExecutorService", - readLockIdempotentReleaseExecutorService) - } - - /** - * Logging level used when a read lock could not be acquired. By default a DEBUG is logged. You - * can change this level, for example to OFF to not have any logging. This option is only applicable - * for readLock of types: changed, fileLock, idempotent, idempotent-changed, idempotent-rename, - * rename. - */ - public fun readLockLoggingLevel(readLockLoggingLevel: String) { - it.property("readLockLoggingLevel", readLockLoggingLevel) - } - - /** - * Whether to use marker file with the changed, rename, or exclusive read lock types. By default a - * marker file is used as well to guard against other processes picking up the same files. This - * behavior can be turned off by setting this option to false. For example if you do not want to - * write marker files to the file systems by the Camel application. - */ - public fun readLockMarkerFile(readLockMarkerFile: String) { - it.property("readLockMarkerFile", readLockMarkerFile) - } - - /** - * Whether to use marker file with the changed, rename, or exclusive read lock types. By default a - * marker file is used as well to guard against other processes picking up the same files. This - * behavior can be turned off by setting this option to false. For example if you do not want to - * write marker files to the file systems by the Camel application. - */ - public fun readLockMarkerFile(readLockMarkerFile: Boolean) { - it.property("readLockMarkerFile", readLockMarkerFile.toString()) - } - - /** - * This option is applied only for readLock=changed. It allows to specify a minimum age the file - * must be before attempting to acquire the read lock. For example use readLockMinAge=300s to require - * the file is at last 5 minutes old. This can speedup the changed read lock as it will only attempt - * to acquire files which are at least that given age. - */ - public fun readLockMinAge(readLockMinAge: String) { - it.property("readLockMinAge", readLockMinAge) - } - - /** - * This option is applied only for readLock=changed. It allows to specify a minimum age the file - * must be before attempting to acquire the read lock. For example use readLockMinAge=300s to require - * the file is at last 5 minutes old. This can speedup the changed read lock as it will only attempt - * to acquire files which are at least that given age. - */ - public fun readLockMinAge(readLockMinAge: Int) { - it.property("readLockMinAge", readLockMinAge.toString()) - } - - /** - * This option is applied only for readLock=changed. It allows you to configure a minimum file - * length. By default Camel expects the file to contain data, and thus the default value is 1. You - * can set this option to zero, to allow consuming zero-length files. - */ - public fun readLockMinLength(readLockMinLength: String) { - it.property("readLockMinLength", readLockMinLength) - } - - /** - * This option is applied only for readLock=changed. It allows you to configure a minimum file - * length. By default Camel expects the file to contain data, and thus the default value is 1. You - * can set this option to zero, to allow consuming zero-length files. - */ - public fun readLockMinLength(readLockMinLength: Int) { - it.property("readLockMinLength", readLockMinLength.toString()) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file is succeeded and a commit - * happens. By default the file is not removed which ensures that any race-condition do not occur so - * another active node may attempt to grab the file. Instead the idempotent repository may support - * eviction strategies that you can configure to evict the file name entry after X minutes - this - * ensures no problems with race conditions. See more details at the readLockIdempotentReleaseDelay - * option. - */ - public fun readLockRemoveOnCommit(readLockRemoveOnCommit: String) { - it.property("readLockRemoveOnCommit", readLockRemoveOnCommit) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file is succeeded and a commit - * happens. By default the file is not removed which ensures that any race-condition do not occur so - * another active node may attempt to grab the file. Instead the idempotent repository may support - * eviction strategies that you can configure to evict the file name entry after X minutes - this - * ensures no problems with race conditions. See more details at the readLockIdempotentReleaseDelay - * option. - */ - public fun readLockRemoveOnCommit(readLockRemoveOnCommit: Boolean) { - it.property("readLockRemoveOnCommit", readLockRemoveOnCommit.toString()) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file failed and a rollback - * happens. If this option is false, then the file name entry is confirmed (as if the file did a - * commit). - */ - public fun readLockRemoveOnRollback(readLockRemoveOnRollback: String) { - it.property("readLockRemoveOnRollback", readLockRemoveOnRollback) - } - - /** - * This option is applied only for readLock=idempotent. It allows to specify whether to remove the - * file name entry from the idempotent repository when processing the file failed and a rollback - * happens. If this option is false, then the file name entry is confirmed (as if the file did a - * commit). - */ - public fun readLockRemoveOnRollback(readLockRemoveOnRollback: Boolean) { - it.property("readLockRemoveOnRollback", readLockRemoveOnRollback.toString()) - } - - /** - * Optional timeout in millis for the read-lock, if supported by the read-lock. If the read-lock - * could not be granted and the timeout triggered, then Camel will skip the file. At next poll Camel, - * will try the file again, and this time maybe the read-lock could be granted. Use a value of 0 or - * lower to indicate forever. Currently fileLock, changed and rename support the timeout. Notice: For - * FTP the default readLockTimeout value is 20000 instead of 10000. The readLockTimeout value must be - * higher than readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or - * more times higher than the readLockCheckInterval. This is needed to ensure that ample time is - * allowed for the read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockTimeout(readLockTimeout: String) { - it.property("readLockTimeout", readLockTimeout) - } - - /** - * Optional timeout in millis for the read-lock, if supported by the read-lock. If the read-lock - * could not be granted and the timeout triggered, then Camel will skip the file. At next poll Camel, - * will try the file again, and this time maybe the read-lock could be granted. Use a value of 0 or - * lower to indicate forever. Currently fileLock, changed and rename support the timeout. Notice: For - * FTP the default readLockTimeout value is 20000 instead of 10000. The readLockTimeout value must be - * higher than readLockCheckInterval, but a rule of thumb is to have a timeout that is at least 2 or - * more times higher than the readLockCheckInterval. This is needed to ensure that ample time is - * allowed for the read lock process to try to grab the lock before the timeout was hit. - */ - public fun readLockTimeout(readLockTimeout: Int) { - it.property("readLockTimeout", readLockTimeout.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * If knownHostFile does not exist, then attempt to auto-create the path and file (beware that the - * file will be created by the current user of the running Java process, which may not have file - * permission). - */ - public fun autoCreateKnownHostsFile(autoCreateKnownHostsFile: String) { - it.property("autoCreateKnownHostsFile", autoCreateKnownHostsFile) - } - - /** - * If knownHostFile does not exist, then attempt to auto-create the path and file (beware that the - * file will be created by the current user of the running Java process, which may not have file - * permission). - */ - public fun autoCreateKnownHostsFile(autoCreateKnownHostsFile: Boolean) { - it.property("autoCreateKnownHostsFile", autoCreateKnownHostsFile.toString()) - } - - /** - * Set a comma separated list of ciphers that will be used in order of preference. Possible cipher - * names are defined by JCraft JSCH. Some examples include: - * aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc,aes192-cbc,aes256-cbc. If not specified the - * default list from JSCH will be used. - */ - public fun ciphers(ciphers: String) { - it.property("ciphers", ciphers) - } - - /** - * Set a comma separated list of key exchange protocols that will be used in order of preference. - * Possible cipher names are defined by JCraft JSCH. Some examples include: - * diffie-hellman-group-exchange-sha1,diffie-hellman-group1-sha1,diffie-hellman-group14-sha1, - * diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521. If - * not specified the default list from JSCH will be used. - */ - public fun keyExchangeProtocols(keyExchangeProtocols: String) { - it.property("keyExchangeProtocols", keyExchangeProtocols) - } - - /** - * Sets a key pair of the public and private key so to that the SFTP endpoint can do - * public/private key verification. - */ - public fun keyPair(keyPair: String) { - it.property("keyPair", keyPair) - } - - /** - * Sets the known_hosts from the byte array, so that the SFTP endpoint can do host key - * verification. - */ - public fun knownHosts(knownHosts: String) { - it.property("knownHosts", knownHosts) - } - - /** - * Sets the known_hosts file, so that the SFTP endpoint can do host key verification. - */ - public fun knownHostsFile(knownHostsFile: String) { - it.property("knownHostsFile", knownHostsFile) - } - - /** - * Sets the known_hosts file (loaded from classpath by default), so that the SFTP endpoint can do - * host key verification. - */ - public fun knownHostsUri(knownHostsUri: String) { - it.property("knownHostsUri", knownHostsUri) - } - - /** - * Password to use for login - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Set the preferred authentications which SFTP endpoint will used. Some example - * include:password,publickey. If not specified the default list from JSCH will be used. - */ - public fun preferredAuthentications(preferredAuthentications: String) { - it.property("preferredAuthentications", preferredAuthentications) - } - - /** - * Set the private key as byte so that the SFTP endpoint can do private key verification. - */ - public fun privateKey(privateKey: String) { - it.property("privateKey", privateKey) - } - - /** - * Set the private key file so that the SFTP endpoint can do private key verification. - */ - public fun privateKeyFile(privateKeyFile: String) { - it.property("privateKeyFile", privateKeyFile) - } - - /** - * Set the private key file passphrase so that the SFTP endpoint can do private key verification. - */ - public fun privateKeyPassphrase(privateKeyPassphrase: String) { - it.property("privateKeyPassphrase", privateKeyPassphrase) - } - - /** - * Set the private key file (loaded from classpath by default) so that the SFTP endpoint can do - * private key verification. - */ - public fun privateKeyUri(privateKeyUri: String) { - it.property("privateKeyUri", privateKeyUri) - } - - /** - * Set a comma separated list of public key accepted algorithms. Some examples include: - * ssh-dss,ssh-rsa,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521. If not specified the - * default list from JSCH will be used. - */ - public fun publicKeyAcceptedAlgorithms(publicKeyAcceptedAlgorithms: String) { - it.property("publicKeyAcceptedAlgorithms", publicKeyAcceptedAlgorithms) - } - - /** - * Set a comma separated list of algorithms supported for the server host key. Some examples - * include: ssh-dss,ssh-rsa,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521. If not - * specified the default list from JSCH will be used. - */ - public fun serverHostKeys(serverHostKeys: String) { - it.property("serverHostKeys", serverHostKeys) - } - - /** - * Sets whether to use strict host key checking. - */ - public fun strictHostKeyChecking(strictHostKeyChecking: String) { - it.property("strictHostKeyChecking", strictHostKeyChecking) - } - - /** - * Username to use for login - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * If knownHostFile has not been explicit configured then use the host file from - * System.getProperty(user.home)/.ssh/known_hosts - */ - public fun useUserKnownHostsFile(useUserKnownHostsFile: String) { - it.property("useUserKnownHostsFile", useUserKnownHostsFile) - } - - /** - * If knownHostFile has not been explicit configured then use the host file from - * System.getProperty(user.home)/.ssh/known_hosts - */ - public fun useUserKnownHostsFile(useUserKnownHostsFile: Boolean) { - it.property("useUserKnownHostsFile", useUserKnownHostsFile.toString()) - } - - /** - * To shuffle the list of files (sort in random order) - */ - public fun shuffle(shuffle: String) { - it.property("shuffle", shuffle) - } - - /** - * To shuffle the list of files (sort in random order) - */ - public fun shuffle(shuffle: Boolean) { - it.property("shuffle", shuffle.toString()) - } - - /** - * Built-in sort by using the File Language. Supports nested sorts, so you can have a sort by file - * name and as a 2nd group sort by modified date. - */ - public fun sortBy(sortBy: String) { - it.property("sortBy", sortBy) - } - - /** - * Pluggable sorter as a java.util.Comparator class. - */ - public fun sorter(sorter: String) { - it.property("sorter", sorter) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Sjms2UriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Sjms2UriDsl.kt deleted file mode 100644 index 09cba76664402..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Sjms2UriDsl.kt +++ /dev/null @@ -1,760 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from a JMS Queue or Topic using plain JMS 2.x API. - */ -public fun UriDsl.sjms2(i: Sjms2UriDsl.() -> Unit) { - Sjms2UriDsl(this).apply(i) -} - -@CamelDslMarker -public class Sjms2UriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("sjms2") - } - - private var destinationType: String = "" - - private var destinationName: String = "" - - /** - * The kind of destination to use - */ - public fun destinationType(destinationType: String) { - this.destinationType = destinationType - it.url("$destinationType:$destinationName") - } - - /** - * DestinationName is a JMS queue or topic name. By default, the destinationName is interpreted as - * a queue name. - */ - public fun destinationName(destinationName: String) { - this.destinationName = destinationName - it.url("$destinationType:$destinationName") - } - - /** - * The JMS acknowledgement name, which is one of: SESSION_TRANSACTED, CLIENT_ACKNOWLEDGE, - * AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE - */ - public fun acknowledgementMode(acknowledgementMode: String) { - it.property("acknowledgementMode", acknowledgementMode) - } - - /** - * The connection factory to be use. A connection factory must be configured either on the - * component or endpoint. - */ - public fun connectionFactory(connectionFactory: String) { - it.property("connectionFactory", connectionFactory) - } - - /** - * Specifies whether Camel ignores the JMSReplyTo header in messages. If true, Camel does not send - * a reply back to the destination specified in the JMSReplyTo header. You can use this option if you - * want Camel to consume from a route and you do not want Camel to automatically send back a reply - * message because another component in your code handles the reply message. You can also use this - * option if you want to use Camel as a proxy between different message brokers and you want to route - * message from one system to another. - */ - public fun disableReplyTo(disableReplyTo: String) { - it.property("disableReplyTo", disableReplyTo) - } - - /** - * Specifies whether Camel ignores the JMSReplyTo header in messages. If true, Camel does not send - * a reply back to the destination specified in the JMSReplyTo header. You can use this option if you - * want Camel to consume from a route and you do not want Camel to automatically send back a reply - * message because another component in your code handles the reply message. You can also use this - * option if you want to use Camel as a proxy between different message brokers and you want to route - * message from one system to another. - */ - public fun disableReplyTo(disableReplyTo: Boolean) { - it.property("disableReplyTo", disableReplyTo.toString()) - } - - /** - * Provides an explicit ReplyTo destination (overrides any incoming value of - * Message.getJMSReplyTo() in consumer). - */ - public fun replyTo(replyTo: String) { - it.property("replyTo", replyTo) - } - - /** - * Specifies whether to test the connection on startup. This ensures that when Camel starts that - * all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted - * then Camel throws an exception on startup. This ensures that Camel is not started with failed - * connections. The JMS producers is tested as well. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: String) { - it.property("testConnectionOnStartup", testConnectionOnStartup) - } - - /** - * Specifies whether to test the connection on startup. This ensures that when Camel starts that - * all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted - * then Camel throws an exception on startup. This ensures that Camel is not started with failed - * connections. The JMS producers is tested as well. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: Boolean) { - it.property("testConnectionOnStartup", testConnectionOnStartup.toString()) - } - - /** - * Whether the JmsConsumer processes the Exchange asynchronously. If enabled then the JmsConsumer - * may pickup the next message from the JMS queue, while the previous message is being processed - * asynchronously (by the Asynchronous Routing Engine). This means that messages may be processed not - * 100% strictly in order. If disabled (as default) then the Exchange is fully processed before the - * JmsConsumer will pickup the next message from the JMS queue. Note if transacted has been enabled, - * then asyncConsumer=true does not run asynchronously, as transaction must be executed synchronously - * (Camel 3.0 may support async transactions). - */ - public fun asyncConsumer(asyncConsumer: String) { - it.property("asyncConsumer", asyncConsumer) - } - - /** - * Whether the JmsConsumer processes the Exchange asynchronously. If enabled then the JmsConsumer - * may pickup the next message from the JMS queue, while the previous message is being processed - * asynchronously (by the Asynchronous Routing Engine). This means that messages may be processed not - * 100% strictly in order. If disabled (as default) then the Exchange is fully processed before the - * JmsConsumer will pickup the next message from the JMS queue. Note if transacted has been enabled, - * then asyncConsumer=true does not run asynchronously, as transaction must be executed synchronously - * (Camel 3.0 may support async transactions). - */ - public fun asyncConsumer(asyncConsumer: Boolean) { - it.property("asyncConsumer", asyncConsumer.toString()) - } - - /** - * Specifies whether the consumer container should auto-startup. - */ - public fun autoStartup(autoStartup: String) { - it.property("autoStartup", autoStartup) - } - - /** - * Specifies whether the consumer container should auto-startup. - */ - public fun autoStartup(autoStartup: Boolean) { - it.property("autoStartup", autoStartup.toString()) - } - - /** - * Sets the JMS client ID to use. Note that this value, if specified, must be unique and can only - * be used by a single JMS connection instance. It is typically only required for durable topic - * subscriptions. If using Apache ActiveMQ you may prefer to use Virtual Topics instead. - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * Specifies the default number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToConcurrentConsumers is used - * to control number of concurrent consumers on the reply message listener. - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * Specifies the default number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToConcurrentConsumers is used - * to control number of concurrent consumers on the reply message listener. - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * Sets the topic to be durable - */ - public fun durable(durable: String) { - it.property("durable", durable) - } - - /** - * Sets the topic to be durable - */ - public fun durable(durable: Boolean) { - it.property("durable", durable.toString()) - } - - /** - * The durable subscriber name for specifying durable topic subscriptions. The clientId option - * must be configured as well. - */ - public fun durableSubscriptionName(durableSubscriptionName: String) { - it.property("durableSubscriptionName", durableSubscriptionName) - } - - /** - * Specifies whether to use persistent delivery by default for replies. - */ - public fun replyToDeliveryPersistent(replyToDeliveryPersistent: String) { - it.property("replyToDeliveryPersistent", replyToDeliveryPersistent) - } - - /** - * Specifies whether to use persistent delivery by default for replies. - */ - public fun replyToDeliveryPersistent(replyToDeliveryPersistent: Boolean) { - it.property("replyToDeliveryPersistent", replyToDeliveryPersistent.toString()) - } - - /** - * Sets the topic to be shared - */ - public fun shared(shared: String) { - it.property("shared", shared) - } - - /** - * Sets the topic to be shared - */ - public fun shared(shared: Boolean) { - it.property("shared", shared.toString()) - } - - /** - * Sets the topic subscription id, required for durable or shared topics. - */ - public fun subscriptionId(subscriptionId: String) { - it.property("subscriptionId", subscriptionId) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Enables eager loading of JMS properties and payload as soon as a message is loaded which - * generally is inefficient as the JMS properties may not be required but sometimes can catch early - * any issues with the underlying JMS provider and the use of JMS properties. See also the option - * eagerPoisonBody. - */ - public fun eagerLoadingOfProperties(eagerLoadingOfProperties: String) { - it.property("eagerLoadingOfProperties", eagerLoadingOfProperties) - } - - /** - * Enables eager loading of JMS properties and payload as soon as a message is loaded which - * generally is inefficient as the JMS properties may not be required but sometimes can catch early - * any issues with the underlying JMS provider and the use of JMS properties. See also the option - * eagerPoisonBody. - */ - public fun eagerLoadingOfProperties(eagerLoadingOfProperties: Boolean) { - it.property("eagerLoadingOfProperties", eagerLoadingOfProperties.toString()) - } - - /** - * If eagerLoadingOfProperties is enabled and the JMS message payload (JMS body or JMS properties) - * is poison (cannot be read/mapped), then set this text as the message body instead so the message - * can be processed (the cause of the poison are already stored as exception on the Exchange). This - * can be turned off by setting eagerPoisonBody=false. See also the option eagerLoadingOfProperties. - */ - public fun eagerPoisonBody(eagerPoisonBody: String) { - it.property("eagerPoisonBody", eagerPoisonBody) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Sets the JMS Message selector syntax. - */ - public fun messageSelector(messageSelector: String) { - it.property("messageSelector", messageSelector) - } - - /** - * Whether a JMS consumer is allowed to send a reply message to the same destination that the - * consumer is using to consume from. This prevents an endless loop by consuming and sending back the - * same message to itself. - */ - public fun replyToSameDestinationAllowed(replyToSameDestinationAllowed: String) { - it.property("replyToSameDestinationAllowed", replyToSameDestinationAllowed) - } - - /** - * Whether a JMS consumer is allowed to send a reply message to the same destination that the - * consumer is using to consume from. This prevents an endless loop by consuming and sending back the - * same message to itself. - */ - public fun replyToSameDestinationAllowed(replyToSameDestinationAllowed: Boolean) { - it.property("replyToSameDestinationAllowed", replyToSameDestinationAllowed.toString()) - } - - /** - * Specifies the delivery mode to be used. Possible values are those defined by - * jakarta.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. - */ - public fun deliveryMode(deliveryMode: String) { - it.property("deliveryMode", deliveryMode) - } - - /** - * Specifies the delivery mode to be used. Possible values are those defined by - * jakarta.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. - */ - public fun deliveryMode(deliveryMode: Int) { - it.property("deliveryMode", deliveryMode.toString()) - } - - /** - * Specifies whether persistent delivery is used by default. - */ - public fun deliveryPersistent(deliveryPersistent: String) { - it.property("deliveryPersistent", deliveryPersistent) - } - - /** - * Specifies whether persistent delivery is used by default. - */ - public fun deliveryPersistent(deliveryPersistent: Boolean) { - it.property("deliveryPersistent", deliveryPersistent.toString()) - } - - /** - * Values greater than 1 specify the message priority when sending (where 1 is the lowest priority - * and 9 is the highest). The explicitQosEnabled option must also be enabled in order for this option - * to have any effect. - */ - public fun priority(priority: String) { - it.property("priority", priority) - } - - /** - * Values greater than 1 specify the message priority when sending (where 1 is the lowest priority - * and 9 is the highest). The explicitQosEnabled option must also be enabled in order for this option - * to have any effect. - */ - public fun priority(priority: Int) { - it.property("priority", priority.toString()) - } - - /** - * Specifies the default number of concurrent consumers when doing request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToConcurrentConsumers(replyToConcurrentConsumers: String) { - it.property("replyToConcurrentConsumers", replyToConcurrentConsumers) - } - - /** - * Specifies the default number of concurrent consumers when doing request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToConcurrentConsumers(replyToConcurrentConsumers: Int) { - it.property("replyToConcurrentConsumers", replyToConcurrentConsumers.toString()) - } - - /** - * Provides an explicit ReplyTo destination in the JMS message, which overrides the setting of - * replyTo. It is useful if you want to forward the message to a remote Queue and receive the reply - * message from the ReplyTo destination. - */ - public fun replyToOverride(replyToOverride: String) { - it.property("replyToOverride", replyToOverride) - } - - /** - * Allows for explicitly specifying which kind of strategy to use for replyTo queues when doing - * request/reply over JMS. Possible values are: Temporary or Exclusive. By default Camel will use - * temporary queues. However if replyTo has been configured, then Exclusive is used. - */ - public fun replyToType(replyToType: String) { - it.property("replyToType", replyToType) - } - - /** - * The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds). - * The default is 20 seconds. You can include the header CamelJmsRequestTimeout to override this - * endpoint configured timeout value, and thus have per message individual timeout values. See also - * the requestTimeoutCheckerInterval option. - */ - public fun requestTimeout(requestTimeout: String) { - it.property("requestTimeout", requestTimeout) - } - - /** - * When sending messages, specifies the time-to-live of the message (in milliseconds). - */ - public fun timeToLive(timeToLive: String) { - it.property("timeToLive", timeToLive) - } - - /** - * When sending messages, specifies the time-to-live of the message (in milliseconds). - */ - public fun timeToLive(timeToLive: Int) { - it.property("timeToLive", timeToLive.toString()) - } - - /** - * Whether to allow sending messages with no body. If this option is false and the message body is - * null, then an JMSException is thrown. - */ - public fun allowNullBody(allowNullBody: String) { - it.property("allowNullBody", allowNullBody) - } - - /** - * Whether to allow sending messages with no body. If this option is false and the message body is - * null, then an JMSException is thrown. - */ - public fun allowNullBody(allowNullBody: Boolean) { - it.property("allowNullBody", allowNullBody.toString()) - } - - /** - * Use this option to force disabling time to live. For example when you do request/reply over - * JMS, then Camel will by default use the requestTimeout value as time to live on the message being - * sent. The problem is that the sender and receiver systems have to have their clocks synchronized, - * so they are in sync. This is not always so easy to archive. So you can use disableTimeToLive=true - * to not set a time to live value on the sent message. Then the message will not expire on the - * receiver system. See below in section About time to live for more details. - */ - public fun disableTimeToLive(disableTimeToLive: String) { - it.property("disableTimeToLive", disableTimeToLive) - } - - /** - * Use this option to force disabling time to live. For example when you do request/reply over - * JMS, then Camel will by default use the requestTimeout value as time to live on the message being - * sent. The problem is that the sender and receiver systems have to have their clocks synchronized, - * so they are in sync. This is not always so easy to archive. So you can use disableTimeToLive=true - * to not set a time to live value on the sent message. Then the message will not expire on the - * receiver system. See below in section About time to live for more details. - */ - public fun disableTimeToLive(disableTimeToLive: Boolean) { - it.property("disableTimeToLive", disableTimeToLive.toString()) - } - - /** - * Set if the deliveryMode, priority or timeToLive qualities of service should be used when - * sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and - * timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos - * option, which operates at message granularity, reading QoS properties exclusively from the Camel - * In message headers. - */ - public fun explicitQosEnabled(explicitQosEnabled: String) { - it.property("explicitQosEnabled", explicitQosEnabled) - } - - /** - * Set if the deliveryMode, priority or timeToLive qualities of service should be used when - * sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and - * timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos - * option, which operates at message granularity, reading QoS properties exclusively from the Camel - * In message headers. - */ - public fun explicitQosEnabled(explicitQosEnabled: Boolean) { - it.property("explicitQosEnabled", explicitQosEnabled.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Set to true, if you want to send message using the QoS settings specified on the message, - * instead of the QoS settings on the JMS endpoint. The following three headers are considered - * JMSPriority, JMSDeliveryMode, and JMSExpiration. You can provide all or only some of them. If not - * provided, Camel will fall back to use the values from the endpoint instead. So, when using this - * option, the headers override the values from the endpoint. The explicitQosEnabled option, by - * contrast, will only use options set on the endpoint, and not values from the message header. - */ - public fun preserveMessageQos(preserveMessageQos: String) { - it.property("preserveMessageQos", preserveMessageQos) - } - - /** - * Set to true, if you want to send message using the QoS settings specified on the message, - * instead of the QoS settings on the JMS endpoint. The following three headers are considered - * JMSPriority, JMSDeliveryMode, and JMSExpiration. You can provide all or only some of them. If not - * provided, Camel will fall back to use the values from the endpoint instead. So, when using this - * option, the headers override the values from the endpoint. The explicitQosEnabled option, by - * contrast, will only use options set on the endpoint, and not values from the message header. - */ - public fun preserveMessageQos(preserveMessageQos: Boolean) { - it.property("preserveMessageQos", preserveMessageQos.toString()) - } - - /** - * Whether to startup the consumer message listener asynchronously, when starting a route. For - * example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while - * retrying and/or fail over. This will cause Camel to block while starting routes. By setting this - * option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker - * using a dedicated thread in asynchronous mode. If this option is used, then beware that if the - * connection could not be established, then an exception is logged at WARN level, and the consumer - * will not be able to receive messages; You can then restart the route to retry. - */ - public fun asyncStartListener(asyncStartListener: String) { - it.property("asyncStartListener", asyncStartListener) - } - - /** - * Whether to startup the consumer message listener asynchronously, when starting a route. For - * example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while - * retrying and/or fail over. This will cause Camel to block while starting routes. By setting this - * option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker - * using a dedicated thread in asynchronous mode. If this option is used, then beware that if the - * connection could not be established, then an exception is logged at WARN level, and the consumer - * will not be able to receive messages; You can then restart the route to retry. - */ - public fun asyncStartListener(asyncStartListener: Boolean) { - it.property("asyncStartListener", asyncStartListener.toString()) - } - - /** - * Whether to stop the consumer message listener asynchronously, when stopping a route. - */ - public fun asyncStopListener(asyncStopListener: String) { - it.property("asyncStopListener", asyncStopListener) - } - - /** - * Whether to stop the consumer message listener asynchronously, when stopping a route. - */ - public fun asyncStopListener(asyncStopListener: Boolean) { - it.property("asyncStopListener", asyncStopListener.toString()) - } - - /** - * To use a custom DestinationCreationStrategy. - */ - public fun destinationCreationStrategy(destinationCreationStrategy: String) { - it.property("destinationCreationStrategy", destinationCreationStrategy) - } - - /** - * Specifies the JMS Exception Listener that is to be notified of any underlying JMS exceptions. - */ - public fun exceptionListener(exceptionListener: String) { - it.property("exceptionListener", exceptionListener) - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * Whether to include all JMSXxxx properties when mapping from JMS to Camel Message. Setting this - * to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using a - * custom headerFilterStrategy then this option does not apply. - */ - public fun includeAllJMSXProperties(includeAllJMSXProperties: String) { - it.property("includeAllJMSXProperties", includeAllJMSXProperties) - } - - /** - * Whether to include all JMSXxxx properties when mapping from JMS to Camel Message. Setting this - * to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using a - * custom headerFilterStrategy then this option does not apply. - */ - public fun includeAllJMSXProperties(includeAllJMSXProperties: Boolean) { - it.property("includeAllJMSXProperties", includeAllJMSXProperties.toString()) - } - - /** - * Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS - * specification. Camel provides two implementations out of the box: default and passthrough. The - * default strategy will safely marshal dots and hyphens (. and -). The passthrough strategy leaves - * the key as is. Can be used for JMS brokers which do not care whether JMS header keys contain - * illegal characters. You can provide your own implementation of the - * org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the # notation. - */ - public fun jmsKeyFormatStrategy(jmsKeyFormatStrategy: String) { - it.property("jmsKeyFormatStrategy", jmsKeyFormatStrategy) - } - - /** - * Specifies whether Camel should auto map the received JMS message to a suited payload type, such - * as jakarta.jms.TextMessage to a String etc. See section about how mapping works below for more - * details. - */ - public fun mapJmsMessage(mapJmsMessage: String) { - it.property("mapJmsMessage", mapJmsMessage) - } - - /** - * Specifies whether Camel should auto map the received JMS message to a suited payload type, such - * as jakarta.jms.TextMessage to a String etc. See section about how mapping works below for more - * details. - */ - public fun mapJmsMessage(mapJmsMessage: Boolean) { - it.property("mapJmsMessage", mapJmsMessage.toString()) - } - - /** - * To use the given MessageCreatedStrategy which are invoked when Camel creates new instances of - * jakarta.jms.Message objects when Camel is sending a JMS message. - */ - public fun messageCreatedStrategy(messageCreatedStrategy: String) { - it.property("messageCreatedStrategy", messageCreatedStrategy) - } - - /** - * Specifies the interval between recovery attempts, i.e. when a connection is being refreshed, in - * milliseconds. The default is 5000 ms, that is, 5 seconds. - */ - public fun recoveryInterval(recoveryInterval: String) { - it.property("recoveryInterval", recoveryInterval) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the - * consumer side, then the caused Exception will be send back in response as a - * jakarta.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows - * you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable - * robust routing. Notice that if you also have transferExchange enabled, this option takes - * precedence. The caught exception is required to be serializable. The original Exception on the - * consumer side can be wrapped in an outer exception such as org.apache.camel.RuntimeCamelException - * when returned to the producer. Use this with caution as the data is using Java Object - * serialization and requires the received to be able to deserialize the data at Class level, which - * forces a strong coupling between the producers and consumer! - */ - public fun transferException(transferException: String) { - it.property("transferException", transferException) - } - - /** - * If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the - * consumer side, then the caused Exception will be send back in response as a - * jakarta.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows - * you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable - * robust routing. Notice that if you also have transferExchange enabled, this option takes - * precedence. The caught exception is required to be serializable. The original Exception on the - * consumer side can be wrapped in an outer exception such as org.apache.camel.RuntimeCamelException - * when returned to the producer. Use this with caution as the data is using Java Object - * serialization and requires the received to be able to deserialize the data at Class level, which - * forces a strong coupling between the producers and consumer! - */ - public fun transferException(transferException: Boolean) { - it.property("transferException", transferException.toString()) - } - - /** - * Specifies whether to use transacted mode - */ - public fun transacted(transacted: String) { - it.property("transacted", transacted) - } - - /** - * Specifies whether to use transacted mode - */ - public fun transacted(transacted: Boolean) { - it.property("transacted", transacted.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SjmsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SjmsUriDsl.kt deleted file mode 100644 index c4d2331e6a718..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SjmsUriDsl.kt +++ /dev/null @@ -1,725 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from a JMS Queue or Topic using plain JMS 1.x API. - */ -public fun UriDsl.sjms(i: SjmsUriDsl.() -> Unit) { - SjmsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SjmsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("sjms") - } - - private var destinationType: String = "" - - private var destinationName: String = "" - - /** - * The kind of destination to use - */ - public fun destinationType(destinationType: String) { - this.destinationType = destinationType - it.url("$destinationType:$destinationName") - } - - /** - * DestinationName is a JMS queue or topic name. By default, the destinationName is interpreted as - * a queue name. - */ - public fun destinationName(destinationName: String) { - this.destinationName = destinationName - it.url("$destinationType:$destinationName") - } - - /** - * The JMS acknowledgement name, which is one of: SESSION_TRANSACTED, CLIENT_ACKNOWLEDGE, - * AUTO_ACKNOWLEDGE, DUPS_OK_ACKNOWLEDGE - */ - public fun acknowledgementMode(acknowledgementMode: String) { - it.property("acknowledgementMode", acknowledgementMode) - } - - /** - * The connection factory to be use. A connection factory must be configured either on the - * component or endpoint. - */ - public fun connectionFactory(connectionFactory: String) { - it.property("connectionFactory", connectionFactory) - } - - /** - * Specifies whether Camel ignores the JMSReplyTo header in messages. If true, Camel does not send - * a reply back to the destination specified in the JMSReplyTo header. You can use this option if you - * want Camel to consume from a route and you do not want Camel to automatically send back a reply - * message because another component in your code handles the reply message. You can also use this - * option if you want to use Camel as a proxy between different message brokers and you want to route - * message from one system to another. - */ - public fun disableReplyTo(disableReplyTo: String) { - it.property("disableReplyTo", disableReplyTo) - } - - /** - * Specifies whether Camel ignores the JMSReplyTo header in messages. If true, Camel does not send - * a reply back to the destination specified in the JMSReplyTo header. You can use this option if you - * want Camel to consume from a route and you do not want Camel to automatically send back a reply - * message because another component in your code handles the reply message. You can also use this - * option if you want to use Camel as a proxy between different message brokers and you want to route - * message from one system to another. - */ - public fun disableReplyTo(disableReplyTo: Boolean) { - it.property("disableReplyTo", disableReplyTo.toString()) - } - - /** - * Provides an explicit ReplyTo destination (overrides any incoming value of - * Message.getJMSReplyTo() in consumer). - */ - public fun replyTo(replyTo: String) { - it.property("replyTo", replyTo) - } - - /** - * Specifies whether to test the connection on startup. This ensures that when Camel starts that - * all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted - * then Camel throws an exception on startup. This ensures that Camel is not started with failed - * connections. The JMS producers is tested as well. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: String) { - it.property("testConnectionOnStartup", testConnectionOnStartup) - } - - /** - * Specifies whether to test the connection on startup. This ensures that when Camel starts that - * all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted - * then Camel throws an exception on startup. This ensures that Camel is not started with failed - * connections. The JMS producers is tested as well. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: Boolean) { - it.property("testConnectionOnStartup", testConnectionOnStartup.toString()) - } - - /** - * Whether the JmsConsumer processes the Exchange asynchronously. If enabled then the JmsConsumer - * may pickup the next message from the JMS queue, while the previous message is being processed - * asynchronously (by the Asynchronous Routing Engine). This means that messages may be processed not - * 100% strictly in order. If disabled (as default) then the Exchange is fully processed before the - * JmsConsumer will pickup the next message from the JMS queue. Note if transacted has been enabled, - * then asyncConsumer=true does not run asynchronously, as transaction must be executed synchronously - * (Camel 3.0 may support async transactions). - */ - public fun asyncConsumer(asyncConsumer: String) { - it.property("asyncConsumer", asyncConsumer) - } - - /** - * Whether the JmsConsumer processes the Exchange asynchronously. If enabled then the JmsConsumer - * may pickup the next message from the JMS queue, while the previous message is being processed - * asynchronously (by the Asynchronous Routing Engine). This means that messages may be processed not - * 100% strictly in order. If disabled (as default) then the Exchange is fully processed before the - * JmsConsumer will pickup the next message from the JMS queue. Note if transacted has been enabled, - * then asyncConsumer=true does not run asynchronously, as transaction must be executed synchronously - * (Camel 3.0 may support async transactions). - */ - public fun asyncConsumer(asyncConsumer: Boolean) { - it.property("asyncConsumer", asyncConsumer.toString()) - } - - /** - * Specifies whether the consumer container should auto-startup. - */ - public fun autoStartup(autoStartup: String) { - it.property("autoStartup", autoStartup) - } - - /** - * Specifies whether the consumer container should auto-startup. - */ - public fun autoStartup(autoStartup: Boolean) { - it.property("autoStartup", autoStartup.toString()) - } - - /** - * Sets the JMS client ID to use. Note that this value, if specified, must be unique and can only - * be used by a single JMS connection instance. It is typically only required for durable topic - * subscriptions. If using Apache ActiveMQ you may prefer to use Virtual Topics instead. - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * Specifies the default number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToConcurrentConsumers is used - * to control number of concurrent consumers on the reply message listener. - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * Specifies the default number of concurrent consumers when consuming from JMS (not for - * request/reply over JMS). See also the maxMessagesPerTask option to control dynamic scaling up/down - * of threads. When doing request/reply over JMS then the option replyToConcurrentConsumers is used - * to control number of concurrent consumers on the reply message listener. - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * The durable subscriber name for specifying durable topic subscriptions. The clientId option - * must be configured as well. - */ - public fun durableSubscriptionName(durableSubscriptionName: String) { - it.property("durableSubscriptionName", durableSubscriptionName) - } - - /** - * Specifies whether to use persistent delivery by default for replies. - */ - public fun replyToDeliveryPersistent(replyToDeliveryPersistent: String) { - it.property("replyToDeliveryPersistent", replyToDeliveryPersistent) - } - - /** - * Specifies whether to use persistent delivery by default for replies. - */ - public fun replyToDeliveryPersistent(replyToDeliveryPersistent: Boolean) { - it.property("replyToDeliveryPersistent", replyToDeliveryPersistent.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Enables eager loading of JMS properties and payload as soon as a message is loaded which - * generally is inefficient as the JMS properties may not be required but sometimes can catch early - * any issues with the underlying JMS provider and the use of JMS properties. See also the option - * eagerPoisonBody. - */ - public fun eagerLoadingOfProperties(eagerLoadingOfProperties: String) { - it.property("eagerLoadingOfProperties", eagerLoadingOfProperties) - } - - /** - * Enables eager loading of JMS properties and payload as soon as a message is loaded which - * generally is inefficient as the JMS properties may not be required but sometimes can catch early - * any issues with the underlying JMS provider and the use of JMS properties. See also the option - * eagerPoisonBody. - */ - public fun eagerLoadingOfProperties(eagerLoadingOfProperties: Boolean) { - it.property("eagerLoadingOfProperties", eagerLoadingOfProperties.toString()) - } - - /** - * If eagerLoadingOfProperties is enabled and the JMS message payload (JMS body or JMS properties) - * is poison (cannot be read/mapped), then set this text as the message body instead so the message - * can be processed (the cause of the poison are already stored as exception on the Exchange). This - * can be turned off by setting eagerPoisonBody=false. See also the option eagerLoadingOfProperties. - */ - public fun eagerPoisonBody(eagerPoisonBody: String) { - it.property("eagerPoisonBody", eagerPoisonBody) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Sets the JMS Message selector syntax. - */ - public fun messageSelector(messageSelector: String) { - it.property("messageSelector", messageSelector) - } - - /** - * Whether a JMS consumer is allowed to send a reply message to the same destination that the - * consumer is using to consume from. This prevents an endless loop by consuming and sending back the - * same message to itself. - */ - public fun replyToSameDestinationAllowed(replyToSameDestinationAllowed: String) { - it.property("replyToSameDestinationAllowed", replyToSameDestinationAllowed) - } - - /** - * Whether a JMS consumer is allowed to send a reply message to the same destination that the - * consumer is using to consume from. This prevents an endless loop by consuming and sending back the - * same message to itself. - */ - public fun replyToSameDestinationAllowed(replyToSameDestinationAllowed: Boolean) { - it.property("replyToSameDestinationAllowed", replyToSameDestinationAllowed.toString()) - } - - /** - * Specifies the delivery mode to be used. Possible values are those defined by - * jakarta.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. - */ - public fun deliveryMode(deliveryMode: String) { - it.property("deliveryMode", deliveryMode) - } - - /** - * Specifies the delivery mode to be used. Possible values are those defined by - * jakarta.jms.DeliveryMode. NON_PERSISTENT = 1 and PERSISTENT = 2. - */ - public fun deliveryMode(deliveryMode: Int) { - it.property("deliveryMode", deliveryMode.toString()) - } - - /** - * Specifies whether persistent delivery is used by default. - */ - public fun deliveryPersistent(deliveryPersistent: String) { - it.property("deliveryPersistent", deliveryPersistent) - } - - /** - * Specifies whether persistent delivery is used by default. - */ - public fun deliveryPersistent(deliveryPersistent: Boolean) { - it.property("deliveryPersistent", deliveryPersistent.toString()) - } - - /** - * Values greater than 1 specify the message priority when sending (where 1 is the lowest priority - * and 9 is the highest). The explicitQosEnabled option must also be enabled in order for this option - * to have any effect. - */ - public fun priority(priority: String) { - it.property("priority", priority) - } - - /** - * Values greater than 1 specify the message priority when sending (where 1 is the lowest priority - * and 9 is the highest). The explicitQosEnabled option must also be enabled in order for this option - * to have any effect. - */ - public fun priority(priority: Int) { - it.property("priority", priority.toString()) - } - - /** - * Specifies the default number of concurrent consumers when doing request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToConcurrentConsumers(replyToConcurrentConsumers: String) { - it.property("replyToConcurrentConsumers", replyToConcurrentConsumers) - } - - /** - * Specifies the default number of concurrent consumers when doing request/reply over JMS. See - * also the maxMessagesPerTask option to control dynamic scaling up/down of threads. - */ - public fun replyToConcurrentConsumers(replyToConcurrentConsumers: Int) { - it.property("replyToConcurrentConsumers", replyToConcurrentConsumers.toString()) - } - - /** - * Provides an explicit ReplyTo destination in the JMS message, which overrides the setting of - * replyTo. It is useful if you want to forward the message to a remote Queue and receive the reply - * message from the ReplyTo destination. - */ - public fun replyToOverride(replyToOverride: String) { - it.property("replyToOverride", replyToOverride) - } - - /** - * Allows for explicitly specifying which kind of strategy to use for replyTo queues when doing - * request/reply over JMS. Possible values are: Temporary or Exclusive. By default Camel will use - * temporary queues. However if replyTo has been configured, then Exclusive is used. - */ - public fun replyToType(replyToType: String) { - it.property("replyToType", replyToType) - } - - /** - * The timeout for waiting for a reply when using the InOut Exchange Pattern (in milliseconds). - * The default is 20 seconds. You can include the header CamelJmsRequestTimeout to override this - * endpoint configured timeout value, and thus have per message individual timeout values. See also - * the requestTimeoutCheckerInterval option. - */ - public fun requestTimeout(requestTimeout: String) { - it.property("requestTimeout", requestTimeout) - } - - /** - * When sending messages, specifies the time-to-live of the message (in milliseconds). - */ - public fun timeToLive(timeToLive: String) { - it.property("timeToLive", timeToLive) - } - - /** - * When sending messages, specifies the time-to-live of the message (in milliseconds). - */ - public fun timeToLive(timeToLive: Int) { - it.property("timeToLive", timeToLive.toString()) - } - - /** - * Whether to allow sending messages with no body. If this option is false and the message body is - * null, then an JMSException is thrown. - */ - public fun allowNullBody(allowNullBody: String) { - it.property("allowNullBody", allowNullBody) - } - - /** - * Whether to allow sending messages with no body. If this option is false and the message body is - * null, then an JMSException is thrown. - */ - public fun allowNullBody(allowNullBody: Boolean) { - it.property("allowNullBody", allowNullBody.toString()) - } - - /** - * Use this option to force disabling time to live. For example when you do request/reply over - * JMS, then Camel will by default use the requestTimeout value as time to live on the message being - * sent. The problem is that the sender and receiver systems have to have their clocks synchronized, - * so they are in sync. This is not always so easy to archive. So you can use disableTimeToLive=true - * to not set a time to live value on the sent message. Then the message will not expire on the - * receiver system. See below in section About time to live for more details. - */ - public fun disableTimeToLive(disableTimeToLive: String) { - it.property("disableTimeToLive", disableTimeToLive) - } - - /** - * Use this option to force disabling time to live. For example when you do request/reply over - * JMS, then Camel will by default use the requestTimeout value as time to live on the message being - * sent. The problem is that the sender and receiver systems have to have their clocks synchronized, - * so they are in sync. This is not always so easy to archive. So you can use disableTimeToLive=true - * to not set a time to live value on the sent message. Then the message will not expire on the - * receiver system. See below in section About time to live for more details. - */ - public fun disableTimeToLive(disableTimeToLive: Boolean) { - it.property("disableTimeToLive", disableTimeToLive.toString()) - } - - /** - * Set if the deliveryMode, priority or timeToLive qualities of service should be used when - * sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and - * timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos - * option, which operates at message granularity, reading QoS properties exclusively from the Camel - * In message headers. - */ - public fun explicitQosEnabled(explicitQosEnabled: String) { - it.property("explicitQosEnabled", explicitQosEnabled) - } - - /** - * Set if the deliveryMode, priority or timeToLive qualities of service should be used when - * sending messages. This option is based on Spring's JmsTemplate. The deliveryMode, priority and - * timeToLive options are applied to the current endpoint. This contrasts with the preserveMessageQos - * option, which operates at message granularity, reading QoS properties exclusively from the Camel - * In message headers. - */ - public fun explicitQosEnabled(explicitQosEnabled: Boolean) { - it.property("explicitQosEnabled", explicitQosEnabled.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Set to true, if you want to send message using the QoS settings specified on the message, - * instead of the QoS settings on the JMS endpoint. The following three headers are considered - * JMSPriority, JMSDeliveryMode, and JMSExpiration. You can provide all or only some of them. If not - * provided, Camel will fall back to use the values from the endpoint instead. So, when using this - * option, the headers override the values from the endpoint. The explicitQosEnabled option, by - * contrast, will only use options set on the endpoint, and not values from the message header. - */ - public fun preserveMessageQos(preserveMessageQos: String) { - it.property("preserveMessageQos", preserveMessageQos) - } - - /** - * Set to true, if you want to send message using the QoS settings specified on the message, - * instead of the QoS settings on the JMS endpoint. The following three headers are considered - * JMSPriority, JMSDeliveryMode, and JMSExpiration. You can provide all or only some of them. If not - * provided, Camel will fall back to use the values from the endpoint instead. So, when using this - * option, the headers override the values from the endpoint. The explicitQosEnabled option, by - * contrast, will only use options set on the endpoint, and not values from the message header. - */ - public fun preserveMessageQos(preserveMessageQos: Boolean) { - it.property("preserveMessageQos", preserveMessageQos.toString()) - } - - /** - * Whether to startup the consumer message listener asynchronously, when starting a route. For - * example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while - * retrying and/or fail over. This will cause Camel to block while starting routes. By setting this - * option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker - * using a dedicated thread in asynchronous mode. If this option is used, then beware that if the - * connection could not be established, then an exception is logged at WARN level, and the consumer - * will not be able to receive messages; You can then restart the route to retry. - */ - public fun asyncStartListener(asyncStartListener: String) { - it.property("asyncStartListener", asyncStartListener) - } - - /** - * Whether to startup the consumer message listener asynchronously, when starting a route. For - * example if a JmsConsumer cannot get a connection to a remote JMS broker, then it may block while - * retrying and/or fail over. This will cause Camel to block while starting routes. By setting this - * option to true, you will let routes startup, while the JmsConsumer connects to the JMS broker - * using a dedicated thread in asynchronous mode. If this option is used, then beware that if the - * connection could not be established, then an exception is logged at WARN level, and the consumer - * will not be able to receive messages; You can then restart the route to retry. - */ - public fun asyncStartListener(asyncStartListener: Boolean) { - it.property("asyncStartListener", asyncStartListener.toString()) - } - - /** - * Whether to stop the consumer message listener asynchronously, when stopping a route. - */ - public fun asyncStopListener(asyncStopListener: String) { - it.property("asyncStopListener", asyncStopListener) - } - - /** - * Whether to stop the consumer message listener asynchronously, when stopping a route. - */ - public fun asyncStopListener(asyncStopListener: Boolean) { - it.property("asyncStopListener", asyncStopListener.toString()) - } - - /** - * To use a custom DestinationCreationStrategy. - */ - public fun destinationCreationStrategy(destinationCreationStrategy: String) { - it.property("destinationCreationStrategy", destinationCreationStrategy) - } - - /** - * Specifies the JMS Exception Listener that is to be notified of any underlying JMS exceptions. - */ - public fun exceptionListener(exceptionListener: String) { - it.property("exceptionListener", exceptionListener) - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * Whether to include all JMSXxxx properties when mapping from JMS to Camel Message. Setting this - * to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using a - * custom headerFilterStrategy then this option does not apply. - */ - public fun includeAllJMSXProperties(includeAllJMSXProperties: String) { - it.property("includeAllJMSXProperties", includeAllJMSXProperties) - } - - /** - * Whether to include all JMSXxxx properties when mapping from JMS to Camel Message. Setting this - * to true will include properties such as JMSXAppID, and JMSXUserID etc. Note: If you are using a - * custom headerFilterStrategy then this option does not apply. - */ - public fun includeAllJMSXProperties(includeAllJMSXProperties: Boolean) { - it.property("includeAllJMSXProperties", includeAllJMSXProperties.toString()) - } - - /** - * Pluggable strategy for encoding and decoding JMS keys so they can be compliant with the JMS - * specification. Camel provides two implementations out of the box: default and passthrough. The - * default strategy will safely marshal dots and hyphens (. and -). The passthrough strategy leaves - * the key as is. Can be used for JMS brokers which do not care whether JMS header keys contain - * illegal characters. You can provide your own implementation of the - * org.apache.camel.component.jms.JmsKeyFormatStrategy and refer to it using the # notation. - */ - public fun jmsKeyFormatStrategy(jmsKeyFormatStrategy: String) { - it.property("jmsKeyFormatStrategy", jmsKeyFormatStrategy) - } - - /** - * Specifies whether Camel should auto map the received JMS message to a suited payload type, such - * as jakarta.jms.TextMessage to a String etc. See section about how mapping works below for more - * details. - */ - public fun mapJmsMessage(mapJmsMessage: String) { - it.property("mapJmsMessage", mapJmsMessage) - } - - /** - * Specifies whether Camel should auto map the received JMS message to a suited payload type, such - * as jakarta.jms.TextMessage to a String etc. See section about how mapping works below for more - * details. - */ - public fun mapJmsMessage(mapJmsMessage: Boolean) { - it.property("mapJmsMessage", mapJmsMessage.toString()) - } - - /** - * To use the given MessageCreatedStrategy which are invoked when Camel creates new instances of - * jakarta.jms.Message objects when Camel is sending a JMS message. - */ - public fun messageCreatedStrategy(messageCreatedStrategy: String) { - it.property("messageCreatedStrategy", messageCreatedStrategy) - } - - /** - * Specifies the interval between recovery attempts, i.e. when a connection is being refreshed, in - * milliseconds. The default is 5000 ms, that is, 5 seconds. - */ - public fun recoveryInterval(recoveryInterval: String) { - it.property("recoveryInterval", recoveryInterval) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the - * consumer side, then the caused Exception will be send back in response as a - * jakarta.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows - * you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable - * robust routing. Notice that if you also have transferExchange enabled, this option takes - * precedence. The caught exception is required to be serializable. The original Exception on the - * consumer side can be wrapped in an outer exception such as org.apache.camel.RuntimeCamelException - * when returned to the producer. Use this with caution as the data is using Java Object - * serialization and requires the received to be able to deserialize the data at Class level, which - * forces a strong coupling between the producers and consumer! - */ - public fun transferException(transferException: String) { - it.property("transferException", transferException) - } - - /** - * If enabled and you are using Request Reply messaging (InOut) and an Exchange failed on the - * consumer side, then the caused Exception will be send back in response as a - * jakarta.jms.ObjectMessage. If the client is Camel, the returned Exception is rethrown. This allows - * you to use Camel JMS as a bridge in your routing - for example, using persistent queues to enable - * robust routing. Notice that if you also have transferExchange enabled, this option takes - * precedence. The caught exception is required to be serializable. The original Exception on the - * consumer side can be wrapped in an outer exception such as org.apache.camel.RuntimeCamelException - * when returned to the producer. Use this with caution as the data is using Java Object - * serialization and requires the received to be able to deserialize the data at Class level, which - * forces a strong coupling between the producers and consumer! - */ - public fun transferException(transferException: Boolean) { - it.property("transferException", transferException.toString()) - } - - /** - * Specifies whether to use transacted mode - */ - public fun transacted(transacted: String) { - it.property("transacted", transacted) - } - - /** - * Specifies whether to use transacted mode - */ - public fun transacted(transacted: Boolean) { - it.property("transacted", transacted.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SlackUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SlackUriDsl.kt deleted file mode 100644 index 438142ec55f4a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SlackUriDsl.kt +++ /dev/null @@ -1,395 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from Slack. - */ -public fun UriDsl.slack(i: SlackUriDsl.() -> Unit) { - SlackUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SlackUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("slack") - } - - private var channel: String = "" - - /** - * The channel name (syntax #name) or slack user (syntax userName) to send a message directly to - * an user. - */ - public fun channel(channel: String) { - this.channel = channel - it.url("$channel") - } - - /** - * The token to access Slack. This app needs to have channels:history, groups:history, im:history, - * mpim:history, channels:read, groups:read, im:read and mpim:read permissions. The User OAuth Token - * is the kind of token needed. - */ - public fun token(token: String) { - it.property("token", token) - } - - /** - * Type of conversation - */ - public fun conversationType(conversationType: String) { - it.property("conversationType", conversationType) - } - - /** - * The Max Result for the poll - */ - public fun maxResults(maxResults: String) { - it.property("maxResults", maxResults) - } - - /** - * Create exchanges in natural order (oldest to newest) or not - */ - public fun naturalOrder(naturalOrder: String) { - it.property("naturalOrder", naturalOrder) - } - - /** - * Create exchanges in natural order (oldest to newest) or not - */ - public fun naturalOrder(naturalOrder: Boolean) { - it.property("naturalOrder", naturalOrder.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * The Server URL of the Slack instance - */ - public fun serverUrl(serverUrl: String) { - it.property("serverUrl", serverUrl) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Use a Slack emoji as an avatar - */ - public fun iconEmoji(iconEmoji: String) { - it.property("iconEmoji", iconEmoji) - } - - /** - * The avatar that the component will use when sending message to a channel or user. - */ - public fun iconUrl(iconUrl: String) { - it.property("iconUrl", iconUrl) - } - - /** - * This is the username that the bot will have when sending messages to a channel or user. - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * The incoming webhook URL - */ - public fun webhookUrl(webhookUrl: String) { - it.property("webhookUrl", webhookUrl) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SmbUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SmbUriDsl.kt deleted file mode 100644 index 9790d93f92dc7..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SmbUriDsl.kt +++ /dev/null @@ -1,464 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Receive files from SMB (Server Message Block) shares. - */ -public fun UriDsl.smb(i: SmbUriDsl.() -> Unit) { - SmbUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SmbUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("smb") - } - - private var hostname: String = "" - - private var port: String = "" - - private var shareName: String = "" - - /** - * The share hostname or IP address - */ - public fun hostname(hostname: String) { - this.hostname = hostname - it.url("$hostname:$port/$shareName") - } - - /** - * The share port number - */ - public fun port(port: String) { - this.port = port - it.url("$hostname:$port/$shareName") - } - - /** - * The share port number - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$hostname:$port/$shareName") - } - - /** - * The name of the share to connect to. - */ - public fun shareName(shareName: String) { - this.shareName = shareName - it.url("$hostname:$port/$shareName") - } - - /** - * The path, within the share, to consume the files from - */ - public fun path(path: String) { - it.property("path", path) - } - - /** - * The search pattern used to list the files - */ - public fun searchPattern(searchPattern: String) { - it.property("searchPattern", searchPattern) - } - - /** - * If a directory, will look for files in all the sub-directories as well. - */ - public fun recursive(recursive: String) { - it.property("recursive", recursive) - } - - /** - * If a directory, will look for files in all the sub-directories as well. - */ - public fun recursive(recursive: Boolean) { - it.property("recursive", recursive.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Whether to create parent directory if it does not exist - */ - public fun autoCreate(autoCreate: String) { - it.property("autoCreate", autoCreate) - } - - /** - * Whether to create parent directory if it does not exist - */ - public fun autoCreate(autoCreate: Boolean) { - it.property("autoCreate", autoCreate.toString()) - } - - /** - * What action to take if the SMB file already exists - */ - public fun fileExist(fileExist: String) { - it.property("fileExist", fileExist) - } - - /** - * Read buffer size when for file being produced - */ - public fun readBufferSize(readBufferSize: String) { - it.property("readBufferSize", readBufferSize) - } - - /** - * Read buffer size when for file being produced - */ - public fun readBufferSize(readBufferSize: Int) { - it.property("readBufferSize", readBufferSize.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * A pluggable repository org.apache.camel.spi.IdempotentRepository which by default use - * MemoryIdempotentRepository if none is specified. - */ - public fun idempotentRepository(idempotentRepository: String) { - it.property("idempotentRepository", idempotentRepository) - } - - /** - * An optional SMB client configuration, can be used to configure client specific configurations, - * like timeouts - */ - public fun smbConfig(smbConfig: String) { - it.property("smbConfig", smbConfig) - } - - /** - * An optional SMB I/O bean to use to setup the file access attributes when reading/writing a file - */ - public fun smbIoBean(smbIoBean: String) { - it.property("smbIoBean", smbIoBean) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * The user domain - */ - public fun domain(domain: String) { - it.property("domain", domain) - } - - /** - * The password to access the share - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * The username required to access the share - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SmooksUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SmooksUriDsl.kt deleted file mode 100644 index 7e2f42edb6bbb..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SmooksUriDsl.kt +++ /dev/null @@ -1,329 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * EDI, XML, CSV, etc. based data transformation using Smooks. - */ -public fun UriDsl.smooks(i: SmooksUriDsl.() -> Unit) { - SmooksUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SmooksUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("smooks") - } - - private var smooksConfig: String = "" - - /** - * Smooks XML configuration file - */ - public fun smooksConfig(smooksConfig: String) { - this.smooksConfig = smooksConfig - it.url("$smooksConfig") - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SmppUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SmppUriDsl.kt deleted file mode 100644 index 564a893571366..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SmppUriDsl.kt +++ /dev/null @@ -1,670 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive SMS messages using a SMSC (Short Message Service Center). - */ -public fun UriDsl.smpp(i: SmppUriDsl.() -> Unit) { - SmppUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SmppUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("smpp") - } - - private var host: String = "" - - private var port: String = "" - - /** - * Hostname for the SMSC server to use. - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port") - } - - /** - * Port number for the SMSC server to use. - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port") - } - - /** - * Port number for the SMSC server to use. - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port") - } - - /** - * Defines the initial delay in milliseconds after the consumer/producer tries to reconnect to the - * SMSC, after the connection was lost. - */ - public fun initialReconnectDelay(initialReconnectDelay: String) { - it.property("initialReconnectDelay", initialReconnectDelay) - } - - /** - * Defines the initial delay in milliseconds after the consumer/producer tries to reconnect to the - * SMSC, after the connection was lost. - */ - public fun initialReconnectDelay(initialReconnectDelay: Int) { - it.property("initialReconnectDelay", initialReconnectDelay.toString()) - } - - /** - * Defines the maximum number of attempts to reconnect to the SMSC, if SMSC returns a negative - * bind response - */ - public fun maxReconnect(maxReconnect: String) { - it.property("maxReconnect", maxReconnect) - } - - /** - * Defines the maximum number of attempts to reconnect to the SMSC, if SMSC returns a negative - * bind response - */ - public fun maxReconnect(maxReconnect: Int) { - it.property("maxReconnect", maxReconnect.toString()) - } - - /** - * Defines the interval in milliseconds between the reconnect attempts, if the connection to the - * SMSC was lost and the previous was not succeed. - */ - public fun reconnectDelay(reconnectDelay: String) { - it.property("reconnectDelay", reconnectDelay) - } - - /** - * Defines the interval in milliseconds between the reconnect attempts, if the connection to the - * SMSC was lost and the previous was not succeed. - */ - public fun reconnectDelay(reconnectDelay: Int) { - it.property("reconnectDelay", reconnectDelay.toString()) - } - - /** - * You can specify a policy for handling long messages: ALLOW - the default, long messages are - * split to 140 bytes per message TRUNCATE - long messages are split and only the first fragment will - * be sent to the SMSC. Some carriers drop subsequent fragments so this reduces load on the SMPP - * connection sending parts of a message that will never be delivered. REJECT - if a message would - * need to be split, it is rejected with an SMPP NegativeResponseException and the reason code - * signifying the message is too long. - */ - public fun splittingPolicy(splittingPolicy: String) { - it.property("splittingPolicy", splittingPolicy) - } - - /** - * This parameter is used to categorize the type of ESME (External Short Message Entity) that is - * binding to the SMSC (max. 13 characters). - */ - public fun systemType(systemType: String) { - it.property("systemType", systemType) - } - - /** - * You can specify the address range for the SmppConsumer as defined in section 5.2.7 of the SMPP - * 3.4 specification. The SmppConsumer will receive messages only from SMSC's which target an address - * (MSISDN or IP address) within this range. - */ - public fun addressRange(addressRange: String) { - it.property("addressRange", addressRange) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Defines the destination SME address. For mobile terminated messages, this is the directory - * number of the recipient MS. Only for SubmitSm, SubmitMulti, CancelSm and DataSm. - */ - public fun destAddr(destAddr: String) { - it.property("destAddr", destAddr) - } - - /** - * Defines the type of number (TON) to be used in the SME destination address parameters. Only for - * SubmitSm, SubmitMulti, CancelSm and DataSm. The following NPI values are defined: 0: Unknown 1: - * ISDN (E163/E164) 2: Data (X.121) 3: Telex (F.69) 6: Land Mobile (E.212) 8: National 9: Private 10: - * ERMES 13: Internet (IP) 18: WAP Client Id (to be defined by WAP Forum) - */ - public fun destAddrNpi(destAddrNpi: String) { - it.property("destAddrNpi", destAddrNpi) - } - - /** - * Defines the type of number (TON) to be used in the SME destination address parameters. Only for - * SubmitSm, SubmitMulti, CancelSm and DataSm. The following NPI values are defined: 0: Unknown 1: - * ISDN (E163/E164) 2: Data (X.121) 3: Telex (F.69) 6: Land Mobile (E.212) 8: National 9: Private 10: - * ERMES 13: Internet (IP) 18: WAP Client Id (to be defined by WAP Forum) - */ - public fun destAddrNpi(destAddrNpi: Int) { - it.property("destAddrNpi", destAddrNpi.toString()) - } - - /** - * Defines the type of number (TON) to be used in the SME destination address parameters. Only for - * SubmitSm, SubmitMulti, CancelSm and DataSm. The following TON values are defined: 0: Unknown 1: - * International 2: National 3: Network Specific 4: Subscriber Number 5: Alphanumeric 6: Abbreviated - */ - public fun destAddrTon(destAddrTon: String) { - it.property("destAddrTon", destAddrTon) - } - - /** - * Defines the type of number (TON) to be used in the SME destination address parameters. Only for - * SubmitSm, SubmitMulti, CancelSm and DataSm. The following TON values are defined: 0: Unknown 1: - * International 2: National 3: Network Specific 4: Subscriber Number 5: Alphanumeric 6: Abbreviated - */ - public fun destAddrTon(destAddrTon: Int) { - it.property("destAddrTon", destAddrTon.toString()) - } - - /** - * Sessions can be lazily created to avoid exceptions, if the SMSC is not available when the Camel - * producer is started. Camel will check the in message headers 'CamelSmppSystemId' and - * 'CamelSmppPassword' of the first exchange. If they are present, Camel will use these data to - * connect to the SMSC. - */ - public fun lazySessionCreation(lazySessionCreation: String) { - it.property("lazySessionCreation", lazySessionCreation) - } - - /** - * Sessions can be lazily created to avoid exceptions, if the SMSC is not available when the Camel - * producer is started. Camel will check the in message headers 'CamelSmppSystemId' and - * 'CamelSmppPassword' of the first exchange. If they are present, Camel will use these data to - * connect to the SMSC. - */ - public fun lazySessionCreation(lazySessionCreation: Boolean) { - it.property("lazySessionCreation", lazySessionCreation.toString()) - } - - /** - * Set this on producer in order to benefit from transceiver (TRX) binding type. So once set, you - * don't need to define an 'SMTPP consumer' endpoint anymore. You would set this to a 'Direct - * consumer' endpoint instead. DISCALIMER: This feature is only tested with 'Direct consumer' - * endpoint. The behavior with any other consumer type is unknown and not tested. - */ - public fun messageReceiverRouteId(messageReceiverRouteId: String) { - it.property("messageReceiverRouteId", messageReceiverRouteId) - } - - /** - * Defines the numeric plan indicator (NPI) to be used in the SME. The following NPI values are - * defined: 0: Unknown 1: ISDN (E163/E164) 2: Data (X.121) 3: Telex (F.69) 6: Land Mobile (E.212) 8: - * National 9: Private 10: ERMES 13: Internet (IP) 18: WAP Client Id (to be defined by WAP Forum) - */ - public fun numberingPlanIndicator(numberingPlanIndicator: String) { - it.property("numberingPlanIndicator", numberingPlanIndicator) - } - - /** - * Defines the numeric plan indicator (NPI) to be used in the SME. The following NPI values are - * defined: 0: Unknown 1: ISDN (E163/E164) 2: Data (X.121) 3: Telex (F.69) 6: Land Mobile (E.212) 8: - * National 9: Private 10: ERMES 13: Internet (IP) 18: WAP Client Id (to be defined by WAP Forum) - */ - public fun numberingPlanIndicator(numberingPlanIndicator: Int) { - it.property("numberingPlanIndicator", numberingPlanIndicator.toString()) - } - - /** - * Allows the originating SME to assign a priority level to the short message. Only for SubmitSm - * and SubmitMulti. Four Priority Levels are supported: 0: Level 0 (lowest) priority 1: Level 1 - * priority 2: Level 2 priority 3: Level 3 (highest) priority - */ - public fun priorityFlag(priorityFlag: String) { - it.property("priorityFlag", priorityFlag) - } - - /** - * Allows the originating SME to assign a priority level to the short message. Only for SubmitSm - * and SubmitMulti. Four Priority Levels are supported: 0: Level 0 (lowest) priority 1: Level 1 - * priority 2: Level 2 priority 3: Level 3 (highest) priority - */ - public fun priorityFlag(priorityFlag: Int) { - it.property("priorityFlag", priorityFlag.toString()) - } - - /** - * The protocol id - */ - public fun protocolId(protocolId: String) { - it.property("protocolId", protocolId) - } - - /** - * The protocol id - */ - public fun protocolId(protocolId: Int) { - it.property("protocolId", protocolId.toString()) - } - - /** - * Is used to request an SMSC delivery receipt and/or SME originated acknowledgements. The - * following values are defined: 0: No SMSC delivery receipt requested. 1: SMSC delivery receipt - * requested where final delivery outcome is success or failure. 2: SMSC delivery receipt requested - * where the final delivery outcome is delivery failure. - */ - public fun registeredDelivery(registeredDelivery: String) { - it.property("registeredDelivery", registeredDelivery) - } - - /** - * Is used to request an SMSC delivery receipt and/or SME originated acknowledgements. The - * following values are defined: 0: No SMSC delivery receipt requested. 1: SMSC delivery receipt - * requested where final delivery outcome is success or failure. 2: SMSC delivery receipt requested - * where the final delivery outcome is delivery failure. - */ - public fun registeredDelivery(registeredDelivery: Int) { - it.property("registeredDelivery", registeredDelivery.toString()) - } - - /** - * Used to request the SMSC to replace a previously submitted message, that is still pending - * delivery. The SMSC will replace an existing message provided that the source address, destination - * address and service type match the same fields in the new message. The following replace if - * present flag values are defined: 0: Don't replace 1: Replace - */ - public fun replaceIfPresentFlag(replaceIfPresentFlag: String) { - it.property("replaceIfPresentFlag", replaceIfPresentFlag) - } - - /** - * Used to request the SMSC to replace a previously submitted message, that is still pending - * delivery. The SMSC will replace an existing message provided that the source address, destination - * address and service type match the same fields in the new message. The following replace if - * present flag values are defined: 0: Don't replace 1: Replace - */ - public fun replaceIfPresentFlag(replaceIfPresentFlag: Int) { - it.property("replaceIfPresentFlag", replaceIfPresentFlag.toString()) - } - - /** - * The service type parameter can be used to indicate the SMS Application service associated with - * the message. The following generic service_types are defined: CMT: Cellular Messaging CPT: - * Cellular Paging VMN: Voice Mail Notification VMA: Voice Mail Alerting WAP: Wireless Application - * Protocol USSD: Unstructured Supplementary Services Data - */ - public fun serviceType(serviceType: String) { - it.property("serviceType", serviceType) - } - - /** - * Defines the address of SME (Short Message Entity) which originated this message. - */ - public fun sourceAddr(sourceAddr: String) { - it.property("sourceAddr", sourceAddr) - } - - /** - * Defines the numeric plan indicator (NPI) to be used in the SME originator address parameters. - * The following NPI values are defined: 0: Unknown 1: ISDN (E163/E164) 2: Data (X.121) 3: Telex - * (F.69) 6: Land Mobile (E.212) 8: National 9: Private 10: ERMES 13: Internet (IP) 18: WAP Client Id - * (to be defined by WAP Forum) - */ - public fun sourceAddrNpi(sourceAddrNpi: String) { - it.property("sourceAddrNpi", sourceAddrNpi) - } - - /** - * Defines the numeric plan indicator (NPI) to be used in the SME originator address parameters. - * The following NPI values are defined: 0: Unknown 1: ISDN (E163/E164) 2: Data (X.121) 3: Telex - * (F.69) 6: Land Mobile (E.212) 8: National 9: Private 10: ERMES 13: Internet (IP) 18: WAP Client Id - * (to be defined by WAP Forum) - */ - public fun sourceAddrNpi(sourceAddrNpi: Int) { - it.property("sourceAddrNpi", sourceAddrNpi.toString()) - } - - /** - * Defines the type of number (TON) to be used in the SME originator address parameters. The - * following TON values are defined: 0: Unknown 1: International 2: National 3: Network Specific 4: - * Subscriber Number 5: Alphanumeric 6: Abbreviated - */ - public fun sourceAddrTon(sourceAddrTon: String) { - it.property("sourceAddrTon", sourceAddrTon) - } - - /** - * Defines the type of number (TON) to be used in the SME originator address parameters. The - * following TON values are defined: 0: Unknown 1: International 2: National 3: Network Specific 4: - * Subscriber Number 5: Alphanumeric 6: Abbreviated - */ - public fun sourceAddrTon(sourceAddrTon: Int) { - it.property("sourceAddrTon", sourceAddrTon.toString()) - } - - /** - * Defines the type of number (TON) to be used in the SME. The following TON values are defined: - * 0: Unknown 1: International 2: National 3: Network Specific 4: Subscriber Number 5: Alphanumeric - * 6: Abbreviated - */ - public fun typeOfNumber(typeOfNumber: String) { - it.property("typeOfNumber", typeOfNumber) - } - - /** - * Defines the type of number (TON) to be used in the SME. The following TON values are defined: - * 0: Unknown 1: International 2: National 3: Network Specific 4: Subscriber Number 5: Alphanumeric - * 6: Abbreviated - */ - public fun typeOfNumber(typeOfNumber: Int) { - it.property("typeOfNumber", typeOfNumber.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Defines the interval in milliseconds between the confidence checks. The confidence check is - * used to test the communication path between an ESME and an SMSC. - */ - public fun enquireLinkTimer(enquireLinkTimer: String) { - it.property("enquireLinkTimer", enquireLinkTimer) - } - - /** - * Defines the interval in milliseconds between the confidence checks. The confidence check is - * used to test the communication path between an ESME and an SMSC. - */ - public fun enquireLinkTimer(enquireLinkTimer: Int) { - it.property("enquireLinkTimer", enquireLinkTimer.toString()) - } - - /** - * Defines the interface version to be used in the binding request with the SMSC. The following - * values are allowed, as defined in the SMPP protocol (and the underlying implementation using the - * jSMPP library, respectively): legacy (0x00), 3.3 (0x33), 3.4 (0x34), and 5.0 (0x50). The default - * (fallback) value is version 3.4. - */ - public fun interfaceVersion(interfaceVersion: String) { - it.property("interfaceVersion", interfaceVersion) - } - - /** - * Sets the number of threads which can read PDU and process them in parallel. - */ - public fun pduProcessorDegree(pduProcessorDegree: String) { - it.property("pduProcessorDegree", pduProcessorDegree) - } - - /** - * Sets the number of threads which can read PDU and process them in parallel. - */ - public fun pduProcessorDegree(pduProcessorDegree: Int) { - it.property("pduProcessorDegree", pduProcessorDegree.toString()) - } - - /** - * Sets the capacity of the working queue for PDU processing. - */ - public fun pduProcessorQueueCapacity(pduProcessorQueueCapacity: String) { - it.property("pduProcessorQueueCapacity", pduProcessorQueueCapacity) - } - - /** - * Sets the capacity of the working queue for PDU processing. - */ - public fun pduProcessorQueueCapacity(pduProcessorQueueCapacity: Int) { - it.property("pduProcessorQueueCapacity", pduProcessorQueueCapacity.toString()) - } - - /** - * You can refer to a org.jsmpp.session.SessionStateListener in the Registry to receive callbacks - * when the session state changed. - */ - public fun sessionStateListener(sessionStateListener: String) { - it.property("sessionStateListener", sessionStateListener) - } - - /** - * When true, the SMSC delivery receipt would be requested only for the last segment of a - * multi-segment (long) message. For short messages, with only 1 segment the behaviour is unchanged. - */ - public fun singleDLR(singleDLR: String) { - it.property("singleDLR", singleDLR) - } - - /** - * When true, the SMSC delivery receipt would be requested only for the last segment of a - * multi-segment (long) message. For short messages, with only 1 segment the behaviour is unchanged. - */ - public fun singleDLR(singleDLR: Boolean) { - it.property("singleDLR", singleDLR.toString()) - } - - /** - * Defines the maximum period of inactivity allowed after a transaction, after which an SMPP - * entity may assume that the session is no longer active. This timer may be active on either - * communicating SMPP entity (i.e. SMSC or ESME). - */ - public fun transactionTimer(transactionTimer: String) { - it.property("transactionTimer", transactionTimer) - } - - /** - * Defines the maximum period of inactivity allowed after a transaction, after which an SMPP - * entity may assume that the session is no longer active. This timer may be active on either - * communicating SMPP entity (i.e. SMSC or ESME). - */ - public fun transactionTimer(transactionTimer: Int) { - it.property("transactionTimer", transactionTimer.toString()) - } - - /** - * Defines encoding of data according the SMPP 3.4 specification, section 5.2.19. 0: SMSC Default - * Alphabet 4: 8 bit Alphabet 8: UCS2 Alphabet - */ - public fun alphabet(alphabet: String) { - it.property("alphabet", alphabet) - } - - /** - * Defines encoding of data according the SMPP 3.4 specification, section 5.2.19. 0: SMSC Default - * Alphabet 4: 8 bit Alphabet 8: UCS2 Alphabet - */ - public fun alphabet(alphabet: Int) { - it.property("alphabet", alphabet.toString()) - } - - /** - * Defines the data coding according the SMPP 3.4 specification, section 5.2.19. Example data - * encodings are: 0: SMSC Default Alphabet 3: Latin 1 (ISO-8859-1) 4: Octet unspecified (8-bit - * binary) 8: UCS2 (ISO/IEC-10646) 13: Extended Kanji JIS(X 0212-1990) - */ - public fun dataCoding(dataCoding: String) { - it.property("dataCoding", dataCoding) - } - - /** - * Defines the data coding according the SMPP 3.4 specification, section 5.2.19. Example data - * encodings are: 0: SMSC Default Alphabet 3: Latin 1 (ISO-8859-1) 4: Octet unspecified (8-bit - * binary) 8: UCS2 (ISO/IEC-10646) 13: Extended Kanji JIS(X 0212-1990) - */ - public fun dataCoding(dataCoding: Int) { - it.property("dataCoding", dataCoding.toString()) - } - - /** - * Defines the encoding scheme of the short message user data. Only for SubmitSm, ReplaceSm and - * SubmitMulti. - */ - public fun encoding(encoding: String) { - it.property("encoding", encoding) - } - - /** - * If you need to tunnel SMPP through a HTTP proxy, set this attribute to the hostname or ip - * address of your HTTP proxy. - */ - public fun httpProxyHost(httpProxyHost: String) { - it.property("httpProxyHost", httpProxyHost) - } - - /** - * If your HTTP proxy requires basic authentication, set this attribute to the password required - * for your HTTP proxy. - */ - public fun httpProxyPassword(httpProxyPassword: String) { - it.property("httpProxyPassword", httpProxyPassword) - } - - /** - * If you need to tunnel SMPP through a HTTP proxy, set this attribute to the port of your HTTP - * proxy. - */ - public fun httpProxyPort(httpProxyPort: String) { - it.property("httpProxyPort", httpProxyPort) - } - - /** - * If you need to tunnel SMPP through a HTTP proxy, set this attribute to the port of your HTTP - * proxy. - */ - public fun httpProxyPort(httpProxyPort: Int) { - it.property("httpProxyPort", httpProxyPort.toString()) - } - - /** - * If your HTTP proxy requires basic authentication, set this attribute to the username required - * for your HTTP proxy. - */ - public fun httpProxyUsername(httpProxyUsername: String) { - it.property("httpProxyUsername", httpProxyUsername) - } - - /** - * These headers will be passed to the proxy server while establishing the connection. - */ - public fun proxyHeaders(proxyHeaders: String) { - it.property("proxyHeaders", proxyHeaders) - } - - /** - * The password for connecting to SMSC server. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * The system id (username) for connecting to SMSC server. - */ - public fun systemId(systemId: String) { - it.property("systemId", systemId) - } - - /** - * Whether using SSL with the smpps protocol - */ - public fun usingSSL(usingSSL: String) { - it.property("usingSSL", usingSSL) - } - - /** - * Whether using SSL with the smpps protocol - */ - public fun usingSSL(usingSSL: Boolean) { - it.property("usingSSL", usingSSL.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SnmpUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SnmpUriDsl.kt deleted file mode 100644 index 1f637094f8376..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SnmpUriDsl.kt +++ /dev/null @@ -1,513 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Receive traps and poll SNMP (Simple Network Management Protocol) capable devices. - */ -public fun UriDsl.snmp(i: SnmpUriDsl.() -> Unit) { - SnmpUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SnmpUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("snmp") - } - - private var host: String = "" - - private var port: String = "" - - /** - * Hostname of the SNMP enabled device - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port") - } - - /** - * Port number of the SNMP enabled device - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port") - } - - /** - * Port number of the SNMP enabled device - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port") - } - - /** - * Defines which values you are interested in. Please have a look at the Wikipedia to get a better - * understanding. You may provide a single OID or a coma separated list of OIDs. Example: - * oids=1.3.6.1.2.1.1.3.0,1.3.6.1.2.1.25.3.2.1.5.1,1.3.6.1.2.1.25.3.5.1.1.1,1.3.6.1.2.1.43.5.1.1.11.1 - */ - public fun oids(oids: String) { - it.property("oids", oids) - } - - /** - * Here you can select which protocol to use. You can use either udp or tcp. - */ - public fun protocol(protocol: String) { - it.property("protocol", protocol) - } - - /** - * Defines how often a retry is made before canceling the request. - */ - public fun retries(retries: String) { - it.property("retries", retries) - } - - /** - * Defines how often a retry is made before canceling the request. - */ - public fun retries(retries: Int) { - it.property("retries", retries.toString()) - } - - /** - * Sets the community octet string for the snmp request. - */ - public fun snmpCommunity(snmpCommunity: String) { - it.property("snmpCommunity", snmpCommunity) - } - - /** - * Sets the context engine ID field of the scoped PDU. - */ - public fun snmpContextEngineId(snmpContextEngineId: String) { - it.property("snmpContextEngineId", snmpContextEngineId) - } - - /** - * Sets the context name field of this scoped PDU. - */ - public fun snmpContextName(snmpContextName: String) { - it.property("snmpContextName", snmpContextName) - } - - /** - * Sets the snmp version for the request. The value 0 means SNMPv1, 1 means SNMPv2c, and the value - * 3 means SNMPv3 - */ - public fun snmpVersion(snmpVersion: String) { - it.property("snmpVersion", snmpVersion) - } - - /** - * Sets the snmp version for the request. The value 0 means SNMPv1, 1 means SNMPv2c, and the value - * 3 means SNMPv3 - */ - public fun snmpVersion(snmpVersion: Int) { - it.property("snmpVersion", snmpVersion.toString()) - } - - /** - * Sets the timeout value for the request in millis. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Sets the timeout value for the request in millis. - */ - public fun timeout(timeout: Int) { - it.property("timeout", timeout.toString()) - } - - /** - * Which operation to perform such as poll, trap, etc. - */ - public fun type(type: String) { - it.property("type", type) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Sets the flag whether the scoped PDU will be displayed as the list if it has child elements in - * its tree - */ - public fun treeList(treeList: String) { - it.property("treeList", treeList) - } - - /** - * Sets the flag whether the scoped PDU will be displayed as the list if it has child elements in - * its tree - */ - public fun treeList(treeList: Boolean) { - it.property("treeList", treeList.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * The authentication passphrase. If not null, authenticationProtocol must also be not null. - * RFC3414 11.2 requires passphrases to have a minimum length of 8 bytes. If the length of - * authenticationPassphrase is less than 8 bytes an IllegalArgumentException is thrown. - */ - public fun authenticationPassphrase(authenticationPassphrase: String) { - it.property("authenticationPassphrase", authenticationPassphrase) - } - - /** - * Authentication protocol to use if security level is set to enable authentication The possible - * values are: MD5, SHA1 - */ - public fun authenticationProtocol(authenticationProtocol: String) { - it.property("authenticationProtocol", authenticationProtocol) - } - - /** - * The privacy passphrase. If not null, privacyProtocol must also be not null. RFC3414 11.2 - * requires passphrases to have a minimum length of 8 bytes. If the length of - * authenticationPassphrase is less than 8 bytes an IllegalArgumentException is thrown. - */ - public fun privacyPassphrase(privacyPassphrase: String) { - it.property("privacyPassphrase", privacyPassphrase) - } - - /** - * The privacy protocol ID to be associated with this user. If set to null, this user only - * supports unencrypted messages. - */ - public fun privacyProtocol(privacyProtocol: String) { - it.property("privacyProtocol", privacyProtocol) - } - - /** - * Sets the security level for this target. The supplied security level must be supported by the - * security model dependent information associated with the security name set for this target. The - * value 1 means: No authentication and no encryption. Anyone can create and read messages with this - * security level The value 2 means: Authentication and no encryption. Only the one with the right - * authentication key can create messages with this security level, but anyone can read the contents - * of the message. The value 3 means: Authentication and encryption. Only the one with the right - * authentication key can create messages with this security level, and only the one with the right - * encryption/decryption key can read the contents of the message. - */ - public fun securityLevel(securityLevel: String) { - it.property("securityLevel", securityLevel) - } - - /** - * Sets the security level for this target. The supplied security level must be supported by the - * security model dependent information associated with the security name set for this target. The - * value 1 means: No authentication and no encryption. Anyone can create and read messages with this - * security level The value 2 means: Authentication and no encryption. Only the one with the right - * authentication key can create messages with this security level, but anyone can read the contents - * of the message. The value 3 means: Authentication and encryption. Only the one with the right - * authentication key can create messages with this security level, and only the one with the right - * encryption/decryption key can read the contents of the message. - */ - public fun securityLevel(securityLevel: Int) { - it.property("securityLevel", securityLevel.toString()) - } - - /** - * Sets the security name to be used with this target. - */ - public fun securityName(securityName: String) { - it.property("securityName", securityName) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SolrUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SolrUriDsl.kt deleted file mode 100644 index c08aa77bfe961..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SolrUriDsl.kt +++ /dev/null @@ -1,288 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform operations against Apache Lucene Solr. - */ -public fun UriDsl.solr(i: SolrUriDsl.() -> Unit) { - SolrUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SolrUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("solr") - } - - private var url: String = "" - - /** - * Hostname and port for the Solr server(s). Multiple hosts can be specified, separated with a - * comma. See the solrClient parameter for more information on the SolrClient used to connect to - * Solr. - */ - public fun url(url: String) { - this.url = url - it.url("$url") - } - - /** - * If true, each producer operation will be automatically followed by a commit - */ - public fun autoCommit(autoCommit: String) { - it.property("autoCommit", autoCommit) - } - - /** - * If true, each producer operation will be automatically followed by a commit - */ - public fun autoCommit(autoCommit: Boolean) { - it.property("autoCommit", autoCommit.toString()) - } - - /** - * Sets the connection timeout on the SolrClient - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Sets the connection timeout on the SolrClient - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * maxConnectionsPerHost on the underlying HttpConnectionManager - */ - public fun defaultMaxConnectionsPerHost(defaultMaxConnectionsPerHost: String) { - it.property("defaultMaxConnectionsPerHost", defaultMaxConnectionsPerHost) - } - - /** - * maxConnectionsPerHost on the underlying HttpConnectionManager - */ - public fun defaultMaxConnectionsPerHost(defaultMaxConnectionsPerHost: Int) { - it.property("defaultMaxConnectionsPerHost", defaultMaxConnectionsPerHost.toString()) - } - - /** - * Sets the http client to be used by the solrClient. This is only applicable when solrClient is - * not set. - */ - public fun httpClient(httpClient: String) { - it.property("httpClient", httpClient) - } - - /** - * Maximum number of retries to attempt in the event of transient errors - */ - public fun maxRetries(maxRetries: String) { - it.property("maxRetries", maxRetries) - } - - /** - * Maximum number of retries to attempt in the event of transient errors - */ - public fun maxRetries(maxRetries: Int) { - it.property("maxRetries", maxRetries.toString()) - } - - /** - * maxTotalConnection on the underlying HttpConnectionManager - */ - public fun maxTotalConnections(maxTotalConnections: String) { - it.property("maxTotalConnections", maxTotalConnections) - } - - /** - * maxTotalConnection on the underlying HttpConnectionManager - */ - public fun maxTotalConnections(maxTotalConnections: Int) { - it.property("maxTotalConnections", maxTotalConnections.toString()) - } - - /** - * Set the request handler to be used - */ - public fun requestHandler(requestHandler: String) { - it.property("requestHandler", requestHandler) - } - - /** - * Uses the provided solr client to connect to solr. When this parameter is not specified, camel - * applies the following rules to determine the SolrClient: 1) when zkHost or zkChroot (=zookeeper - * root) parameter is set, then the CloudSolrClient is used. 2) when multiple hosts are specified in - * the uri (separated with a comma), then the CloudSolrClient (uri scheme is 'solrCloud') or the - * LBHttpSolrClient (uri scheme is not 'solrCloud') is used. 3) when the solr operation is - * INSERT_STREAMING, then the ConcurrentUpdateSolrClient is used. 4) otherwise, the HttpSolrClient is - * used. Note: A CloudSolrClient should point to zookeeper endpoint(s); other clients point to Solr - * endpoint(s). The SolrClient can also be set via the exchange header 'CamelSolrClient'. - */ - public fun solrClient(solrClient: String) { - it.property("solrClient", solrClient) - } - - /** - * Sets the socket timeout on the SolrClient - */ - public fun soTimeout(soTimeout: String) { - it.property("soTimeout", soTimeout) - } - - /** - * Sets the socket timeout on the SolrClient - */ - public fun soTimeout(soTimeout: Int) { - it.property("soTimeout", soTimeout.toString()) - } - - /** - * Sets the queue size for the ConcurrentUpdateSolrClient - */ - public fun streamingQueueSize(streamingQueueSize: String) { - it.property("streamingQueueSize", streamingQueueSize) - } - - /** - * Sets the queue size for the ConcurrentUpdateSolrClient - */ - public fun streamingQueueSize(streamingQueueSize: Int) { - it.property("streamingQueueSize", streamingQueueSize.toString()) - } - - /** - * Sets the number of threads for the ConcurrentUpdateSolrClient - */ - public fun streamingThreadCount(streamingThreadCount: String) { - it.property("streamingThreadCount", streamingThreadCount) - } - - /** - * Sets the number of threads for the ConcurrentUpdateSolrClient - */ - public fun streamingThreadCount(streamingThreadCount: Int) { - it.property("streamingThreadCount", streamingThreadCount.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Set the default collection for SolrCloud - */ - public fun collection(collection: String) { - it.property("collection", collection) - } - - /** - * Set the chroot of the zookeeper connection (include the leading slash; e.g. '/mychroot') - */ - public fun zkChroot(zkChroot: String) { - it.property("zkChroot", zkChroot) - } - - /** - * Set the ZooKeeper host(s) urls which the CloudSolrClient uses, e.g. - * zkHost=localhost:2181,localhost:2182. Optionally add the chroot, e.g. - * zkHost=localhost:2181,localhost:2182/rootformysolr. In case the first part of the url path - * (='contextroot') is set to 'solr' (e.g. 'localhost:2181/solr' or 'localhost:2181/solr/..'), then - * that path is not considered as zookeeper chroot for backward compatibility reasons (this behaviour - * can be overridden via zkChroot parameter). - */ - public fun zkHost(zkHost: String) { - it.property("zkHost", zkHost) - } - - /** - * Server side must support gzip or deflate for this to have any effect - */ - public fun allowCompression(allowCompression: String) { - it.property("allowCompression", allowCompression) - } - - /** - * Server side must support gzip or deflate for this to have any effect - */ - public fun allowCompression(allowCompression: Boolean) { - it.property("allowCompression", allowCompression.toString()) - } - - /** - * Indicates whether redirects are used to get to the Solr server - */ - public fun followRedirects(followRedirects: String) { - it.property("followRedirects", followRedirects) - } - - /** - * Indicates whether redirects are used to get to the Solr server - */ - public fun followRedirects(followRedirects: Boolean) { - it.property("followRedirects", followRedirects.toString()) - } - - /** - * Sets password for basic auth plugin enabled servers - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Sets username for basic auth plugin enabled servers - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SplunkHecUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SplunkHecUriDsl.kt deleted file mode 100644 index 24c272277ffe8..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SplunkHecUriDsl.kt +++ /dev/null @@ -1,201 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * The splunk component allows publishing events in Splunk using the HTTP Event Collector. - */ -public fun UriDsl.`splunk-hec`(i: SplunkHecUriDsl.() -> Unit) { - SplunkHecUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SplunkHecUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("splunk-hec") - } - - private var splunkURL: String = "" - - /** - * Splunk Host and Port (example: my_splunk_server:8089) - */ - public fun splunkURL(splunkURL: String) { - this.splunkURL = splunkURL - it.url("$splunkURL") - } - - /** - * Send only the message body - */ - public fun bodyOnly(bodyOnly: String) { - it.property("bodyOnly", bodyOnly) - } - - /** - * Send only the message body - */ - public fun bodyOnly(bodyOnly: Boolean) { - it.property("bodyOnly", bodyOnly.toString()) - } - - /** - * Send only message headers - */ - public fun headersOnly(headersOnly: String) { - it.property("headersOnly", headersOnly) - } - - /** - * Send only message headers - */ - public fun headersOnly(headersOnly: Boolean) { - it.property("headersOnly", headersOnly.toString()) - } - - /** - * Splunk host field of the event message. This is not the Splunk host to connect to. - */ - public fun host(host: String) { - it.property("host", host) - } - - /** - * Splunk index to write to - */ - public fun index(index: String) { - it.property("index", index) - } - - /** - * Splunk source argument - */ - public fun source(source: String) { - it.property("source", source) - } - - /** - * Splunk sourcetype argument - */ - public fun sourceType(sourceType: String) { - it.property("sourceType", sourceType) - } - - /** - * Splunk endpoint Defaults to /services/collector/event To write RAW data like JSON use - * /services/collector/raw For a list of all endpoints refer to splunk documentation (HTTP Event - * Collector REST API endpoints) Example for Spunk 8.2.x: - * https://docs.splunk.com/Documentation/SplunkCloud/8.2.2203/Data/HECRESTendpoints To extract - * timestamps in Splunk8.0 /services/collector/eventauto_extract_timestamp=true Remember to utilize - * RAW{} for questionmarks or slashes in parameters. - */ - public fun splunkEndpoint(splunkEndpoint: String) { - it.property("splunkEndpoint", splunkEndpoint) - } - - /** - * SSL configuration - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * Time this even occurred. By default, the time will be when this event hits the splunk server. - */ - public fun time(time: String) { - it.property("time", time) - } - - /** - * Time this even occurred. By default, the time will be when this event hits the splunk server. - */ - public fun time(time: Int) { - it.property("time", time.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Contact HEC over https. - */ - public fun https(https: String) { - it.property("https", https) - } - - /** - * Contact HEC over https. - */ - public fun https(https: Boolean) { - it.property("https", https.toString()) - } - - /** - * Splunk HEC TLS verification. - */ - public fun skipTlsVerify(skipTlsVerify: String) { - it.property("skipTlsVerify", skipTlsVerify) - } - - /** - * Splunk HEC TLS verification. - */ - public fun skipTlsVerify(skipTlsVerify: Boolean) { - it.property("skipTlsVerify", skipTlsVerify.toString()) - } - - /** - * Splunk HEC token (this is the token created for HEC and not the user's token) - */ - public fun token(token: String) { - it.property("token", token) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SplunkUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SplunkUriDsl.kt deleted file mode 100644 index fc8b3a937bc2e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SplunkUriDsl.kt +++ /dev/null @@ -1,582 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Publish or search for events in Splunk. - */ -public fun UriDsl.splunk(i: SplunkUriDsl.() -> Unit) { - SplunkUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SplunkUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("splunk") - } - - private var name: String = "" - - /** - * Name has no purpose - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * Splunk app - */ - public fun app(app: String) { - it.property("app", app) - } - - /** - * Timeout in MS when connecting to Splunk server - */ - public fun connectionTimeout(connectionTimeout: String) { - it.property("connectionTimeout", connectionTimeout) - } - - /** - * Timeout in MS when connecting to Splunk server - */ - public fun connectionTimeout(connectionTimeout: Int) { - it.property("connectionTimeout", connectionTimeout.toString()) - } - - /** - * Splunk host. - */ - public fun host(host: String) { - it.property("host", host) - } - - /** - * Splunk owner - */ - public fun owner(owner: String) { - it.property("owner", owner) - } - - /** - * Splunk port - */ - public fun port(port: String) { - it.property("port", port) - } - - /** - * Splunk port - */ - public fun port(port: Int) { - it.property("port", port.toString()) - } - - /** - * Splunk scheme - */ - public fun scheme(scheme: String) { - it.property("scheme", scheme) - } - - /** - * A number that indicates the maximum number of entities to return. - */ - public fun count(count: String) { - it.property("count", count) - } - - /** - * A number that indicates the maximum number of entities to return. - */ - public fun count(count: Int) { - it.property("count", count.toString()) - } - - /** - * Earliest time of the search time window. - */ - public fun earliestTime(earliestTime: String) { - it.property("earliestTime", earliestTime) - } - - /** - * Initial start offset of the first search - */ - public fun initEarliestTime(initEarliestTime: String) { - it.property("initEarliestTime", initEarliestTime) - } - - /** - * Latest time of the search time window. - */ - public fun latestTime(latestTime: String) { - it.property("latestTime", latestTime) - } - - /** - * The name of the query saved in Splunk to run - */ - public fun savedSearch(savedSearch: String) { - it.property("savedSearch", savedSearch) - } - - /** - * The Splunk query to run - */ - public fun search(search: String) { - it.property("search", search) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Sets streaming mode. Streaming mode sends exchanges as they are received, rather than in a - * batch. - */ - public fun streaming(streaming: String) { - it.property("streaming", streaming) - } - - /** - * Sets streaming mode. Streaming mode sends exchanges as they are received, rather than in a - * batch. - */ - public fun streaming(streaming: Boolean) { - it.property("streaming", streaming.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Override the default Splunk event host field - */ - public fun eventHost(eventHost: String) { - it.property("eventHost", eventHost) - } - - /** - * Splunk index to write to - */ - public fun index(index: String) { - it.property("index", index) - } - - /** - * Should the payload be inserted raw - */ - public fun raw(raw: String) { - it.property("raw", raw) - } - - /** - * Should the payload be inserted raw - */ - public fun raw(raw: Boolean) { - it.property("raw", raw.toString()) - } - - /** - * Splunk source argument - */ - public fun source(source: String) { - it.property("source", source) - } - - /** - * Splunk sourcetype argument - */ - public fun sourceType(sourceType: String) { - it.property("sourceType", sourceType) - } - - /** - * Splunk tcp receiver port defined locally on splunk server. (For example if splunk port 9997 is - * mapped to 12345, tcpReceiverLocalPort has to be 9997) - */ - public fun tcpReceiverLocalPort(tcpReceiverLocalPort: String) { - it.property("tcpReceiverLocalPort", tcpReceiverLocalPort) - } - - /** - * Splunk tcp receiver port defined locally on splunk server. (For example if splunk port 9997 is - * mapped to 12345, tcpReceiverLocalPort has to be 9997) - */ - public fun tcpReceiverLocalPort(tcpReceiverLocalPort: Int) { - it.property("tcpReceiverLocalPort", tcpReceiverLocalPort.toString()) - } - - /** - * Splunk tcp receiver port - */ - public fun tcpReceiverPort(tcpReceiverPort: String) { - it.property("tcpReceiverPort", tcpReceiverPort) - } - - /** - * Splunk tcp receiver port - */ - public fun tcpReceiverPort(tcpReceiverPort: Int) { - it.property("tcpReceiverPort", tcpReceiverPort.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Password for Splunk - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Set the ssl protocol to use - */ - public fun sslProtocol(sslProtocol: String) { - it.property("sslProtocol", sslProtocol) - } - - /** - * User's token for Splunk. This takes precedence over password when both are set - */ - public fun token(token: String) { - it.property("token", token) - } - - /** - * Username for Splunk - */ - public fun username(username: String) { - it.property("username", username) - } - - /** - * Use sun.net.www.protocol.https.Handler Https handler to establish the Splunk Connection. Can be - * useful when running in application servers to avoid app. server https handling. - */ - public fun useSunHttpsHandler(useSunHttpsHandler: String) { - it.property("useSunHttpsHandler", useSunHttpsHandler) - } - - /** - * Use sun.net.www.protocol.https.Handler Https handler to establish the Splunk Connection. Can be - * useful when running in application servers to avoid app. server https handling. - */ - public fun useSunHttpsHandler(useSunHttpsHandler: Boolean) { - it.property("useSunHttpsHandler", useSunHttpsHandler.toString()) - } - - /** - * Sets client's certificate validation mode. Value false makes SSL vulnerable and is not - * recommended for the production environment. - */ - public fun validateCertificates(validateCertificates: String) { - it.property("validateCertificates", validateCertificates) - } - - /** - * Sets client's certificate validation mode. Value false makes SSL vulnerable and is not - * recommended for the production environment. - */ - public fun validateCertificates(validateCertificates: Boolean) { - it.property("validateCertificates", validateCertificates.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringBatchUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringBatchUriDsl.kt deleted file mode 100644 index edb36184d6934..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringBatchUriDsl.kt +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send messages to Spring Batch for further processing. - */ -public fun UriDsl.`spring-batch`(i: SpringBatchUriDsl.() -> Unit) { - SpringBatchUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SpringBatchUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("spring-batch") - } - - private var jobName: String = "" - - /** - * The name of the Spring Batch job located in the registry. - */ - public fun jobName(jobName: String) { - this.jobName = jobName - it.url("$jobName") - } - - /** - * Explicitly defines if the jobName should be taken from the headers instead of the URI. - */ - public fun jobFromHeader(jobFromHeader: String) { - it.property("jobFromHeader", jobFromHeader) - } - - /** - * Explicitly defines if the jobName should be taken from the headers instead of the URI. - */ - public fun jobFromHeader(jobFromHeader: Boolean) { - it.property("jobFromHeader", jobFromHeader.toString()) - } - - /** - * Explicitly specifies a JobLauncher to be used. - */ - public fun jobLauncher(jobLauncher: String) { - it.property("jobLauncher", jobLauncher) - } - - /** - * Explicitly specifies a JobRegistry to be used. - */ - public fun jobRegistry(jobRegistry: String) { - it.property("jobRegistry", jobRegistry) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringEventUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringEventUriDsl.kt deleted file mode 100644 index e25ee33a81389..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringEventUriDsl.kt +++ /dev/null @@ -1,122 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Listen for Spring Application Events. - */ -public fun UriDsl.`spring-event`(i: SpringEventUriDsl.() -> Unit) { - SpringEventUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SpringEventUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("spring-event") - } - - private var name: String = "" - - /** - * Name of endpoint - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringJdbcUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringJdbcUriDsl.kt deleted file mode 100644 index 1db5d5fbdbd7f..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringJdbcUriDsl.kt +++ /dev/null @@ -1,248 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Access databases through SQL and JDBC with Spring Transaction support. - */ -public fun UriDsl.`spring-jdbc`(i: SpringJdbcUriDsl.() -> Unit) { - SpringJdbcUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SpringJdbcUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("spring-jdbc") - } - - private var dataSourceName: String = "" - - /** - * Name of DataSource to lookup in the Registry. If the name is dataSource or default, then Camel - * will attempt to lookup a default DataSource from the registry, meaning if there is a only one - * instance of DataSource found, then this DataSource will be used. - */ - public fun dataSourceName(dataSourceName: String) { - this.dataSourceName = dataSourceName - it.url("$dataSourceName") - } - - /** - * Whether to allow using named parameters in the queries. - */ - public fun allowNamedParameters(allowNamedParameters: String) { - it.property("allowNamedParameters", allowNamedParameters) - } - - /** - * Whether to allow using named parameters in the queries. - */ - public fun allowNamedParameters(allowNamedParameters: Boolean) { - it.property("allowNamedParameters", allowNamedParameters.toString()) - } - - /** - * Specify the full package and class name to use as conversion when outputType=SelectOne or - * SelectList. - */ - public fun outputClass(outputClass: String) { - it.property("outputClass", outputClass) - } - - /** - * Determines the output the producer should use. - */ - public fun outputType(outputType: String) { - it.property("outputType", outputType) - } - - /** - * Optional parameters to the java.sql.Statement. For example to set maxRows, fetchSize etc. - */ - public fun parameters(parameters: String) { - it.property("parameters", parameters) - } - - /** - * The default maximum number of rows that can be read by a polling query. The default value is 0. - */ - public fun readSize(readSize: String) { - it.property("readSize", readSize) - } - - /** - * The default maximum number of rows that can be read by a polling query. The default value is 0. - */ - public fun readSize(readSize: Int) { - it.property("readSize", readSize.toString()) - } - - /** - * Camel will set the autoCommit on the JDBC connection to be false, commit the change after - * executed the statement and reset the autoCommit flag of the connection at the end, if the - * resetAutoCommit is true. If the JDBC connection doesn't support to reset the autoCommit flag, you - * can set the resetAutoCommit flag to be false, and Camel will not try to reset the autoCommit flag. - * When used with XA transactions you most likely need to set it to false so that the transaction - * manager is in charge of committing this tx. - */ - public fun resetAutoCommit(resetAutoCommit: String) { - it.property("resetAutoCommit", resetAutoCommit) - } - - /** - * Camel will set the autoCommit on the JDBC connection to be false, commit the change after - * executed the statement and reset the autoCommit flag of the connection at the end, if the - * resetAutoCommit is true. If the JDBC connection doesn't support to reset the autoCommit flag, you - * can set the resetAutoCommit flag to be false, and Camel will not try to reset the autoCommit flag. - * When used with XA transactions you most likely need to set it to false so that the transaction - * manager is in charge of committing this tx. - */ - public fun resetAutoCommit(resetAutoCommit: Boolean) { - it.property("resetAutoCommit", resetAutoCommit.toString()) - } - - /** - * Whether transactions are in use. - */ - public fun transacted(transacted: String) { - it.property("transacted", transacted) - } - - /** - * Whether transactions are in use. - */ - public fun transacted(transacted: Boolean) { - it.property("transacted", transacted.toString()) - } - - /** - * To read BLOB columns as bytes instead of string data. This may be needed for certain databases - * such as Oracle where you must read BLOB columns as bytes. - */ - public fun useGetBytesForBlob(useGetBytesForBlob: String) { - it.property("useGetBytesForBlob", useGetBytesForBlob) - } - - /** - * To read BLOB columns as bytes instead of string data. This may be needed for certain databases - * such as Oracle where you must read BLOB columns as bytes. - */ - public fun useGetBytesForBlob(useGetBytesForBlob: Boolean) { - it.property("useGetBytesForBlob", useGetBytesForBlob.toString()) - } - - /** - * Set this option to true to use the prepareStatementStrategy with named parameters. This allows - * to define queries with named placeholders, and use headers with the dynamic values for the query - * placeholders. - */ - public fun useHeadersAsParameters(useHeadersAsParameters: String) { - it.property("useHeadersAsParameters", useHeadersAsParameters) - } - - /** - * Set this option to true to use the prepareStatementStrategy with named parameters. This allows - * to define queries with named placeholders, and use headers with the dynamic values for the query - * placeholders. - */ - public fun useHeadersAsParameters(useHeadersAsParameters: Boolean) { - it.property("useHeadersAsParameters", useHeadersAsParameters.toString()) - } - - /** - * Sets whether to use JDBC 4 or JDBC 3.0 or older semantic when retrieving column name. JDBC 4.0 - * uses columnLabel to get the column name where as JDBC 3.0 uses both columnName or columnLabel. - * Unfortunately JDBC drivers behave differently so you can use this option to work out issues around - * your JDBC driver if you get problem using this component This option is default true. - */ - public fun useJDBC4ColumnNameAndLabelSemantics(useJDBC4ColumnNameAndLabelSemantics: String) { - it.property("useJDBC4ColumnNameAndLabelSemantics", useJDBC4ColumnNameAndLabelSemantics) - } - - /** - * Sets whether to use JDBC 4 or JDBC 3.0 or older semantic when retrieving column name. JDBC 4.0 - * uses columnLabel to get the column name where as JDBC 3.0 uses both columnName or columnLabel. - * Unfortunately JDBC drivers behave differently so you can use this option to work out issues around - * your JDBC driver if you get problem using this component This option is default true. - */ - public fun useJDBC4ColumnNameAndLabelSemantics(useJDBC4ColumnNameAndLabelSemantics: Boolean) { - it.property("useJDBC4ColumnNameAndLabelSemantics", - useJDBC4ColumnNameAndLabelSemantics.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use a custom org.apache.camel.component.jdbc.BeanRowMapper when using outputClass. The - * default implementation will lower case the row names and skip underscores, and dashes. For example - * CUST_ID is mapped as custId. - */ - public fun beanRowMapper(beanRowMapper: String) { - it.property("beanRowMapper", beanRowMapper) - } - - /** - * To use a custom strategy for working with connections. Do not use a custom strategy when using - * the spring-jdbc component because a special Spring ConnectionStrategy is used by default to - * support Spring Transactions. - */ - public fun connectionStrategy(connectionStrategy: String) { - it.property("connectionStrategy", connectionStrategy) - } - - /** - * Allows the plugin to use a custom org.apache.camel.component.jdbc.JdbcPrepareStatementStrategy - * to control preparation of the query and prepared statement. - */ - public fun prepareStatementStrategy(prepareStatementStrategy: String) { - it.property("prepareStatementStrategy", prepareStatementStrategy) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringLdapUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringLdapUriDsl.kt deleted file mode 100644 index c2951a914a207..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringLdapUriDsl.kt +++ /dev/null @@ -1,90 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform searches in LDAP servers using filters as the message payload. - */ -public fun UriDsl.`spring-ldap`(i: SpringLdapUriDsl.() -> Unit) { - SpringLdapUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SpringLdapUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("spring-ldap") - } - - private var templateName: String = "" - - /** - * Name of the Spring LDAP Template bean - */ - public fun templateName(templateName: String) { - this.templateName = templateName - it.url("$templateName") - } - - /** - * The LDAP operation to be performed. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * The scope of the search operation. - */ - public fun scope(scope: String) { - it.property("scope", scope) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringRabbitmqUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringRabbitmqUriDsl.kt deleted file mode 100644 index ae98dc7f19ff2..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringRabbitmqUriDsl.kt +++ /dev/null @@ -1,588 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages from RabbitMQ using the Spring RabbitMQ client. - */ -public fun UriDsl.`spring-rabbitmq`(i: SpringRabbitmqUriDsl.() -> Unit) { - SpringRabbitmqUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SpringRabbitmqUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("spring-rabbitmq") - } - - private var exchangeName: String = "" - - /** - * The exchange name determines the exchange to which the produced messages will be sent to. In - * the case of consumers, the exchange name determines the exchange the queue will be bound to. Note: - * to use default exchange then do not use empty name, but use default instead. - */ - public fun exchangeName(exchangeName: String) { - this.exchangeName = exchangeName - it.url("$exchangeName") - } - - /** - * The connection factory to be use. A connection factory must be configured either on the - * component or endpoint. - */ - public fun connectionFactory(connectionFactory: String) { - it.property("connectionFactory", connectionFactory) - } - - /** - * The name of the dead letter exchange - */ - public fun deadLetterExchange(deadLetterExchange: String) { - it.property("deadLetterExchange", deadLetterExchange) - } - - /** - * The type of the dead letter exchange - */ - public fun deadLetterExchangeType(deadLetterExchangeType: String) { - it.property("deadLetterExchangeType", deadLetterExchangeType) - } - - /** - * The name of the dead letter queue - */ - public fun deadLetterQueue(deadLetterQueue: String) { - it.property("deadLetterQueue", deadLetterQueue) - } - - /** - * The routing key for the dead letter exchange - */ - public fun deadLetterRoutingKey(deadLetterRoutingKey: String) { - it.property("deadLetterRoutingKey", deadLetterRoutingKey) - } - - /** - * Specifies whether Camel ignores the ReplyTo header in messages. If true, Camel does not send a - * reply back to the destination specified in the ReplyTo header. You can use this option if you want - * Camel to consume from a route and you do not want Camel to automatically send back a reply message - * because another component in your code handles the reply message. You can also use this option if - * you want to use Camel as a proxy between different message brokers and you want to route message - * from one system to another. - */ - public fun disableReplyTo(disableReplyTo: String) { - it.property("disableReplyTo", disableReplyTo) - } - - /** - * Specifies whether Camel ignores the ReplyTo header in messages. If true, Camel does not send a - * reply back to the destination specified in the ReplyTo header. You can use this option if you want - * Camel to consume from a route and you do not want Camel to automatically send back a reply message - * because another component in your code handles the reply message. You can also use this option if - * you want to use Camel as a proxy between different message brokers and you want to route message - * from one system to another. - */ - public fun disableReplyTo(disableReplyTo: Boolean) { - it.property("disableReplyTo", disableReplyTo.toString()) - } - - /** - * The queue(s) to use for consuming or producing messages. Multiple queue names can be separated - * by comma. If none has been configured then Camel will generate an unique id as the queue name. - */ - public fun queues(queues: String) { - it.property("queues", queues) - } - - /** - * The value of a routing key to use. Default is empty which is not helpful when using the default - * (or any direct) exchange, but fine if the exchange is a headers exchange for instance. - */ - public fun routingKey(routingKey: String) { - it.property("routingKey", routingKey) - } - - /** - * Specifies whether to test the connection on startup. This ensures that when Camel starts that - * all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted - * then Camel throws an exception on startup. This ensures that Camel is not started with failed - * connections. The JMS producers is tested as well. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: String) { - it.property("testConnectionOnStartup", testConnectionOnStartup) - } - - /** - * Specifies whether to test the connection on startup. This ensures that when Camel starts that - * all the JMS consumers have a valid connection to the JMS broker. If a connection cannot be granted - * then Camel throws an exception on startup. This ensures that Camel is not started with failed - * connections. The JMS producers is tested as well. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: Boolean) { - it.property("testConnectionOnStartup", testConnectionOnStartup.toString()) - } - - /** - * Flag controlling the behaviour of the container with respect to message acknowledgement. The - * most common usage is to let the container handle the acknowledgements (so the listener doesn't - * need to know about the channel or the message). Set to AcknowledgeMode.MANUAL if the listener will - * send the acknowledgements itself using Channel.basicAck(long, boolean). Manual acks are consistent - * with either a transactional or non-transactional channel, but if you are doing no other work on - * the channel at the same other than receiving a single message then the transaction is probably - * unnecessary. Set to AcknowledgeMode.NONE to tell the broker not to expect any acknowledgements, - * and it will assume all messages are acknowledged as soon as they are sent (this is autoack in - * native Rabbit broker terms). If AcknowledgeMode.NONE then the channel cannot be transactional (so - * the container will fail on start up if that flag is accidentally set). - */ - public fun acknowledgeMode(acknowledgeMode: String) { - it.property("acknowledgeMode", acknowledgeMode) - } - - /** - * Whether the consumer processes the Exchange asynchronously. If enabled then the consumer may - * pickup the next message from the queue, while the previous message is being processed - * asynchronously (by the Asynchronous Routing Engine). This means that messages may be processed not - * 100% strictly in order. If disabled (as default) then the Exchange is fully processed before the - * consumer will pickup the next message from the queue. - */ - public fun asyncConsumer(asyncConsumer: String) { - it.property("asyncConsumer", asyncConsumer) - } - - /** - * Whether the consumer processes the Exchange asynchronously. If enabled then the consumer may - * pickup the next message from the queue, while the previous message is being processed - * asynchronously (by the Asynchronous Routing Engine). This means that messages may be processed not - * 100% strictly in order. If disabled (as default) then the Exchange is fully processed before the - * consumer will pickup the next message from the queue. - */ - public fun asyncConsumer(asyncConsumer: Boolean) { - it.property("asyncConsumer", asyncConsumer.toString()) - } - - /** - * Specifies whether the consumer should auto declare binding between exchange, queue and routing - * key when starting. - */ - public fun autoDeclare(autoDeclare: String) { - it.property("autoDeclare", autoDeclare) - } - - /** - * Specifies whether the consumer should auto declare binding between exchange, queue and routing - * key when starting. - */ - public fun autoDeclare(autoDeclare: Boolean) { - it.property("autoDeclare", autoDeclare.toString()) - } - - /** - * Specifies whether the consumer container should auto-startup. - */ - public fun autoStartup(autoStartup: String) { - it.property("autoStartup", autoStartup) - } - - /** - * Specifies whether the consumer container should auto-startup. - */ - public fun autoStartup(autoStartup: Boolean) { - it.property("autoStartup", autoStartup.toString()) - } - - /** - * The type of the exchange - */ - public fun exchangeType(exchangeType: String) { - it.property("exchangeType", exchangeType) - } - - /** - * Set to true for an exclusive consumer - */ - public fun exclusive(exclusive: String) { - it.property("exclusive", exclusive) - } - - /** - * Set to true for an exclusive consumer - */ - public fun exclusive(exclusive: Boolean) { - it.property("exclusive", exclusive.toString()) - } - - /** - * How many times a Rabbitmq consumer will try the same message if Camel failed to process the - * message (The number of attempts includes the initial try) - */ - public fun maximumRetryAttempts(maximumRetryAttempts: String) { - it.property("maximumRetryAttempts", maximumRetryAttempts) - } - - /** - * How many times a Rabbitmq consumer will try the same message if Camel failed to process the - * message (The number of attempts includes the initial try) - */ - public fun maximumRetryAttempts(maximumRetryAttempts: Int) { - it.property("maximumRetryAttempts", maximumRetryAttempts.toString()) - } - - /** - * Set to true for an no-local consumer - */ - public fun noLocal(noLocal: String) { - it.property("noLocal", noLocal) - } - - /** - * Set to true for an no-local consumer - */ - public fun noLocal(noLocal: Boolean) { - it.property("noLocal", noLocal.toString()) - } - - /** - * Whether a Rabbitmq consumer should reject the message without requeuing. This enables failed - * messages to be sent to a Dead Letter Exchange/Queue, if the broker is so configured. - */ - public fun rejectAndDontRequeue(rejectAndDontRequeue: String) { - it.property("rejectAndDontRequeue", rejectAndDontRequeue) - } - - /** - * Whether a Rabbitmq consumer should reject the message without requeuing. This enables failed - * messages to be sent to a Dead Letter Exchange/Queue, if the broker is so configured. - */ - public fun rejectAndDontRequeue(rejectAndDontRequeue: Boolean) { - it.property("rejectAndDontRequeue", rejectAndDontRequeue.toString()) - } - - /** - * Delay in millis a Rabbitmq consumer will wait before redelivering a message that Camel failed - * to process - */ - public fun retryDelay(retryDelay: String) { - it.property("retryDelay", retryDelay) - } - - /** - * Delay in millis a Rabbitmq consumer will wait before redelivering a message that Camel failed - * to process - */ - public fun retryDelay(retryDelay: Int) { - it.property("retryDelay", retryDelay.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * The number of consumers - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * The number of consumers - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * The maximum number of consumers (available only with SMLC) - */ - public fun maxConcurrentConsumers(maxConcurrentConsumers: String) { - it.property("maxConcurrentConsumers", maxConcurrentConsumers) - } - - /** - * The maximum number of consumers (available only with SMLC) - */ - public fun maxConcurrentConsumers(maxConcurrentConsumers: Int) { - it.property("maxConcurrentConsumers", maxConcurrentConsumers.toString()) - } - - /** - * The type of the MessageListenerContainer - */ - public fun messageListenerContainerType(messageListenerContainerType: String) { - it.property("messageListenerContainerType", messageListenerContainerType) - } - - /** - * Tell the broker how many messages to send in a single request. Often this can be set quite high - * to improve throughput. - */ - public fun prefetchCount(prefetchCount: String) { - it.property("prefetchCount", prefetchCount) - } - - /** - * Tell the broker how many messages to send in a single request. Often this can be set quite high - * to improve throughput. - */ - public fun prefetchCount(prefetchCount: Int) { - it.property("prefetchCount", prefetchCount.toString()) - } - - /** - * Custom retry configuration to use. If this is configured then the other settings such as - * maximumRetryAttempts for retry are not in use. - */ - public fun retry(retry: String) { - it.property("retry", retry) - } - - /** - * Whether to allow sending messages with no body. If this option is false and the message body is - * null, then an MessageConversionException is thrown. - */ - public fun allowNullBody(allowNullBody: String) { - it.property("allowNullBody", allowNullBody) - } - - /** - * Whether to allow sending messages with no body. If this option is false and the message body is - * null, then an MessageConversionException is thrown. - */ - public fun allowNullBody(allowNullBody: Boolean) { - it.property("allowNullBody", allowNullBody.toString()) - } - - /** - * Specifies whether the producer should auto declare binding between exchange, queue and routing - * key when starting. - */ - public fun autoDeclareProducer(autoDeclareProducer: String) { - it.property("autoDeclareProducer", autoDeclareProducer) - } - - /** - * Specifies whether the producer should auto declare binding between exchange, queue and routing - * key when starting. - */ - public fun autoDeclareProducer(autoDeclareProducer: Boolean) { - it.property("autoDeclareProducer", autoDeclareProducer.toString()) - } - - /** - * Controls whether to wait for confirms. The connection factory must be configured for publisher - * confirms and this method. auto = Camel detects if the connection factory uses confirms or not. - * disabled = Confirms is disabled. enabled = Confirms is enabled. - */ - public fun confirm(confirm: String) { - it.property("confirm", confirm) - } - - /** - * Specify the timeout in milliseconds to be used when waiting for a message sent to be confirmed - * by RabbitMQ when doing send only messaging (InOnly). The default value is 5 seconds. A negative - * value indicates an indefinite timeout. - */ - public fun confirmTimeout(confirmTimeout: String) { - it.property("confirmTimeout", confirmTimeout) - } - - /** - * Specify the timeout in milliseconds to be used when waiting for a reply message when doing - * request/reply (InOut) messaging. The default value is 30 seconds. A negative value indicates an - * indefinite timeout (Beware that this will cause a memory leak if a reply is not received). - */ - public fun replyTimeout(replyTimeout: String) { - it.property("replyTimeout", replyTimeout) - } - - /** - * If true the queue will not be bound to the exchange after declaring it. - */ - public fun skipBindQueue(skipBindQueue: String) { - it.property("skipBindQueue", skipBindQueue) - } - - /** - * If true the queue will not be bound to the exchange after declaring it. - */ - public fun skipBindQueue(skipBindQueue: Boolean) { - it.property("skipBindQueue", skipBindQueue.toString()) - } - - /** - * This can be used if we need to declare the queue but not the exchange. - */ - public fun skipDeclareExchange(skipDeclareExchange: String) { - it.property("skipDeclareExchange", skipDeclareExchange) - } - - /** - * This can be used if we need to declare the queue but not the exchange. - */ - public fun skipDeclareExchange(skipDeclareExchange: Boolean) { - it.property("skipDeclareExchange", skipDeclareExchange.toString()) - } - - /** - * If true the producer will not declare and bind a queue. This can be used for directing messages - * via an existing routing key. - */ - public fun skipDeclareQueue(skipDeclareQueue: String) { - it.property("skipDeclareQueue", skipDeclareQueue) - } - - /** - * If true the producer will not declare and bind a queue. This can be used for directing messages - * via an existing routing key. - */ - public fun skipDeclareQueue(skipDeclareQueue: Boolean) { - it.property("skipDeclareQueue", skipDeclareQueue.toString()) - } - - /** - * Use a separate connection for publishers and consumers - */ - public fun usePublisherConnection(usePublisherConnection: String) { - it.property("usePublisherConnection", usePublisherConnection) - } - - /** - * Use a separate connection for publishers and consumers - */ - public fun usePublisherConnection(usePublisherConnection: Boolean) { - it.property("usePublisherConnection", usePublisherConnection.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Specify arguments for configuring the different RabbitMQ concepts, a different prefix is - * required for each element: arg.consumer. arg.exchange. arg.queue. arg.binding. arg.dlq.exchange. - * arg.dlq.queue. arg.dlq.binding. For example to declare a queue with message ttl argument: - * args=arg.queue.x-message-ttl=60000 - */ - public fun args(args: String) { - it.property("args", args) - } - - /** - * To use a custom MessageConverter so you can be in control how to map to/from a - * org.springframework.amqp.core.Message. - */ - public fun messageConverter(messageConverter: String) { - it.property("messageConverter", messageConverter) - } - - /** - * To use a custom MessagePropertiesConverter so you can be in control how to map to/from a - * org.springframework.amqp.core.MessageProperties. - */ - public fun messagePropertiesConverter(messagePropertiesConverter: String) { - it.property("messagePropertiesConverter", messagePropertiesConverter) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringRedisUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringRedisUriDsl.kt deleted file mode 100644 index cb78e277000b9..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringRedisUriDsl.kt +++ /dev/null @@ -1,184 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages from Redis. - */ -public fun UriDsl.`spring-redis`(i: SpringRedisUriDsl.() -> Unit) { - SpringRedisUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SpringRedisUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("spring-redis") - } - - private var host: String = "" - - private var port: String = "" - - /** - * The host where Redis server is running. - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port") - } - - /** - * Redis server port number - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port") - } - - /** - * Redis server port number - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port") - } - - /** - * List of topic names or name patterns to subscribe to. Multiple names can be separated by comma. - */ - public fun channels(channels: String) { - it.property("channels", channels) - } - - /** - * Default command, which can be overridden by message header. Notice the consumer only supports - * the following commands: PSUBSCRIBE and SUBSCRIBE - */ - public fun command(command: String) { - it.property("command", command) - } - - /** - * Reference to a pre-configured RedisConnectionFactory instance to use. - */ - public fun connectionFactory(connectionFactory: String) { - it.property("connectionFactory", connectionFactory) - } - - /** - * Reference to a pre-configured RedisTemplate instance to use. - */ - public fun redisTemplate(redisTemplate: String) { - it.property("redisTemplate", redisTemplate) - } - - /** - * Reference to a pre-configured RedisSerializer instance to use. - */ - public fun serializer(serializer: String) { - it.property("serializer", serializer) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Reference to a pre-configured RedisMessageListenerContainer instance to use. - */ - public fun listenerContainer(listenerContainer: String) { - it.property("listenerContainer", listenerContainer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringWsUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringWsUriDsl.kt deleted file mode 100644 index 7e17243e75142..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SpringWsUriDsl.kt +++ /dev/null @@ -1,346 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Access external web services as a client or expose your own web services. - */ -public fun UriDsl.`spring-ws`(i: SpringWsUriDsl.() -> Unit) { - SpringWsUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SpringWsUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("spring-ws") - } - - private var type: String = "" - - private var lookupKey: String = "" - - private var webServiceEndpointUri: String = "" - - /** - * Endpoint mapping type if endpoint mapping is used. rootqname - Offers the option to map web - * service requests based on the qualified name of the root element contained in the message. - * soapaction - Used to map web service requests based on the SOAP action specified in the header of - * the message. uri - In order to map web service requests that target a specific URI. xpathresult - - * Used to map web service requests based on the evaluation of an XPath expression against the - * incoming message. The result of the evaluation should match the XPath result specified in the - * endpoint URI. beanname - Allows you to reference an - * org.apache.camel.component.spring.ws.bean.CamelEndpointDispatcher object in order to integrate - * with existing (legacy) endpoint mappings like PayloadRootQNameEndpointMapping, - * SoapActionEndpointMapping, etc - */ - public fun type(type: String) { - this.type = type - it.url("$type:$lookupKey:$webServiceEndpointUri") - } - - /** - * Endpoint mapping key if endpoint mapping is used - */ - public fun lookupKey(lookupKey: String) { - this.lookupKey = lookupKey - it.url("$type:$lookupKey:$webServiceEndpointUri") - } - - /** - * The default Web Service endpoint uri to use for the producer. - */ - public fun webServiceEndpointUri(webServiceEndpointUri: String) { - this.webServiceEndpointUri = webServiceEndpointUri - it.url("$type:$lookupKey:$webServiceEndpointUri") - } - - /** - * Option to provide a custom MessageFilter. For example when you want to process your headers or - * attachments by your own. - */ - public fun messageFilter(messageFilter: String) { - it.property("messageFilter", messageFilter) - } - - /** - * Option to provide a custom MessageIdStrategy to control generation of WS-Addressing unique - * message ids. - */ - public fun messageIdStrategy(messageIdStrategy: String) { - it.property("messageIdStrategy", messageIdStrategy) - } - - /** - * Spring org.springframework.ws.server.endpoint.MessageEndpoint for dispatching messages received - * by Spring-WS to a Camel endpoint, to integrate with existing (legacy) endpoint mappings like - * PayloadRootQNameEndpointMapping, SoapActionEndpointMapping, etc. - */ - public fun endpointDispatcher(endpointDispatcher: String) { - it.property("endpointDispatcher", endpointDispatcher) - } - - /** - * Reference to an instance of org.apache.camel.component.spring.ws.bean.CamelEndpointMapping in - * the Registry/ApplicationContext. Only one bean is required in the registry to serve all - * Camel/Spring-WS endpoints. This bean is auto-discovered by the MessageDispatcher and used to map - * requests to Camel endpoints based on characteristics specified on the endpoint (like root QName, - * SOAP action, etc) - */ - public fun endpointMapping(endpointMapping: String) { - it.property("endpointMapping", endpointMapping) - } - - /** - * The XPath expression to use when option type=xpathresult. Then this option is required to be - * configured. - */ - public fun expression(expression: String) { - it.property("expression", expression) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Option to override soap response attachments in in/out exchange with attachments from the - * actual service layer. If the invoked service appends or rewrites the soap attachments this option - * when set to true, allows the modified soap attachments to be overwritten in in/out message - * attachments - */ - public fun allowResponseAttachmentOverride(allowResponseAttachmentOverride: String) { - it.property("allowResponseAttachmentOverride", allowResponseAttachmentOverride) - } - - /** - * Option to override soap response attachments in in/out exchange with attachments from the - * actual service layer. If the invoked service appends or rewrites the soap attachments this option - * when set to true, allows the modified soap attachments to be overwritten in in/out message - * attachments - */ - public fun allowResponseAttachmentOverride(allowResponseAttachmentOverride: Boolean) { - it.property("allowResponseAttachmentOverride", allowResponseAttachmentOverride.toString()) - } - - /** - * Option to override soap response header in in/out exchange with header info from the actual - * service layer. If the invoked service appends or rewrites the soap header this option when set to - * true, allows the modified soap header to be overwritten in in/out message headers - */ - public fun allowResponseHeaderOverride(allowResponseHeaderOverride: String) { - it.property("allowResponseHeaderOverride", allowResponseHeaderOverride) - } - - /** - * Option to override soap response header in in/out exchange with header info from the actual - * service layer. If the invoked service appends or rewrites the soap header this option when set to - * true, allows the modified soap header to be overwritten in in/out message headers - */ - public fun allowResponseHeaderOverride(allowResponseHeaderOverride: Boolean) { - it.property("allowResponseHeaderOverride", allowResponseHeaderOverride.toString()) - } - - /** - * Signifies the value for the faultAction response WS-Addressing Fault Action header that is - * provided by the method. See org.springframework.ws.soap.addressing.server.annotation.Action - * annotation for more details. - */ - public fun faultAction(faultAction: String) { - it.property("faultAction", faultAction) - } - - /** - * Signifies the value for the faultAction response WS-Addressing FaultTo header that is provided - * by the method. See org.springframework.ws.soap.addressing.server.annotation.Action annotation for - * more details. - */ - public fun faultTo(faultTo: String) { - it.property("faultTo", faultTo) - } - - /** - * Option to provide a custom WebServiceMessageFactory. - */ - public fun messageFactory(messageFactory: String) { - it.property("messageFactory", messageFactory) - } - - /** - * Option to provide a custom WebServiceMessageSender. For example to perform authentication or - * use alternative transports - */ - public fun messageSender(messageSender: String) { - it.property("messageSender", messageSender) - } - - /** - * Signifies the value for the response WS-Addressing Action header that is provided by the - * method. See org.springframework.ws.soap.addressing.server.annotation.Action annotation for more - * details. - */ - public fun outputAction(outputAction: String) { - it.property("outputAction", outputAction) - } - - /** - * Signifies the value for the replyTo response WS-Addressing ReplyTo header that is provided by - * the method. See org.springframework.ws.soap.addressing.server.annotation.Action annotation for - * more details. - */ - public fun replyTo(replyTo: String) { - it.property("replyTo", replyTo) - } - - /** - * SOAP action to include inside a SOAP request when accessing remote web services - */ - public fun soapAction(soapAction: String) { - it.property("soapAction", soapAction) - } - - /** - * Sets the socket read timeout (in milliseconds) while invoking a webservice using the producer, - * see URLConnection.setReadTimeout() and CommonsHttpMessageSender.setReadTimeout(). This option - * works when using the built-in message sender implementations: CommonsHttpMessageSender and - * HttpUrlConnectionMessageSender. One of these implementations will be used by default for HTTP - * based services unless you customize the Spring WS configuration options supplied to the component. - * If you are using a non-standard sender, it is assumed that you will handle your own timeout - * configuration. The built-in message sender HttpComponentsMessageSender is considered instead of - * CommonsHttpMessageSender which has been deprecated, see - * HttpComponentsMessageSender.setReadTimeout(). - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Sets the socket read timeout (in milliseconds) while invoking a webservice using the producer, - * see URLConnection.setReadTimeout() and CommonsHttpMessageSender.setReadTimeout(). This option - * works when using the built-in message sender implementations: CommonsHttpMessageSender and - * HttpUrlConnectionMessageSender. One of these implementations will be used by default for HTTP - * based services unless you customize the Spring WS configuration options supplied to the component. - * If you are using a non-standard sender, it is assumed that you will handle your own timeout - * configuration. The built-in message sender HttpComponentsMessageSender is considered instead of - * CommonsHttpMessageSender which has been deprecated, see - * HttpComponentsMessageSender.setReadTimeout(). - */ - public fun timeout(timeout: Int) { - it.property("timeout", timeout.toString()) - } - - /** - * Option to provide a custom WebServiceTemplate. This allows for full control over client-side - * web services handling; like adding a custom interceptor or specifying a fault resolver, message - * sender or message factory. - */ - public fun webServiceTemplate(webServiceTemplate: String) { - it.property("webServiceTemplate", webServiceTemplate) - } - - /** - * WS-Addressing 1.0 action header to include when accessing web services. The To header is set to - * the address of the web service as specified in the endpoint URI (default Spring-WS behavior). - */ - public fun wsAddressingAction(wsAddressingAction: String) { - it.property("wsAddressingAction", wsAddressingAction) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To configure security using SSLContextParameters - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SqlStoredUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SqlStoredUriDsl.kt deleted file mode 100644 index ecb21d7163ca5..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SqlStoredUriDsl.kt +++ /dev/null @@ -1,161 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform SQL queries as a JDBC Stored Procedures using Spring JDBC. - */ -public fun UriDsl.`sql-stored`(i: SqlStoredUriDsl.() -> Unit) { - SqlStoredUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SqlStoredUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("sql-stored") - } - - private var template: String = "" - - /** - * Sets the stored procedure template to perform. You can externalize the template by using file: - * or classpath: as prefix and specify the location of the file. - */ - public fun template(template: String) { - this.template = template - it.url("$template") - } - - /** - * Enables or disables batch mode - */ - public fun batch(batch: String) { - it.property("batch", batch) - } - - /** - * Enables or disables batch mode - */ - public fun batch(batch: Boolean) { - it.property("batch", batch.toString()) - } - - /** - * Sets the DataSource to use to communicate with the database. - */ - public fun dataSource(dataSource: String) { - it.property("dataSource", dataSource) - } - - /** - * Whether this call is for a function. - */ - public fun function(function: String) { - it.property("function", function) - } - - /** - * Whether this call is for a function. - */ - public fun function(function: Boolean) { - it.property("function", function.toString()) - } - - /** - * If set, will ignore the results of the stored procedure template and use the existing IN - * message as the OUT message for the continuation of processing - */ - public fun noop(noop: String) { - it.property("noop", noop) - } - - /** - * If set, will ignore the results of the stored procedure template and use the existing IN - * message as the OUT message for the continuation of processing - */ - public fun noop(noop: Boolean) { - it.property("noop", noop.toString()) - } - - /** - * Store the template result in a header instead of the message body. By default, outputHeader == - * null and the template result is stored in the message body, any existing content in the message - * body is discarded. If outputHeader is set, the value is used as the name of the header to store - * the template result and the original message body is preserved. - */ - public fun outputHeader(outputHeader: String) { - it.property("outputHeader", outputHeader) - } - - /** - * Whether to use the message body as the stored procedure template and then headers for - * parameters. If this option is enabled then the template in the uri is not used. - */ - public fun useMessageBodyForTemplate(useMessageBodyForTemplate: String) { - it.property("useMessageBodyForTemplate", useMessageBodyForTemplate) - } - - /** - * Whether to use the message body as the stored procedure template and then headers for - * parameters. If this option is enabled then the template in the uri is not used. - */ - public fun useMessageBodyForTemplate(useMessageBodyForTemplate: Boolean) { - it.property("useMessageBodyForTemplate", useMessageBodyForTemplate.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Configures the Spring JdbcTemplate with the key/values from the Map - */ - public fun templateOptions(templateOptions: String) { - it.property("templateOptions", templateOptions) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SqlUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SqlUriDsl.kt deleted file mode 100644 index 1441744c57c3b..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SqlUriDsl.kt +++ /dev/null @@ -1,648 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Perform SQL queries using Spring JDBC. - */ -public fun UriDsl.sql(i: SqlUriDsl.() -> Unit) { - SqlUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SqlUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("sql") - } - - private var query: String = "" - - /** - * Sets the SQL query to perform. You can externalize the query by using file: or classpath: as - * prefix and specify the location of the file. - */ - public fun query(query: String) { - this.query = query - it.url("$query") - } - - /** - * Whether to allow using named parameters in the queries. - */ - public fun allowNamedParameters(allowNamedParameters: String) { - it.property("allowNamedParameters", allowNamedParameters) - } - - /** - * Whether to allow using named parameters in the queries. - */ - public fun allowNamedParameters(allowNamedParameters: Boolean) { - it.property("allowNamedParameters", allowNamedParameters.toString()) - } - - /** - * Sets the DataSource to use to communicate with the database at endpoint level. - */ - public fun dataSource(dataSource: String) { - it.property("dataSource", dataSource) - } - - /** - * Specify the full package and class name to use as conversion when outputType=SelectOne. - */ - public fun outputClass(outputClass: String) { - it.property("outputClass", outputClass) - } - - /** - * Store the query result in a header instead of the message body. By default, outputHeader == - * null and the query result is stored in the message body, any existing content in the message body - * is discarded. If outputHeader is set, the value is used as the name of the header to store the - * query result and the original message body is preserved. - */ - public fun outputHeader(outputHeader: String) { - it.property("outputHeader", outputHeader) - } - - /** - * Make the output of consumer or producer to SelectList as List of Map, or SelectOne as single - * Java object in the following way: a) If the query has only single column, then that JDBC Column - * object is returned. (such as SELECT COUNT( ) FROM PROJECT will return a Long object. b) If the - * query has more than one column, then it will return a Map of that result. c) If the outputClass is - * set, then it will convert the query result into an Java bean object by calling all the setters - * that match the column names. It will assume your class has a default constructor to create - * instance with. d) If the query resulted in more than one rows, it throws an non-unique result - * exception. StreamList streams the result of the query using an Iterator. This can be used with the - * Splitter EIP in streaming mode to process the ResultSet in streaming fashion. - */ - public fun outputType(outputType: String) { - it.property("outputType", outputType) - } - - /** - * The separator to use when parameter values is taken from message body (if the body is a String - * type), to be inserted at # placeholders. Notice if you use named parameters, then a Map type is - * used instead. The default value is comma - */ - public fun separator(separator: String) { - it.property("separator", separator) - } - - /** - * Sets whether to break batch if onConsume failed. - */ - public fun breakBatchOnConsumeFail(breakBatchOnConsumeFail: String) { - it.property("breakBatchOnConsumeFail", breakBatchOnConsumeFail) - } - - /** - * Sets whether to break batch if onConsume failed. - */ - public fun breakBatchOnConsumeFail(breakBatchOnConsumeFail: Boolean) { - it.property("breakBatchOnConsumeFail", breakBatchOnConsumeFail.toString()) - } - - /** - * Sets an expected update count to validate when using onConsume. - */ - public fun expectedUpdateCount(expectedUpdateCount: String) { - it.property("expectedUpdateCount", expectedUpdateCount) - } - - /** - * Sets an expected update count to validate when using onConsume. - */ - public fun expectedUpdateCount(expectedUpdateCount: Int) { - it.property("expectedUpdateCount", expectedUpdateCount.toString()) - } - - /** - * Sets the maximum number of messages to poll - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: String) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll) - } - - /** - * Sets the maximum number of messages to poll - */ - public fun maxMessagesPerPoll(maxMessagesPerPoll: Int) { - it.property("maxMessagesPerPoll", maxMessagesPerPoll.toString()) - } - - /** - * After processing each row then this query can be executed, if the Exchange was processed - * successfully, for example to mark the row as processed. The query can have parameter. - */ - public fun onConsume(onConsume: String) { - it.property("onConsume", onConsume) - } - - /** - * After processing the entire batch, this query can be executed to bulk update rows etc. The - * query cannot have parameters. - */ - public fun onConsumeBatchComplete(onConsumeBatchComplete: String) { - it.property("onConsumeBatchComplete", onConsumeBatchComplete) - } - - /** - * After processing each row then this query can be executed, if the Exchange failed, for example - * to mark the row as failed. The query can have parameter. - */ - public fun onConsumeFailed(onConsumeFailed: String) { - it.property("onConsumeFailed", onConsumeFailed) - } - - /** - * Sets whether empty resultset should be allowed to be sent to the next hop. Defaults to false. - * So the empty resultset will be filtered out. - */ - public fun routeEmptyResultSet(routeEmptyResultSet: String) { - it.property("routeEmptyResultSet", routeEmptyResultSet) - } - - /** - * Sets whether empty resultset should be allowed to be sent to the next hop. Defaults to false. - * So the empty resultset will be filtered out. - */ - public fun routeEmptyResultSet(routeEmptyResultSet: Boolean) { - it.property("routeEmptyResultSet", routeEmptyResultSet.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Enables or disables transaction. If enabled then if processing an exchange failed then the - * consumer breaks out processing any further exchanges to cause a rollback eager. - */ - public fun transacted(transacted: String) { - it.property("transacted", transacted) - } - - /** - * Enables or disables transaction. If enabled then if processing an exchange failed then the - * consumer breaks out processing any further exchanges to cause a rollback eager. - */ - public fun transacted(transacted: Boolean) { - it.property("transacted", transacted.toString()) - } - - /** - * Sets how resultset should be delivered to route. Indicates delivery as either a list or - * individual object. defaults to true. - */ - public fun useIterator(useIterator: String) { - it.property("useIterator", useIterator) - } - - /** - * Sets how resultset should be delivered to route. Indicates delivery as either a list or - * individual object. defaults to true. - */ - public fun useIterator(useIterator: Boolean) { - it.property("useIterator", useIterator.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Allows to plugin to use a custom org.apache.camel.component.sql.SqlProcessingStrategy to - * execute queries when the consumer has processed the rows/batch. - */ - public fun processingStrategy(processingStrategy: String) { - it.property("processingStrategy", processingStrategy) - } - - /** - * Enables or disables batch mode - */ - public fun batch(batch: String) { - it.property("batch", batch) - } - - /** - * Enables or disables batch mode - */ - public fun batch(batch: Boolean) { - it.property("batch", batch.toString()) - } - - /** - * If set, will ignore the results of the SQL query and use the existing IN message as the OUT - * message for the continuation of processing - */ - public fun noop(noop: String) { - it.property("noop", noop) - } - - /** - * If set, will ignore the results of the SQL query and use the existing IN message as the OUT - * message for the continuation of processing - */ - public fun noop(noop: Boolean) { - it.property("noop", noop.toString()) - } - - /** - * Whether to use the message body as the SQL and then headers for parameters. If this option is - * enabled then the SQL in the uri is not used. Note that query parameters in the message body are - * represented by a question mark instead of a # symbol. - */ - public fun useMessageBodyForSql(useMessageBodyForSql: String) { - it.property("useMessageBodyForSql", useMessageBodyForSql) - } - - /** - * Whether to use the message body as the SQL and then headers for parameters. If this option is - * enabled then the SQL in the uri is not used. Note that query parameters in the message body are - * represented by a question mark instead of a # symbol. - */ - public fun useMessageBodyForSql(useMessageBodyForSql: Boolean) { - it.property("useMessageBodyForSql", useMessageBodyForSql.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * If enabled then the populateStatement method from - * org.apache.camel.component.sql.SqlPrepareStatementStrategy is always invoked, also if there is no - * expected parameters to be prepared. When this is false then the populateStatement is only invoked - * if there is 1 or more expected parameters to be set; for example this avoids reading the message - * body/headers for SQL queries with no parameters. - */ - public fun alwaysPopulateStatement(alwaysPopulateStatement: String) { - it.property("alwaysPopulateStatement", alwaysPopulateStatement) - } - - /** - * If enabled then the populateStatement method from - * org.apache.camel.component.sql.SqlPrepareStatementStrategy is always invoked, also if there is no - * expected parameters to be prepared. When this is false then the populateStatement is only invoked - * if there is 1 or more expected parameters to be set; for example this avoids reading the message - * body/headers for SQL queries with no parameters. - */ - public fun alwaysPopulateStatement(alwaysPopulateStatement: Boolean) { - it.property("alwaysPopulateStatement", alwaysPopulateStatement.toString()) - } - - /** - * If set greater than zero, then Camel will use this count value of parameters to replace instead - * of querying via JDBC metadata API. This is useful if the JDBC vendor could not return correct - * parameters count, then user may override instead. - */ - public fun parametersCount(parametersCount: String) { - it.property("parametersCount", parametersCount) - } - - /** - * If set greater than zero, then Camel will use this count value of parameters to replace instead - * of querying via JDBC metadata API. This is useful if the JDBC vendor could not return correct - * parameters count, then user may override instead. - */ - public fun parametersCount(parametersCount: Int) { - it.property("parametersCount", parametersCount.toString()) - } - - /** - * Specifies a character that will be replaced to in SQL query. Notice, that it is simple - * String.replaceAll() operation and no SQL parsing is involved (quoted strings will also change). - */ - public fun placeholder(placeholder: String) { - it.property("placeholder", placeholder) - } - - /** - * Allows to plugin to use a custom org.apache.camel.component.sql.SqlPrepareStatementStrategy to - * control preparation of the query and prepared statement. - */ - public fun prepareStatementStrategy(prepareStatementStrategy: String) { - it.property("prepareStatementStrategy", prepareStatementStrategy) - } - - /** - * Factory for creating RowMapper - */ - public fun rowMapperFactory(rowMapperFactory: String) { - it.property("rowMapperFactory", rowMapperFactory) - } - - /** - * Configures the Spring JdbcTemplate with the key/values from the Map - */ - public fun templateOptions(templateOptions: String) { - it.property("templateOptions", templateOptions) - } - - /** - * Sets whether to use placeholder and replace all placeholder characters with sign in the SQL - * queries. - */ - public fun usePlaceholder(usePlaceholder: String) { - it.property("usePlaceholder", usePlaceholder) - } - - /** - * Sets whether to use placeholder and replace all placeholder characters with sign in the SQL - * queries. - */ - public fun usePlaceholder(usePlaceholder: Boolean) { - it.property("usePlaceholder", usePlaceholder.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SshUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SshUriDsl.kt deleted file mode 100644 index bf7cb6f4fe1f7..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/SshUriDsl.kt +++ /dev/null @@ -1,516 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Execute commands on remote hosts using SSH. - */ -public fun UriDsl.ssh(i: SshUriDsl.() -> Unit) { - SshUriDsl(this).apply(i) -} - -@CamelDslMarker -public class SshUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("ssh") - } - - private var host: String = "" - - private var port: String = "" - - /** - * Sets the hostname of the remote SSH server. - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port") - } - - /** - * Sets the port number for the remote SSH server. - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port") - } - - /** - * Sets the port number for the remote SSH server. - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port") - } - - /** - * Specifies whether a connection to an unknown host should fail or not. This value is only - * checked when the property knownHosts is set. - */ - public fun failOnUnknownHost(failOnUnknownHost: String) { - it.property("failOnUnknownHost", failOnUnknownHost) - } - - /** - * Specifies whether a connection to an unknown host should fail or not. This value is only - * checked when the property knownHosts is set. - */ - public fun failOnUnknownHost(failOnUnknownHost: Boolean) { - it.property("failOnUnknownHost", failOnUnknownHost.toString()) - } - - /** - * Sets the resource path for a known_hosts file - */ - public fun knownHostsResource(knownHostsResource: String) { - it.property("knownHostsResource", knownHostsResource) - } - - /** - * Sets the timeout in milliseconds to wait in establishing the remote SSH server connection. - * Defaults to 30000 milliseconds. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Sets the timeout in milliseconds to wait in establishing the remote SSH server connection. - * Defaults to 30000 milliseconds. - */ - public fun timeout(timeout: Int) { - it.property("timeout", timeout.toString()) - } - - /** - * Sets the command string to send to the remote SSH server during every poll cycle. Only works - * with camel-ssh component being used as a consumer, i.e. from(ssh://...) You may need to end your - * command with a newline, and that must be URL encoded %0A - */ - public fun pollCommand(pollCommand: String) { - it.property("pollCommand", pollCommand) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Sets the channel type to pass to the Channel as part of command execution. Defaults to exec. - */ - public fun channelType(channelType: String) { - it.property("channelType", channelType) - } - - /** - * Instance of ClientBuilder used by the producer or consumer to create a new SshClient - */ - public fun clientBuilder(clientBuilder: String) { - it.property("clientBuilder", clientBuilder) - } - - /** - * Whether to use compression, and if so which. - */ - public fun compressions(compressions: String) { - it.property("compressions", compressions) - } - - /** - * Sets the shellPrompt to be dropped when response is read after command execution - */ - public fun shellPrompt(shellPrompt: String) { - it.property("shellPrompt", shellPrompt) - } - - /** - * Sets the sleep period in milliseconds to wait reading response from shell prompt. Defaults to - * 100 milliseconds. - */ - public fun sleepForShellPrompt(sleepForShellPrompt: String) { - it.property("sleepForShellPrompt", sleepForShellPrompt) - } - - /** - * Sets the sleep period in milliseconds to wait reading response from shell prompt. Defaults to - * 100 milliseconds. - */ - public fun sleepForShellPrompt(sleepForShellPrompt: Int) { - it.property("sleepForShellPrompt", sleepForShellPrompt.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * Sets the resource path of the certificate to use for Authentication. Will use - * ResourceHelperKeyPairProvider to resolve file based certificate, and depends on keyType setting. - */ - public fun certResource(certResource: String) { - it.property("certResource", certResource) - } - - /** - * Sets the password to use in loading certResource, if certResource is an encrypted key. - */ - public fun certResourcePassword(certResourcePassword: String) { - it.property("certResourcePassword", certResourcePassword) - } - - /** - * Comma-separated list of allowed/supported ciphers in their order of preference. - */ - public fun ciphers(ciphers: String) { - it.property("ciphers", ciphers) - } - - /** - * Comma-separated list of allowed/supported key exchange algorithms in their order of preference. - */ - public fun kex(kex: String) { - it.property("kex", kex) - } - - /** - * Sets the KeyPairProvider reference to use when connecting using Certificates to the remote SSH - * Server. - */ - public fun keyPairProvider(keyPairProvider: String) { - it.property("keyPairProvider", keyPairProvider) - } - - /** - * Sets the key type to pass to the KeyPairProvider as part of authentication. - * KeyPairProvider.loadKey(...) will be passed this value. From Camel 3.0.0 / 2.25.0, by default - * Camel will select the first available KeyPair that is loaded. Prior to this, a KeyType of - * 'ssh-rsa' was enforced by default. - */ - public fun keyType(keyType: String) { - it.property("keyType", keyType) - } - - /** - * Comma-separated list of allowed/supported message authentication code algorithms in their order - * of preference. The MAC algorithm is used for data integrity protection. - */ - public fun macs(macs: String) { - it.property("macs", macs) - } - - /** - * Sets the password to use in connecting to remote SSH server. Requires keyPairProvider to be set - * to null. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Comma-separated list of allowed/supported signature algorithms in their order of preference. - */ - public fun signatures(signatures: String) { - it.property("signatures", signatures) - } - - /** - * Sets the username to use in logging into the remote SSH server. - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StaxUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StaxUriDsl.kt deleted file mode 100644 index fe33c78798d5e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StaxUriDsl.kt +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Process XML payloads by a SAX ContentHandler. - */ -public fun UriDsl.stax(i: StaxUriDsl.() -> Unit) { - StaxUriDsl(this).apply(i) -} - -@CamelDslMarker -public class StaxUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("stax") - } - - private var contentHandlerClass: String = "" - - /** - * The FQN class name for the ContentHandler implementation to use. - */ - public fun contentHandlerClass(contentHandlerClass: String) { - this.contentHandlerClass = contentHandlerClass - it.url("$contentHandlerClass") - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StitchUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StitchUriDsl.kt deleted file mode 100644 index 85864714a6664..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StitchUriDsl.kt +++ /dev/null @@ -1,133 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Stitch is a cloud ETL service that integrates various data sources into a central data warehouse - * through various integrations. - */ -public fun UriDsl.stitch(i: StitchUriDsl.() -> Unit) { - StitchUriDsl(this).apply(i) -} - -@CamelDslMarker -public class StitchUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("stitch") - } - - private var tableName: String = "" - - /** - * The name of the destination table the data is being pushed to. Table names must be unique in - * each destination schema, or loading issues will occur. Note: The number of characters in the table - * name should be within the destination's allowed limits or data will rejected. - */ - public fun tableName(tableName: String) { - this.tableName = tableName - it.url("$tableName") - } - - /** - * A collection of comma separated strings representing the Primary Key fields in the source - * table. Stitch use these Primary Keys to de-dupe data during loading If not provided, the table - * will be loaded in an append-only manner. - */ - public fun keyNames(keyNames: String) { - it.property("keyNames", keyNames) - } - - /** - * Stitch account region, e.g: europe - */ - public fun region(region: String) { - it.property("region", region) - } - - /** - * A schema that describes the record(s) - */ - public fun stitchSchema(stitchSchema: String) { - it.property("stitchSchema", stitchSchema) - } - - /** - * ConnectionProvider contain configuration for the HttpClient like Maximum connection limit .. - * etc, you can inject this ConnectionProvider and the StitchClient will initialize HttpClient with - * this ConnectionProvider - */ - public fun connectionProvider(connectionProvider: String) { - it.property("connectionProvider", connectionProvider) - } - - /** - * Reactor Netty HttpClient, you can injected it if you want to have custom HttpClient - */ - public fun httpClient(httpClient: String) { - it.property("httpClient", httpClient) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Set a custom StitchClient that implements org.apache.camel.component.stitch.client.StitchClient - * interface - */ - public fun stitchClient(stitchClient: String) { - it.property("stitchClient", stitchClient) - } - - /** - * Stitch access token for the Stitch Import API - */ - public fun token(token: String) { - it.property("token", token) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StompUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StompUriDsl.kt deleted file mode 100644 index ffd721b3ef10a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StompUriDsl.kt +++ /dev/null @@ -1,179 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from STOMP (Simple Text Oriented Messaging Protocol) compliant - * message brokers. - */ -public fun UriDsl.stomp(i: StompUriDsl.() -> Unit) { - StompUriDsl(this).apply(i) -} - -@CamelDslMarker -public class StompUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("stomp") - } - - private var destination: String = "" - - /** - * Name of the queue - */ - public fun destination(destination: String) { - this.destination = destination - it.url("$destination") - } - - /** - * The URI of the Stomp broker to connect to - */ - public fun brokerURL(brokerURL: String) { - it.property("brokerURL", brokerURL) - } - - /** - * To set custom headers - */ - public fun customHeaders(customHeaders: String) { - it.property("customHeaders", customHeaders) - } - - /** - * The virtual host name - */ - public fun host(host: String) { - it.property("host", host) - } - - /** - * The stomp version (1.1, or 1.2) - */ - public fun version(version: String) { - it.property("version", version) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * The username - */ - public fun login(login: String) { - it.property("login", login) - } - - /** - * The password - */ - public fun passcode(passcode: String) { - it.property("passcode", passcode) - } - - /** - * To configure security using SSLContextParameters - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StreamUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StreamUriDsl.kt deleted file mode 100644 index c82ff75281f2a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StreamUriDsl.kt +++ /dev/null @@ -1,378 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Read from system-in and write to system-out and system-err streams. - */ -public fun UriDsl.stream(i: StreamUriDsl.() -> Unit) { - StreamUriDsl(this).apply(i) -} - -@CamelDslMarker -public class StreamUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("stream") - } - - private var kind: String = "" - - /** - * Kind of stream to use such as System.in, System.out, a file, or a http url. - */ - public fun kind(kind: String) { - this.kind = kind - it.url("$kind") - } - - /** - * You can configure the encoding (is a charset name) to use text-based streams (for example, - * message body is a String object). If not provided, Camel uses the JVM default Charset. - */ - public fun encoding(encoding: String) { - it.property("encoding", encoding) - } - - /** - * When using the stream:file URI format, this option specifies the filename to stream to/from. - */ - public fun fileName(fileName: String) { - it.property("fileName", fileName) - } - - /** - * To use JVM file watcher to listen for file change events to support re-loading files that may - * be overwritten, somewhat like tail --retry - */ - public fun fileWatcher(fileWatcher: String) { - it.property("fileWatcher", fileWatcher) - } - - /** - * To use JVM file watcher to listen for file change events to support re-loading files that may - * be overwritten, somewhat like tail --retry - */ - public fun fileWatcher(fileWatcher: Boolean) { - it.property("fileWatcher", fileWatcher.toString()) - } - - /** - * To group X number of lines in the consumer. For example to group 10 lines and therefore only - * spit out an Exchange with 10 lines, instead of 1 Exchange per line. - */ - public fun groupLines(groupLines: String) { - it.property("groupLines", groupLines) - } - - /** - * To group X number of lines in the consumer. For example to group 10 lines and therefore only - * spit out an Exchange with 10 lines, instead of 1 Exchange per line. - */ - public fun groupLines(groupLines: Int) { - it.property("groupLines", groupLines.toString()) - } - - /** - * Allows to use a custom GroupStrategy to control how to group lines. - */ - public fun groupStrategy(groupStrategy: String) { - it.property("groupStrategy", groupStrategy) - } - - /** - * When using stream:http format, this option specifies optional http headers, such as Accept: - * application/json. Multiple headers can be separated by comma. The format of headers can be either - * HEADER=VALUE or HEADER:VALUE. In accordance with the HTTP/1.1 specification, leading and/or - * trailing whitespace is ignored - */ - public fun httpHeaders(httpHeaders: String) { - it.property("httpHeaders", httpHeaders) - } - - /** - * When using stream:http format, this option specifies the http url to stream from. - */ - public fun httpUrl(httpUrl: String) { - it.property("httpUrl", httpUrl) - } - - /** - * Initial delay in milliseconds before showing the message prompt. This delay occurs only once. - * Can be used during system startup to avoid message prompts being written while other logging is - * done to the system out. - */ - public fun initialPromptDelay(initialPromptDelay: String) { - it.property("initialPromptDelay", initialPromptDelay) - } - - /** - * Initial delay in milliseconds before showing the message prompt. This delay occurs only once. - * Can be used during system startup to avoid message prompts being written while other logging is - * done to the system out. - */ - public fun initialPromptDelay(initialPromptDelay: Int) { - it.property("initialPromptDelay", initialPromptDelay.toString()) - } - - /** - * Optional delay in milliseconds before showing the message prompt. - */ - public fun promptDelay(promptDelay: String) { - it.property("promptDelay", promptDelay) - } - - /** - * Optional delay in milliseconds before showing the message prompt. - */ - public fun promptDelay(promptDelay: Int) { - it.property("promptDelay", promptDelay.toString()) - } - - /** - * Message prompt to use when reading from stream:in; for example, you could set this to Enter a - * command: - */ - public fun promptMessage(promptMessage: String) { - it.property("promptMessage", promptMessage) - } - - /** - * Whether to read the input stream in line mode (terminate by line breaks). Setting this to - * false, will instead read the entire stream until EOL. - */ - public fun readLine(readLine: String) { - it.property("readLine", readLine) - } - - /** - * Whether to read the input stream in line mode (terminate by line breaks). Setting this to - * false, will instead read the entire stream until EOL. - */ - public fun readLine(readLine: Boolean) { - it.property("readLine", readLine.toString()) - } - - /** - * Will retry opening the stream if it's overwritten, somewhat like tail --retry If reading from - * files then you should also enable the fileWatcher option, to make it work reliable. - */ - public fun retry(retry: String) { - it.property("retry", retry) - } - - /** - * Will retry opening the stream if it's overwritten, somewhat like tail --retry If reading from - * files then you should also enable the fileWatcher option, to make it work reliable. - */ - public fun retry(retry: Boolean) { - it.property("retry", retry.toString()) - } - - /** - * To be used for continuously reading a stream such as the unix tail command. - */ - public fun scanStream(scanStream: String) { - it.property("scanStream", scanStream) - } - - /** - * To be used for continuously reading a stream such as the unix tail command. - */ - public fun scanStream(scanStream: Boolean) { - it.property("scanStream", scanStream.toString()) - } - - /** - * Delay in milliseconds between read attempts when using scanStream. - */ - public fun scanStreamDelay(scanStreamDelay: String) { - it.property("scanStreamDelay", scanStreamDelay) - } - - /** - * Delay in milliseconds between read attempts when using scanStream. - */ - public fun scanStreamDelay(scanStreamDelay: Int) { - it.property("scanStreamDelay", scanStreamDelay.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Whether to append a new line character at end of output. - */ - public fun appendNewLine(appendNewLine: String) { - it.property("appendNewLine", appendNewLine) - } - - /** - * Whether to append a new line character at end of output. - */ - public fun appendNewLine(appendNewLine: Boolean) { - it.property("appendNewLine", appendNewLine.toString()) - } - - /** - * Number of messages to process before closing stream on Producer side. Never close stream by - * default (only when Producer is stopped). If more messages are sent, the stream is reopened for - * another autoCloseCount batch. - */ - public fun autoCloseCount(autoCloseCount: String) { - it.property("autoCloseCount", autoCloseCount) - } - - /** - * Number of messages to process before closing stream on Producer side. Never close stream by - * default (only when Producer is stopped). If more messages are sent, the stream is reopened for - * another autoCloseCount batch. - */ - public fun autoCloseCount(autoCloseCount: Int) { - it.property("autoCloseCount", autoCloseCount.toString()) - } - - /** - * This option is used in combination with Splitter and streaming to the same file. The idea is to - * keep the stream open and only close when the Splitter is done, to improve performance. Mind this - * requires that you only stream to the same file, and not 2 or more files. - */ - public fun closeOnDone(closeOnDone: String) { - it.property("closeOnDone", closeOnDone) - } - - /** - * This option is used in combination with Splitter and streaming to the same file. The idea is to - * keep the stream open and only close when the Splitter is done, to improve performance. Mind this - * requires that you only stream to the same file, and not 2 or more files. - */ - public fun closeOnDone(closeOnDone: Boolean) { - it.property("closeOnDone", closeOnDone.toString()) - } - - /** - * Initial delay in milliseconds before producing the stream. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Initial delay in milliseconds before producing the stream. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Sets the read timeout to a specified timeout, in milliseconds. A non-zero value specifies the - * timeout when reading from Input stream when a connection is established to a resource. If the - * timeout expires before there is data available for read, a java.net.SocketTimeoutException is - * raised. A timeout of zero is interpreted as an infinite timeout. - */ - public fun readTimeout(readTimeout: String) { - it.property("readTimeout", readTimeout) - } - - /** - * Sets the read timeout to a specified timeout, in milliseconds. A non-zero value specifies the - * timeout when reading from Input stream when a connection is established to a resource. If the - * timeout expires before there is data available for read, a java.net.SocketTimeoutException is - * raised. A timeout of zero is interpreted as an infinite timeout. - */ - public fun readTimeout(readTimeout: Int) { - it.property("readTimeout", readTimeout.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StringTemplateUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StringTemplateUriDsl.kt deleted file mode 100644 index 88361100d985a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StringTemplateUriDsl.kt +++ /dev/null @@ -1,145 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Transform messages using StringTemplate engine. - */ -public fun UriDsl.`string-template`(i: StringTemplateUriDsl.() -> Unit) { - StringTemplateUriDsl(this).apply(i) -} - -@CamelDslMarker -public class StringTemplateUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("string-template") - } - - private var resourceUri: String = "" - - /** - * Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file - * and http loads the resource using these protocols (classpath is default). ref will lookup the - * resource in the registry. bean will call a method on a bean to be used as the resource. For bean - * you can specify the method name after dot, eg bean:myBean.myMethod. - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: String) { - it.property("allowContextMapAll", allowContextMapAll) - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: Boolean) { - it.property("allowContextMapAll", allowContextMapAll.toString()) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: String) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: Boolean) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader.toString()) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * The variable start delimiter - */ - public fun delimiterStart(delimiterStart: String) { - it.property("delimiterStart", delimiterStart) - } - - /** - * The variable end delimiter - */ - public fun delimiterStop(delimiterStop: String) { - it.property("delimiterStop", delimiterStop) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StubUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StubUriDsl.kt deleted file mode 100644 index 28dcf94fe98b1..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/StubUriDsl.kt +++ /dev/null @@ -1,332 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Stub out any physical endpoints while in development or testing. - */ -public fun UriDsl.stub(i: StubUriDsl.() -> Unit) { - StubUriDsl(this).apply(i) -} - -@CamelDslMarker -public class StubUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("stub") - } - - private var name: String = "" - - /** - * Name of queue - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * The maximum capacity of the SEDA queue (i.e., the number of messages it can hold). Will by - * default use the defaultSize set on the SEDA component. - */ - public fun size(size: String) { - it.property("size", size) - } - - /** - * The maximum capacity of the SEDA queue (i.e., the number of messages it can hold). Will by - * default use the defaultSize set on the SEDA component. - */ - public fun size(size: Int) { - it.property("size", size.toString()) - } - - /** - * Number of concurrent threads processing exchanges. - */ - public fun concurrentConsumers(concurrentConsumers: String) { - it.property("concurrentConsumers", concurrentConsumers) - } - - /** - * Number of concurrent threads processing exchanges. - */ - public fun concurrentConsumers(concurrentConsumers: Int) { - it.property("concurrentConsumers", concurrentConsumers.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Whether to limit the number of concurrentConsumers to the maximum of 500. By default, an - * exception will be thrown if an endpoint is configured with a greater number. You can disable that - * check by turning this option off. - */ - public fun limitConcurrentConsumers(limitConcurrentConsumers: String) { - it.property("limitConcurrentConsumers", limitConcurrentConsumers) - } - - /** - * Whether to limit the number of concurrentConsumers to the maximum of 500. By default, an - * exception will be thrown if an endpoint is configured with a greater number. You can disable that - * check by turning this option off. - */ - public fun limitConcurrentConsumers(limitConcurrentConsumers: Boolean) { - it.property("limitConcurrentConsumers", limitConcurrentConsumers.toString()) - } - - /** - * Specifies whether multiple consumers are allowed. If enabled, you can use SEDA for - * Publish-Subscribe messaging. That is, you can send a message to the SEDA queue and have each - * consumer receive a copy of the message. When enabled, this option should be specified on every - * consumer endpoint. - */ - public fun multipleConsumers(multipleConsumers: String) { - it.property("multipleConsumers", multipleConsumers) - } - - /** - * Specifies whether multiple consumers are allowed. If enabled, you can use SEDA for - * Publish-Subscribe messaging. That is, you can send a message to the SEDA queue and have each - * consumer receive a copy of the message. When enabled, this option should be specified on every - * consumer endpoint. - */ - public fun multipleConsumers(multipleConsumers: Boolean) { - it.property("multipleConsumers", multipleConsumers.toString()) - } - - /** - * The timeout (in milliseconds) used when polling. When a timeout occurs, the consumer can check - * whether it is allowed to continue running. Setting a lower value allows the consumer to react more - * quickly upon shutdown. - */ - public fun pollTimeout(pollTimeout: String) { - it.property("pollTimeout", pollTimeout) - } - - /** - * The timeout (in milliseconds) used when polling. When a timeout occurs, the consumer can check - * whether it is allowed to continue running. Setting a lower value allows the consumer to react more - * quickly upon shutdown. - */ - public fun pollTimeout(pollTimeout: Int) { - it.property("pollTimeout", pollTimeout.toString()) - } - - /** - * Whether to purge the task queue when stopping the consumer/route. This allows to stop faster, - * as any pending messages on the queue is discarded. - */ - public fun purgeWhenStopping(purgeWhenStopping: String) { - it.property("purgeWhenStopping", purgeWhenStopping) - } - - /** - * Whether to purge the task queue when stopping the consumer/route. This allows to stop faster, - * as any pending messages on the queue is discarded. - */ - public fun purgeWhenStopping(purgeWhenStopping: Boolean) { - it.property("purgeWhenStopping", purgeWhenStopping.toString()) - } - - /** - * Whether a thread that sends messages to a full SEDA queue will block until the queue's capacity - * is no longer exhausted. By default, an exception will be thrown stating that the queue is full. By - * enabling this option, the calling thread will instead block and wait until the message can be - * accepted. - */ - public fun blockWhenFull(blockWhenFull: String) { - it.property("blockWhenFull", blockWhenFull) - } - - /** - * Whether a thread that sends messages to a full SEDA queue will block until the queue's capacity - * is no longer exhausted. By default, an exception will be thrown stating that the queue is full. By - * enabling this option, the calling thread will instead block and wait until the message can be - * accepted. - */ - public fun blockWhenFull(blockWhenFull: Boolean) { - it.property("blockWhenFull", blockWhenFull.toString()) - } - - /** - * Whether the producer should discard the message (do not add the message to the queue), when - * sending to a queue with no active consumers. Only one of the options discardIfNoConsumers and - * failIfNoConsumers can be enabled at the same time. - */ - public fun discardIfNoConsumers(discardIfNoConsumers: String) { - it.property("discardIfNoConsumers", discardIfNoConsumers) - } - - /** - * Whether the producer should discard the message (do not add the message to the queue), when - * sending to a queue with no active consumers. Only one of the options discardIfNoConsumers and - * failIfNoConsumers can be enabled at the same time. - */ - public fun discardIfNoConsumers(discardIfNoConsumers: Boolean) { - it.property("discardIfNoConsumers", discardIfNoConsumers.toString()) - } - - /** - * Whether a thread that sends messages to a full SEDA queue will be discarded. By default, an - * exception will be thrown stating that the queue is full. By enabling this option, the calling - * thread will give up sending and continue, meaning that the message was not sent to the SEDA queue. - */ - public fun discardWhenFull(discardWhenFull: String) { - it.property("discardWhenFull", discardWhenFull) - } - - /** - * Whether a thread that sends messages to a full SEDA queue will be discarded. By default, an - * exception will be thrown stating that the queue is full. By enabling this option, the calling - * thread will give up sending and continue, meaning that the message was not sent to the SEDA queue. - */ - public fun discardWhenFull(discardWhenFull: Boolean) { - it.property("discardWhenFull", discardWhenFull.toString()) - } - - /** - * Whether the producer should fail by throwing an exception, when sending to a queue with no - * active consumers. Only one of the options discardIfNoConsumers and failIfNoConsumers can be - * enabled at the same time. - */ - public fun failIfNoConsumers(failIfNoConsumers: String) { - it.property("failIfNoConsumers", failIfNoConsumers) - } - - /** - * Whether the producer should fail by throwing an exception, when sending to a queue with no - * active consumers. Only one of the options discardIfNoConsumers and failIfNoConsumers can be - * enabled at the same time. - */ - public fun failIfNoConsumers(failIfNoConsumers: Boolean) { - it.property("failIfNoConsumers", failIfNoConsumers.toString()) - } - - /** - * Offer timeout (in milliseconds) can be added to the block case when queue is full. You can - * disable timeout by using 0 or a negative value. - */ - public fun offerTimeout(offerTimeout: String) { - it.property("offerTimeout", offerTimeout) - } - - /** - * Timeout (in milliseconds) before a SEDA producer will stop waiting for an asynchronous task to - * complete. You can disable timeout by using 0 or a negative value. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Option to specify whether the caller should wait for the async task to complete or not before - * continuing. The following three options are supported: Always, Never or IfReplyExpected. The first - * two values are self-explanatory. The last value, IfReplyExpected, will only wait if the message is - * Request Reply based. The default option is IfReplyExpected. - */ - public fun waitForTaskToComplete(waitForTaskToComplete: String) { - it.property("waitForTaskToComplete", waitForTaskToComplete) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Define the queue instance which will be used by the endpoint - */ - public fun queue(queue: String) { - it.property("queue", queue) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TahuEdgeUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TahuEdgeUriDsl.kt deleted file mode 100644 index d54c9781e789d..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TahuEdgeUriDsl.kt +++ /dev/null @@ -1,240 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Sparkplug B Edge Node and Device support over MQTT using Eclipse Tahu - */ -public fun UriDsl.`tahu-edge`(i: TahuEdgeUriDsl.() -> Unit) { - TahuEdgeUriDsl(this).apply(i) -} - -@CamelDslMarker -public class TahuEdgeUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("tahu-edge") - } - - private var groupId: String = "" - - private var edgeNode: String = "" - - private var deviceId: String = "" - - /** - * ID of the group - */ - public fun groupId(groupId: String) { - this.groupId = groupId - it.url("$groupId/$edgeNode") - } - - /** - * ID of the edge node - */ - public fun edgeNode(edgeNode: String) { - this.edgeNode = edgeNode - it.url("$groupId/$edgeNode") - } - - /** - * ID of this edge node device - */ - public fun deviceId(deviceId: String) { - this.deviceId = deviceId - it.url("$groupId/$edgeNode") - } - - /** - * MQTT client ID length check enabled - */ - public fun checkClientIdLength(checkClientIdLength: String) { - it.property("checkClientIdLength", checkClientIdLength) - } - - /** - * MQTT client ID length check enabled - */ - public fun checkClientIdLength(checkClientIdLength: Boolean) { - it.property("checkClientIdLength", checkClientIdLength.toString()) - } - - /** - * MQTT client ID to use for all server definitions, rather than specifying the same one for each. - * Note that if neither the 'clientId' parameter nor an 'MqttClientId' are defined for an MQTT - * Server, a random MQTT Client ID will be generated automatically, prefaced with 'Camel' - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * MQTT connection keep alive timeout, in seconds - */ - public fun keepAliveTimeout(keepAliveTimeout: String) { - it.property("keepAliveTimeout", keepAliveTimeout) - } - - /** - * MQTT connection keep alive timeout, in seconds - */ - public fun keepAliveTimeout(keepAliveTimeout: Int) { - it.property("keepAliveTimeout", keepAliveTimeout.toString()) - } - - /** - * Delay before recurring node rebirth messages will be sent - */ - public fun rebirthDebounceDelay(rebirthDebounceDelay: String) { - it.property("rebirthDebounceDelay", rebirthDebounceDelay) - } - - /** - * Delay before recurring node rebirth messages will be sent - */ - public fun rebirthDebounceDelay(rebirthDebounceDelay: Int) { - it.property("rebirthDebounceDelay", rebirthDebounceDelay.toString()) - } - - /** - * MQTT server definitions, given with the following syntax in a comma-separated list: - * MqttServerName:(MqttClientId:)(tcp/ssl)://hostname(:port),... - */ - public fun servers(servers: String) { - it.property("servers", servers) - } - - /** - * Tahu SparkplugBPayloadMap to configure metric data types for this edge node or device. Note - * that this payload is used exclusively as a Sparkplug B spec-compliant configuration for all - * possible edge node or device metric names, aliases, and data types. This configuration is required - * to publish proper Sparkplug B NBIRTH and DBIRTH payloads. - */ - public fun metricDataTypePayloadMap(metricDataTypePayloadMap: String) { - it.property("metricDataTypePayloadMap", metricDataTypePayloadMap) - } - - /** - * To use a custom HeaderFilterStrategy to filter headers used as Sparkplug metrics. Default value - * notice: Defaults to sending all Camel Message headers with name prefixes of CamelTahuMetric., - * including those with null values - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use a specific org.eclipse.tahu.message.BdSeqManager implementation to manage edge node - * birth-death sequence numbers - */ - public fun bdSeqManager(bdSeqManager: String) { - it.property("bdSeqManager", bdSeqManager) - } - - /** - * Path for Sparkplug B NBIRTH/NDEATH sequence number persistence files. This path will contain - * files named as -bdSeqNum and must be writable by the executing process' user - */ - public fun bdSeqNumPath(bdSeqNumPath: String) { - it.property("bdSeqNumPath", bdSeqNumPath) - } - - /** - * Flag enabling support for metric aliases - */ - public fun useAliases(useAliases: String) { - it.property("useAliases", useAliases) - } - - /** - * Flag enabling support for metric aliases - */ - public fun useAliases(useAliases: Boolean) { - it.property("useAliases", useAliases.toString()) - } - - /** - * ID of each device connected to this edge node, as a comma-separated list - */ - public fun deviceIds(deviceIds: String) { - it.property("deviceIds", deviceIds) - } - - /** - * Host ID of the primary host application for this edge node - */ - public fun primaryHostId(primaryHostId: String) { - it.property("primaryHostId", primaryHostId) - } - - /** - * Password for MQTT server authentication - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * SSL configuration for MQTT server connections - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * Username for MQTT server authentication - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TahuHostUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TahuHostUriDsl.kt deleted file mode 100644 index 2796965c28755..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TahuHostUriDsl.kt +++ /dev/null @@ -1,179 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Sparkplug B Host Application support over MQTT using Eclipse Tahu - */ -public fun UriDsl.`tahu-host`(i: TahuHostUriDsl.() -> Unit) { - TahuHostUriDsl(this).apply(i) -} - -@CamelDslMarker -public class TahuHostUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("tahu-host") - } - - private var hostId: String = "" - - /** - * ID for the host application - */ - public fun hostId(hostId: String) { - this.hostId = hostId - it.url("$hostId") - } - - /** - * MQTT client ID length check enabled - */ - public fun checkClientIdLength(checkClientIdLength: String) { - it.property("checkClientIdLength", checkClientIdLength) - } - - /** - * MQTT client ID length check enabled - */ - public fun checkClientIdLength(checkClientIdLength: Boolean) { - it.property("checkClientIdLength", checkClientIdLength.toString()) - } - - /** - * MQTT client ID to use for all server definitions, rather than specifying the same one for each. - * Note that if neither the 'clientId' parameter nor an 'MqttClientId' are defined for an MQTT - * Server, a random MQTT Client ID will be generated automatically, prefaced with 'Camel' - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * MQTT connection keep alive timeout, in seconds - */ - public fun keepAliveTimeout(keepAliveTimeout: String) { - it.property("keepAliveTimeout", keepAliveTimeout) - } - - /** - * MQTT connection keep alive timeout, in seconds - */ - public fun keepAliveTimeout(keepAliveTimeout: Int) { - it.property("keepAliveTimeout", keepAliveTimeout.toString()) - } - - /** - * Delay before recurring node rebirth messages will be sent - */ - public fun rebirthDebounceDelay(rebirthDebounceDelay: String) { - it.property("rebirthDebounceDelay", rebirthDebounceDelay) - } - - /** - * Delay before recurring node rebirth messages will be sent - */ - public fun rebirthDebounceDelay(rebirthDebounceDelay: Int) { - it.property("rebirthDebounceDelay", rebirthDebounceDelay.toString()) - } - - /** - * MQTT server definitions, given with the following syntax in a comma-separated list: - * MqttServerName:(MqttClientId:)(tcp/ssl)://hostname(:port),... - */ - public fun servers(servers: String) { - it.property("servers", servers) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Password for MQTT server authentication - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * SSL configuration for MQTT server connections - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * Username for MQTT server authentication - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TahuUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TahuUriDsl.kt deleted file mode 100644 index 0e6a1a6957672..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TahuUriDsl.kt +++ /dev/null @@ -1,296 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Sparkplug B Edge Node and Host Application support over MQTT using Eclipse Tahu - */ -public fun UriDsl.tahu(i: TahuUriDsl.() -> Unit) { - TahuUriDsl(this).apply(i) -} - -@CamelDslMarker -public class TahuUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("tahu") - } - - private var groupId: String = "" - - private var edgeNode: String = "" - - private var deviceId: String = "" - - private var hostId: String = "" - - /** - * ID of the group - */ - public fun groupId(groupId: String) { - this.groupId = groupId - it.url("$groupId/$edgeNode/$deviceId") - } - - /** - * ID of the edge node - */ - public fun edgeNode(edgeNode: String) { - this.edgeNode = edgeNode - it.url("$groupId/$edgeNode/$deviceId") - } - - /** - * ID of this edge node device - */ - public fun deviceId(deviceId: String) { - this.deviceId = deviceId - it.url("$groupId/$edgeNode/$deviceId") - } - - /** - * ID for the host application - */ - public fun hostId(hostId: String) { - this.hostId = hostId - it.url("$groupId/$edgeNode/$deviceId") - } - - /** - * MQTT client ID length check enabled - */ - public fun checkClientIdLength(checkClientIdLength: String) { - it.property("checkClientIdLength", checkClientIdLength) - } - - /** - * MQTT client ID length check enabled - */ - public fun checkClientIdLength(checkClientIdLength: Boolean) { - it.property("checkClientIdLength", checkClientIdLength.toString()) - } - - /** - * MQTT client ID to use for all server definitions, rather than specifying the same one for each. - * Note that if neither the 'clientId' parameter nor an 'MqttClientId' are defined for an MQTT - * Server, a random MQTT Client ID will be generated automatically, prefaced with 'Camel' - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * MQTT connection keep alive timeout, in seconds - */ - public fun keepAliveTimeout(keepAliveTimeout: String) { - it.property("keepAliveTimeout", keepAliveTimeout) - } - - /** - * MQTT connection keep alive timeout, in seconds - */ - public fun keepAliveTimeout(keepAliveTimeout: Int) { - it.property("keepAliveTimeout", keepAliveTimeout.toString()) - } - - /** - * Delay before recurring node rebirth messages will be sent - */ - public fun rebirthDebounceDelay(rebirthDebounceDelay: String) { - it.property("rebirthDebounceDelay", rebirthDebounceDelay) - } - - /** - * Delay before recurring node rebirth messages will be sent - */ - public fun rebirthDebounceDelay(rebirthDebounceDelay: Int) { - it.property("rebirthDebounceDelay", rebirthDebounceDelay.toString()) - } - - /** - * MQTT server definitions, given with the following syntax in a comma-separated list: - * MqttServerName:(MqttClientId:)(tcp/ssl)://hostname(:port),... - */ - public fun servers(servers: String) { - it.property("servers", servers) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Tahu SparkplugBPayloadMap to configure metric data types for this edge node or device Note that - * this payload is used exclusively as a Sparkplug B spec-compliant configuration for all possible - * edge node or device metric names, aliases, and data types. This configuration is required to - * publish proper Sparkplug B NBIRTH and DBIRTH payloads. - */ - public fun metricDataTypePayloadMap(metricDataTypePayloadMap: String) { - it.property("metricDataTypePayloadMap", metricDataTypePayloadMap) - } - - /** - * To use a custom HeaderFilterStrategy to filter headers used as Sparkplug metrics. Default value - * notice: Defaults to sending all Camel Message headers with name prefixes of CamelTahuMetric., - * including those with null values - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use a specific org.eclipse.tahu.message.BdSeqManager implementation to manage edge node - * birth-death sequence numbers - */ - public fun bdSeqManager(bdSeqManager: String) { - it.property("bdSeqManager", bdSeqManager) - } - - /** - * Path for Sparkplug B NBIRTH/NDEATH sequence number persistence files. This path will contain - * files named as -bdSeqNum and must be writable by the executing process' user - */ - public fun bdSeqNumPath(bdSeqNumPath: String) { - it.property("bdSeqNumPath", bdSeqNumPath) - } - - /** - * Flag enabling support for metric aliases - */ - public fun useAliases(useAliases: String) { - it.property("useAliases", useAliases) - } - - /** - * Flag enabling support for metric aliases - */ - public fun useAliases(useAliases: Boolean) { - it.property("useAliases", useAliases.toString()) - } - - /** - * ID of each device connected to this edge node, as a comma-separated list - */ - public fun deviceIds(deviceIds: String) { - it.property("deviceIds", deviceIds) - } - - /** - * Host ID of the primary host application for this edge node - */ - public fun primaryHostId(primaryHostId: String) { - it.property("primaryHostId", primaryHostId) - } - - /** - * Password for MQTT server authentication - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * SSL configuration for MQTT server connections - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * Username for MQTT server authentication - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TelegramUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TelegramUriDsl.kt deleted file mode 100644 index 524cb86bb50fd..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TelegramUriDsl.kt +++ /dev/null @@ -1,434 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages using the Telegram Bot API. - */ -public fun UriDsl.telegram(i: TelegramUriDsl.() -> Unit) { - TelegramUriDsl(this).apply(i) -} - -@CamelDslMarker -public class TelegramUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("telegram") - } - - private var type: String = "" - - /** - * The endpoint type. Currently, only the 'bots' type is supported. - */ - public fun type(type: String) { - this.type = type - it.url("$type") - } - - /** - * Limit on the number of updates that can be received in a single polling request. - */ - public fun limit(limit: String) { - it.property("limit", limit) - } - - /** - * Limit on the number of updates that can be received in a single polling request. - */ - public fun limit(limit: Int) { - it.property("limit", limit.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Timeout in seconds for long polling. Put 0 for short polling or a bigger number for long - * polling. Long polling produces shorter response time. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Timeout in seconds for long polling. Put 0 for short polling or a bigger number for long - * polling. Long polling produces shorter response time. - */ - public fun timeout(timeout: Int) { - it.property("timeout", timeout.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * The identifier of the chat that will receive the produced messages. Chat ids can be first - * obtained from incoming messages (eg. when a telegram user starts a conversation with a bot, its - * client sends automatically a '/start' message containing the chat id). It is an optional - * parameter, as the chat id can be set dynamically for each outgoing message (using body or - * headers). - */ - public fun chatId(chatId: String) { - it.property("chatId", chatId) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Can be used to set an alternative base URI, e.g. when you want to test the component against a - * mock Telegram API - */ - public fun baseUri(baseUri: String) { - it.property("baseUri", baseUri) - } - - /** - * The initial in-memory buffer size used when transferring data between Camel and AHC Client. - */ - public fun bufferSize(bufferSize: String) { - it.property("bufferSize", bufferSize) - } - - /** - * The initial in-memory buffer size used when transferring data between Camel and AHC Client. - */ - public fun bufferSize(bufferSize: Int) { - it.property("bufferSize", bufferSize.toString()) - } - - /** - * To use a custom HttpClient - */ - public fun client(client: String) { - it.property("client", client) - } - - /** - * HTTP proxy host which could be used when sending out the message. - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * HTTP proxy port which could be used when sending out the message. - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * HTTP proxy port which could be used when sending out the message. - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * HTTP proxy type which could be used when sending out the message. - */ - public fun proxyType(proxyType: String) { - it.property("proxyType", proxyType) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * The authorization token for using the bot (ask the BotFather) - */ - public fun authorizationToken(authorizationToken: String) { - it.property("authorizationToken", authorizationToken) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ThriftUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ThriftUriDsl.kt deleted file mode 100644 index eb5cb9efe67ec..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ThriftUriDsl.kt +++ /dev/null @@ -1,245 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Call and expose remote procedures (RPC) with Apache Thrift data format and serialization - * mechanism. - */ -public fun UriDsl.thrift(i: ThriftUriDsl.() -> Unit) { - ThriftUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ThriftUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("thrift") - } - - private var host: String = "" - - private var port: String = "" - - private var service: String = "" - - /** - * The Thrift server host name. This is localhost or 0.0.0.0 (if not defined) when being a - * consumer or remote server host name when using producer. - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port/$service") - } - - /** - * The Thrift server port - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port/$service") - } - - /** - * The Thrift server port - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port/$service") - } - - /** - * Fully qualified service name from the thrift descriptor file (package dot service definition - * name) - */ - public fun service(service: String) { - this.service = service - it.url("$host:$port/$service") - } - - /** - * Protocol compression mechanism type - */ - public fun compressionType(compressionType: String) { - it.property("compressionType", compressionType) - } - - /** - * Exchange protocol serialization type - */ - public fun exchangeProtocol(exchangeProtocol: String) { - it.property("exchangeProtocol", exchangeProtocol) - } - - /** - * Client timeout for consumers - */ - public fun clientTimeout(clientTimeout: String) { - it.property("clientTimeout", clientTimeout) - } - - /** - * Client timeout for consumers - */ - public fun clientTimeout(clientTimeout: Int) { - it.property("clientTimeout", clientTimeout.toString()) - } - - /** - * The Thrift server consumer max thread pool size - */ - public fun maxPoolSize(maxPoolSize: String) { - it.property("maxPoolSize", maxPoolSize) - } - - /** - * The Thrift server consumer max thread pool size - */ - public fun maxPoolSize(maxPoolSize: Int) { - it.property("maxPoolSize", maxPoolSize.toString()) - } - - /** - * The Thrift server consumer initial thread pool size - */ - public fun poolSize(poolSize: String) { - it.property("poolSize", poolSize) - } - - /** - * The Thrift server consumer initial thread pool size - */ - public fun poolSize(poolSize: Int) { - it.property("poolSize", poolSize.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * The Thrift invoked method name - */ - public fun method(method: String) { - it.property("method", method) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * Security negotiation type - */ - public fun negotiationType(negotiationType: String) { - it.property("negotiationType", negotiationType) - } - - /** - * Configuration parameters for SSL/TLS security negotiation - */ - public fun sslParameters(sslParameters: String) { - it.property("sslParameters", sslParameters) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ThymeleafUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ThymeleafUriDsl.kt deleted file mode 100644 index df317238af904..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ThymeleafUriDsl.kt +++ /dev/null @@ -1,205 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Transform messages using a Thymeleaf template. - */ -public fun UriDsl.thymeleaf(i: ThymeleafUriDsl.() -> Unit) { - ThymeleafUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ThymeleafUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("thymeleaf") - } - - private var resourceUri: String = "" - - /** - * Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file - * and http loads the resource using these protocols (classpath is default). ref will lookup the - * resource in the registry. bean will call a method on a bean to be used as the resource. For bean - * you can specify the method name after dot, eg bean:myBean.myMethod. - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: String) { - it.property("allowContextMapAll", allowContextMapAll) - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: Boolean) { - it.property("allowContextMapAll", allowContextMapAll.toString()) - } - - /** - * Whether templates have to be considered cacheable or not. - */ - public fun cacheable(cacheable: String) { - it.property("cacheable", cacheable) - } - - /** - * Whether templates have to be considered cacheable or not. - */ - public fun cacheable(cacheable: Boolean) { - it.property("cacheable", cacheable.toString()) - } - - /** - * The cache Time To Live for templates, expressed in milliseconds. - */ - public fun cacheTimeToLive(cacheTimeToLive: String) { - it.property("cacheTimeToLive", cacheTimeToLive) - } - - /** - * The cache Time To Live for templates, expressed in milliseconds. - */ - public fun cacheTimeToLive(cacheTimeToLive: Int) { - it.property("cacheTimeToLive", cacheTimeToLive.toString()) - } - - /** - * Whether a template resources will be checked for existence before being returned. - */ - public fun checkExistence(checkExistence: String) { - it.property("checkExistence", checkExistence) - } - - /** - * Whether a template resources will be checked for existence before being returned. - */ - public fun checkExistence(checkExistence: Boolean) { - it.property("checkExistence", checkExistence.toString()) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * The template mode to be applied to templates. - */ - public fun templateMode(templateMode: String) { - it.property("templateMode", templateMode) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The character encoding to be used for reading template resources. - */ - public fun encoding(encoding: String) { - it.property("encoding", encoding) - } - - /** - * The order in which this template will be resolved as part of the resolver chain. - */ - public fun order(order: String) { - it.property("order", order) - } - - /** - * The order in which this template will be resolved as part of the resolver chain. - */ - public fun order(order: Int) { - it.property("order", order.toString()) - } - - /** - * An optional prefix added to template names to convert them into resource names. - */ - public fun prefix(prefix: String) { - it.property("prefix", prefix) - } - - /** - * The type of resolver to be used by the template engine. - */ - public fun resolver(resolver: String) { - it.property("resolver", resolver) - } - - /** - * An optional suffix added to template names to convert them into resource names. - */ - public fun suffix(suffix: String) { - it.property("suffix", suffix) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TikaUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TikaUriDsl.kt deleted file mode 100644 index 0aaebfe69802a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TikaUriDsl.kt +++ /dev/null @@ -1,106 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Parse documents and extract metadata and text using Apache Tika. - */ -public fun UriDsl.tika(i: TikaUriDsl.() -> Unit) { - TikaUriDsl(this).apply(i) -} - -@CamelDslMarker -public class TikaUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("tika") - } - - private var operation: String = "" - - /** - * Operation type - */ - public fun operation(operation: String) { - this.operation = operation - it.url("$operation") - } - - /** - * Tika Parse Output Encoding - */ - public fun tikaParseOutputEncoding(tikaParseOutputEncoding: String) { - it.property("tikaParseOutputEncoding", tikaParseOutputEncoding) - } - - /** - * Tika Output Format. Supported output formats. xml: Returns Parsed Content as XML. html: Returns - * Parsed Content as HTML. text: Returns Parsed Content as Text. textMain: Uses the boilerpipe - * library to automatically extract the main content from a web page. - */ - public fun tikaParseOutputFormat(tikaParseOutputFormat: String) { - it.property("tikaParseOutputFormat", tikaParseOutputFormat) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Tika Config - */ - public fun tikaConfig(tikaConfig: String) { - it.property("tikaConfig", tikaConfig) - } - - /** - * Tika Config Url - */ - public fun tikaConfigUri(tikaConfigUri: String) { - it.property("tikaConfigUri", tikaConfigUri) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TimerUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TimerUriDsl.kt deleted file mode 100644 index 9517462e0560b..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TimerUriDsl.kt +++ /dev/null @@ -1,222 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Generate messages in specified intervals using java.util.Timer. - */ -public fun UriDsl.timer(i: TimerUriDsl.() -> Unit) { - TimerUriDsl(this).apply(i) -} - -@CamelDslMarker -public class TimerUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("timer") - } - - private var timerName: String = "" - - /** - * The name of the timer - */ - public fun timerName(timerName: String) { - this.timerName = timerName - it.url("$timerName") - } - - /** - * The number of milliseconds to wait before the first event is generated. Should not be used in - * conjunction with the time option. The default value is 1000. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Events take place at approximately regular intervals, separated by the specified period. - */ - public fun fixedRate(fixedRate: String) { - it.property("fixedRate", fixedRate) - } - - /** - * Events take place at approximately regular intervals, separated by the specified period. - */ - public fun fixedRate(fixedRate: Boolean) { - it.property("fixedRate", fixedRate.toString()) - } - - /** - * Whether to include metadata in the exchange such as fired time, timer name, timer count etc. - */ - public fun includeMetadata(includeMetadata: String) { - it.property("includeMetadata", includeMetadata) - } - - /** - * Whether to include metadata in the exchange such as fired time, timer name, timer count etc. - */ - public fun includeMetadata(includeMetadata: Boolean) { - it.property("includeMetadata", includeMetadata.toString()) - } - - /** - * Generate periodic events every period. Must be zero or positive value. The default value is - * 1000. - */ - public fun period(period: String) { - it.property("period", period) - } - - /** - * Specifies a maximum limit for the number of fires. Therefore, if you set it to 1, the timer - * will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative - * means fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit for the number of fires. Therefore, if you set it to 1, the timer - * will only fire once. If you set it to 5, it will only fire five times. A value of zero or negative - * means fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Specifies whether the thread associated with the timer endpoint runs as a daemon. The default - * value is true. - */ - public fun daemon(daemon: String) { - it.property("daemon", daemon) - } - - /** - * Specifies whether the thread associated with the timer endpoint runs as a daemon. The default - * value is true. - */ - public fun daemon(daemon: Boolean) { - it.property("daemon", daemon.toString()) - } - - /** - * Allows you to specify a custom Date pattern to use for setting the time option using URI - * syntax. - */ - public fun pattern(pattern: String) { - it.property("pattern", pattern) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: String) { - it.property("synchronous", synchronous) - } - - /** - * Sets whether synchronous processing should be strictly used - */ - public fun synchronous(synchronous: Boolean) { - it.property("synchronous", synchronous.toString()) - } - - /** - * A java.util.Date the first event should be generated. If using the URI, the pattern expected - * is: yyyy-MM-dd HH:mm:ss or yyyy-MM-dd'T'HH:mm:ss. - */ - public fun time(time: String) { - it.property("time", time) - } - - /** - * To use a custom Timer - */ - public fun timer(timer: String) { - it.property("timer", timer) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwilioUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwilioUriDsl.kt deleted file mode 100644 index 1c7764ad9783e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwilioUriDsl.kt +++ /dev/null @@ -1,346 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Interact with Twilio REST APIs using Twilio Java SDK. - */ -public fun UriDsl.twilio(i: TwilioUriDsl.() -> Unit) { - TwilioUriDsl(this).apply(i) -} - -@CamelDslMarker -public class TwilioUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("twilio") - } - - private var apiName: String = "" - - private var methodName: String = "" - - /** - * What kind of operation to perform - */ - public fun apiName(apiName: String) { - this.apiName = apiName - it.url("$apiName/$methodName") - } - - /** - * What sub operation to use for the selected operation - */ - public fun methodName(methodName: String) { - this.methodName = methodName - it.url("$apiName/$methodName") - } - - /** - * Sets the name of a parameter to be passed in the exchange In Body - */ - public fun inBody(inBody: String) { - it.property("inBody", inBody) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwitterDirectmessageUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwitterDirectmessageUriDsl.kt deleted file mode 100644 index 5d39aa77ed060..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwitterDirectmessageUriDsl.kt +++ /dev/null @@ -1,567 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Double -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive Twitter direct messages. - */ -public fun UriDsl.`twitter-directmessage`(i: TwitterDirectmessageUriDsl.() -> Unit) { - TwitterDirectmessageUriDsl(this).apply(i) -} - -@CamelDslMarker -public class TwitterDirectmessageUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("twitter-directmessage") - } - - private var user: String = "" - - /** - * The user name to send a direct message. This will be ignored for consumer. - */ - public fun user(user: String) { - this.user = user - it.url("$user") - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Endpoint type to use. - */ - public fun type(type: String) { - it.property("type", type) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Used by the geography search, to search by radius using the configured metrics. The unit can - * either be mi for miles, or km for kilometers. You need to configure all the following options: - * longitude, latitude, radius, and distanceMetric. - */ - public fun distanceMetric(distanceMetric: String) { - it.property("distanceMetric", distanceMetric) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Used for enabling full text from twitter (eg receive tweets that contains more than 140 - * characters). - */ - public fun extendedMode(extendedMode: String) { - it.property("extendedMode", extendedMode) - } - - /** - * Used for enabling full text from twitter (eg receive tweets that contains more than 140 - * characters). - */ - public fun extendedMode(extendedMode: Boolean) { - it.property("extendedMode", extendedMode.toString()) - } - - /** - * Used by the geography search to search by latitude. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun latitude(latitude: String) { - it.property("latitude", latitude) - } - - /** - * Used by the geography search to search by latitude. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun latitude(latitude: Double) { - it.property("latitude", latitude.toString()) - } - - /** - * Bounding boxes, created by pairs of lat/lons. Can be used for filter. A pair is defined as - * lat,lon. And multiple pairs can be separated by semicolon. - */ - public fun locations(locations: String) { - it.property("locations", locations) - } - - /** - * Used by the geography search to search by longitude. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun longitude(longitude: String) { - it.property("longitude", longitude) - } - - /** - * Used by the geography search to search by longitude. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun longitude(longitude: Double) { - it.property("longitude", longitude.toString()) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Used by the geography search to search by radius. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun radius(radius: String) { - it.property("radius", radius) - } - - /** - * Used by the geography search to search by radius. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun radius(radius: Double) { - it.property("radius", radius.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Limiting number of results per page. - */ - public fun count(count: String) { - it.property("count", count) - } - - /** - * Limiting number of results per page. - */ - public fun count(count: Int) { - it.property("count", count.toString()) - } - - /** - * Filter out old tweets, that has previously been polled. This state is stored in memory only, - * and based on last tweet id. - */ - public fun filterOld(filterOld: String) { - it.property("filterOld", filterOld) - } - - /** - * Filter out old tweets, that has previously been polled. This state is stored in memory only, - * and based on last tweet id. - */ - public fun filterOld(filterOld: Boolean) { - it.property("filterOld", filterOld.toString()) - } - - /** - * The lang string ISO_639-1 which will be used for searching - */ - public fun lang(lang: String) { - it.property("lang", lang) - } - - /** - * The number of pages result which you want camel-twitter to consume. - */ - public fun numberOfPages(numberOfPages: String) { - it.property("numberOfPages", numberOfPages) - } - - /** - * The number of pages result which you want camel-twitter to consume. - */ - public fun numberOfPages(numberOfPages: Int) { - it.property("numberOfPages", numberOfPages.toString()) - } - - /** - * The last tweet id which will be used for pulling the tweets. It is useful when the camel route - * is restarted after a long running. - */ - public fun sinceId(sinceId: String) { - it.property("sinceId", sinceId) - } - - /** - * The last tweet id which will be used for pulling the tweets. It is useful when the camel route - * is restarted after a long running. - */ - public fun sinceId(sinceId: Int) { - it.property("sinceId", sinceId.toString()) - } - - /** - * To filter by user ids for filter. Multiple values can be separated by comma. - */ - public fun userIds(userIds: String) { - it.property("userIds", userIds) - } - - /** - * The http proxy host which can be used for the camel-twitter. Can also be configured on the - * TwitterComponent level instead. - */ - public fun httpProxyHost(httpProxyHost: String) { - it.property("httpProxyHost", httpProxyHost) - } - - /** - * The http proxy password which can be used for the camel-twitter. Can also be configured on the - * TwitterComponent level instead. - */ - public fun httpProxyPassword(httpProxyPassword: String) { - it.property("httpProxyPassword", httpProxyPassword) - } - - /** - * The http proxy port which can be used for the camel-twitter. Can also be configured on the - * TwitterComponent level instead. - */ - public fun httpProxyPort(httpProxyPort: String) { - it.property("httpProxyPort", httpProxyPort) - } - - /** - * The http proxy port which can be used for the camel-twitter. Can also be configured on the - * TwitterComponent level instead. - */ - public fun httpProxyPort(httpProxyPort: Int) { - it.property("httpProxyPort", httpProxyPort.toString()) - } - - /** - * The http proxy user which can be used for the camel-twitter. Can also be configured on the - * TwitterComponent level instead. - */ - public fun httpProxyUser(httpProxyUser: String) { - it.property("httpProxyUser", httpProxyUser) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * The access token. Can also be configured on the TwitterComponent level instead. - */ - public fun accessToken(accessToken: String) { - it.property("accessToken", accessToken) - } - - /** - * The access secret. Can also be configured on the TwitterComponent level instead. - */ - public fun accessTokenSecret(accessTokenSecret: String) { - it.property("accessTokenSecret", accessTokenSecret) - } - - /** - * The consumer key. Can also be configured on the TwitterComponent level instead. - */ - public fun consumerKey(consumerKey: String) { - it.property("consumerKey", consumerKey) - } - - /** - * The consumer secret. Can also be configured on the TwitterComponent level instead. - */ - public fun consumerSecret(consumerSecret: String) { - it.property("consumerSecret", consumerSecret) - } - - /** - * Sorts by id, so the oldest are first, and newest last. - */ - public fun sortById(sortById: String) { - it.property("sortById", sortById) - } - - /** - * Sorts by id, so the oldest are first, and newest last. - */ - public fun sortById(sortById: Boolean) { - it.property("sortById", sortById.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwitterSearchUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwitterSearchUriDsl.kt deleted file mode 100644 index 7fd895ac90535..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwitterSearchUriDsl.kt +++ /dev/null @@ -1,567 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Double -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Access Twitter Search. - */ -public fun UriDsl.`twitter-search`(i: TwitterSearchUriDsl.() -> Unit) { - TwitterSearchUriDsl(this).apply(i) -} - -@CamelDslMarker -public class TwitterSearchUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("twitter-search") - } - - private var keywords: String = "" - - /** - * The search query, use the keywords AND, OR, - and () to narrow the search results. - */ - public fun keywords(keywords: String) { - this.keywords = keywords - it.url("$keywords") - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Endpoint type to use. - */ - public fun type(type: String) { - it.property("type", type) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Used by the geography search, to search by radius using the configured metrics. The unit can - * either be mi for miles, or km for kilometers. You need to configure all the following options: - * longitude, latitude, radius, and distanceMetric. - */ - public fun distanceMetric(distanceMetric: String) { - it.property("distanceMetric", distanceMetric) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Used for enabling full text from twitter (eg receive tweets that contains more than 140 - * characters). - */ - public fun extendedMode(extendedMode: String) { - it.property("extendedMode", extendedMode) - } - - /** - * Used for enabling full text from twitter (eg receive tweets that contains more than 140 - * characters). - */ - public fun extendedMode(extendedMode: Boolean) { - it.property("extendedMode", extendedMode.toString()) - } - - /** - * Used by the geography search to search by latitude. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun latitude(latitude: String) { - it.property("latitude", latitude) - } - - /** - * Used by the geography search to search by latitude. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun latitude(latitude: Double) { - it.property("latitude", latitude.toString()) - } - - /** - * Bounding boxes, created by pairs of lat/lons. Can be used for filter. A pair is defined as - * lat,lon. And multiple pairs can be separated by semicolon. - */ - public fun locations(locations: String) { - it.property("locations", locations) - } - - /** - * Used by the geography search to search by longitude. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun longitude(longitude: String) { - it.property("longitude", longitude) - } - - /** - * Used by the geography search to search by longitude. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun longitude(longitude: Double) { - it.property("longitude", longitude.toString()) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Used by the geography search to search by radius. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun radius(radius: String) { - it.property("radius", radius) - } - - /** - * Used by the geography search to search by radius. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun radius(radius: Double) { - it.property("radius", radius.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Limiting number of results per page. - */ - public fun count(count: String) { - it.property("count", count) - } - - /** - * Limiting number of results per page. - */ - public fun count(count: Int) { - it.property("count", count.toString()) - } - - /** - * Filter out old tweets, that has previously been polled. This state is stored in memory only, - * and based on last tweet id. - */ - public fun filterOld(filterOld: String) { - it.property("filterOld", filterOld) - } - - /** - * Filter out old tweets, that has previously been polled. This state is stored in memory only, - * and based on last tweet id. - */ - public fun filterOld(filterOld: Boolean) { - it.property("filterOld", filterOld.toString()) - } - - /** - * The lang string ISO_639-1 which will be used for searching - */ - public fun lang(lang: String) { - it.property("lang", lang) - } - - /** - * The number of pages result which you want camel-twitter to consume. - */ - public fun numberOfPages(numberOfPages: String) { - it.property("numberOfPages", numberOfPages) - } - - /** - * The number of pages result which you want camel-twitter to consume. - */ - public fun numberOfPages(numberOfPages: Int) { - it.property("numberOfPages", numberOfPages.toString()) - } - - /** - * The last tweet id which will be used for pulling the tweets. It is useful when the camel route - * is restarted after a long running. - */ - public fun sinceId(sinceId: String) { - it.property("sinceId", sinceId) - } - - /** - * The last tweet id which will be used for pulling the tweets. It is useful when the camel route - * is restarted after a long running. - */ - public fun sinceId(sinceId: Int) { - it.property("sinceId", sinceId.toString()) - } - - /** - * To filter by user ids for filter. Multiple values can be separated by comma. - */ - public fun userIds(userIds: String) { - it.property("userIds", userIds) - } - - /** - * The http proxy host which can be used for the camel-twitter. Can also be configured on the - * TwitterComponent level instead. - */ - public fun httpProxyHost(httpProxyHost: String) { - it.property("httpProxyHost", httpProxyHost) - } - - /** - * The http proxy password which can be used for the camel-twitter. Can also be configured on the - * TwitterComponent level instead. - */ - public fun httpProxyPassword(httpProxyPassword: String) { - it.property("httpProxyPassword", httpProxyPassword) - } - - /** - * The http proxy port which can be used for the camel-twitter. Can also be configured on the - * TwitterComponent level instead. - */ - public fun httpProxyPort(httpProxyPort: String) { - it.property("httpProxyPort", httpProxyPort) - } - - /** - * The http proxy port which can be used for the camel-twitter. Can also be configured on the - * TwitterComponent level instead. - */ - public fun httpProxyPort(httpProxyPort: Int) { - it.property("httpProxyPort", httpProxyPort.toString()) - } - - /** - * The http proxy user which can be used for the camel-twitter. Can also be configured on the - * TwitterComponent level instead. - */ - public fun httpProxyUser(httpProxyUser: String) { - it.property("httpProxyUser", httpProxyUser) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * The access token. Can also be configured on the TwitterComponent level instead. - */ - public fun accessToken(accessToken: String) { - it.property("accessToken", accessToken) - } - - /** - * The access secret. Can also be configured on the TwitterComponent level instead. - */ - public fun accessTokenSecret(accessTokenSecret: String) { - it.property("accessTokenSecret", accessTokenSecret) - } - - /** - * The consumer key. Can also be configured on the TwitterComponent level instead. - */ - public fun consumerKey(consumerKey: String) { - it.property("consumerKey", consumerKey) - } - - /** - * The consumer secret. Can also be configured on the TwitterComponent level instead. - */ - public fun consumerSecret(consumerSecret: String) { - it.property("consumerSecret", consumerSecret) - } - - /** - * Sorts by id, so the oldest are first, and newest last. - */ - public fun sortById(sortById: String) { - it.property("sortById", sortById) - } - - /** - * Sorts by id, so the oldest are first, and newest last. - */ - public fun sortById(sortById: Boolean) { - it.property("sortById", sortById.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwitterTimelineUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwitterTimelineUriDsl.kt deleted file mode 100644 index 118784722a008..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/TwitterTimelineUriDsl.kt +++ /dev/null @@ -1,581 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Double -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send tweets and receive tweets from user's timeline. - */ -public fun UriDsl.`twitter-timeline`(i: TwitterTimelineUriDsl.() -> Unit) { - TwitterTimelineUriDsl(this).apply(i) -} - -@CamelDslMarker -public class TwitterTimelineUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("twitter-timeline") - } - - private var timelineType: String = "" - - /** - * The timeline type to produce/consume. - */ - public fun timelineType(timelineType: String) { - this.timelineType = timelineType - it.url("$timelineType") - } - - /** - * The list name when using timelineType=list - */ - public fun list(list: String) { - it.property("list", list) - } - - /** - * The username when using timelineType=user - */ - public fun user(user: String) { - it.property("user", user) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Endpoint type to use. - */ - public fun type(type: String) { - it.property("type", type) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * Used by the geography search, to search by radius using the configured metrics. The unit can - * either be mi for miles, or km for kilometers. You need to configure all the following options: - * longitude, latitude, radius, and distanceMetric. - */ - public fun distanceMetric(distanceMetric: String) { - it.property("distanceMetric", distanceMetric) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Used for enabling full text from twitter (eg receive tweets that contains more than 140 - * characters). - */ - public fun extendedMode(extendedMode: String) { - it.property("extendedMode", extendedMode) - } - - /** - * Used for enabling full text from twitter (eg receive tweets that contains more than 140 - * characters). - */ - public fun extendedMode(extendedMode: Boolean) { - it.property("extendedMode", extendedMode.toString()) - } - - /** - * Used by the geography search to search by latitude. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun latitude(latitude: String) { - it.property("latitude", latitude) - } - - /** - * Used by the geography search to search by latitude. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun latitude(latitude: Double) { - it.property("latitude", latitude.toString()) - } - - /** - * Bounding boxes, created by pairs of lat/lons. Can be used for filter. A pair is defined as - * lat,lon. And multiple pairs can be separated by semicolon. - */ - public fun locations(locations: String) { - it.property("locations", locations) - } - - /** - * Used by the geography search to search by longitude. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun longitude(longitude: String) { - it.property("longitude", longitude) - } - - /** - * Used by the geography search to search by longitude. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun longitude(longitude: Double) { - it.property("longitude", longitude.toString()) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * Used by the geography search to search by radius. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun radius(radius: String) { - it.property("radius", radius) - } - - /** - * Used by the geography search to search by radius. You need to configure all the following - * options: longitude, latitude, radius, and distanceMetric. - */ - public fun radius(radius: Double) { - it.property("radius", radius.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Limiting number of results per page. - */ - public fun count(count: String) { - it.property("count", count) - } - - /** - * Limiting number of results per page. - */ - public fun count(count: Int) { - it.property("count", count.toString()) - } - - /** - * Filter out old tweets, that has previously been polled. This state is stored in memory only, - * and based on last tweet id. - */ - public fun filterOld(filterOld: String) { - it.property("filterOld", filterOld) - } - - /** - * Filter out old tweets, that has previously been polled. This state is stored in memory only, - * and based on last tweet id. - */ - public fun filterOld(filterOld: Boolean) { - it.property("filterOld", filterOld.toString()) - } - - /** - * The lang string ISO_639-1 which will be used for searching - */ - public fun lang(lang: String) { - it.property("lang", lang) - } - - /** - * The number of pages result which you want camel-twitter to consume. - */ - public fun numberOfPages(numberOfPages: String) { - it.property("numberOfPages", numberOfPages) - } - - /** - * The number of pages result which you want camel-twitter to consume. - */ - public fun numberOfPages(numberOfPages: Int) { - it.property("numberOfPages", numberOfPages.toString()) - } - - /** - * The last tweet id which will be used for pulling the tweets. It is useful when the camel route - * is restarted after a long running. - */ - public fun sinceId(sinceId: String) { - it.property("sinceId", sinceId) - } - - /** - * The last tweet id which will be used for pulling the tweets. It is useful when the camel route - * is restarted after a long running. - */ - public fun sinceId(sinceId: Int) { - it.property("sinceId", sinceId.toString()) - } - - /** - * To filter by user ids for filter. Multiple values can be separated by comma. - */ - public fun userIds(userIds: String) { - it.property("userIds", userIds) - } - - /** - * The http proxy host which can be used for the camel-twitter. Can also be configured on the - * TwitterComponent level instead. - */ - public fun httpProxyHost(httpProxyHost: String) { - it.property("httpProxyHost", httpProxyHost) - } - - /** - * The http proxy password which can be used for the camel-twitter. Can also be configured on the - * TwitterComponent level instead. - */ - public fun httpProxyPassword(httpProxyPassword: String) { - it.property("httpProxyPassword", httpProxyPassword) - } - - /** - * The http proxy port which can be used for the camel-twitter. Can also be configured on the - * TwitterComponent level instead. - */ - public fun httpProxyPort(httpProxyPort: String) { - it.property("httpProxyPort", httpProxyPort) - } - - /** - * The http proxy port which can be used for the camel-twitter. Can also be configured on the - * TwitterComponent level instead. - */ - public fun httpProxyPort(httpProxyPort: Int) { - it.property("httpProxyPort", httpProxyPort.toString()) - } - - /** - * The http proxy user which can be used for the camel-twitter. Can also be configured on the - * TwitterComponent level instead. - */ - public fun httpProxyUser(httpProxyUser: String) { - it.property("httpProxyUser", httpProxyUser) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * The access token. Can also be configured on the TwitterComponent level instead. - */ - public fun accessToken(accessToken: String) { - it.property("accessToken", accessToken) - } - - /** - * The access secret. Can also be configured on the TwitterComponent level instead. - */ - public fun accessTokenSecret(accessTokenSecret: String) { - it.property("accessTokenSecret", accessTokenSecret) - } - - /** - * The consumer key. Can also be configured on the TwitterComponent level instead. - */ - public fun consumerKey(consumerKey: String) { - it.property("consumerKey", consumerKey) - } - - /** - * The consumer secret. Can also be configured on the TwitterComponent level instead. - */ - public fun consumerSecret(consumerSecret: String) { - it.property("consumerSecret", consumerSecret) - } - - /** - * Sorts by id, so the oldest are first, and newest last. - */ - public fun sortById(sortById: String) { - it.property("sortById", sortById) - } - - /** - * Sorts by id, so the oldest are first, and newest last. - */ - public fun sortById(sortById: Boolean) { - it.property("sortById", sortById.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/UndertowUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/UndertowUriDsl.kt deleted file mode 100644 index 899e041893128..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/UndertowUriDsl.kt +++ /dev/null @@ -1,445 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Expose HTTP and WebSocket endpoints and access external HTTP/WebSocket servers. - */ -public fun UriDsl.undertow(i: UndertowUriDsl.() -> Unit) { - UndertowUriDsl(this).apply(i) -} - -@CamelDslMarker -public class UndertowUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("undertow") - } - - private var httpURI: String = "" - - /** - * The url of the HTTP endpoint to use. - */ - public fun httpURI(httpURI: String) { - this.httpURI = httpURI - it.url("$httpURI") - } - - /** - * For HTTP endpoint: if true, text and binary messages will be wrapped as java.io.InputStream - * before they are passed to an Exchange; otherwise they will be passed as byte. For WebSocket - * endpoint: if true, text and binary messages will be wrapped as java.io.Reader and - * java.io.InputStream respectively before they are passed to an Exchange; otherwise they will be - * passed as String and byte respectively. - */ - public fun useStreaming(useStreaming: String) { - it.property("useStreaming", useStreaming) - } - - /** - * For HTTP endpoint: if true, text and binary messages will be wrapped as java.io.InputStream - * before they are passed to an Exchange; otherwise they will be passed as byte. For WebSocket - * endpoint: if true, text and binary messages will be wrapped as java.io.Reader and - * java.io.InputStream respectively before they are passed to an Exchange; otherwise they will be - * passed as String and byte respectively. - */ - public fun useStreaming(useStreaming: Boolean) { - it.property("useStreaming", useStreaming.toString()) - } - - /** - * Whether or not the consumer should write access log - */ - public fun accessLog(accessLog: String) { - it.property("accessLog", accessLog) - } - - /** - * Whether or not the consumer should write access log - */ - public fun accessLog(accessLog: Boolean) { - it.property("accessLog", accessLog.toString()) - } - - /** - * Used to only allow consuming if the HttpMethod matches, such as GET/POST/PUT etc. Multiple - * methods can be specified separated by comma. - */ - public fun httpMethodRestrict(httpMethodRestrict: String) { - it.property("httpMethodRestrict", httpMethodRestrict) - } - - /** - * Whether or not the consumer should try to find a target consumer by matching the URI prefix if - * no exact match is found. - */ - public fun matchOnUriPrefix(matchOnUriPrefix: String) { - it.property("matchOnUriPrefix", matchOnUriPrefix) - } - - /** - * Whether or not the consumer should try to find a target consumer by matching the URI prefix if - * no exact match is found. - */ - public fun matchOnUriPrefix(matchOnUriPrefix: Boolean) { - it.property("matchOnUriPrefix", matchOnUriPrefix.toString()) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the response's body won't - * contain the exception's stack trace. - */ - public fun muteException(muteException: String) { - it.property("muteException", muteException) - } - - /** - * If enabled and an Exchange failed processing on the consumer side the response's body won't - * contain the exception's stack trace. - */ - public fun muteException(muteException: Boolean) { - it.property("muteException", muteException.toString()) - } - - /** - * Specifies whether to enable HTTP OPTIONS for this Servlet consumer. By default OPTIONS is - * turned off. - */ - public fun optionsEnabled(optionsEnabled: String) { - it.property("optionsEnabled", optionsEnabled) - } - - /** - * Specifies whether to enable HTTP OPTIONS for this Servlet consumer. By default OPTIONS is - * turned off. - */ - public fun optionsEnabled(optionsEnabled: Boolean) { - it.property("optionsEnabled", optionsEnabled.toString()) - } - - /** - * If enabled and an Exchange failed processing on the consumer side and if the caused Exception - * was send back serialized in the response as a application/x-java-serialized-object content type. - * On the producer side the exception will be deserialized and thrown as is instead of the - * HttpOperationFailedException. The caused exception is required to be serialized. This is by - * default turned off. If you enable this then be aware that Java will deserialize the incoming data - * from the request to Java and that can be a potential security risk. - */ - public fun transferException(transferException: String) { - it.property("transferException", transferException) - } - - /** - * If enabled and an Exchange failed processing on the consumer side and if the caused Exception - * was send back serialized in the response as a application/x-java-serialized-object content type. - * On the producer side the exception will be deserialized and thrown as is instead of the - * HttpOperationFailedException. The caused exception is required to be serialized. This is by - * default turned off. If you enable this then be aware that Java will deserialize the incoming data - * from the request to Java and that can be a potential security risk. - */ - public fun transferException(transferException: Boolean) { - it.property("transferException", transferException.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Specifies a comma-delimited set of io.undertow.server.HttpHandler instances to lookup in your - * Registry. These handlers are added to the Undertow handler chain (for example, to add security). - * Important: You can not use different handlers with different Undertow endpoints using the same - * port number. The handlers is associated to the port number. If you need different handlers, then - * use different port numbers. - */ - public fun handlers(handlers: String) { - it.property("handlers", handlers) - } - - /** - * Configure a cookie handler to maintain a HTTP session - */ - public fun cookieHandler(cookieHandler: String) { - it.property("cookieHandler", cookieHandler) - } - - /** - * Setting to ensure socket is not closed due to inactivity - */ - public fun keepAlive(keepAlive: String) { - it.property("keepAlive", keepAlive) - } - - /** - * Setting to ensure socket is not closed due to inactivity - */ - public fun keepAlive(keepAlive: Boolean) { - it.property("keepAlive", keepAlive.toString()) - } - - /** - * Sets additional channel options. The options that can be used are defined in org.xnio.Options. - * To configure from endpoint uri, then prefix each option with option., such as - * option.close-abort=true&option.send-buffer=8192 - */ - public fun options(options: String) { - it.property("options", options) - } - - /** - * If the option is true, UndertowProducer will set the Host header to the value contained in the - * current exchange Host header, useful in reverse proxy applications where you want the Host header - * received by the downstream server to reflect the URL called by the upstream client, this allows - * applications which use the Host header to generate accurate URL's for a proxied service. - */ - public fun preserveHostHeader(preserveHostHeader: String) { - it.property("preserveHostHeader", preserveHostHeader) - } - - /** - * If the option is true, UndertowProducer will set the Host header to the value contained in the - * current exchange Host header, useful in reverse proxy applications where you want the Host header - * received by the downstream server to reflect the URL called by the upstream client, this allows - * applications which use the Host header to generate accurate URL's for a proxied service. - */ - public fun preserveHostHeader(preserveHostHeader: Boolean) { - it.property("preserveHostHeader", preserveHostHeader.toString()) - } - - /** - * Setting to facilitate socket multiplexing - */ - public fun reuseAddresses(reuseAddresses: String) { - it.property("reuseAddresses", reuseAddresses) - } - - /** - * Setting to facilitate socket multiplexing - */ - public fun reuseAddresses(reuseAddresses: Boolean) { - it.property("reuseAddresses", reuseAddresses.toString()) - } - - /** - * Setting to improve TCP protocol performance - */ - public fun tcpNoDelay(tcpNoDelay: String) { - it.property("tcpNoDelay", tcpNoDelay) - } - - /** - * Setting to improve TCP protocol performance - */ - public fun tcpNoDelay(tcpNoDelay: Boolean) { - it.property("tcpNoDelay", tcpNoDelay.toString()) - } - - /** - * Option to disable throwing the HttpOperationFailedException in case of failed responses from - * the remote server. This allows you to get all responses regardless of the HTTP status code. - */ - public fun throwExceptionOnFailure(throwExceptionOnFailure: String) { - it.property("throwExceptionOnFailure", throwExceptionOnFailure) - } - - /** - * Option to disable throwing the HttpOperationFailedException in case of failed responses from - * the remote server. This allows you to get all responses regardless of the HTTP status code. - */ - public fun throwExceptionOnFailure(throwExceptionOnFailure: Boolean) { - it.property("throwExceptionOnFailure", throwExceptionOnFailure.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Which Undertow AccessLogReceiver should be used Will use JBossLoggingAccessLogReceiver if not - * specified - */ - public fun accessLogReceiver(accessLogReceiver: String) { - it.property("accessLogReceiver", accessLogReceiver) - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * To use a custom UndertowHttpBinding to control the mapping between Camel message and undertow. - */ - public fun undertowHttpBinding(undertowHttpBinding: String) { - it.property("undertowHttpBinding", undertowHttpBinding) - } - - /** - * Configuration used by UndertowSecurityProvider. Comma separated list of allowed roles. - */ - public fun allowedRoles(allowedRoles: String) { - it.property("allowedRoles", allowedRoles) - } - - /** - * OConfiguration used by UndertowSecurityProvider. Security configuration object for use from - * UndertowSecurityProvider. Configuration is UndertowSecurityProvider specific. Each provider - * decides whether accepts configuration. - */ - public fun securityConfiguration(securityConfiguration: String) { - it.property("securityConfiguration", securityConfiguration) - } - - /** - * Security provider allows plug in the provider, which will be used to secure requests. SPI - * approach could be used too (endpoint then finds security provider using SPI). - */ - public fun securityProvider(securityProvider: String) { - it.property("securityProvider", securityProvider) - } - - /** - * To configure security using SSLContextParameters - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } - - /** - * if true, the consumer will post notifications to the route when a new WebSocket peer connects, - * disconnects, etc. See UndertowConstants.EVENT_TYPE and EventType. - */ - public fun fireWebSocketChannelEvents(fireWebSocketChannelEvents: String) { - it.property("fireWebSocketChannelEvents", fireWebSocketChannelEvents) - } - - /** - * if true, the consumer will post notifications to the route when a new WebSocket peer connects, - * disconnects, etc. See UndertowConstants.EVENT_TYPE and EventType. - */ - public fun fireWebSocketChannelEvents(fireWebSocketChannelEvents: Boolean) { - it.property("fireWebSocketChannelEvents", fireWebSocketChannelEvents.toString()) - } - - /** - * Timeout in milliseconds when sending to a websocket channel. The default timeout is 30000 (30 - * seconds). - */ - public fun sendTimeout(sendTimeout: String) { - it.property("sendTimeout", sendTimeout) - } - - /** - * Timeout in milliseconds when sending to a websocket channel. The default timeout is 30000 (30 - * seconds). - */ - public fun sendTimeout(sendTimeout: Int) { - it.property("sendTimeout", sendTimeout.toString()) - } - - /** - * To send to all websocket subscribers. Can be used to configure on endpoint level, instead of - * having to use the UndertowConstants.SEND_TO_ALL header on the message. - */ - public fun sendToAll(sendToAll: String) { - it.property("sendToAll", sendToAll) - } - - /** - * To send to all websocket subscribers. Can be used to configure on endpoint level, instead of - * having to use the UndertowConstants.SEND_TO_ALL header on the message. - */ - public fun sendToAll(sendToAll: Boolean) { - it.property("sendToAll", sendToAll.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ValidatorUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ValidatorUriDsl.kt deleted file mode 100644 index 8d18fd38e0c8b..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ValidatorUriDsl.kt +++ /dev/null @@ -1,167 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Validate the payload using XML Schema and JAXP Validation. - */ -public fun UriDsl.validator(i: ValidatorUriDsl.() -> Unit) { - ValidatorUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ValidatorUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("validator") - } - - private var resourceUri: String = "" - - /** - * URL to a local resource on the classpath, or a reference to lookup a bean in the Registry, or a - * full URL to a remote resource or resource on the file system which contains the XSD to validate - * against. - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Whether to fail if no body exists. - */ - public fun failOnNullBody(failOnNullBody: String) { - it.property("failOnNullBody", failOnNullBody) - } - - /** - * Whether to fail if no body exists. - */ - public fun failOnNullBody(failOnNullBody: Boolean) { - it.property("failOnNullBody", failOnNullBody.toString()) - } - - /** - * Whether to fail if no header exists when validating against a header. - */ - public fun failOnNullHeader(failOnNullHeader: String) { - it.property("failOnNullHeader", failOnNullHeader) - } - - /** - * Whether to fail if no header exists when validating against a header. - */ - public fun failOnNullHeader(failOnNullHeader: Boolean) { - it.property("failOnNullHeader", failOnNullHeader.toString()) - } - - /** - * To validate against a header instead of the message body. - */ - public fun headerName(headerName: String) { - it.property("headerName", headerName) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use a custom org.apache.camel.processor.validation.ValidatorErrorHandler. The default error - * handler captures the errors and throws an exception. - */ - public fun errorHandler(errorHandler: String) { - it.property("errorHandler", errorHandler) - } - - /** - * To use a custom LSResourceResolver. Do not use together with resourceResolverFactory - */ - public fun resourceResolver(resourceResolver: String) { - it.property("resourceResolver", resourceResolver) - } - - /** - * To use a custom LSResourceResolver which depends on a dynamic endpoint resource URI. The - * default resource resolver factory returns a resource resolver which can read files from the class - * path and file system. Do not use together with resourceResolver. - */ - public fun resourceResolverFactory(resourceResolverFactory: String) { - it.property("resourceResolverFactory", resourceResolverFactory) - } - - /** - * To use a custom javax.xml.validation.SchemaFactory - */ - public fun schemaFactory(schemaFactory: String) { - it.property("schemaFactory", schemaFactory) - } - - /** - * Configures the W3C XML Schema Namespace URI. - */ - public fun schemaLanguage(schemaLanguage: String) { - it.property("schemaLanguage", schemaLanguage) - } - - /** - * Whether the Schema instance should be shared or not. This option is introduced to work around a - * JDK 1.6.x bug. Xerces should not have this issue. - */ - public fun useSharedSchema(useSharedSchema: String) { - it.property("useSharedSchema", useSharedSchema) - } - - /** - * Whether the Schema instance should be shared or not. This option is introduced to work around a - * JDK 1.6.x bug. Xerces should not have this issue. - */ - public fun useSharedSchema(useSharedSchema: Boolean) { - it.property("useSharedSchema", useSharedSchema.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VelocityUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VelocityUriDsl.kt deleted file mode 100644 index 74345e6e62329..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VelocityUriDsl.kt +++ /dev/null @@ -1,159 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Transform messages using a Velocity template. - */ -public fun UriDsl.velocity(i: VelocityUriDsl.() -> Unit) { - VelocityUriDsl(this).apply(i) -} - -@CamelDslMarker -public class VelocityUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("velocity") - } - - private var resourceUri: String = "" - - /** - * Path to the resource. You can prefix with: classpath, file, http, ref, or bean. classpath, file - * and http loads the resource using these protocols (classpath is default). ref will lookup the - * resource in the registry. bean will call a method on a bean to be used as the resource. For bean - * you can specify the method name after dot, eg bean:myBean.myMethod. - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: String) { - it.property("allowContextMapAll", allowContextMapAll) - } - - /** - * Sets whether the context map should allow access to all details. By default only the message - * body and headers can be accessed. This option can be enabled for full access to the current - * Exchange and CamelContext. Doing so impose a potential security risk as this opens access to the - * full power of CamelContext API. - */ - public fun allowContextMapAll(allowContextMapAll: Boolean) { - it.property("allowContextMapAll", allowContextMapAll.toString()) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: String) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: Boolean) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader.toString()) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Sets whether to use resource content cache or not - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * Character encoding of the resource content. - */ - public fun encoding(encoding: String) { - it.property("encoding", encoding) - } - - /** - * Enables / disables the velocity resource loader cache which is enabled by default - */ - public fun loaderCache(loaderCache: String) { - it.property("loaderCache", loaderCache) - } - - /** - * Enables / disables the velocity resource loader cache which is enabled by default - */ - public fun loaderCache(loaderCache: Boolean) { - it.property("loaderCache", loaderCache.toString()) - } - - /** - * The URI of the properties file which is used for VelocityEngine initialization. - */ - public fun propertiesFile(propertiesFile: String) { - it.property("propertiesFile", propertiesFile) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VertxHttpUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VertxHttpUriDsl.kt deleted file mode 100644 index 98f32710b0bdf..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VertxHttpUriDsl.kt +++ /dev/null @@ -1,310 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send requests to external HTTP servers using Vert.x - */ -public fun UriDsl.`vertx-http`(i: VertxHttpUriDsl.() -> Unit) { - VertxHttpUriDsl(this).apply(i) -} - -@CamelDslMarker -public class VertxHttpUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("vertx-http") - } - - private var httpUri: String = "" - - /** - * The HTTP URI to connect to - */ - public fun httpUri(httpUri: String) { - this.httpUri = httpUri - it.url("$httpUri") - } - - /** - * The amount of time in milliseconds until a connection is established. A timeout value of zero - * is interpreted as an infinite timeout. - */ - public fun connectTimeout(connectTimeout: String) { - it.property("connectTimeout", connectTimeout) - } - - /** - * The amount of time in milliseconds until a connection is established. A timeout value of zero - * is interpreted as an infinite timeout. - */ - public fun connectTimeout(connectTimeout: Int) { - it.property("connectTimeout", connectTimeout.toString()) - } - - /** - * A custom CookieStore to use when session management is enabled. If this option is not set then - * an in-memory CookieStore is used - */ - public fun cookieStore(cookieStore: String) { - it.property("cookieStore", cookieStore) - } - - /** - * A custom org.apache.camel.spi.HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * The HTTP method to use. The HttpMethod header cannot override this option if set - */ - public fun httpMethod(httpMethod: String) { - it.property("httpMethod", httpMethod) - } - - /** - * The status codes which are considered a success response. The values are inclusive. Multiple - * ranges can be defined, separated by comma, e.g. 200-204,209,301-304. Each range must be a single - * number or from-to with the dash included - */ - public fun okStatusCodeRange(okStatusCodeRange: String) { - it.property("okStatusCodeRange", okStatusCodeRange) - } - - /** - * Whether the response body should be byte or as io.vertx.core.buffer.Buffer - */ - public fun responsePayloadAsByteArray(responsePayloadAsByteArray: String) { - it.property("responsePayloadAsByteArray", responsePayloadAsByteArray) - } - - /** - * Whether the response body should be byte or as io.vertx.core.buffer.Buffer - */ - public fun responsePayloadAsByteArray(responsePayloadAsByteArray: Boolean) { - it.property("responsePayloadAsByteArray", responsePayloadAsByteArray.toString()) - } - - /** - * Enables session management via WebClientSession. By default the client is configured to use an - * in-memory CookieStore. The cookieStore option can be used to override this - */ - public fun sessionManagement(sessionManagement: String) { - it.property("sessionManagement", sessionManagement) - } - - /** - * Enables session management via WebClientSession. By default the client is configured to use an - * in-memory CookieStore. The cookieStore option can be used to override this - */ - public fun sessionManagement(sessionManagement: Boolean) { - it.property("sessionManagement", sessionManagement.toString()) - } - - /** - * Disable throwing HttpOperationFailedException in case of failed responses from the remote - * server - */ - public fun throwExceptionOnFailure(throwExceptionOnFailure: String) { - it.property("throwExceptionOnFailure", throwExceptionOnFailure) - } - - /** - * Disable throwing HttpOperationFailedException in case of failed responses from the remote - * server - */ - public fun throwExceptionOnFailure(throwExceptionOnFailure: Boolean) { - it.property("throwExceptionOnFailure", throwExceptionOnFailure.toString()) - } - - /** - * The amount of time in milliseconds after which if the request does not return any data within - * the timeout period a TimeoutException fails the request. Setting zero or a negative value disables - * the timeout. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * The amount of time in milliseconds after which if the request does not return any data within - * the timeout period a TimeoutException fails the request. Setting zero or a negative value disables - * the timeout. - */ - public fun timeout(timeout: Int) { - it.property("timeout", timeout.toString()) - } - - /** - * If enabled and an Exchange failed processing on the consumer side, and if the caused Exception - * was sent back serialized in the response as a application/x-java-serialized-object content type. - * On the producer side the exception will be deserialized and thrown as is, instead of - * HttpOperationFailedException. The caused exception is required to be serialized. This is by - * default turned off. If you enable this then be aware that Camel will deserialize the incoming data - * from the request to a Java object, which can be a potential security risk. - */ - public fun transferException(transferException: String) { - it.property("transferException", transferException) - } - - /** - * If enabled and an Exchange failed processing on the consumer side, and if the caused Exception - * was sent back serialized in the response as a application/x-java-serialized-object content type. - * On the producer side the exception will be deserialized and thrown as is, instead of - * HttpOperationFailedException. The caused exception is required to be serialized. This is by - * default turned off. If you enable this then be aware that Camel will deserialize the incoming data - * from the request to a Java object, which can be a potential security risk. - */ - public fun transferException(transferException: Boolean) { - it.property("transferException", transferException.toString()) - } - - /** - * Set whether compression is enabled to handled compressed (E.g gzipped) responses - */ - public fun useCompression(useCompression: String) { - it.property("useCompression", useCompression) - } - - /** - * Set whether compression is enabled to handled compressed (E.g gzipped) responses - */ - public fun useCompression(useCompression: Boolean) { - it.property("useCompression", useCompression.toString()) - } - - /** - * A custom VertxHttpBinding which can control how to bind between Vert.x and Camel. - */ - public fun vertxHttpBinding(vertxHttpBinding: String) { - it.property("vertxHttpBinding", vertxHttpBinding) - } - - /** - * Sets customized options for configuring the Vert.x WebClient - */ - public fun webClientOptions(webClientOptions: String) { - it.property("webClientOptions", webClientOptions) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The proxy server host address - */ - public fun proxyHost(proxyHost: String) { - it.property("proxyHost", proxyHost) - } - - /** - * The proxy server password if authentication is required - */ - public fun proxyPassword(proxyPassword: String) { - it.property("proxyPassword", proxyPassword) - } - - /** - * The proxy server port - */ - public fun proxyPort(proxyPort: String) { - it.property("proxyPort", proxyPort) - } - - /** - * The proxy server port - */ - public fun proxyPort(proxyPort: Int) { - it.property("proxyPort", proxyPort.toString()) - } - - /** - * The proxy server type - */ - public fun proxyType(proxyType: String) { - it.property("proxyType", proxyType) - } - - /** - * The proxy server username if authentication is required - */ - public fun proxyUsername(proxyUsername: String) { - it.property("proxyUsername", proxyUsername) - } - - /** - * The password to use for basic authentication - */ - public fun basicAuthPassword(basicAuthPassword: String) { - it.property("basicAuthPassword", basicAuthPassword) - } - - /** - * The user name to use for basic authentication - */ - public fun basicAuthUsername(basicAuthUsername: String) { - it.property("basicAuthUsername", basicAuthUsername) - } - - /** - * The bearer token to use for bearer token authentication - */ - public fun bearerToken(bearerToken: String) { - it.property("bearerToken", bearerToken) - } - - /** - * To configure security using SSLContextParameters - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VertxUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VertxUriDsl.kt deleted file mode 100644 index a2f3fe677e421..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VertxUriDsl.kt +++ /dev/null @@ -1,136 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from Vert.x Event Bus. - */ -public fun UriDsl.vertx(i: VertxUriDsl.() -> Unit) { - VertxUriDsl(this).apply(i) -} - -@CamelDslMarker -public class VertxUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("vertx") - } - - private var address: String = "" - - /** - * Sets the event bus address used to communicate - */ - public fun address(address: String) { - this.address = address - it.url("$address") - } - - /** - * Whether to use publish/subscribe instead of point to point when sending to a vertx endpoint. - */ - public fun pubSub(pubSub: String) { - it.property("pubSub", pubSub) - } - - /** - * Whether to use publish/subscribe instead of point to point when sending to a vertx endpoint. - */ - public fun pubSub(pubSub: Boolean) { - it.property("pubSub", pubSub.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VertxWebsocketUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VertxWebsocketUriDsl.kt deleted file mode 100644 index 44b06090c036d..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/VertxWebsocketUriDsl.kt +++ /dev/null @@ -1,329 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Expose WebSocket endpoints and connect to remote WebSocket servers using Vert.x - */ -public fun UriDsl.`vertx-websocket`(i: VertxWebsocketUriDsl.() -> Unit) { - VertxWebsocketUriDsl(this).apply(i) -} - -@CamelDslMarker -public class VertxWebsocketUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("vertx-websocket") - } - - private var host: String = "" - - private var port: String = "" - - private var path: String = "" - - /** - * WebSocket hostname, such as localhost or a remote host when in client mode. - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port/$path") - } - - /** - * WebSocket port number to use. - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port/$path") - } - - /** - * WebSocket port number to use. - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port/$path") - } - - /** - * WebSocket path to use. - */ - public fun path(path: String) { - this.path = path - it.url("$host:$port/$path") - } - - /** - * Regex pattern to match the origin header sent by WebSocket clients - */ - public fun allowedOriginPattern(allowedOriginPattern: String) { - it.property("allowedOriginPattern", allowedOriginPattern) - } - - /** - * Whether the WebSocket client should add the Origin header to the WebSocket handshake request. - */ - public fun allowOriginHeader(allowOriginHeader: String) { - it.property("allowOriginHeader", allowOriginHeader) - } - - /** - * Whether the WebSocket client should add the Origin header to the WebSocket handshake request. - */ - public fun allowOriginHeader(allowOriginHeader: Boolean) { - it.property("allowOriginHeader", allowOriginHeader.toString()) - } - - /** - * When set to true, the consumer acts as a WebSocket client, creating exchanges on each received - * WebSocket event. - */ - public fun consumeAsClient(consumeAsClient: String) { - it.property("consumeAsClient", consumeAsClient) - } - - /** - * When set to true, the consumer acts as a WebSocket client, creating exchanges on each received - * WebSocket event. - */ - public fun consumeAsClient(consumeAsClient: Boolean) { - it.property("consumeAsClient", consumeAsClient.toString()) - } - - /** - * Whether the server consumer will create a message exchange when a new WebSocket peer connects - * or disconnects - */ - public fun fireWebSocketConnectionEvents(fireWebSocketConnectionEvents: String) { - it.property("fireWebSocketConnectionEvents", fireWebSocketConnectionEvents) - } - - /** - * Whether the server consumer will create a message exchange when a new WebSocket peer connects - * or disconnects - */ - public fun fireWebSocketConnectionEvents(fireWebSocketConnectionEvents: Boolean) { - it.property("fireWebSocketConnectionEvents", fireWebSocketConnectionEvents.toString()) - } - - /** - * Headers to send in the HTTP handshake request. When the endpoint is a consumer, it only works - * when it consumes a remote host as a client (i.e. consumeAsClient is true). - */ - public fun handshakeHeaders(handshakeHeaders: String) { - it.property("handshakeHeaders", handshakeHeaders) - } - - /** - * When consumeAsClient is set to true this sets the maximum number of allowed reconnection - * attempts to a previously closed WebSocket. A value of 0 (the default) will attempt to reconnect - * indefinitely. - */ - public fun maxReconnectAttempts(maxReconnectAttempts: String) { - it.property("maxReconnectAttempts", maxReconnectAttempts) - } - - /** - * When consumeAsClient is set to true this sets the maximum number of allowed reconnection - * attempts to a previously closed WebSocket. A value of 0 (the default) will attempt to reconnect - * indefinitely. - */ - public fun maxReconnectAttempts(maxReconnectAttempts: Int) { - it.property("maxReconnectAttempts", maxReconnectAttempts.toString()) - } - - /** - * The value of the Origin header that the WebSocket client should use on the WebSocket handshake - * request. When not specified, the WebSocket client will automatically determine the value for the - * Origin from the request URL. - */ - public fun originHeaderUrl(originHeaderUrl: String) { - it.property("originHeaderUrl", originHeaderUrl) - } - - /** - * When consumeAsClient is set to true this sets the initial delay in milliseconds before - * attempting to reconnect to a previously closed WebSocket. - */ - public fun reconnectInitialDelay(reconnectInitialDelay: String) { - it.property("reconnectInitialDelay", reconnectInitialDelay) - } - - /** - * When consumeAsClient is set to true this sets the initial delay in milliseconds before - * attempting to reconnect to a previously closed WebSocket. - */ - public fun reconnectInitialDelay(reconnectInitialDelay: Int) { - it.property("reconnectInitialDelay", reconnectInitialDelay.toString()) - } - - /** - * When consumeAsClient is set to true this sets the interval in milliseconds at which - * reconnecting to a previously closed WebSocket occurs. - */ - public fun reconnectInterval(reconnectInterval: String) { - it.property("reconnectInterval", reconnectInterval) - } - - /** - * When consumeAsClient is set to true this sets the interval in milliseconds at which - * reconnecting to a previously closed WebSocket occurs. - */ - public fun reconnectInterval(reconnectInterval: Int) { - it.property("reconnectInterval", reconnectInterval.toString()) - } - - /** - * To use an existing vertx router for the HTTP server - */ - public fun router(router: String) { - it.property("router", router) - } - - /** - * Sets customized options for configuring the HTTP server hosting the WebSocket for the consumer - */ - public fun serverOptions(serverOptions: String) { - it.property("serverOptions", serverOptions) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Sets customized options for configuring the WebSocket client used in the producer - */ - public fun clientOptions(clientOptions: String) { - it.property("clientOptions", clientOptions) - } - - /** - * Comma separated list of WebSocket subprotocols that the client should use for the - * Sec-WebSocket-Protocol header - */ - public fun clientSubProtocols(clientSubProtocols: String) { - it.property("clientSubProtocols", clientSubProtocols) - } - - /** - * To send to all websocket subscribers. Can be used to configure at the endpoint level, instead - * of providing the VertxWebsocketConstants.SEND_TO_ALL header on the message. Note that when using - * this option, the host name specified for the vertx-websocket producer URI must match one used for - * an existing vertx-websocket consumer. Note that this option only applies when producing messages - * to endpoints hosted by the vertx-websocket consumer and not to an externally hosted WebSocket. - */ - public fun sendToAll(sendToAll: String) { - it.property("sendToAll", sendToAll) - } - - /** - * To send to all websocket subscribers. Can be used to configure at the endpoint level, instead - * of providing the VertxWebsocketConstants.SEND_TO_ALL header on the message. Note that when using - * this option, the host name specified for the vertx-websocket producer URI must match one used for - * an existing vertx-websocket consumer. Note that this option only applies when producing messages - * to endpoints hosted by the vertx-websocket consumer and not to an externally hosted WebSocket. - */ - public fun sendToAll(sendToAll: Boolean) { - it.property("sendToAll", sendToAll.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To configure security using SSLContextParameters - */ - public fun sslContextParameters(sslContextParameters: String) { - it.property("sslContextParameters", sslContextParameters) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WasmUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WasmUriDsl.kt deleted file mode 100644 index f9f45a05bb4cf..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WasmUriDsl.kt +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Invoke Wasm functions. - */ -public fun UriDsl.wasm(i: WasmUriDsl.() -> Unit) { - WasmUriDsl(this).apply(i) -} - -@CamelDslMarker -public class WasmUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("wasm") - } - - private var functionName: String = "" - - /** - * The Function Name - */ - public fun functionName(functionName: String) { - this.functionName = functionName - it.url("$functionName") - } - - /** - * Set the module (the distributable, loadable, and executable unit of code in WebAssembly) - * resource that provides the producer function. - */ - public fun module(module: String) { - it.property("module", module) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WeatherUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WeatherUriDsl.kt deleted file mode 100644 index dab1c810b7df2..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WeatherUriDsl.kt +++ /dev/null @@ -1,497 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Poll the weather information from Open Weather Map. - */ -public fun UriDsl.weather(i: WeatherUriDsl.() -> Unit) { - WeatherUriDsl(this).apply(i) -} - -@CamelDslMarker -public class WeatherUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("weather") - } - - private var name: String = "" - - /** - * The name value is not used. - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * APPID ID used to authenticate the user connected to the API Server - */ - public fun appid(appid: String) { - it.property("appid", appid) - } - - /** - * To store the weather result in this header instead of the message body. This is useable if you - * want to keep current message body as-is. - */ - public fun headerName(headerName: String) { - it.property("headerName", headerName) - } - - /** - * Language of the response. - */ - public fun language(language: String) { - it.property("language", language) - } - - /** - * The output format of the weather data. - */ - public fun mode(mode: String) { - it.property("mode", mode) - } - - /** - * If null, the current weather will be returned, else use values of 5, 7, 14 days. Only the - * numeric value for the forecast period is actually parsed, so spelling, capitalisation of the time - * period is up to you (its ignored) - */ - public fun period(period: String) { - it.property("period", period) - } - - /** - * The units for temperature measurement. - */ - public fun units(units: String) { - it.property("units", units) - } - - /** - * The API to use (current, forecast/3 hour, forecast daily, station) - */ - public fun weatherApi(weatherApi: String) { - it.property("weatherApi", weatherApi) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * A custum geolocation provider to determine the longitude and latitude to use when no location - * information is set. The default implementaion uses the ipstack API and requires - * geolocationAccessKey and geolocationRequestHostIP - */ - public fun geoLocationProvider(geoLocationProvider: String) { - it.property("geoLocationProvider", geoLocationProvider) - } - - /** - * To use an existing configured http client (for example with http proxy) - */ - public fun httpClient(httpClient: String) { - it.property("httpClient", httpClient) - } - - /** - * Number of results to be found - */ - public fun cnt(cnt: String) { - it.property("cnt", cnt) - } - - /** - * Number of results to be found - */ - public fun cnt(cnt: Int) { - it.property("cnt", cnt.toString()) - } - - /** - * List of id's of city/stations. You can separate multiple ids by comma. - */ - public fun ids(ids: String) { - it.property("ids", ids) - } - - /** - * Latitude of location. You can use lat and lon options instead of location. For boxed queries - * this is the bottom latitude. - */ - public fun lat(lat: String) { - it.property("lat", lat) - } - - /** - * If null Camel will try and determine your current location using the geolocation of your ip - * address, else specify the city,country. For well known city names, Open Weather Map will determine - * the best fit, but multiple results may be returned. Hence specifying and country as well will - * return more accurate data. If you specify current as the location then the component will try to - * get the current latitude and longitude and use that to get the weather details. You can use lat - * and lon options instead of location. - */ - public fun location(location: String) { - it.property("location", location) - } - - /** - * Longitude of location. You can use lat and lon options instead of location. For boxed queries - * this is the left longtitude. - */ - public fun lon(lon: String) { - it.property("lon", lon) - } - - /** - * For boxed queries this is the right longtitude. Needs to be used in combination with topLat and - * zoom. - */ - public fun rightLon(rightLon: String) { - it.property("rightLon", rightLon) - } - - /** - * For boxed queries this is the top latitude. Needs to be used in combination with rightLon and - * zoom. - */ - public fun topLat(topLat: String) { - it.property("topLat", topLat) - } - - /** - * Zip-code, e.g. 94040,us - */ - public fun zip(zip: String) { - it.property("zip", zip) - } - - /** - * For boxed queries this is the zoom. Needs to be used in combination with rightLon and topLat. - */ - public fun zoom(zoom: String) { - it.property("zoom", zoom) - } - - /** - * For boxed queries this is the zoom. Needs to be used in combination with rightLon and topLat. - */ - public fun zoom(zoom: Int) { - it.property("zoom", zoom.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * The geolocation service now needs an accessKey to be used - */ - public fun geolocationAccessKey(geolocationAccessKey: String) { - it.property("geolocationAccessKey", geolocationAccessKey) - } - - /** - * The geolocation service now needs to specify the IP associated to the accessKey you're using - */ - public fun geolocationRequestHostIP(geolocationRequestHostIP: String) { - it.property("geolocationRequestHostIP", geolocationRequestHostIP) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Web3jUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Web3jUriDsl.kt deleted file mode 100644 index fad959a93ae03..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/Web3jUriDsl.kt +++ /dev/null @@ -1,380 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Interact with Ethereum nodes using web3j client API. - */ -public fun UriDsl.web3j(i: Web3jUriDsl.() -> Unit) { - Web3jUriDsl(this).apply(i) -} - -@CamelDslMarker -public class Web3jUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("web3j") - } - - private var nodeAddress: String = "" - - /** - * Sets the node address used to communicate - */ - public fun nodeAddress(nodeAddress: String) { - this.nodeAddress = nodeAddress - it.url("$nodeAddress") - } - - /** - * Contract address or a list of addresses. - */ - public fun addresses(addresses: String) { - it.property("addresses", addresses) - } - - /** - * The address the transaction is send from - */ - public fun fromAddress(fromAddress: String) { - it.property("fromAddress", fromAddress) - } - - /** - * The block number, or the string latest for the last mined block or pending, earliest for not - * yet mined transactions. - */ - public fun fromBlock(fromBlock: String) { - it.property("fromBlock", fromBlock) - } - - /** - * If true it returns the full transaction objects, if false only the hashes of the transactions. - */ - public fun fullTransactionObjects(fullTransactionObjects: String) { - it.property("fullTransactionObjects", fullTransactionObjects) - } - - /** - * If true it returns the full transaction objects, if false only the hashes of the transactions. - */ - public fun fullTransactionObjects(fullTransactionObjects: Boolean) { - it.property("fullTransactionObjects", fullTransactionObjects.toString()) - } - - /** - * The maximum gas allowed in this block. - */ - public fun gasLimit(gasLimit: String) { - it.property("gasLimit", gasLimit) - } - - /** - * A transaction privateFor nodes with public keys in a Quorum network - */ - public fun privateFor(privateFor: String) { - it.property("privateFor", privateFor) - } - - /** - * If true, this will support Quorum API. - */ - public fun quorumAPI(quorumAPI: String) { - it.property("quorumAPI", quorumAPI) - } - - /** - * If true, this will support Quorum API. - */ - public fun quorumAPI(quorumAPI: Boolean) { - it.property("quorumAPI", quorumAPI.toString()) - } - - /** - * The address the transaction is directed to. - */ - public fun toAddress(toAddress: String) { - it.property("toAddress", toAddress) - } - - /** - * The block number, or the string latest for the last mined block or pending, earliest for not - * yet mined transactions. - */ - public fun toBlock(toBlock: String) { - it.property("toBlock", toBlock) - } - - /** - * Topics are order-dependent. Each topic can also be a list of topics. Specify multiple topics - * separated by comma. - */ - public fun topics(topics: String) { - it.property("topics", topics) - } - - /** - * The preconfigured Web3j object. - */ - public fun web3j(web3j: String) { - it.property("web3j", web3j) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Contract address. - */ - public fun address(address: String) { - it.property("address", address) - } - - /** - * The block number, or the string latest for the last mined block or pending, earliest for not - * yet mined transactions. - */ - public fun atBlock(atBlock: String) { - it.property("atBlock", atBlock) - } - - /** - * Hash of the block where this transaction was in. - */ - public fun blockHash(blockHash: String) { - it.property("blockHash", blockHash) - } - - /** - * A random hexadecimal(32 bytes) ID identifying the client. - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * The compiled code of a contract OR the hash of the invoked method signature and encoded - * parameters. - */ - public fun `data`(`data`: String) { - it.property("data", data) - } - - /** - * The local database name. - */ - public fun databaseName(databaseName: String) { - it.property("databaseName", databaseName) - } - - /** - * The filter id to use. - */ - public fun filterId(filterId: String) { - it.property("filterId", filterId) - } - - /** - * Gas price used for each paid gas. - */ - public fun gasPrice(gasPrice: String) { - it.property("gasPrice", gasPrice) - } - - /** - * A hexadecimal string representation (32 bytes) of the hash rate. - */ - public fun hashrate(hashrate: String) { - it.property("hashrate", hashrate) - } - - /** - * The header's pow-hash (256 bits) used for submitting a proof-of-work solution. - */ - public fun headerPowHash(headerPowHash: String) { - it.property("headerPowHash", headerPowHash) - } - - /** - * The transactions/uncle index position in the block. - */ - public fun index(index: String) { - it.property("index", index) - } - - /** - * The key name in the database. - */ - public fun keyName(keyName: String) { - it.property("keyName", keyName) - } - - /** - * The mix digest (256 bits) used for submitting a proof-of-work solution. - */ - public fun mixDigest(mixDigest: String) { - it.property("mixDigest", mixDigest) - } - - /** - * The nonce found (64 bits) used for submitting a proof-of-work solution. - */ - public fun nonce(nonce: String) { - it.property("nonce", nonce) - } - - /** - * Operation to use. - */ - public fun operation(operation: String) { - it.property("operation", operation) - } - - /** - * The transaction index position withing a block. - */ - public fun position(position: String) { - it.property("position", position) - } - - /** - * The priority of a whisper message. - */ - public fun priority(priority: String) { - it.property("priority", priority) - } - - /** - * Message to sign by calculating an Ethereum specific signature. - */ - public fun sha3HashOfDataToSign(sha3HashOfDataToSign: String) { - it.property("sha3HashOfDataToSign", sha3HashOfDataToSign) - } - - /** - * The signed transaction data for a new message call transaction or a contract creation for - * signed transactions. - */ - public fun signedTransactionData(signedTransactionData: String) { - it.property("signedTransactionData", signedTransactionData) - } - - /** - * The source code to compile. - */ - public fun sourceCode(sourceCode: String) { - it.property("sourceCode", sourceCode) - } - - /** - * The information about a transaction requested by transaction hash. - */ - public fun transactionHash(transactionHash: String) { - it.property("transactionHash", transactionHash) - } - - /** - * The time to live in seconds of a whisper message. - */ - public fun ttl(ttl: String) { - it.property("ttl", ttl) - } - - /** - * The value sent within a transaction. - */ - public fun `value`(`value`: String) { - it.property("value", value) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WebhookUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WebhookUriDsl.kt deleted file mode 100644 index 60cef5cb88cb2..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WebhookUriDsl.kt +++ /dev/null @@ -1,141 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Expose webhook endpoints to receive push notifications for other Camel components. - */ -public fun UriDsl.webhook(i: WebhookUriDsl.() -> Unit) { - WebhookUriDsl(this).apply(i) -} - -@CamelDslMarker -public class WebhookUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("webhook") - } - - private var endpointUri: String = "" - - /** - * The delegate uri. Must belong to a component that supports webhooks. - */ - public fun endpointUri(endpointUri: String) { - this.endpointUri = endpointUri - it.url("$endpointUri") - } - - /** - * Automatically register the webhook at startup and unregister it on shutdown. - */ - public fun webhookAutoRegister(webhookAutoRegister: String) { - it.property("webhookAutoRegister", webhookAutoRegister) - } - - /** - * Automatically register the webhook at startup and unregister it on shutdown. - */ - public fun webhookAutoRegister(webhookAutoRegister: Boolean) { - it.property("webhookAutoRegister", webhookAutoRegister.toString()) - } - - /** - * The first (base) path element where the webhook will be exposed. It's a good practice to set it - * to a random string, so that it cannot be guessed by unauthorized parties. - */ - public fun webhookBasePath(webhookBasePath: String) { - it.property("webhookBasePath", webhookBasePath) - } - - /** - * The Camel Rest component to use for the REST transport, such as netty-http. - */ - public fun webhookComponentName(webhookComponentName: String) { - it.property("webhookComponentName", webhookComponentName) - } - - /** - * The URL of the current service as seen by the webhook provider - */ - public fun webhookExternalUrl(webhookExternalUrl: String) { - it.property("webhookExternalUrl", webhookExternalUrl) - } - - /** - * The path where the webhook endpoint will be exposed (relative to basePath, if any) - */ - public fun webhookPath(webhookPath: String) { - it.property("webhookPath", webhookPath) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WhatsappUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WhatsappUriDsl.kt deleted file mode 100644 index 2ba0acf9ea9c1..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WhatsappUriDsl.kt +++ /dev/null @@ -1,126 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send messages to WhatsApp. - */ -public fun UriDsl.whatsapp(i: WhatsappUriDsl.() -> Unit) { - WhatsappUriDsl(this).apply(i) -} - -@CamelDslMarker -public class WhatsappUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("whatsapp") - } - - private var phoneNumberId: String = "" - - /** - * The phone number ID taken from whatsapp-business dashboard. - */ - public fun phoneNumberId(phoneNumberId: String) { - this.phoneNumberId = phoneNumberId - it.url("$phoneNumberId") - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Facebook graph api version. - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * Can be used to set an alternative base URI, e.g. when you want to test the component against a - * mock WhatsApp API - */ - public fun baseUri(baseUri: String) { - it.property("baseUri", baseUri) - } - - /** - * HttpClient implementation - */ - public fun httpClient(httpClient: String) { - it.property("httpClient", httpClient) - } - - /** - * Webhook path - */ - public fun webhookPath(webhookPath: String) { - it.property("webhookPath", webhookPath) - } - - /** - * Webhook verify token - */ - public fun webhookVerifyToken(webhookVerifyToken: String) { - it.property("webhookVerifyToken", webhookVerifyToken) - } - - /** - * WhatsApp service implementation - */ - public fun whatsappService(whatsappService: String) { - it.property("whatsappService", whatsappService) - } - - /** - * The authorization access token taken from whatsapp-business dashboard. - */ - public fun authorizationToken(authorizationToken: String) { - it.property("authorizationToken", authorizationToken) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WordpressUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WordpressUriDsl.kt deleted file mode 100644 index 05c92c288b386..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WordpressUriDsl.kt +++ /dev/null @@ -1,206 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage posts and users using the WordPress API. - */ -public fun UriDsl.wordpress(i: WordpressUriDsl.() -> Unit) { - WordpressUriDsl(this).apply(i) -} - -@CamelDslMarker -public class WordpressUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("wordpress") - } - - private var operation: String = "" - - private var operationDetail: String = "" - - /** - * The endpoint operation. - */ - public fun operation(operation: String) { - this.operation = operation - it.url("$operation") - } - - /** - * The second part of an endpoint operation. Needed only when endpoint semantic is not enough, - * like wordpress:post:delete - */ - public fun operationDetail(operationDetail: String) { - this.operationDetail = operationDetail - it.url("$operation") - } - - /** - * The Wordpress REST API version - */ - public fun apiVersion(apiVersion: String) { - it.property("apiVersion", apiVersion) - } - - /** - * The criteria to use with complex searches. - */ - public fun criteria(criteria: String) { - it.property("criteria", criteria) - } - - /** - * Whether to bypass trash and force deletion. - */ - public fun force(force: String) { - it.property("force", force) - } - - /** - * Whether to bypass trash and force deletion. - */ - public fun force(force: Boolean) { - it.property("force", force.toString()) - } - - /** - * The entity ID. Should be passed when the operation performed requires a specific entity, e.g. - * deleting a post - */ - public fun id(id: String) { - it.property("id", id) - } - - /** - * The entity ID. Should be passed when the operation performed requires a specific entity, e.g. - * deleting a post - */ - public fun id(id: Int) { - it.property("id", id.toString()) - } - - /** - * Password from authorized user - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Search criteria - */ - public fun searchCriteria(searchCriteria: String) { - it.property("searchCriteria", searchCriteria) - } - - /** - * The Wordpress API URL from your site, e.g. http://myblog.com/wp-json/ - */ - public fun url(url: String) { - it.property("url", url) - } - - /** - * Authorized user to perform writing operations - */ - public fun user(user: String) { - it.property("user", user) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WorkdayUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WorkdayUriDsl.kt deleted file mode 100644 index ff4d9e0b62421..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/WorkdayUriDsl.kt +++ /dev/null @@ -1,135 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Detect and parse documents using Workday. - */ -public fun UriDsl.workday(i: WorkdayUriDsl.() -> Unit) { - WorkdayUriDsl(this).apply(i) -} - -@CamelDslMarker -public class WorkdayUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("workday") - } - - private var entity: String = "" - - private var path: String = "" - - /** - * The entity to be requested or subscribed via API. - */ - public fun entity(entity: String) { - this.entity = entity - it.url("$entity:$path") - } - - /** - * The API path to access an entity structure. - */ - public fun path(path: String) { - this.path = path - it.url("$entity:$path") - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * Pool connection manager for advanced configuration. - */ - public fun httpConnectionManager(httpConnectionManager: String) { - it.property("httpConnectionManager", httpConnectionManager) - } - - /** - * Workday Report as a service output format. - */ - public fun reportFormat(reportFormat: String) { - it.property("reportFormat", reportFormat) - } - - /** - * Workday Host name. - */ - public fun host(host: String) { - it.property("host", host) - } - - /** - * Workday client Id generated by API client for integrations. - */ - public fun clientId(clientId: String) { - it.property("clientId", clientId) - } - - /** - * Workday client Secret generated by API client for integrations. - */ - public fun clientSecret(clientSecret: String) { - it.property("clientSecret", clientSecret) - } - - /** - * Workday token Refresh generated for integrations system user. - */ - public fun tokenRefresh(tokenRefresh: String) { - it.property("tokenRefresh", tokenRefresh) - } - - /** - * Workday Tenant name. - */ - public fun tenant(tenant: String) { - it.property("tenant", tenant) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XchangeUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XchangeUriDsl.kt deleted file mode 100644 index 16aa5ac189a5f..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XchangeUriDsl.kt +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Access market data and trade on Bitcoin and Altcoin exchanges. - */ -public fun UriDsl.xchange(i: XchangeUriDsl.() -> Unit) { - XchangeUriDsl(this).apply(i) -} - -@CamelDslMarker -public class XchangeUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("xchange") - } - - private var name: String = "" - - /** - * The exchange to connect to - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * The currency - */ - public fun currency(currency: String) { - it.property("currency", currency) - } - - /** - * The currency pair - */ - public fun currencyPair(currencyPair: String) { - it.property("currencyPair", currencyPair) - } - - /** - * The method to execute - */ - public fun method(method: String) { - it.property("method", method) - } - - /** - * The service to call - */ - public fun service(service: String) { - it.property("service", service) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XjUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XjUriDsl.kt deleted file mode 100644 index b90f7f7d61c8c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XjUriDsl.kt +++ /dev/null @@ -1,297 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Transform JSON and XML message using a XSLT. - */ -public fun UriDsl.xj(i: XjUriDsl.() -> Unit) { - XjUriDsl(this).apply(i) -} - -@CamelDslMarker -public class XjUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("xj") - } - - private var resourceUri: String = "" - - /** - * Path to the template. The following is supported by the default URIResolver. You can prefix - * with: classpath, file, http, ref, or bean. classpath, file and http loads the resource using these - * protocols (classpath is default). ref will lookup the resource in the registry. bean will call a - * method on a bean to be used as the resource. For bean you can specify the method name after dot, - * eg bean:myBean.myMethod - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Whether to allow using StAX as the javax.xml.transform.Source. You can enable this if the XSLT - * library supports StAX such as the Saxon library (camel-saxon). The Xalan library (default in JVM) - * does not support StAXSource. - */ - public fun allowStAX(allowStAX: String) { - it.property("allowStAX", allowStAX) - } - - /** - * Whether to allow using StAX as the javax.xml.transform.Source. You can enable this if the XSLT - * library supports StAX such as the Saxon library (camel-saxon). The Xalan library (default in JVM) - * does not support StAXSource. - */ - public fun allowStAX(allowStAX: Boolean) { - it.property("allowStAX", allowStAX.toString()) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: String) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: Boolean) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader.toString()) - } - - /** - * Cache for the resource content (the stylesheet file) when it is loaded on startup. If set to - * false Camel will reload the stylesheet file on each message processing. This is good for - * development. A cached stylesheet can be forced to reload at runtime via JMX using the - * clearCachedStylesheet operation. - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Cache for the resource content (the stylesheet file) when it is loaded on startup. If set to - * false Camel will reload the stylesheet file on each message processing. This is good for - * development. A cached stylesheet can be forced to reload at runtime via JMX using the - * clearCachedStylesheet operation. - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * If you have output=file then this option dictates whether or not the output file should be - * deleted when the Exchange is done processing. For example suppose the output file is a temporary - * file, then it can be a good idea to delete it after use. - */ - public fun deleteOutputFile(deleteOutputFile: String) { - it.property("deleteOutputFile", deleteOutputFile) - } - - /** - * If you have output=file then this option dictates whether or not the output file should be - * deleted when the Exchange is done processing. For example suppose the output file is a temporary - * file, then it can be a good idea to delete it after use. - */ - public fun deleteOutputFile(deleteOutputFile: Boolean) { - it.property("deleteOutputFile", deleteOutputFile.toString()) - } - - /** - * Whether or not to throw an exception if the input body is null. - */ - public fun failOnNullBody(failOnNullBody: String) { - it.property("failOnNullBody", failOnNullBody) - } - - /** - * Whether or not to throw an exception if the input body is null. - */ - public fun failOnNullBody(failOnNullBody: Boolean) { - it.property("failOnNullBody", failOnNullBody.toString()) - } - - /** - * Option to specify which output type to use. Possible values are: string, bytes, DOM, file. The - * first three options are all in memory based, where as file is streamed directly to a java.io.File. - * For file you must specify the filename in the IN header with the key XsltConstants.XSLT_FILE_NAME - * which is also CamelXsltFileName. Also any paths leading to the filename must be created - * beforehand, otherwise an exception is thrown at runtime. - */ - public fun output(output: String) { - it.property("output", output) - } - - /** - * Transform direction. Either XML2JSON or JSON2XML - */ - public fun transformDirection(transformDirection: String) { - it.property("transformDirection", transformDirection) - } - - /** - * The number of javax.xml.transform.Transformer object that are cached for reuse to avoid calls - * to Template.newTransformer(). - */ - public fun transformerCacheSize(transformerCacheSize: String) { - it.property("transformerCacheSize", transformerCacheSize) - } - - /** - * The number of javax.xml.transform.Transformer object that are cached for reuse to avoid calls - * to Template.newTransformer(). - */ - public fun transformerCacheSize(transformerCacheSize: Int) { - it.property("transformerCacheSize", transformerCacheSize.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use a custom org.xml.sax.EntityResolver with javax.xml.transform.sax.SAXSource. - */ - public fun entityResolver(entityResolver: String) { - it.property("entityResolver", entityResolver) - } - - /** - * Allows to configure to use a custom javax.xml.transform.ErrorListener. Beware when doing this - * then the default error listener which captures any errors or fatal errors and store information on - * the Exchange as properties is not in use. So only use this option for special use-cases. - */ - public fun errorListener(errorListener: String) { - it.property("errorListener", errorListener) - } - - /** - * Allows you to use a custom org.apache.camel.builder.xml.ResultHandlerFactory which is capable - * of using custom org.apache.camel.builder.xml.ResultHandler types. - */ - public fun resultHandlerFactory(resultHandlerFactory: String) { - it.property("resultHandlerFactory", resultHandlerFactory) - } - - /** - * To use a custom Saxon configuration - */ - public fun saxonConfiguration(saxonConfiguration: String) { - it.property("saxonConfiguration", saxonConfiguration) - } - - /** - * Allows you to use a custom net.sf.saxon.lib.ExtensionFunctionDefinition. You would need to add - * camel-saxon to the classpath. The function is looked up in the registry, where you can comma to - * separate multiple values to lookup. - */ - public fun saxonExtensionFunctions(saxonExtensionFunctions: String) { - it.property("saxonExtensionFunctions", saxonExtensionFunctions) - } - - /** - * Feature for XML secure processing (see javax.xml.XMLConstants). This is enabled by default. - * However, when using Saxon Professional you may need to turn this off to allow Saxon to be able to - * use Java extension functions. - */ - public fun secureProcessing(secureProcessing: String) { - it.property("secureProcessing", secureProcessing) - } - - /** - * Feature for XML secure processing (see javax.xml.XMLConstants). This is enabled by default. - * However, when using Saxon Professional you may need to turn this off to allow Saxon to be able to - * use Java extension functions. - */ - public fun secureProcessing(secureProcessing: Boolean) { - it.property("secureProcessing", secureProcessing.toString()) - } - - /** - * To use a custom XSLT transformer factory - */ - public fun transformerFactory(transformerFactory: String) { - it.property("transformerFactory", transformerFactory) - } - - /** - * To use a custom XSLT transformer factory, specified as a FQN class name - */ - public fun transformerFactoryClass(transformerFactoryClass: String) { - it.property("transformerFactoryClass", transformerFactoryClass) - } - - /** - * A configuration strategy to apply on freshly created instances of TransformerFactory. - */ - public - fun transformerFactoryConfigurationStrategy(transformerFactoryConfigurationStrategy: String) { - it.property("transformerFactoryConfigurationStrategy", transformerFactoryConfigurationStrategy) - } - - /** - * To use a custom javax.xml.transform.URIResolver - */ - public fun uriResolver(uriResolver: String) { - it.property("uriResolver", uriResolver) - } - - /** - * A consumer to messages generated during XSLT transformations. - */ - public fun xsltMessageLogger(xsltMessageLogger: String) { - it.property("xsltMessageLogger", xsltMessageLogger) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XmlsecuritySignUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XmlsecuritySignUriDsl.kt deleted file mode 100644 index 331bf9200984f..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XmlsecuritySignUriDsl.kt +++ /dev/null @@ -1,362 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Sign XML payloads using the XML signature specification. - */ -public fun UriDsl.`xmlsecurity-sign`(i: XmlsecuritySignUriDsl.() -> Unit) { - XmlsecuritySignUriDsl(this).apply(i) -} - -@CamelDslMarker -public class XmlsecuritySignUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("xmlsecurity-sign") - } - - private var name: String = "" - - /** - * The name part in the URI can be chosen by the user to distinguish between different signer - * endpoints within the camel context. - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * In order to protect the KeyInfo element from tampering you can add a reference to the signed - * info element so that it is protected via the signature value. The default value is true. Only - * relevant when a KeyInfo is returned by KeyAccessor. and KeyInfo#getId() is not null. - */ - public fun addKeyInfoReference(addKeyInfoReference: String) { - it.property("addKeyInfoReference", addKeyInfoReference) - } - - /** - * In order to protect the KeyInfo element from tampering you can add a reference to the signed - * info element so that it is protected via the signature value. The default value is true. Only - * relevant when a KeyInfo is returned by KeyAccessor. and KeyInfo#getId() is not null. - */ - public fun addKeyInfoReference(addKeyInfoReference: Boolean) { - it.property("addKeyInfoReference", addKeyInfoReference.toString()) - } - - /** - * You can set a base URI which is used in the URI dereferencing. Relative URIs are then - * concatenated with the base URI. - */ - public fun baseUri(baseUri: String) { - it.property("baseUri", baseUri) - } - - /** - * Canonicalization method used to canonicalize the SignedInfo element before the digest is - * calculated. You can use the helper methods XmlSignatureHelper.getCanonicalizationMethod(String - * algorithm) or getCanonicalizationMethod(String algorithm, List inclusiveNamespacePrefixes) to - * create a canonicalization method. - */ - public fun canonicalizationMethod(canonicalizationMethod: String) { - it.property("canonicalizationMethod", canonicalizationMethod) - } - - /** - * Determines if the XML signature specific headers be cleared after signing and verification. - * Defaults to true. - */ - public fun clearHeaders(clearHeaders: String) { - it.property("clearHeaders", clearHeaders) - } - - /** - * Determines if the XML signature specific headers be cleared after signing and verification. - * Defaults to true. - */ - public fun clearHeaders(clearHeaders: Boolean) { - it.property("clearHeaders", clearHeaders.toString()) - } - - /** - * Sets the content object Id attribute value. By default a UUID is generated. If you set the null - * value, then a new UUID will be generated. Only used in the enveloping case. - */ - public fun contentObjectId(contentObjectId: String) { - it.property("contentObjectId", contentObjectId) - } - - /** - * Type of the content reference. The default value is null. This value can be overwritten by the - * header XmlSignatureConstants#HEADER_CONTENT_REFERENCE_TYPE. - */ - public fun contentReferenceType(contentReferenceType: String) { - it.property("contentReferenceType", contentReferenceType) - } - - /** - * Reference URI for the content to be signed. Only used in the enveloped case. If the reference - * URI contains an ID attribute value, then the resource schema URI ( setSchemaResourceUri(String)) - * must also be set because the schema validator will then find out which attributes are ID - * attributes. Will be ignored in the enveloping or detached case. - */ - public fun contentReferenceUri(contentReferenceUri: String) { - it.property("contentReferenceUri", contentReferenceUri) - } - - /** - * Sets the crypto context properties. See {link XMLCryptoContext#setProperty(String, Object)}. - * Possible properties are defined in XMLSignContext an XMLValidateContext (see Supported - * Properties). The following properties are set by default to the value Boolean#TRUE for the XML - * validation. If you want to switch these features off you must set the property value to - * Boolean#FALSE. org.jcp.xml.dsig.validateManifests javax.xml.crypto.dsig.cacheReference - */ - public fun cryptoContextProperties(cryptoContextProperties: String) { - it.property("cryptoContextProperties", cryptoContextProperties) - } - - /** - * Digest algorithm URI. Optional parameter. This digest algorithm is used for calculating the - * digest of the input message. If this digest algorithm is not specified then the digest algorithm - * is calculated from the signature algorithm. Example: http://www.w3.org/2001/04/xmlenc#sha256 - */ - public fun digestAlgorithm(digestAlgorithm: String) { - it.property("digestAlgorithm", digestAlgorithm) - } - - /** - * Disallows that the incoming XML document contains DTD DOCTYPE declaration. The default value is - * Boolean#TRUE. - */ - public fun disallowDoctypeDecl(disallowDoctypeDecl: String) { - it.property("disallowDoctypeDecl", disallowDoctypeDecl) - } - - /** - * Disallows that the incoming XML document contains DTD DOCTYPE declaration. The default value is - * Boolean#TRUE. - */ - public fun disallowDoctypeDecl(disallowDoctypeDecl: Boolean) { - it.property("disallowDoctypeDecl", disallowDoctypeDecl.toString()) - } - - /** - * For the signing process, a private key is necessary. You specify a key accessor bean which - * provides this private key. The key accessor bean must implement the KeyAccessor interface. The - * package org.apache.camel.component.xmlsecurity.api contains the default implementation class - * DefaultKeyAccessor which reads the private key from a Java keystore. - */ - public fun keyAccessor(keyAccessor: String) { - it.property("keyAccessor", keyAccessor) - } - - /** - * Indicator whether the XML declaration in the outgoing message body should be omitted. Default - * value is false. Can be overwritten by the header - * XmlSignatureConstants#HEADER_OMIT_XML_DECLARATION. - */ - public fun omitXmlDeclaration(omitXmlDeclaration: String) { - it.property("omitXmlDeclaration", omitXmlDeclaration) - } - - /** - * Indicator whether the XML declaration in the outgoing message body should be omitted. Default - * value is false. Can be overwritten by the header - * XmlSignatureConstants#HEADER_OMIT_XML_DECLARATION. - */ - public fun omitXmlDeclaration(omitXmlDeclaration: Boolean) { - it.property("omitXmlDeclaration", omitXmlDeclaration.toString()) - } - - /** - * The character encoding of the resulting signed XML document. If null then the encoding of the - * original XML document is used. - */ - public fun outputXmlEncoding(outputXmlEncoding: String) { - it.property("outputXmlEncoding", outputXmlEncoding) - } - - /** - * Local name of the parent element to which the XML signature element will be added. Only - * relevant for enveloped XML signature. Alternatively you can also use - * setParentXpath(XPathFilterParameterSpec). Default value is null. The value must be null for - * enveloping and detached XML signature. This parameter or the parameter - * setParentXpath(XPathFilterParameterSpec) for enveloped signature and the parameter - * setXpathsToIdAttributes(List) for detached signature must not be set in the same configuration. If - * the parameters parentXpath and parentLocalName are specified in the same configuration then an - * exception is thrown. - */ - public fun parentLocalName(parentLocalName: String) { - it.property("parentLocalName", parentLocalName) - } - - /** - * Namespace of the parent element to which the XML signature element will be added. - */ - public fun parentNamespace(parentNamespace: String) { - it.property("parentNamespace", parentNamespace) - } - - /** - * Sets the XPath to find the parent node in the enveloped case. Either you specify the parent - * node via this method or the local name and namespace of the parent with the methods - * setParentLocalName(String) and setParentNamespace(String). Default value is null. The value must - * be null for enveloping and detached XML signature. If the parameters parentXpath and - * parentLocalName are specified in the same configuration then an exception is thrown. - */ - public fun parentXpath(parentXpath: String) { - it.property("parentXpath", parentXpath) - } - - /** - * Indicator whether the message body contains plain text. The default value is false, indicating - * that the message body contains XML. The value can be overwritten by the header - * XmlSignatureConstants#HEADER_MESSAGE_IS_PLAIN_TEXT. - */ - public fun plainText(plainText: String) { - it.property("plainText", plainText) - } - - /** - * Indicator whether the message body contains plain text. The default value is false, indicating - * that the message body contains XML. The value can be overwritten by the header - * XmlSignatureConstants#HEADER_MESSAGE_IS_PLAIN_TEXT. - */ - public fun plainText(plainText: Boolean) { - it.property("plainText", plainText.toString()) - } - - /** - * Encoding of the plain text. Only relevant if the message body is plain text (see parameter - * plainText. Default value is UTF-8. - */ - public fun plainTextEncoding(plainTextEncoding: String) { - it.property("plainTextEncoding", plainTextEncoding) - } - - /** - * Namespace prefix for the XML signature namespace http://www.w3.org/2000/09/xmldsig#. Default - * value is ds. If null or an empty value is set then no prefix is used for the XML signature - * namespace. See best practice http://www.w3.org/TR/xmldsig-bestpractices/#signing-xml- - * without-namespaces - */ - public fun prefixForXmlSignatureNamespace(prefixForXmlSignatureNamespace: String) { - it.property("prefixForXmlSignatureNamespace", prefixForXmlSignatureNamespace) - } - - /** - * For adding additional References and Objects to the XML signature which contain additional - * properties, you can provide a bean which implements the XmlSignatureProperties interface. - */ - public fun properties(properties: String) { - it.property("properties", properties) - } - - /** - * Classpath to the XML Schema. Must be specified in the detached XML Signature case for - * determining the ID attributes, might be set in the enveloped and enveloping case. If set, then the - * XML document is validated with the specified XML schema. The schema resource URI can be - * overwritten by the header XmlSignatureConstants#HEADER_SCHEMA_RESOURCE_URI. - */ - public fun schemaResourceUri(schemaResourceUri: String) { - it.property("schemaResourceUri", schemaResourceUri) - } - - /** - * Signature algorithm. Default value is http://www.w3.org/2000/09/xmldsig#rsa-sha1. - */ - public fun signatureAlgorithm(signatureAlgorithm: String) { - it.property("signatureAlgorithm", signatureAlgorithm) - } - - /** - * Sets the signature Id. If this parameter is not set (null value) then a unique ID is generated - * for the signature ID (default). If this parameter is set to (empty string) then no Id attribute is - * created in the signature element. - */ - public fun signatureId(signatureId: String) { - it.property("signatureId", signatureId) - } - - /** - * Transforms which are executed on the message body before the digest is calculated. By default, - * C14n is added and in the case of enveloped signature (see option parentLocalName) also - * http://www.w3.org/2000/09/xmldsig#enveloped-signature is added at position 0 of the list. Use - * methods in XmlSignatureHelper to create the transform methods. - */ - public fun transformMethods(transformMethods: String) { - it.property("transformMethods", transformMethods) - } - - /** - * Define the elements which are signed in the detached case via XPATH expressions to ID - * attributes (attributes of type ID). For each element found via the XPATH expression a detached - * signature is created whose reference URI contains the corresponding attribute value (preceded by - * '#'). The signature becomes the last sibling of the signed element. Elements with deeper hierarchy - * level are signed first. You can also set the XPATH list dynamically via the header - * XmlSignatureConstants#HEADER_XPATHS_TO_ID_ATTRIBUTES. The parameter setParentLocalName(String) or - * setParentXpath(XPathFilterParameterSpec) for enveloped signature and this parameter for detached - * signature must not be set in the same configuration. - */ - public fun xpathsToIdAttributes(xpathsToIdAttributes: String) { - it.property("xpathsToIdAttributes", xpathsToIdAttributes) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * If you want to restrict the remote access via reference URIs, you can set an own dereferencer. - * Optional parameter. If not set the provider default dereferencer is used which can resolve URI - * fragments, HTTP, file and XPpointer URIs. Attention: The implementation is provider dependent! - */ - public fun uriDereferencer(uriDereferencer: String) { - it.property("uriDereferencer", uriDereferencer) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XmlsecurityVerifyUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XmlsecurityVerifyUriDsl.kt deleted file mode 100644 index 51fb74c1aed76..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XmlsecurityVerifyUriDsl.kt +++ /dev/null @@ -1,275 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Verify XML payloads using the XML signature specification. - */ -public fun UriDsl.`xmlsecurity-verify`(i: XmlsecurityVerifyUriDsl.() -> Unit) { - XmlsecurityVerifyUriDsl(this).apply(i) -} - -@CamelDslMarker -public class XmlsecurityVerifyUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("xmlsecurity-verify") - } - - private var name: String = "" - - /** - * The name part in the URI can be chosen by the user to distinguish between different verify - * endpoints within the camel context. - */ - public fun name(name: String) { - this.name = name - it.url("$name") - } - - /** - * You can set a base URI which is used in the URI dereferencing. Relative URIs are then - * concatenated with the base URI. - */ - public fun baseUri(baseUri: String) { - it.property("baseUri", baseUri) - } - - /** - * Determines if the XML signature specific headers be cleared after signing and verification. - * Defaults to true. - */ - public fun clearHeaders(clearHeaders: String) { - it.property("clearHeaders", clearHeaders) - } - - /** - * Determines if the XML signature specific headers be cleared after signing and verification. - * Defaults to true. - */ - public fun clearHeaders(clearHeaders: Boolean) { - it.property("clearHeaders", clearHeaders.toString()) - } - - /** - * Sets the crypto context properties. See {link XMLCryptoContext#setProperty(String, Object)}. - * Possible properties are defined in XMLSignContext an XMLValidateContext (see Supported - * Properties). The following properties are set by default to the value Boolean#TRUE for the XML - * validation. If you want to switch these features off you must set the property value to - * Boolean#FALSE. org.jcp.xml.dsig.validateManifests javax.xml.crypto.dsig.cacheReference - */ - public fun cryptoContextProperties(cryptoContextProperties: String) { - it.property("cryptoContextProperties", cryptoContextProperties) - } - - /** - * Disallows that the incoming XML document contains DTD DOCTYPE declaration. The default value is - * Boolean#TRUE. - */ - public fun disallowDoctypeDecl(disallowDoctypeDecl: String) { - it.property("disallowDoctypeDecl", disallowDoctypeDecl) - } - - /** - * Disallows that the incoming XML document contains DTD DOCTYPE declaration. The default value is - * Boolean#TRUE. - */ - public fun disallowDoctypeDecl(disallowDoctypeDecl: Boolean) { - it.property("disallowDoctypeDecl", disallowDoctypeDecl.toString()) - } - - /** - * Provides the key for validating the XML signature. - */ - public fun keySelector(keySelector: String) { - it.property("keySelector", keySelector) - } - - /** - * Indicator whether the XML declaration in the outgoing message body should be omitted. Default - * value is false. Can be overwritten by the header - * XmlSignatureConstants#HEADER_OMIT_XML_DECLARATION. - */ - public fun omitXmlDeclaration(omitXmlDeclaration: String) { - it.property("omitXmlDeclaration", omitXmlDeclaration) - } - - /** - * Indicator whether the XML declaration in the outgoing message body should be omitted. Default - * value is false. Can be overwritten by the header - * XmlSignatureConstants#HEADER_OMIT_XML_DECLARATION. - */ - public fun omitXmlDeclaration(omitXmlDeclaration: Boolean) { - it.property("omitXmlDeclaration", omitXmlDeclaration.toString()) - } - - /** - * Sets the output node search value for determining the node from the XML signature document - * which shall be set to the output message body. The class of the value depends on the type of the - * output node search. The output node search is forwarded to XmlSignature2Message. - */ - public fun outputNodeSearch(outputNodeSearch: String) { - it.property("outputNodeSearch", outputNodeSearch) - } - - /** - * Determines the search type for determining the output node which is serialized into the output - * message bodyF. See setOutputNodeSearch(Object). The supported default search types you can find in - * DefaultXmlSignature2Message. - */ - public fun outputNodeSearchType(outputNodeSearchType: String) { - it.property("outputNodeSearchType", outputNodeSearchType) - } - - /** - * The character encoding of the resulting signed XML document. If null then the encoding of the - * original XML document is used. - */ - public fun outputXmlEncoding(outputXmlEncoding: String) { - it.property("outputXmlEncoding", outputXmlEncoding) - } - - /** - * Indicator whether the XML signature elements (elements with local name Signature and namesapce - * http://www.w3.org/2000/09/xmldsig#) shall be removed from the document set to the output message. - * Normally, this is only necessary, if the XML signature is enveloped. The default value is - * Boolean#FALSE. This parameter is forwarded to XmlSignature2Message. This indicator has no effect - * if the output node search is of type DefaultXmlSignature2Message#OUTPUT_NODE_SEARCH_TYPE_DEFAULT.F - */ - public fun removeSignatureElements(removeSignatureElements: String) { - it.property("removeSignatureElements", removeSignatureElements) - } - - /** - * Indicator whether the XML signature elements (elements with local name Signature and namesapce - * http://www.w3.org/2000/09/xmldsig#) shall be removed from the document set to the output message. - * Normally, this is only necessary, if the XML signature is enveloped. The default value is - * Boolean#FALSE. This parameter is forwarded to XmlSignature2Message. This indicator has no effect - * if the output node search is of type DefaultXmlSignature2Message#OUTPUT_NODE_SEARCH_TYPE_DEFAULT.F - */ - public fun removeSignatureElements(removeSignatureElements: Boolean) { - it.property("removeSignatureElements", removeSignatureElements.toString()) - } - - /** - * Classpath to the XML Schema. Must be specified in the detached XML Signature case for - * determining the ID attributes, might be set in the enveloped and enveloping case. If set, then the - * XML document is validated with the specified XML schema. The schema resource URI can be - * overwritten by the header XmlSignatureConstants#HEADER_SCHEMA_RESOURCE_URI. - */ - public fun schemaResourceUri(schemaResourceUri: String) { - it.property("schemaResourceUri", schemaResourceUri) - } - - /** - * Enables secure validation. If true then secure validation is enabled. - */ - public fun secureValidation(secureValidation: String) { - it.property("secureValidation", secureValidation) - } - - /** - * Enables secure validation. If true then secure validation is enabled. - */ - public fun secureValidation(secureValidation: Boolean) { - it.property("secureValidation", secureValidation.toString()) - } - - /** - * Handles the different validation failed situations. The default implementation throws specific - * exceptions for the different situations (All exceptions have the package name - * org.apache.camel.component.xmlsecurity.api and are a sub-class of XmlSignatureInvalidException. If - * the signature value validation fails, a XmlSignatureInvalidValueException is thrown. If a - * reference validation fails, a XmlSignatureInvalidContentHashException is thrown. For more detailed - * information, see the JavaDoc. - */ - public fun validationFailedHandler(validationFailedHandler: String) { - it.property("validationFailedHandler", validationFailedHandler) - } - - /** - * Bean which maps the XML signature to the output-message after the validation. How this mapping - * should be done can be configured by the options outputNodeSearchType, outputNodeSearch, and - * removeSignatureElements. The default implementation offers three possibilities which are related - * to the three output node search types Default, ElementName, and XPath. The default implementation - * determines a node which is then serialized and set to the body of the output message If the search - * type is ElementName then the output node (which must be in this case an element) is determined by - * the local name and namespace defined in the search value (see option outputNodeSearch). If the - * search type is XPath then the output node is determined by the XPath specified in the search value - * (in this case the output node can be of type Element, TextNode or Document). If the output node - * search type is Default then the following rules apply: In the enveloped XML signature case (there - * is a reference with URI= and transform http://www.w3.org/2000/09/xmldsig#enveloped-signature), the - * incoming XML document without the Signature element is set to the output message body. In the - * non-enveloped XML signature case, the message body is determined from a referenced Object; this is - * explained in more detail in chapter Output Node Determination in Enveloping XML Signature Case. - */ - public fun xmlSignature2Message(xmlSignature2Message: String) { - it.property("xmlSignature2Message", xmlSignature2Message) - } - - /** - * This interface allows the application to check the XML signature before the validation is - * executed. This step is recommended in - * http://www.w3.org/TR/xmldsig-bestpractices/#check-what-is-signed - */ - public fun xmlSignatureChecker(xmlSignatureChecker: String) { - it.property("xmlSignatureChecker", xmlSignatureChecker) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * If you want to restrict the remote access via reference URIs, you can set an own dereferencer. - * Optional parameter. If not set the provider default dereferencer is used which can resolve URI - * fragments, HTTP, file and XPpointer URIs. Attention: The implementation is provider dependent! - */ - public fun uriDereferencer(uriDereferencer: String) { - it.property("uriDereferencer", uriDereferencer) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XmppUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XmppUriDsl.kt deleted file mode 100644 index 9748e123633c9..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XmppUriDsl.kt +++ /dev/null @@ -1,318 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Send and receive messages to/from an XMPP chat server. - */ -public fun UriDsl.xmpp(i: XmppUriDsl.() -> Unit) { - XmppUriDsl(this).apply(i) -} - -@CamelDslMarker -public class XmppUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("xmpp") - } - - private var host: String = "" - - private var port: String = "" - - private var participant: String = "" - - /** - * Hostname for the chat server - */ - public fun host(host: String) { - this.host = host - it.url("$host:$port/$participant") - } - - /** - * Port number for the chat server - */ - public fun port(port: String) { - this.port = port - it.url("$host:$port/$participant") - } - - /** - * Port number for the chat server - */ - public fun port(port: Int) { - this.port = port.toString() - it.url("$host:$port/$participant") - } - - /** - * JID (Jabber ID) of person to receive messages. room parameter has precedence over participant. - */ - public fun participant(participant: String) { - this.participant = participant - it.url("$host:$port/$participant") - } - - /** - * Whether to login the user. - */ - public fun login(login: String) { - it.property("login", login) - } - - /** - * Whether to login the user. - */ - public fun login(login: Boolean) { - it.property("login", login.toString()) - } - - /** - * Use nickname when joining room. If room is specified and nickname is not, user will be used for - * the nickname. - */ - public fun nickname(nickname: String) { - it.property("nickname", nickname) - } - - /** - * Accept pubsub packets on input, default is false - */ - public fun pubsub(pubsub: String) { - it.property("pubsub", pubsub) - } - - /** - * Accept pubsub packets on input, default is false - */ - public fun pubsub(pubsub: Boolean) { - it.property("pubsub", pubsub.toString()) - } - - /** - * If this option is specified, the component will connect to MUC (Multi User Chat). Usually, the - * domain name for MUC is different from the login domain. For example, if you are supermanjabber.org - * and want to join the krypton room, then the room URL is kryptonconference.jabber.org. Note the - * conference part. It is not a requirement to provide the full room JID. If the room parameter does - * not contain the symbol, the domain part will be discovered and added by Camel - */ - public fun room(room: String) { - it.property("room", room) - } - - /** - * The name of the service you are connecting to. For Google Talk, this would be gmail.com. - */ - public fun serviceName(serviceName: String) { - it.property("serviceName", serviceName) - } - - /** - * Specifies whether to test the connection on startup. This is used to ensure that the XMPP - * client has a valid connection to the XMPP server when the route starts. Camel throws an exception - * on startup if a connection cannot be established. When this option is set to false, Camel will - * attempt to establish a lazy connection when needed by a producer, and will poll for a consumer - * connection until the connection is established. Default is true. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: String) { - it.property("testConnectionOnStartup", testConnectionOnStartup) - } - - /** - * Specifies whether to test the connection on startup. This is used to ensure that the XMPP - * client has a valid connection to the XMPP server when the route starts. Camel throws an exception - * on startup if a connection cannot be established. When this option is set to false, Camel will - * attempt to establish a lazy connection when needed by a producer, and will poll for a consumer - * connection until the connection is established. Default is true. - */ - public fun testConnectionOnStartup(testConnectionOnStartup: Boolean) { - it.property("testConnectionOnStartup", testConnectionOnStartup.toString()) - } - - /** - * If true, an attempt to create an account will be made. Default is false. - */ - public fun createAccount(createAccount: String) { - it.property("createAccount", createAccount) - } - - /** - * If true, an attempt to create an account will be made. Default is false. - */ - public fun createAccount(createAccount: Boolean) { - it.property("createAccount", createAccount.toString()) - } - - /** - * XMPP resource. The default is Camel. - */ - public fun resource(resource: String) { - it.property("resource", resource) - } - - /** - * The amount of time in seconds between polls (in seconds) to verify the health of the XMPP - * connection, or between attempts to establish an initial consumer connection. Camel will try to - * re-establish a connection if it has become inactive. Default is 10 seconds. - */ - public fun connectionPollDelay(connectionPollDelay: String) { - it.property("connectionPollDelay", connectionPollDelay) - } - - /** - * The amount of time in seconds between polls (in seconds) to verify the health of the XMPP - * connection, or between attempts to establish an initial consumer connection. Camel will try to - * re-establish a connection if it has become inactive. Default is 10 seconds. - */ - public fun connectionPollDelay(connectionPollDelay: Int) { - it.property("connectionPollDelay", connectionPollDelay.toString()) - } - - /** - * Set a doc header on the IN message containing a Document form of the incoming packet; default - * is true if presence or pubsub are true, otherwise false - */ - public fun doc(doc: String) { - it.property("doc", doc) - } - - /** - * Set a doc header on the IN message containing a Document form of the incoming packet; default - * is true if presence or pubsub are true, otherwise false - */ - public fun doc(doc: Boolean) { - it.property("doc", doc.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use an existing connection configuration. Currently - * org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration is only supported (XMPP over TCP). - */ - public fun connectionConfig(connectionConfig: String) { - it.property("connectionConfig", connectionConfig) - } - - /** - * To use a custom HeaderFilterStrategy to filter header to and from Camel message. - */ - public fun headerFilterStrategy(headerFilterStrategy: String) { - it.property("headerFilterStrategy", headerFilterStrategy) - } - - /** - * Password for login - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * Password for room - */ - public fun roomPassword(roomPassword: String) { - it.property("roomPassword", roomPassword) - } - - /** - * User name (without server name). If not specified, anonymous login will be attempted. - */ - public fun user(user: String) { - it.property("user", user) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XqueryUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XqueryUriDsl.kt deleted file mode 100644 index ad6ba6552a472..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XqueryUriDsl.kt +++ /dev/null @@ -1,429 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Query and/or transform XML payloads using XQuery and Saxon. - */ -public fun UriDsl.xquery(i: XqueryUriDsl.() -> Unit) { - XqueryUriDsl(this).apply(i) -} - -@CamelDslMarker -public class XqueryUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("xquery") - } - - private var resourceUri: String = "" - - /** - * The name of the template to load from classpath or file system - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Whether to allow using StAX mode - */ - public fun allowStAX(allowStAX: String) { - it.property("allowStAX", allowStAX) - } - - /** - * Whether to allow using StAX mode - */ - public fun allowStAX(allowStAX: Boolean) { - it.property("allowStAX", allowStAX.toString()) - } - - /** - * Allows to control which namespace prefixes to use for a set of namespace mappings - */ - public fun namespacePrefixes(namespacePrefixes: String) { - it.property("namespacePrefixes", namespacePrefixes) - } - - /** - * What output result to use - */ - public fun resultsFormat(resultsFormat: String) { - it.property("resultsFormat", resultsFormat) - } - - /** - * What output result to use defined as a class - */ - public fun resultType(resultType: String) { - it.property("resultType", resultType) - } - - /** - * Source to use, instead of message body. You can prefix with variable:, header:, or property: to - * specify kind of source. Otherwise, the source is assumed to be a variable. Use empty or null to - * use default source, which is the message body. - */ - public fun source(source: String) { - it.property("source", source) - } - - /** - * Whether to strip all whitespaces - */ - public fun stripsAllWhiteSpace(stripsAllWhiteSpace: String) { - it.property("stripsAllWhiteSpace", stripsAllWhiteSpace) - } - - /** - * Whether to strip all whitespaces - */ - public fun stripsAllWhiteSpace(stripsAllWhiteSpace: Boolean) { - it.property("stripsAllWhiteSpace", stripsAllWhiteSpace.toString()) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use a custom Saxon configuration - */ - public fun configuration(configuration: String) { - it.property("configuration", configuration) - } - - /** - * To set custom Saxon configuration properties - */ - public fun configurationProperties(configurationProperties: String) { - it.property("configurationProperties", configurationProperties) - } - - /** - * To use the custom ModuleURIResolver - */ - public fun moduleURIResolver(moduleURIResolver: String) { - it.property("moduleURIResolver", moduleURIResolver) - } - - /** - * Additional parameters - */ - public fun parameters(parameters: String) { - it.property("parameters", parameters) - } - - /** - * Properties to configure the serialization parameters - */ - public fun properties(properties: String) { - it.property("properties", properties) - } - - /** - * To use a custom Saxon StaticQueryContext - */ - public fun staticQueryContext(staticQueryContext: String) { - it.property("staticQueryContext", staticQueryContext) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XsltSaxonUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XsltSaxonUriDsl.kt deleted file mode 100644 index c29f11fb8f243..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XsltSaxonUriDsl.kt +++ /dev/null @@ -1,290 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Transform XML payloads using an XSLT template using Saxon. - */ -public fun UriDsl.`xslt-saxon`(i: XsltSaxonUriDsl.() -> Unit) { - XsltSaxonUriDsl(this).apply(i) -} - -@CamelDslMarker -public class XsltSaxonUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("xslt-saxon") - } - - private var resourceUri: String = "" - - /** - * Path to the template. The following is supported by the default URIResolver. You can prefix - * with: classpath, file, http, ref, or bean. classpath, file and http loads the resource using these - * protocols (classpath is default). ref will lookup the resource in the registry. bean will call a - * method on a bean to be used as the resource. For bean you can specify the method name after dot, - * eg bean:myBean.myMethod - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Whether to allow using StAX as the javax.xml.transform.Source. You can enable this if the XSLT - * library supports StAX such as the Saxon library (camel-saxon). The Xalan library (default in JVM) - * does not support StAXSource. - */ - public fun allowStAX(allowStAX: String) { - it.property("allowStAX", allowStAX) - } - - /** - * Whether to allow using StAX as the javax.xml.transform.Source. You can enable this if the XSLT - * library supports StAX such as the Saxon library (camel-saxon). The Xalan library (default in JVM) - * does not support StAXSource. - */ - public fun allowStAX(allowStAX: Boolean) { - it.property("allowStAX", allowStAX.toString()) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: String) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: Boolean) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader.toString()) - } - - /** - * Cache for the resource content (the stylesheet file) when it is loaded on startup. If set to - * false Camel will reload the stylesheet file on each message processing. This is good for - * development. A cached stylesheet can be forced to reload at runtime via JMX using the - * clearCachedStylesheet operation. - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Cache for the resource content (the stylesheet file) when it is loaded on startup. If set to - * false Camel will reload the stylesheet file on each message processing. This is good for - * development. A cached stylesheet can be forced to reload at runtime via JMX using the - * clearCachedStylesheet operation. - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * If you have output=file then this option dictates whether or not the output file should be - * deleted when the Exchange is done processing. For example suppose the output file is a temporary - * file, then it can be a good idea to delete it after use. - */ - public fun deleteOutputFile(deleteOutputFile: String) { - it.property("deleteOutputFile", deleteOutputFile) - } - - /** - * If you have output=file then this option dictates whether or not the output file should be - * deleted when the Exchange is done processing. For example suppose the output file is a temporary - * file, then it can be a good idea to delete it after use. - */ - public fun deleteOutputFile(deleteOutputFile: Boolean) { - it.property("deleteOutputFile", deleteOutputFile.toString()) - } - - /** - * Whether or not to throw an exception if the input body is null. - */ - public fun failOnNullBody(failOnNullBody: String) { - it.property("failOnNullBody", failOnNullBody) - } - - /** - * Whether or not to throw an exception if the input body is null. - */ - public fun failOnNullBody(failOnNullBody: Boolean) { - it.property("failOnNullBody", failOnNullBody.toString()) - } - - /** - * Option to specify which output type to use. Possible values are: string, bytes, DOM, file. The - * first three options are all in memory based, where as file is streamed directly to a java.io.File. - * For file you must specify the filename in the IN header with the key XsltConstants.XSLT_FILE_NAME - * which is also CamelXsltFileName. Also any paths leading to the filename must be created - * beforehand, otherwise an exception is thrown at runtime. - */ - public fun output(output: String) { - it.property("output", output) - } - - /** - * The number of javax.xml.transform.Transformer object that are cached for reuse to avoid calls - * to Template.newTransformer(). - */ - public fun transformerCacheSize(transformerCacheSize: String) { - it.property("transformerCacheSize", transformerCacheSize) - } - - /** - * The number of javax.xml.transform.Transformer object that are cached for reuse to avoid calls - * to Template.newTransformer(). - */ - public fun transformerCacheSize(transformerCacheSize: Int) { - it.property("transformerCacheSize", transformerCacheSize.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use a custom org.xml.sax.EntityResolver with javax.xml.transform.sax.SAXSource. - */ - public fun entityResolver(entityResolver: String) { - it.property("entityResolver", entityResolver) - } - - /** - * Allows to configure to use a custom javax.xml.transform.ErrorListener. Beware when doing this - * then the default error listener which captures any errors or fatal errors and store information on - * the Exchange as properties is not in use. So only use this option for special use-cases. - */ - public fun errorListener(errorListener: String) { - it.property("errorListener", errorListener) - } - - /** - * Allows you to use a custom org.apache.camel.builder.xml.ResultHandlerFactory which is capable - * of using custom org.apache.camel.builder.xml.ResultHandler types. - */ - public fun resultHandlerFactory(resultHandlerFactory: String) { - it.property("resultHandlerFactory", resultHandlerFactory) - } - - /** - * To use a custom Saxon configuration - */ - public fun saxonConfiguration(saxonConfiguration: String) { - it.property("saxonConfiguration", saxonConfiguration) - } - - /** - * Allows you to use a custom net.sf.saxon.lib.ExtensionFunctionDefinition. You would need to add - * camel-saxon to the classpath. The function is looked up in the registry, where you can comma to - * separate multiple values to lookup. - */ - public fun saxonExtensionFunctions(saxonExtensionFunctions: String) { - it.property("saxonExtensionFunctions", saxonExtensionFunctions) - } - - /** - * Feature for XML secure processing (see javax.xml.XMLConstants). This is enabled by default. - * However, when using Saxon Professional you may need to turn this off to allow Saxon to be able to - * use Java extension functions. - */ - public fun secureProcessing(secureProcessing: String) { - it.property("secureProcessing", secureProcessing) - } - - /** - * Feature for XML secure processing (see javax.xml.XMLConstants). This is enabled by default. - * However, when using Saxon Professional you may need to turn this off to allow Saxon to be able to - * use Java extension functions. - */ - public fun secureProcessing(secureProcessing: Boolean) { - it.property("secureProcessing", secureProcessing.toString()) - } - - /** - * To use a custom XSLT transformer factory - */ - public fun transformerFactory(transformerFactory: String) { - it.property("transformerFactory", transformerFactory) - } - - /** - * To use a custom XSLT transformer factory, specified as a FQN class name - */ - public fun transformerFactoryClass(transformerFactoryClass: String) { - it.property("transformerFactoryClass", transformerFactoryClass) - } - - /** - * A configuration strategy to apply on freshly created instances of TransformerFactory. - */ - public - fun transformerFactoryConfigurationStrategy(transformerFactoryConfigurationStrategy: String) { - it.property("transformerFactoryConfigurationStrategy", transformerFactoryConfigurationStrategy) - } - - /** - * To use a custom javax.xml.transform.URIResolver - */ - public fun uriResolver(uriResolver: String) { - it.property("uriResolver", uriResolver) - } - - /** - * A consumer to messages generated during XSLT transformations. - */ - public fun xsltMessageLogger(xsltMessageLogger: String) { - it.property("xsltMessageLogger", xsltMessageLogger) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XsltUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XsltUriDsl.kt deleted file mode 100644 index 7aceeb2bcce25..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/XsltUriDsl.kt +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Transforms XML payload using an XSLT template. - */ -public fun UriDsl.xslt(i: XsltUriDsl.() -> Unit) { - XsltUriDsl(this).apply(i) -} - -@CamelDslMarker -public class XsltUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("xslt") - } - - private var resourceUri: String = "" - - /** - * Path to the template. The following is supported by the default URIResolver. You can prefix - * with: classpath, file, http, ref, or bean. classpath, file and http loads the resource using these - * protocols (classpath is default). ref will lookup the resource in the registry. bean will call a - * method on a bean to be used as the resource. For bean you can specify the method name after dot, - * eg bean:myBean.myMethod - */ - public fun resourceUri(resourceUri: String) { - this.resourceUri = resourceUri - it.url("$resourceUri") - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: String) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader) - } - - /** - * Whether to allow to use resource template from header or not (default false). Enabling this - * allows to specify dynamic templates via message header. However this can be seen as a potential - * security vulnerability if the header is coming from a malicious user, so use this with care. - */ - public fun allowTemplateFromHeader(allowTemplateFromHeader: Boolean) { - it.property("allowTemplateFromHeader", allowTemplateFromHeader.toString()) - } - - /** - * Cache for the resource content (the stylesheet file) when it is loaded on startup. If set to - * false Camel will reload the stylesheet file on each message processing. This is good for - * development. A cached stylesheet can be forced to reload at runtime via JMX using the - * clearCachedStylesheet operation. - */ - public fun contentCache(contentCache: String) { - it.property("contentCache", contentCache) - } - - /** - * Cache for the resource content (the stylesheet file) when it is loaded on startup. If set to - * false Camel will reload the stylesheet file on each message processing. This is good for - * development. A cached stylesheet can be forced to reload at runtime via JMX using the - * clearCachedStylesheet operation. - */ - public fun contentCache(contentCache: Boolean) { - it.property("contentCache", contentCache.toString()) - } - - /** - * If you have output=file then this option dictates whether or not the output file should be - * deleted when the Exchange is done processing. For example suppose the output file is a temporary - * file, then it can be a good idea to delete it after use. - */ - public fun deleteOutputFile(deleteOutputFile: String) { - it.property("deleteOutputFile", deleteOutputFile) - } - - /** - * If you have output=file then this option dictates whether or not the output file should be - * deleted when the Exchange is done processing. For example suppose the output file is a temporary - * file, then it can be a good idea to delete it after use. - */ - public fun deleteOutputFile(deleteOutputFile: Boolean) { - it.property("deleteOutputFile", deleteOutputFile.toString()) - } - - /** - * Whether or not to throw an exception if the input body is null. - */ - public fun failOnNullBody(failOnNullBody: String) { - it.property("failOnNullBody", failOnNullBody) - } - - /** - * Whether or not to throw an exception if the input body is null. - */ - public fun failOnNullBody(failOnNullBody: Boolean) { - it.property("failOnNullBody", failOnNullBody.toString()) - } - - /** - * Option to specify which output type to use. Possible values are: string, bytes, DOM, file. The - * first three options are all in memory based, where as file is streamed directly to a java.io.File. - * For file you must specify the filename in the IN header with the key XsltConstants.XSLT_FILE_NAME - * which is also CamelXsltFileName. Also any paths leading to the filename must be created - * beforehand, otherwise an exception is thrown at runtime. - */ - public fun output(output: String) { - it.property("output", output) - } - - /** - * The number of javax.xml.transform.Transformer object that are cached for reuse to avoid calls - * to Template.newTransformer(). - */ - public fun transformerCacheSize(transformerCacheSize: String) { - it.property("transformerCacheSize", transformerCacheSize) - } - - /** - * The number of javax.xml.transform.Transformer object that are cached for reuse to avoid calls - * to Template.newTransformer(). - */ - public fun transformerCacheSize(transformerCacheSize: Int) { - it.property("transformerCacheSize", transformerCacheSize.toString()) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * To use a custom org.xml.sax.EntityResolver with javax.xml.transform.sax.SAXSource. - */ - public fun entityResolver(entityResolver: String) { - it.property("entityResolver", entityResolver) - } - - /** - * Allows to configure to use a custom javax.xml.transform.ErrorListener. Beware when doing this - * then the default error listener which captures any errors or fatal errors and store information on - * the Exchange as properties is not in use. So only use this option for special use-cases. - */ - public fun errorListener(errorListener: String) { - it.property("errorListener", errorListener) - } - - /** - * Allows you to use a custom org.apache.camel.builder.xml.ResultHandlerFactory which is capable - * of using custom org.apache.camel.builder.xml.ResultHandler types. - */ - public fun resultHandlerFactory(resultHandlerFactory: String) { - it.property("resultHandlerFactory", resultHandlerFactory) - } - - /** - * To use a custom XSLT transformer factory - */ - public fun transformerFactory(transformerFactory: String) { - it.property("transformerFactory", transformerFactory) - } - - /** - * To use a custom XSLT transformer factory, specified as a FQN class name - */ - public fun transformerFactoryClass(transformerFactoryClass: String) { - it.property("transformerFactoryClass", transformerFactoryClass) - } - - /** - * A configuration strategy to apply on freshly created instances of TransformerFactory. - */ - public - fun transformerFactoryConfigurationStrategy(transformerFactoryConfigurationStrategy: String) { - it.property("transformerFactoryConfigurationStrategy", transformerFactoryConfigurationStrategy) - } - - /** - * To use a custom javax.xml.transform.URIResolver - */ - public fun uriResolver(uriResolver: String) { - it.property("uriResolver", uriResolver) - } - - /** - * A consumer to messages generated during XSLT transformations. - */ - public fun xsltMessageLogger(xsltMessageLogger: String) { - it.property("xsltMessageLogger", xsltMessageLogger) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZeebeUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZeebeUriDsl.kt deleted file mode 100644 index d10a90ae756d5..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZeebeUriDsl.kt +++ /dev/null @@ -1,158 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Zeebe component which integrates with Camunda Zeebe to interact with the API. - */ -public fun UriDsl.zeebe(i: ZeebeUriDsl.() -> Unit) { - ZeebeUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ZeebeUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("zeebe") - } - - private var operationName: String = "" - - /** - * The operation to use - */ - public fun operationName(operationName: String) { - this.operationName = operationName - it.url("$operationName") - } - - /** - * Format the result in the body as JSON. - */ - public fun formatJSON(formatJSON: String) { - it.property("formatJSON", formatJSON) - } - - /** - * Format the result in the body as JSON. - */ - public fun formatJSON(formatJSON: Boolean) { - it.property("formatJSON", formatJSON.toString()) - } - - /** - * JobKey for the job worker. - */ - public fun jobKey(jobKey: String) { - it.property("jobKey", jobKey) - } - - /** - * Timeout for job worker. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * Timeout for job worker. - */ - public fun timeout(timeout: Int) { - it.property("timeout", timeout.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZendeskUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZendeskUriDsl.kt deleted file mode 100644 index 80036e486c2c0..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZendeskUriDsl.kt +++ /dev/null @@ -1,371 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage Zendesk tickets, users, organizations, etc. - */ -public fun UriDsl.zendesk(i: ZendeskUriDsl.() -> Unit) { - ZendeskUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ZendeskUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("zendesk") - } - - private var methodName: String = "" - - /** - * What operation to use - */ - public fun methodName(methodName: String) { - this.methodName = methodName - it.url("$methodName") - } - - /** - * Sets the name of a parameter to be passed in the exchange In Body - */ - public fun inBody(inBody: String) { - it.property("inBody", inBody) - } - - /** - * The server URL to connect. - */ - public fun serverUrl(serverUrl: String) { - it.property("serverUrl", serverUrl) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: String) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle) - } - - /** - * If the polling consumer did not poll any files, you can enable this option to send an empty - * message (no body) instead. - */ - public fun sendEmptyMessageWhenIdle(sendEmptyMessageWhenIdle: Boolean) { - it.property("sendEmptyMessageWhenIdle", sendEmptyMessageWhenIdle.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom - * implementation to control error handling usually occurred during the poll operation before an - * Exchange have been created and being routed in Camel. - */ - public fun pollStrategy(pollStrategy: String) { - it.property("pollStrategy", pollStrategy) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: String) { - it.property("backoffErrorThreshold", backoffErrorThreshold) - } - - /** - * The number of subsequent error polls (failed due some error) that should happen before the - * backoffMultipler should kick-in. - */ - public fun backoffErrorThreshold(backoffErrorThreshold: Int) { - it.property("backoffErrorThreshold", backoffErrorThreshold.toString()) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: String) { - it.property("backoffIdleThreshold", backoffIdleThreshold) - } - - /** - * The number of subsequent idle polls that should happen before the backoffMultipler should - * kick-in. - */ - public fun backoffIdleThreshold(backoffIdleThreshold: Int) { - it.property("backoffIdleThreshold", backoffIdleThreshold.toString()) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: String) { - it.property("backoffMultiplier", backoffMultiplier) - } - - /** - * To let the scheduled polling consumer backoff if there has been a number of subsequent - * idles/errors in a row. The multiplier is then the number of polls that will be skipped before the - * next actual attempt is happening again. When this option is in use then backoffIdleThreshold - * and/or backoffErrorThreshold must also be configured. - */ - public fun backoffMultiplier(backoffMultiplier: Int) { - it.property("backoffMultiplier", backoffMultiplier.toString()) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: String) { - it.property("delay", delay) - } - - /** - * Milliseconds before the next poll. - */ - public fun delay(delay: Int) { - it.property("delay", delay.toString()) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: String) { - it.property("greedy", greedy) - } - - /** - * If greedy is enabled, then the ScheduledPollConsumer will run immediately again, if the - * previous run polled 1 or more messages. - */ - public fun greedy(greedy: Boolean) { - it.property("greedy", greedy.toString()) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: String) { - it.property("initialDelay", initialDelay) - } - - /** - * Milliseconds before the first poll starts. - */ - public fun initialDelay(initialDelay: Int) { - it.property("initialDelay", initialDelay.toString()) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: String) { - it.property("repeatCount", repeatCount) - } - - /** - * Specifies a maximum limit of number of fires. So if you set it to 1, the scheduler will only - * fire once. If you set it to 5, it will only fire five times. A value of zero or negative means - * fire forever. - */ - public fun repeatCount(repeatCount: Int) { - it.property("repeatCount", repeatCount.toString()) - } - - /** - * The consumer logs a start/complete log line when it polls. This option allows you to configure - * the logging level for that. - */ - public fun runLoggingLevel(runLoggingLevel: String) { - it.property("runLoggingLevel", runLoggingLevel) - } - - /** - * Allows for configuring a custom/shared thread pool to use for the consumer. By default each - * consumer has its own single threaded thread pool. - */ - public fun scheduledExecutorService(scheduledExecutorService: String) { - it.property("scheduledExecutorService", scheduledExecutorService) - } - - /** - * To use a cron scheduler from either camel-spring or camel-quartz component. Use value spring or - * quartz for built in scheduler - */ - public fun scheduler(scheduler: String) { - it.property("scheduler", scheduler) - } - - /** - * To configure additional properties when using a custom scheduler or any of the Quartz, Spring - * based scheduler. - */ - public fun schedulerProperties(schedulerProperties: String) { - it.property("schedulerProperties", schedulerProperties) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: String) { - it.property("startScheduler", startScheduler) - } - - /** - * Whether the scheduler should be auto started. - */ - public fun startScheduler(startScheduler: Boolean) { - it.property("startScheduler", startScheduler.toString()) - } - - /** - * Time unit for initialDelay and delay options. - */ - public fun timeUnit(timeUnit: String) { - it.property("timeUnit", timeUnit) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: String) { - it.property("useFixedDelay", useFixedDelay) - } - - /** - * Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details. - */ - public fun useFixedDelay(useFixedDelay: Boolean) { - it.property("useFixedDelay", useFixedDelay.toString()) - } - - /** - * The OAuth token. - */ - public fun oauthToken(oauthToken: String) { - it.property("oauthToken", oauthToken) - } - - /** - * The password. - */ - public fun password(password: String) { - it.property("password", password) - } - - /** - * The security token. - */ - public fun token(token: String) { - it.property("token", token) - } - - /** - * The user name. - */ - public fun username(username: String) { - it.property("username", username) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZookeeperMasterUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZookeeperMasterUriDsl.kt deleted file mode 100644 index a4a71e87e02fc..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZookeeperMasterUriDsl.kt +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Have only a single consumer in a cluster consuming from a given endpoint; with automatic failover - * if the JVM dies. - */ -public fun UriDsl.`zookeeper-master`(i: ZookeeperMasterUriDsl.() -> Unit) { - ZookeeperMasterUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ZookeeperMasterUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("zookeeper-master") - } - - private var groupName: String = "" - - private var consumerEndpointUri: String = "" - - /** - * The name of the cluster group to use - */ - public fun groupName(groupName: String) { - this.groupName = groupName - it.url("$groupName:$consumerEndpointUri") - } - - /** - * The consumer endpoint to use in master/slave mode - */ - public fun consumerEndpointUri(consumerEndpointUri: String) { - this.consumerEndpointUri = consumerEndpointUri - it.url("$groupName:$consumerEndpointUri") - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZookeeperUriDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZookeeperUriDsl.kt deleted file mode 100644 index 967210b8ec030..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/components/ZookeeperUriDsl.kt +++ /dev/null @@ -1,224 +0,0 @@ -/* - * 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.kotlin.components - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl - -/** - * Manage ZooKeeper clusters. - */ -public fun UriDsl.zookeeper(i: ZookeeperUriDsl.() -> Unit) { - ZookeeperUriDsl(this).apply(i) -} - -@CamelDslMarker -public class ZookeeperUriDsl( - it: UriDsl, -) { - private val it: UriDsl - - init { - this.it = it - this.it.component("zookeeper") - } - - private var serverUrls: String = "" - - private var path: String = "" - - /** - * The zookeeper server hosts (multiple servers can be separated by comma) - */ - public fun serverUrls(serverUrls: String) { - this.serverUrls = serverUrls - it.url("$serverUrls/$path") - } - - /** - * The node in the ZooKeeper server (aka znode) - */ - public fun path(path: String) { - this.path = path - it.url("$serverUrls/$path") - } - - /** - * Whether the children of the node should be listed - */ - public fun listChildren(listChildren: String) { - it.property("listChildren", listChildren) - } - - /** - * Whether the children of the node should be listed - */ - public fun listChildren(listChildren: Boolean) { - it.property("listChildren", listChildren.toString()) - } - - /** - * The time interval to wait on connection before timing out. - */ - public fun timeout(timeout: String) { - it.property("timeout", timeout) - } - - /** - * The time interval to wait on connection before timing out. - */ - public fun timeout(timeout: Int) { - it.property("timeout", timeout.toString()) - } - - /** - * The time interval to backoff for after an error before retrying. - */ - public fun backoff(backoff: String) { - it.property("backoff", backoff) - } - - /** - * The time interval to backoff for after an error before retrying. - */ - public fun backoff(backoff: Int) { - it.property("backoff", backoff.toString()) - } - - /** - * Should changes to the znode be 'watched' and repeatedly processed. - */ - public fun repeat(repeat: String) { - it.property("repeat", repeat) - } - - /** - * Should changes to the znode be 'watched' and repeatedly processed. - */ - public fun repeat(repeat: Boolean) { - it.property("repeat", repeat.toString()) - } - - /** - * Upon the delete of a znode, should an empty message be send to the consumer - */ - public fun sendEmptyMessageOnDelete(sendEmptyMessageOnDelete: String) { - it.property("sendEmptyMessageOnDelete", sendEmptyMessageOnDelete) - } - - /** - * Upon the delete of a znode, should an empty message be send to the consumer - */ - public fun sendEmptyMessageOnDelete(sendEmptyMessageOnDelete: Boolean) { - it.property("sendEmptyMessageOnDelete", sendEmptyMessageOnDelete.toString()) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: String) { - it.property("bridgeErrorHandler", bridgeErrorHandler) - } - - /** - * Allows for bridging the consumer to the Camel routing Error Handler, which mean any exceptions - * (if possible) occurred while the Camel consumer is trying to pickup incoming messages, or the - * likes, will now be processed as a message and handled by the routing Error Handler. Important: - * This is only possible if the 3rd party component allows Camel to be alerted if an exception was - * thrown. Some components handle this internally only, and therefore bridgeErrorHandler is not - * possible. In other situations we may improve the Camel component to hook into the 3rd party - * component and make this possible for future releases. By default the consumer will use the - * org.apache.camel.spi.ExceptionHandler to deal with exceptions, that will be logged at WARN or - * ERROR level and ignored. - */ - public fun bridgeErrorHandler(bridgeErrorHandler: Boolean) { - it.property("bridgeErrorHandler", bridgeErrorHandler.toString()) - } - - /** - * To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is - * enabled then this option is not in use. By default the consumer will deal with exceptions, that - * will be logged at WARN or ERROR level and ignored. - */ - public fun exceptionHandler(exceptionHandler: String) { - it.property("exceptionHandler", exceptionHandler) - } - - /** - * Sets the exchange pattern when the consumer creates an exchange. - */ - public fun exchangePattern(exchangePattern: String) { - it.property("exchangePattern", exchangePattern) - } - - /** - * Should the endpoint create the node if it does not currently exist. - */ - public fun create(create: String) { - it.property("create", create) - } - - /** - * Should the endpoint create the node if it does not currently exist. - */ - public fun create(create: Boolean) { - it.property("create", create.toString()) - } - - /** - * The create mode that should be used for the newly created node - */ - public fun createMode(createMode: String) { - it.property("createMode", createMode) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: String) { - it.property("lazyStartProducer", lazyStartProducer) - } - - /** - * 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. - */ - public fun lazyStartProducer(lazyStartProducer: Boolean) { - it.property("lazyStartProducer", lazyStartProducer.toString()) - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/Asn1DataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/Asn1DataFormatDsl.kt deleted file mode 100644 index e0cc1a7e9ff17..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/Asn1DataFormatDsl.kt +++ /dev/null @@ -1,70 +0,0 @@ -/* - * 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.kotlin.dataformats - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.ASN1DataFormat - -/** - * Encode and decode data structures using Abstract Syntax Notation One (ASN.1). - */ -public fun DataFormatDsl.asn1(i: Asn1DataFormatDsl.() -> Unit) { - def = Asn1DataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class Asn1DataFormatDsl { - public val def: ASN1DataFormat - - init { - def = ASN1DataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Class to use when unmarshalling. - */ - public fun unmarshalType(unmarshalType: Class<*>) { - def.unmarshalType = unmarshalType - } - - /** - * If the asn1 file has more than one entry, the setting this option to true, allows working with - * the splitter EIP, to split the data using an iterator in a streaming mode. - */ - public fun usingIterator(usingIterator: Boolean) { - def.usingIterator = usingIterator.toString() - } - - /** - * If the asn1 file has more than one entry, the setting this option to true, allows working with - * the splitter EIP, to split the data using an iterator in a streaming mode. - */ - public fun usingIterator(usingIterator: String) { - def.usingIterator = usingIterator - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/AvroDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/AvroDataFormatDsl.kt deleted file mode 100644 index c7ae9b0024d0e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/AvroDataFormatDsl.kt +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.AvroDataFormat - -/** - * Serialize and deserialize messages using Apache Avro binary data format. - */ -public fun DataFormatDsl.avro(i: AvroDataFormatDsl.() -> Unit) { - def = AvroDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class AvroDataFormatDsl { - public val def: AvroDataFormat - - init { - def = AvroDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Class name to use for marshal and unmarshalling - */ - public fun instanceClassName(instanceClassName: String) { - def.instanceClassName = instanceClassName - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/AvroJacksonDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/AvroJacksonDataFormatDsl.kt deleted file mode 100644 index 302faede99721..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/AvroJacksonDataFormatDsl.kt +++ /dev/null @@ -1,244 +0,0 @@ -/* - * 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.kotlin.dataformats - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.AvroDataFormat - -/** - * Marshal POJOs to Avro and back using Jackson. - */ -public fun DataFormatDsl.avroJackson(i: AvroJacksonDataFormatDsl.() -> Unit) { - def = AvroJacksonDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class AvroJacksonDataFormatDsl { - public val def: AvroDataFormat - - init { - def = AvroDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Lookup and use the existing ObjectMapper with the given id when using Jackson. - */ - public fun objectMapper(objectMapper: String) { - def.objectMapper = objectMapper - } - - /** - * Whether to lookup and use default Jackson ObjectMapper from the registry. - */ - public fun useDefaultObjectMapper(useDefaultObjectMapper: Boolean) { - def.useDefaultObjectMapper = useDefaultObjectMapper.toString() - } - - /** - * Whether to lookup and use default Jackson ObjectMapper from the registry. - */ - public fun useDefaultObjectMapper(useDefaultObjectMapper: String) { - def.useDefaultObjectMapper = useDefaultObjectMapper - } - - /** - * Class name of the java type to use when unmarshalling - */ - public fun unmarshalType(unmarshalType: Class<*>) { - def.unmarshalType = unmarshalType - } - - /** - * When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. - * With Jackson you can use JSON views to accomplish this. This option is to refer to the class which - * has JsonView annotations - */ - public fun jsonView(jsonView: Class<*>) { - def.jsonView = jsonView - } - - /** - * If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you - * want to skip these null values, you can set this option to NON_NULL - */ - public fun include(include: String) { - def.include = include - } - - /** - * Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to - * use to unmarshal to. - */ - public fun allowJmsType(allowJmsType: Boolean) { - def.allowJmsType = allowJmsType.toString() - } - - /** - * Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to - * use to unmarshal to. - */ - public fun allowJmsType(allowJmsType: String) { - def.allowJmsType = allowJmsType - } - - /** - * Refers to a custom collection type to lookup in the registry to use. This option should rarely - * be used, but allows to use different collection types than java.util.Collection based as default. - */ - public fun collectionType(collectionType: Class<*>) { - def.collectionType = collectionType - } - - /** - * To unmarshal to a List of Map or a List of Pojo. - */ - public fun useList(useList: Boolean) { - def.useList = useList.toString() - } - - /** - * To unmarshal to a List of Map or a List of Pojo. - */ - public fun useList(useList: String) { - def.useList = useList - } - - /** - * To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with - * FQN class names. Multiple classes can be separated by comma. - */ - public fun moduleClassNames(moduleClassNames: String) { - def.moduleClassNames = moduleClassNames - } - - /** - * To use custom Jackson modules referred from the Camel registry. Multiple modules can be - * separated by comma. - */ - public fun moduleRefs(moduleRefs: String) { - def.moduleRefs = moduleRefs - } - - /** - * Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The - * features should be a name that matches a enum from - * com.fasterxml.jackson.databind.SerializationFeature, - * com.fasterxml.jackson.databind.DeserializationFeature, or - * com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma - */ - public fun enableFeatures(enableFeatures: String) { - def.enableFeatures = enableFeatures - } - - /** - * Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The - * features should be a name that matches a enum from - * com.fasterxml.jackson.databind.SerializationFeature, - * com.fasterxml.jackson.databind.DeserializationFeature, or - * com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma - */ - public fun disableFeatures(disableFeatures: String) { - def.disableFeatures = disableFeatures - } - - /** - * If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header - * during the unmarshalling. This should only be enabled when desired to be used. - */ - public fun allowUnmarshallType(allowUnmarshallType: Boolean) { - def.allowUnmarshallType = allowUnmarshallType.toString() - } - - /** - * If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header - * during the unmarshalling. This should only be enabled when desired to be used. - */ - public fun allowUnmarshallType(allowUnmarshallType: String) { - def.allowUnmarshallType = allowUnmarshallType - } - - /** - * If set then Jackson will use the Timezone when marshalling/unmarshalling. - */ - public fun timezone(timezone: String) { - def.timezone = timezone - } - - /** - * If set to true then Jackson will lookup for an objectMapper into the registry - */ - public fun autoDiscoverObjectMapper(autoDiscoverObjectMapper: Boolean) { - def.autoDiscoverObjectMapper = autoDiscoverObjectMapper.toString() - } - - /** - * If set to true then Jackson will lookup for an objectMapper into the registry - */ - public fun autoDiscoverObjectMapper(autoDiscoverObjectMapper: String) { - def.autoDiscoverObjectMapper = autoDiscoverObjectMapper - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: Boolean) { - def.contentTypeHeader = contentTypeHeader.toString() - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: String) { - def.contentTypeHeader = contentTypeHeader - } - - /** - * Optional schema resolver used to lookup schemas for the data in transit. - */ - public fun schemaResolver(schemaResolver: String) { - def.schemaResolver = schemaResolver - } - - /** - * When not disabled, the SchemaResolver will be looked up into the registry - */ - public fun autoDiscoverSchemaResolver(autoDiscoverSchemaResolver: Boolean) { - def.autoDiscoverSchemaResolver = autoDiscoverSchemaResolver.toString() - } - - /** - * When not disabled, the SchemaResolver will be looked up into the registry - */ - public fun autoDiscoverSchemaResolver(autoDiscoverSchemaResolver: String) { - def.autoDiscoverSchemaResolver = autoDiscoverSchemaResolver - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BarcodeDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BarcodeDataFormatDsl.kt deleted file mode 100644 index 9050ea4f74f3d..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BarcodeDataFormatDsl.kt +++ /dev/null @@ -1,88 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.BarcodeDataFormat - -/** - * Transform strings to various 1D/2D barcode bitmap formats and back. - */ -public fun DataFormatDsl.barcode(i: BarcodeDataFormatDsl.() -> Unit) { - def = BarcodeDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class BarcodeDataFormatDsl { - public val def: BarcodeDataFormat - - init { - def = BarcodeDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Barcode format such as QR-Code - */ - public fun barcodeFormat(barcodeFormat: String) { - def.barcodeFormat = barcodeFormat - } - - /** - * Image type of the barcode such as png - */ - public fun imageType(imageType: String) { - def.imageType = imageType - } - - /** - * Width of the barcode - */ - public fun width(width: Int) { - def.width = width.toString() - } - - /** - * Width of the barcode - */ - public fun width(width: String) { - def.width = width - } - - /** - * Height of the barcode - */ - public fun height(height: Int) { - def.height = height.toString() - } - - /** - * Height of the barcode - */ - public fun height(height: String) { - def.height = height - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/Base64DataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/Base64DataFormatDsl.kt deleted file mode 100644 index 48d2b834aadbd..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/Base64DataFormatDsl.kt +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.Base64DataFormat - -/** - * Encode and decode data using Base64. - */ -public fun DataFormatDsl.base64(i: Base64DataFormatDsl.() -> Unit) { - def = Base64DataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class Base64DataFormatDsl { - public val def: Base64DataFormat - - init { - def = Base64DataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * To specific a maximum line length for the encoded data. By default 76 is used. - */ - public fun lineLength(lineLength: Int) { - def.lineLength = lineLength.toString() - } - - /** - * To specific a maximum line length for the encoded data. By default 76 is used. - */ - public fun lineLength(lineLength: String) { - def.lineLength = lineLength - } - - /** - * The line separators to use. Uses new line characters (CRLF) by default. - */ - public fun lineSeparator(lineSeparator: String) { - def.lineSeparator = lineSeparator - } - - /** - * Instead of emitting '' and '/' we emit '-' and '_' respectively. urlSafe is only applied to - * encode operations. Decoding seamlessly handles both modes. Is by default false. - */ - public fun urlSafe(urlSafe: Boolean) { - def.urlSafe = urlSafe.toString() - } - - /** - * Instead of emitting '' and '/' we emit '-' and '_' respectively. urlSafe is only applied to - * encode operations. Decoding seamlessly handles both modes. Is by default false. - */ - public fun urlSafe(urlSafe: String) { - def.urlSafe = urlSafe - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BeanioDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BeanioDataFormatDsl.kt deleted file mode 100644 index 26875025ad732..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BeanioDataFormatDsl.kt +++ /dev/null @@ -1,139 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.BeanioDataFormat - -/** - * Marshal and unmarshal Java beans to and from flat files (such as CSV, delimited, or fixed length - * formats). - */ -public fun DataFormatDsl.beanio(i: BeanioDataFormatDsl.() -> Unit) { - def = BeanioDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class BeanioDataFormatDsl { - public val def: BeanioDataFormat - - init { - def = BeanioDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The BeanIO mapping file. Is by default loaded from the classpath. You can prefix with file:, - * http:, or classpath: to denote from where to load the mapping file. - */ - public fun mapping(mapping: String) { - def.mapping = mapping - } - - /** - * The name of the stream to use. - */ - public fun streamName(streamName: String) { - def.streamName = streamName - } - - /** - * Whether to ignore unidentified records. - */ - public fun ignoreUnidentifiedRecords(ignoreUnidentifiedRecords: Boolean) { - def.ignoreUnidentifiedRecords = ignoreUnidentifiedRecords.toString() - } - - /** - * Whether to ignore unidentified records. - */ - public fun ignoreUnidentifiedRecords(ignoreUnidentifiedRecords: String) { - def.ignoreUnidentifiedRecords = ignoreUnidentifiedRecords - } - - /** - * Whether to ignore unexpected records. - */ - public fun ignoreUnexpectedRecords(ignoreUnexpectedRecords: Boolean) { - def.ignoreUnexpectedRecords = ignoreUnexpectedRecords.toString() - } - - /** - * Whether to ignore unexpected records. - */ - public fun ignoreUnexpectedRecords(ignoreUnexpectedRecords: String) { - def.ignoreUnexpectedRecords = ignoreUnexpectedRecords - } - - /** - * Whether to ignore invalid records. - */ - public fun ignoreInvalidRecords(ignoreInvalidRecords: Boolean) { - def.ignoreInvalidRecords = ignoreInvalidRecords.toString() - } - - /** - * Whether to ignore invalid records. - */ - public fun ignoreInvalidRecords(ignoreInvalidRecords: String) { - def.ignoreInvalidRecords = ignoreInvalidRecords - } - - /** - * The charset to use. Is by default the JVM platform default charset. - */ - public fun encoding(encoding: String) { - def.encoding = encoding - } - - /** - * To use a custom org.apache.camel.dataformat.beanio.BeanIOErrorHandler as error handler while - * parsing. Configure the fully qualified class name of the error handler. Notice the options - * ignoreUnidentifiedRecords, ignoreUnexpectedRecords, and ignoreInvalidRecords may not be in use - * when you use a custom error handler. - */ - public fun beanReaderErrorHandlerType(beanReaderErrorHandlerType: String) { - def.beanReaderErrorHandlerType = beanReaderErrorHandlerType - } - - /** - * This options controls whether to unmarshal as a list of objects or as a single object only. The - * former is the default mode, and the latter is only intended in special use-cases where beanio maps - * the Camel message to a single POJO bean. - */ - public fun unmarshalSingleObject(unmarshalSingleObject: Boolean) { - def.unmarshalSingleObject = unmarshalSingleObject.toString() - } - - /** - * This options controls whether to unmarshal as a list of objects or as a single object only. The - * former is the default mode, and the latter is only intended in special use-cases where beanio maps - * the Camel message to a single POJO bean. - */ - public fun unmarshalSingleObject(unmarshalSingleObject: String) { - def.unmarshalSingleObject = unmarshalSingleObject - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BindyCsvDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BindyCsvDataFormatDsl.kt deleted file mode 100644 index d42f795fa651a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BindyCsvDataFormatDsl.kt +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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.kotlin.dataformats - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.BindyDataFormat -import org.apache.camel.model.dataformat.BindyType - -/** - * Marshal and unmarshal between POJOs and Comma separated values (CSV) format using Camel Bindy - */ -public fun DataFormatDsl.bindyCsv(i: BindyCsvDataFormatDsl.() -> Unit) { - def = BindyCsvDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class BindyCsvDataFormatDsl { - public val def: BindyDataFormat - - init { - def = BindyDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Whether to use Csv, Fixed, or KeyValue. - */ - public fun type(type: BindyType) { - def.type = type.toString() - } - - /** - * Whether to use Csv, Fixed, or KeyValue. - */ - public fun type(type: String) { - def.type = type - } - - /** - * Name of model class to use. - */ - public fun classType(classType: Class<*>) { - def.classType = classType - } - - /** - * Whether to allow empty streams in the unmarshal process. If true, no exception will be thrown - * when a body without records is provided. - */ - public fun allowEmptyStream(allowEmptyStream: Boolean) { - def.allowEmptyStream = allowEmptyStream.toString() - } - - /** - * Whether to allow empty streams in the unmarshal process. If true, no exception will be thrown - * when a body without records is provided. - */ - public fun allowEmptyStream(allowEmptyStream: String) { - def.allowEmptyStream = allowEmptyStream - } - - /** - * When unmarshalling should a single instance be unwrapped and returned instead of wrapped in a - * java.util.List. - */ - public fun unwrapSingleInstance(unwrapSingleInstance: Boolean) { - def.unwrapSingleInstance = unwrapSingleInstance.toString() - } - - /** - * When unmarshalling should a single instance be unwrapped and returned instead of wrapped in a - * java.util.List. - */ - public fun unwrapSingleInstance(unwrapSingleInstance: String) { - def.unwrapSingleInstance = unwrapSingleInstance - } - - /** - * To configure a default locale to use, such as us for united states. To use the JVM platform - * default locale then use the name default - */ - public fun locale(locale: String) { - def.locale = locale - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BindyFixedDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BindyFixedDataFormatDsl.kt deleted file mode 100644 index 2f14991360f57..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BindyFixedDataFormatDsl.kt +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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.kotlin.dataformats - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.BindyDataFormat -import org.apache.camel.model.dataformat.BindyType - -/** - * Marshal and unmarshal between POJOs and fixed field length format using Camel Bindy - */ -public fun DataFormatDsl.bindyFixed(i: BindyFixedDataFormatDsl.() -> Unit) { - def = BindyFixedDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class BindyFixedDataFormatDsl { - public val def: BindyDataFormat - - init { - def = BindyDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Whether to use Csv, Fixed, or KeyValue. - */ - public fun type(type: BindyType) { - def.type = type.toString() - } - - /** - * Whether to use Csv, Fixed, or KeyValue. - */ - public fun type(type: String) { - def.type = type - } - - /** - * Name of model class to use. - */ - public fun classType(classType: Class<*>) { - def.classType = classType - } - - /** - * Whether to allow empty streams in the unmarshal process. If true, no exception will be thrown - * when a body without records is provided. - */ - public fun allowEmptyStream(allowEmptyStream: Boolean) { - def.allowEmptyStream = allowEmptyStream.toString() - } - - /** - * Whether to allow empty streams in the unmarshal process. If true, no exception will be thrown - * when a body without records is provided. - */ - public fun allowEmptyStream(allowEmptyStream: String) { - def.allowEmptyStream = allowEmptyStream - } - - /** - * When unmarshalling should a single instance be unwrapped and returned instead of wrapped in a - * java.util.List. - */ - public fun unwrapSingleInstance(unwrapSingleInstance: Boolean) { - def.unwrapSingleInstance = unwrapSingleInstance.toString() - } - - /** - * When unmarshalling should a single instance be unwrapped and returned instead of wrapped in a - * java.util.List. - */ - public fun unwrapSingleInstance(unwrapSingleInstance: String) { - def.unwrapSingleInstance = unwrapSingleInstance - } - - /** - * To configure a default locale to use, such as us for united states. To use the JVM platform - * default locale then use the name default - */ - public fun locale(locale: String) { - def.locale = locale - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BindyKvpDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BindyKvpDataFormatDsl.kt deleted file mode 100644 index 92a3fd818e09f..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/BindyKvpDataFormatDsl.kt +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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.kotlin.dataformats - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.BindyDataFormat -import org.apache.camel.model.dataformat.BindyType - -/** - * Marshal and unmarshal between POJOs and key-value pair (KVP) format using Camel Bindy - */ -public fun DataFormatDsl.bindyKvp(i: BindyKvpDataFormatDsl.() -> Unit) { - def = BindyKvpDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class BindyKvpDataFormatDsl { - public val def: BindyDataFormat - - init { - def = BindyDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Whether to use Csv, Fixed, or KeyValue. - */ - public fun type(type: BindyType) { - def.type = type.toString() - } - - /** - * Whether to use Csv, Fixed, or KeyValue. - */ - public fun type(type: String) { - def.type = type - } - - /** - * Name of model class to use. - */ - public fun classType(classType: Class<*>) { - def.classType = classType - } - - /** - * Whether to allow empty streams in the unmarshal process. If true, no exception will be thrown - * when a body without records is provided. - */ - public fun allowEmptyStream(allowEmptyStream: Boolean) { - def.allowEmptyStream = allowEmptyStream.toString() - } - - /** - * Whether to allow empty streams in the unmarshal process. If true, no exception will be thrown - * when a body without records is provided. - */ - public fun allowEmptyStream(allowEmptyStream: String) { - def.allowEmptyStream = allowEmptyStream - } - - /** - * When unmarshalling should a single instance be unwrapped and returned instead of wrapped in a - * java.util.List. - */ - public fun unwrapSingleInstance(unwrapSingleInstance: Boolean) { - def.unwrapSingleInstance = unwrapSingleInstance.toString() - } - - /** - * When unmarshalling should a single instance be unwrapped and returned instead of wrapped in a - * java.util.List. - */ - public fun unwrapSingleInstance(unwrapSingleInstance: String) { - def.unwrapSingleInstance = unwrapSingleInstance - } - - /** - * To configure a default locale to use, such as us for united states. To use the JVM platform - * default locale then use the name default - */ - public fun locale(locale: String) { - def.locale = locale - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/CborDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/CborDataFormatDsl.kt deleted file mode 100644 index 38367770e92ab..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/CborDataFormatDsl.kt +++ /dev/null @@ -1,165 +0,0 @@ -/* - * 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.kotlin.dataformats - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.CBORDataFormat - -/** - * Unmarshal a CBOR payload to POJO and back. - */ -public fun DataFormatDsl.cbor(i: CborDataFormatDsl.() -> Unit) { - def = CborDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class CborDataFormatDsl { - public val def: CBORDataFormat - - init { - def = CBORDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Lookup and use the existing CBOR ObjectMapper with the given id when using Jackson. - */ - public fun objectMapper(objectMapper: String) { - def.objectMapper = objectMapper - } - - /** - * Whether to lookup and use default Jackson CBOR ObjectMapper from the registry. - */ - public fun useDefaultObjectMapper(useDefaultObjectMapper: Boolean) { - def.useDefaultObjectMapper = useDefaultObjectMapper.toString() - } - - /** - * Whether to lookup and use default Jackson CBOR ObjectMapper from the registry. - */ - public fun useDefaultObjectMapper(useDefaultObjectMapper: String) { - def.useDefaultObjectMapper = useDefaultObjectMapper - } - - /** - * Class name of the java type to use when unmarshalling - */ - public fun unmarshalType(unmarshalType: Class<*>) { - def.unmarshalType = unmarshalType - } - - /** - * Refers to a custom collection type to lookup in the registry to use. This option should rarely - * be used, but allows to use different collection types than java.util.Collection based as default. - */ - public fun collectionType(collectionType: Class<*>) { - def.collectionType = collectionType - } - - /** - * To unmarshal to a List of Map or a List of Pojo. - */ - public fun useList(useList: Boolean) { - def.useList = useList.toString() - } - - /** - * To unmarshal to a List of Map or a List of Pojo. - */ - public fun useList(useList: String) { - def.useList = useList - } - - /** - * If enabled then Jackson CBOR is allowed to attempt to use the CamelCBORUnmarshalType header - * during the unmarshalling. This should only be enabled when desired to be used. - */ - public fun allowUnmarshallType(allowUnmarshallType: Boolean) { - def.allowUnmarshallType = allowUnmarshallType.toString() - } - - /** - * If enabled then Jackson CBOR is allowed to attempt to use the CamelCBORUnmarshalType header - * during the unmarshalling. This should only be enabled when desired to be used. - */ - public fun allowUnmarshallType(allowUnmarshallType: String) { - def.allowUnmarshallType = allowUnmarshallType - } - - /** - * To enable pretty printing output nicely formatted. Is by default false. - */ - public fun prettyPrint(prettyPrint: Boolean) { - def.prettyPrint = prettyPrint.toString() - } - - /** - * To enable pretty printing output nicely formatted. Is by default false. - */ - public fun prettyPrint(prettyPrint: String) { - def.prettyPrint = prettyPrint - } - - /** - * Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to - * use to unmarshal to. - */ - public fun allowJmsType(allowJmsType: Boolean) { - def.allowJmsType = allowJmsType.toString() - } - - /** - * Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to - * use to unmarshal to. - */ - public fun allowJmsType(allowJmsType: String) { - def.allowJmsType = allowJmsType - } - - /** - * Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The - * features should be a name that matches a enum from - * com.fasterxml.jackson.databind.SerializationFeature, - * com.fasterxml.jackson.databind.DeserializationFeature, or - * com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma - */ - public fun enableFeatures(enableFeatures: String) { - def.enableFeatures = enableFeatures - } - - /** - * Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The - * features should be a name that matches a enum from - * com.fasterxml.jackson.databind.SerializationFeature, - * com.fasterxml.jackson.databind.DeserializationFeature, or - * com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma - */ - public fun disableFeatures(disableFeatures: String) { - def.disableFeatures = disableFeatures - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/CryptoDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/CryptoDataFormatDsl.kt deleted file mode 100644 index c3f87cebb2192..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/CryptoDataFormatDsl.kt +++ /dev/null @@ -1,137 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.CryptoDataFormat - -/** - * Encrypt and decrypt messages using Java Cryptography Extension (JCE). - */ -public fun DataFormatDsl.crypto(i: CryptoDataFormatDsl.() -> Unit) { - def = CryptoDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class CryptoDataFormatDsl { - public val def: CryptoDataFormat - - init { - def = CryptoDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The JCE algorithm name indicating the cryptographic algorithm that will be used. - */ - public fun algorithm(algorithm: String) { - def.algorithm = algorithm - } - - /** - * Refers to the secret key to lookup from the register to use. - */ - public fun keyRef(keyRef: String) { - def.keyRef = keyRef - } - - /** - * The name of the JCE Security Provider that should be used. - */ - public fun cryptoProvider(cryptoProvider: String) { - def.cryptoProvider = cryptoProvider - } - - /** - * Refers to a byte array containing the Initialization Vector that will be used to initialize the - * Cipher. - */ - public fun initVectorRef(initVectorRef: String) { - def.initVectorRef = initVectorRef - } - - /** - * A JCE AlgorithmParameterSpec used to initialize the Cipher. Will lookup the type using the - * given name as a java.security.spec.AlgorithmParameterSpec type. - */ - public fun algorithmParameterRef(algorithmParameterRef: String) { - def.algorithmParameterRef = algorithmParameterRef - } - - /** - * The size of the buffer used in the signature process. - */ - public fun bufferSize(bufferSize: Int) { - def.bufferSize = bufferSize.toString() - } - - /** - * The size of the buffer used in the signature process. - */ - public fun bufferSize(bufferSize: String) { - def.bufferSize = bufferSize - } - - /** - * The JCE algorithm name indicating the Message Authentication algorithm. - */ - public fun macAlgorithm(macAlgorithm: String) { - def.macAlgorithm = macAlgorithm - } - - /** - * Flag indicating that a Message Authentication Code should be calculated and appended to the - * encrypted data. - */ - public fun shouldAppendHMAC(shouldAppendHMAC: Boolean) { - def.shouldAppendHMAC = shouldAppendHMAC.toString() - } - - /** - * Flag indicating that a Message Authentication Code should be calculated and appended to the - * encrypted data. - */ - public fun shouldAppendHMAC(shouldAppendHMAC: String) { - def.shouldAppendHMAC = shouldAppendHMAC - } - - /** - * Flag indicating that the configured IV should be inlined into the encrypted data stream. Is by - * default false. - */ - public fun `inline`(`inline`: Boolean) { - def.inline = inline.toString() - } - - /** - * Flag indicating that the configured IV should be inlined into the encrypted data stream. Is by - * default false. - */ - public fun `inline`(`inline`: String) { - def.inline = inline - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/CsvDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/CsvDataFormatDsl.kt deleted file mode 100644 index 2a6508f3828a8..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/CsvDataFormatDsl.kt +++ /dev/null @@ -1,370 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import kotlin.collections.MutableList -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.CsvDataFormat - -/** - * Handle CSV (Comma Separated Values) payloads. - */ -public fun DataFormatDsl.csv(i: CsvDataFormatDsl.() -> Unit) { - def = CsvDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class CsvDataFormatDsl { - public val def: CsvDataFormat - - init { - def = CsvDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The reference format to use, it will be updated with the other format options, the default - * value is CSVFormat.DEFAULT - */ - public fun formatRef(formatRef: String) { - def.formatRef = formatRef - } - - /** - * The name of the format to use, the default value is CSVFormat.DEFAULT - */ - public fun formatName(formatName: String) { - def.formatName = formatName - } - - /** - * Disables the comment marker of the reference format. - */ - public fun commentMarkerDisabled(commentMarkerDisabled: Boolean) { - def.commentMarkerDisabled = commentMarkerDisabled.toString() - } - - /** - * Disables the comment marker of the reference format. - */ - public fun commentMarkerDisabled(commentMarkerDisabled: String) { - def.commentMarkerDisabled = commentMarkerDisabled - } - - /** - * Sets the comment marker of the reference format. - */ - public fun commentMarker(commentMarker: String) { - def.commentMarker = commentMarker - } - - /** - * Sets the delimiter to use. The default value is , (comma) - */ - public fun delimiter(delimiter: String) { - def.delimiter = delimiter - } - - /** - * Use for disabling using escape character - */ - public fun escapeDisabled(escapeDisabled: Boolean) { - def.escapeDisabled = escapeDisabled.toString() - } - - /** - * Use for disabling using escape character - */ - public fun escapeDisabled(escapeDisabled: String) { - def.escapeDisabled = escapeDisabled - } - - /** - * Sets the escape character to use - */ - public fun escape(escape: String) { - def.escape = escape - } - - /** - * Use for disabling headers - */ - public fun headerDisabled(headerDisabled: Boolean) { - def.headerDisabled = headerDisabled.toString() - } - - /** - * Use for disabling headers - */ - public fun headerDisabled(headerDisabled: String) { - def.headerDisabled = headerDisabled - } - - /** - * To configure the CSV headers - */ - public fun `header`(`header`: MutableList) { - def.header = header - } - - /** - * Whether to allow missing column names. - */ - public fun allowMissingColumnNames(allowMissingColumnNames: Boolean) { - def.allowMissingColumnNames = allowMissingColumnNames.toString() - } - - /** - * Whether to allow missing column names. - */ - public fun allowMissingColumnNames(allowMissingColumnNames: String) { - def.allowMissingColumnNames = allowMissingColumnNames - } - - /** - * Whether to ignore empty lines. - */ - public fun ignoreEmptyLines(ignoreEmptyLines: Boolean) { - def.ignoreEmptyLines = ignoreEmptyLines.toString() - } - - /** - * Whether to ignore empty lines. - */ - public fun ignoreEmptyLines(ignoreEmptyLines: String) { - def.ignoreEmptyLines = ignoreEmptyLines - } - - /** - * Whether to ignore surrounding spaces - */ - public fun ignoreSurroundingSpaces(ignoreSurroundingSpaces: Boolean) { - def.ignoreSurroundingSpaces = ignoreSurroundingSpaces.toString() - } - - /** - * Whether to ignore surrounding spaces - */ - public fun ignoreSurroundingSpaces(ignoreSurroundingSpaces: String) { - def.ignoreSurroundingSpaces = ignoreSurroundingSpaces - } - - /** - * Used to disable null strings - */ - public fun nullStringDisabled(nullStringDisabled: Boolean) { - def.nullStringDisabled = nullStringDisabled.toString() - } - - /** - * Used to disable null strings - */ - public fun nullStringDisabled(nullStringDisabled: String) { - def.nullStringDisabled = nullStringDisabled - } - - /** - * Sets the null string - */ - public fun nullString(nullString: String) { - def.nullString = nullString - } - - /** - * Used to disable quotes - */ - public fun quoteDisabled(quoteDisabled: Boolean) { - def.quoteDisabled = quoteDisabled.toString() - } - - /** - * Used to disable quotes - */ - public fun quoteDisabled(quoteDisabled: String) { - def.quoteDisabled = quoteDisabled - } - - /** - * Sets the quote to use which by default is double-quote character - */ - public fun quote(quote: String) { - def.quote = quote - } - - /** - * Used for disabling record separator - */ - public fun recordSeparatorDisabled(recordSeparatorDisabled: String) { - def.recordSeparatorDisabled = recordSeparatorDisabled - } - - /** - * Sets the record separator (aka new line) which by default is new line characters (CRLF) - */ - public fun recordSeparator(recordSeparator: String) { - def.recordSeparator = recordSeparator - } - - /** - * Whether to skip the header record in the output - */ - public fun skipHeaderRecord(skipHeaderRecord: Boolean) { - def.skipHeaderRecord = skipHeaderRecord.toString() - } - - /** - * Whether to skip the header record in the output - */ - public fun skipHeaderRecord(skipHeaderRecord: String) { - def.skipHeaderRecord = skipHeaderRecord - } - - /** - * Sets the quote mode - */ - public fun quoteMode(quoteMode: String) { - def.quoteMode = quoteMode - } - - /** - * Sets whether or not to ignore case when accessing header names. - */ - public fun ignoreHeaderCase(ignoreHeaderCase: Boolean) { - def.ignoreHeaderCase = ignoreHeaderCase.toString() - } - - /** - * Sets whether or not to ignore case when accessing header names. - */ - public fun ignoreHeaderCase(ignoreHeaderCase: String) { - def.ignoreHeaderCase = ignoreHeaderCase - } - - /** - * Sets whether or not to trim leading and trailing blanks. - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Sets whether or not to trim leading and trailing blanks. - */ - public fun trim(trim: String) { - def.trim = trim - } - - /** - * Sets whether or not to add a trailing delimiter. - */ - public fun trailingDelimiter(trailingDelimiter: Boolean) { - def.trailingDelimiter = trailingDelimiter.toString() - } - - /** - * Sets whether or not to add a trailing delimiter. - */ - public fun trailingDelimiter(trailingDelimiter: String) { - def.trailingDelimiter = trailingDelimiter - } - - /** - * Sets the implementation of the CsvMarshallerFactory interface which is able to customize - * marshalling/unmarshalling behavior by extending CsvMarshaller or creating it from scratch. - */ - public fun marshallerFactoryRef(marshallerFactoryRef: String) { - def.marshallerFactoryRef = marshallerFactoryRef - } - - /** - * Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all - * the lines must be read at one. - */ - public fun lazyLoad(lazyLoad: Boolean) { - def.lazyLoad = lazyLoad.toString() - } - - /** - * Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all - * the lines must be read at one. - */ - public fun lazyLoad(lazyLoad: String) { - def.lazyLoad = lazyLoad - } - - /** - * Whether the unmarshalling should produce maps (HashMap)for the lines values instead of lists. - * It requires to have header (either defined or collected). - */ - public fun useMaps(useMaps: Boolean) { - def.useMaps = useMaps.toString() - } - - /** - * Whether the unmarshalling should produce maps (HashMap)for the lines values instead of lists. - * It requires to have header (either defined or collected). - */ - public fun useMaps(useMaps: String) { - def.useMaps = useMaps - } - - /** - * Whether the unmarshalling should produce ordered maps (LinkedHashMap) for the lines values - * instead of lists. It requires to have header (either defined or collected). - */ - public fun useOrderedMaps(useOrderedMaps: Boolean) { - def.useOrderedMaps = useOrderedMaps.toString() - } - - /** - * Whether the unmarshalling should produce ordered maps (LinkedHashMap) for the lines values - * instead of lists. It requires to have header (either defined or collected). - */ - public fun useOrderedMaps(useOrderedMaps: String) { - def.useOrderedMaps = useOrderedMaps - } - - /** - * Refers to a custom CsvRecordConverter to lookup from the registry to use. - */ - public fun recordConverterRef(recordConverterRef: String) { - def.recordConverterRef = recordConverterRef - } - - /** - * Whether the unmarshalling should capture the header record and store it in the message header - */ - public fun captureHeaderRecord(captureHeaderRecord: Boolean) { - def.captureHeaderRecord = captureHeaderRecord.toString() - } - - /** - * Whether the unmarshalling should capture the header record and store it in the message header - */ - public fun captureHeaderRecord(captureHeaderRecord: String) { - def.captureHeaderRecord = captureHeaderRecord - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FastjsonDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FastjsonDataFormatDsl.kt deleted file mode 100644 index 3139cca8b5305..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FastjsonDataFormatDsl.kt +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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.kotlin.dataformats - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.JsonDataFormat - -/** - * Marshal POJOs to JSON and back using Fastjson - */ -public fun DataFormatDsl.fastjson(i: FastjsonDataFormatDsl.() -> Unit) { - def = FastjsonDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class FastjsonDataFormatDsl { - public val def: JsonDataFormat - - init { - def = JsonDataFormat()} - - /** - * Class name of the java type to use when unmarshalling - */ - public fun unmarshalType(unmarshalType: Class<*>) { - def.unmarshalType = unmarshalType - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: Boolean) { - def.contentTypeHeader = contentTypeHeader.toString() - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: String) { - def.contentTypeHeader = contentTypeHeader - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FhirJsonDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FhirJsonDataFormatDsl.kt deleted file mode 100644 index 790d942d1e34e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FhirJsonDataFormatDsl.kt +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.FhirJsonDataFormat - -/** - * Marshall and unmarshall FHIR objects to/from JSON. - */ -public fun DataFormatDsl.fhirJson(i: FhirJsonDataFormatDsl.() -> Unit) { - def = FhirJsonDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class FhirJsonDataFormatDsl { - public val def: FhirJsonDataFormat - - init { - def = FhirJsonDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The version of FHIR to use. Possible values are: DSTU2,DSTU2_HL7ORG,DSTU2_1,DSTU3,R4,R5 - */ - public fun fhirVersion(fhirVersion: String) { - def.fhirVersion = fhirVersion - } - - /** - * To use a custom fhir context. Reference to object of type ca.uhn.fhir.context.FhirContext - */ - public fun fhirContext(fhirContext: String) { - def.fhirContext = fhirContext - } - - /** - * Sets the pretty print flag, meaning that the parser will encode resources with human-readable - * spacing and newlines between elements instead of condensing output as much as possible. - */ - public fun prettyPrint(prettyPrint: Boolean) { - def.prettyPrint = prettyPrint.toString() - } - - /** - * Sets the pretty print flag, meaning that the parser will encode resources with human-readable - * spacing and newlines between elements instead of condensing output as much as possible. - */ - public fun prettyPrint(prettyPrint: String) { - def.prettyPrint = prettyPrint - } - - /** - * Registers an error handler which will be invoked when any parse errors are found. Reference to - * object of type ca.uhn.fhir.parser.IParserErrorHandler - */ - public fun parserErrorHandler(parserErrorHandler: String) { - def.parserErrorHandler = parserErrorHandler - } - - /** - * Sets the parser options object which will be used to supply default options to newly created - * parsers. Reference to object of type ca.uhn.fhir.context.ParserOptions. - */ - public fun parserOptions(parserOptions: String) { - def.parserOptions = parserOptions - } - - /** - * If set (FQN class names), when parsing resources the parser will try to use the given types - * when possible, in the order that they are provided (from highest to lowest priority). For example, - * if a custom type which declares to implement the Patient resource is passed in here, and the - * parser is parsing a Bundle containing a Patient resource, the parser will use the given custom - * type. Multiple class names can be separated by comma. - */ - public fun preferTypes(preferTypes: String) { - def.preferTypes = preferTypes - } - - /** - * When encoding, force this resource ID to be encoded as the resource ID. Reference to object of - * type org.hl7.fhir.instance.model.api.IIdType - */ - public fun forceResourceId(forceResourceId: String) { - def.forceResourceId = forceResourceId - } - - /** - * Sets the server's base URL used by this parser. If a value is set, resource references will be - * turned into relative references if they are provided as absolute URLs but have a base matching the - * given base. - */ - public fun serverBaseUrl(serverBaseUrl: String) { - def.serverBaseUrl = serverBaseUrl - } - - /** - * If set to true (default is false) the ID of any resources being encoded will not be included in - * the output. Note that this does not apply to contained resources, only to root resources. In other - * words, if this is set to true, contained resources will still have local IDs but the - * outer/containing ID will not have an ID. - */ - public fun omitResourceId(omitResourceId: Boolean) { - def.omitResourceId = omitResourceId.toString() - } - - /** - * If set to true (default is false) the ID of any resources being encoded will not be included in - * the output. Note that this does not apply to contained resources, only to root resources. In other - * words, if this is set to true, contained resources will still have local IDs but the - * outer/containing ID will not have an ID. - */ - public fun omitResourceId(omitResourceId: String) { - def.omitResourceId = omitResourceId - } - - /** - * If set to true (default is false), the values supplied to setEncodeElements(Set) will not be - * applied to the root resource (typically a Bundle), but will be applied to any sub-resources - * contained within it (i.e. search result resources in that bundle) - */ - public - fun encodeElementsAppliesToChildResourcesOnly(encodeElementsAppliesToChildResourcesOnly: Boolean) { - def.encodeElementsAppliesToChildResourcesOnly = - encodeElementsAppliesToChildResourcesOnly.toString() - } - - /** - * If set to true (default is false), the values supplied to setEncodeElements(Set) will not be - * applied to the root resource (typically a Bundle), but will be applied to any sub-resources - * contained within it (i.e. search result resources in that bundle) - */ - public - fun encodeElementsAppliesToChildResourcesOnly(encodeElementsAppliesToChildResourcesOnly: String) { - def.encodeElementsAppliesToChildResourcesOnly = encodeElementsAppliesToChildResourcesOnly - } - - /** - * If provided, specifies the elements which should be encoded, to the exclusion of all others. - * Multiple elements can be separated by comma when using String parameter. Valid values for this - * field would include: Patient - Encode patient and all its children Patient.name - Encode only the - * patient's name Patient.name.family - Encode only the patient's family name .text - Encode the text - * element on any resource (only the very first position may contain a wildcard) .(mandatory) - This - * is a special case which causes any mandatory fields (min 0) to be encoded - */ - public fun encodeElements(encodeElements: String) { - def.encodeElements = encodeElements - } - - /** - * If provided, specifies the elements which should NOT be encoded. Multiple elements can be - * separated by comma when using String parameter. Valid values for this field would include: - * Patient - Don't encode patient and all its children Patient.name - Don't encode the patient's name - * Patient.name.family - Don't encode the patient's family name .text - Don't encode the text element - * on any resource (only the very first position may contain a wildcard) DSTU2 note: Note that values - * including meta, such as Patient.meta will work for DSTU2 parsers, but values with subelements on - * meta such as Patient.meta.lastUpdated will only work in DSTU3 mode. - */ - public fun dontEncodeElements(dontEncodeElements: String) { - def.dontEncodeElements = dontEncodeElements - } - - /** - * If set to true (which is the default), resource references containing a version will have the - * version removed when the resource is encoded. This is generally good behaviour because in most - * situations, references from one resource to another should be to the resource by ID, not by ID and - * version. In some cases though, it may be desirable to preserve the version in resource links. In - * that case, this value should be set to false. This method provides the ability to globally disable - * reference encoding. If finer-grained control is needed, use - * setDontStripVersionsFromReferencesAtPaths(List) - */ - public fun stripVersionsFromReferences(stripVersionsFromReferences: Boolean) { - def.stripVersionsFromReferences = stripVersionsFromReferences.toString() - } - - /** - * If set to true (which is the default), resource references containing a version will have the - * version removed when the resource is encoded. This is generally good behaviour because in most - * situations, references from one resource to another should be to the resource by ID, not by ID and - * version. In some cases though, it may be desirable to preserve the version in resource links. In - * that case, this value should be set to false. This method provides the ability to globally disable - * reference encoding. If finer-grained control is needed, use - * setDontStripVersionsFromReferencesAtPaths(List) - */ - public fun stripVersionsFromReferences(stripVersionsFromReferences: String) { - def.stripVersionsFromReferences = stripVersionsFromReferences - } - - /** - * If set to true (which is the default), the Bundle.entry.fullUrl will override the - * Bundle.entry.resource's resource id if the fullUrl is defined. This behavior happens when parsing - * the source data into a Bundle object. Set this to false if this is not the desired behavior (e.g. - * the client code wishes to perform additional validation checks between the fullUrl and the - * resource id). - */ - public - fun overrideResourceIdWithBundleEntryFullUrl(overrideResourceIdWithBundleEntryFullUrl: Boolean) { - def.overrideResourceIdWithBundleEntryFullUrl = - overrideResourceIdWithBundleEntryFullUrl.toString() - } - - /** - * If set to true (which is the default), the Bundle.entry.fullUrl will override the - * Bundle.entry.resource's resource id if the fullUrl is defined. This behavior happens when parsing - * the source data into a Bundle object. Set this to false if this is not the desired behavior (e.g. - * the client code wishes to perform additional validation checks between the fullUrl and the - * resource id). - */ - public - fun overrideResourceIdWithBundleEntryFullUrl(overrideResourceIdWithBundleEntryFullUrl: String) { - def.overrideResourceIdWithBundleEntryFullUrl = overrideResourceIdWithBundleEntryFullUrl - } - - /** - * If set to true (default is false) only elements marked by the FHIR specification as being - * summary elements will be included. - */ - public fun summaryMode(summaryMode: Boolean) { - def.summaryMode = summaryMode.toString() - } - - /** - * If set to true (default is false) only elements marked by the FHIR specification as being - * summary elements will be included. - */ - public fun summaryMode(summaryMode: String) { - def.summaryMode = summaryMode - } - - /** - * If set to true (default is false), narratives will not be included in the encoded values. - */ - public fun suppressNarratives(suppressNarratives: Boolean) { - def.suppressNarratives = suppressNarratives.toString() - } - - /** - * If set to true (default is false), narratives will not be included in the encoded values. - */ - public fun suppressNarratives(suppressNarratives: String) { - def.suppressNarratives = suppressNarratives - } - - /** - * If supplied value(s), any resource references at the specified paths will have their resource - * versions encoded instead of being automatically stripped during the encoding process. This setting - * has no effect on the parsing process. Multiple elements can be separated by comma when using - * String parameter. This method provides a finer-grained level of control than - * setStripVersionsFromReferences(String) and any paths specified by this method will be encoded even - * if setStripVersionsFromReferences(String) has been set to true (which is the default) - */ - public - fun dontStripVersionsFromReferencesAtPaths(dontStripVersionsFromReferencesAtPaths: String) { - def.dontStripVersionsFromReferencesAtPaths = dontStripVersionsFromReferencesAtPaths - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: Boolean) { - def.contentTypeHeader = contentTypeHeader.toString() - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: String) { - def.contentTypeHeader = contentTypeHeader - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FhirXmlDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FhirXmlDataFormatDsl.kt deleted file mode 100644 index 3603dd5345e7f..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FhirXmlDataFormatDsl.kt +++ /dev/null @@ -1,298 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.FhirXmlDataFormat - -/** - * Marshall and unmarshall FHIR objects to/from XML. - */ -public fun DataFormatDsl.fhirXml(i: FhirXmlDataFormatDsl.() -> Unit) { - def = FhirXmlDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class FhirXmlDataFormatDsl { - public val def: FhirXmlDataFormat - - init { - def = FhirXmlDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The version of FHIR to use. Possible values are: DSTU2,DSTU2_HL7ORG,DSTU2_1,DSTU3,R4,R5 - */ - public fun fhirVersion(fhirVersion: String) { - def.fhirVersion = fhirVersion - } - - /** - * To use a custom fhir context. Reference to object of type ca.uhn.fhir.context.FhirContext - */ - public fun fhirContext(fhirContext: String) { - def.fhirContext = fhirContext - } - - /** - * Sets the pretty print flag, meaning that the parser will encode resources with human-readable - * spacing and newlines between elements instead of condensing output as much as possible. - */ - public fun prettyPrint(prettyPrint: Boolean) { - def.prettyPrint = prettyPrint.toString() - } - - /** - * Sets the pretty print flag, meaning that the parser will encode resources with human-readable - * spacing and newlines between elements instead of condensing output as much as possible. - */ - public fun prettyPrint(prettyPrint: String) { - def.prettyPrint = prettyPrint - } - - /** - * Registers an error handler which will be invoked when any parse errors are found. Reference to - * object of type ca.uhn.fhir.parser.IParserErrorHandler - */ - public fun parserErrorHandler(parserErrorHandler: String) { - def.parserErrorHandler = parserErrorHandler - } - - /** - * Sets the parser options object which will be used to supply default options to newly created - * parsers. Reference to object of type ca.uhn.fhir.context.ParserOptions. - */ - public fun parserOptions(parserOptions: String) { - def.parserOptions = parserOptions - } - - /** - * If set (FQN class names), when parsing resources the parser will try to use the given types - * when possible, in the order that they are provided (from highest to lowest priority). For example, - * if a custom type which declares to implement the Patient resource is passed in here, and the - * parser is parsing a Bundle containing a Patient resource, the parser will use the given custom - * type. Multiple class names can be separated by comma. - */ - public fun preferTypes(preferTypes: String) { - def.preferTypes = preferTypes - } - - /** - * When encoding, force this resource ID to be encoded as the resource ID. Reference to object of - * type org.hl7.fhir.instance.model.api.IIdType - */ - public fun forceResourceId(forceResourceId: String) { - def.forceResourceId = forceResourceId - } - - /** - * Sets the server's base URL used by this parser. If a value is set, resource references will be - * turned into relative references if they are provided as absolute URLs but have a base matching the - * given base. - */ - public fun serverBaseUrl(serverBaseUrl: String) { - def.serverBaseUrl = serverBaseUrl - } - - /** - * If set to true (default is false) the ID of any resources being encoded will not be included in - * the output. Note that this does not apply to contained resources, only to root resources. In other - * words, if this is set to true, contained resources will still have local IDs but the - * outer/containing ID will not have an ID. - */ - public fun omitResourceId(omitResourceId: Boolean) { - def.omitResourceId = omitResourceId.toString() - } - - /** - * If set to true (default is false) the ID of any resources being encoded will not be included in - * the output. Note that this does not apply to contained resources, only to root resources. In other - * words, if this is set to true, contained resources will still have local IDs but the - * outer/containing ID will not have an ID. - */ - public fun omitResourceId(omitResourceId: String) { - def.omitResourceId = omitResourceId - } - - /** - * If set to true (default is false), the values supplied to setEncodeElements(Set) will not be - * applied to the root resource (typically a Bundle), but will be applied to any sub-resources - * contained within it (i.e. search result resources in that bundle) - */ - public - fun encodeElementsAppliesToChildResourcesOnly(encodeElementsAppliesToChildResourcesOnly: Boolean) { - def.encodeElementsAppliesToChildResourcesOnly = - encodeElementsAppliesToChildResourcesOnly.toString() - } - - /** - * If set to true (default is false), the values supplied to setEncodeElements(Set) will not be - * applied to the root resource (typically a Bundle), but will be applied to any sub-resources - * contained within it (i.e. search result resources in that bundle) - */ - public - fun encodeElementsAppliesToChildResourcesOnly(encodeElementsAppliesToChildResourcesOnly: String) { - def.encodeElementsAppliesToChildResourcesOnly = encodeElementsAppliesToChildResourcesOnly - } - - /** - * If provided, specifies the elements which should be encoded, to the exclusion of all others. - * Multiple elements can be separated by comma when using String parameter. Valid values for this - * field would include: Patient - Encode patient and all its children Patient.name - Encode only the - * patient's name Patient.name.family - Encode only the patient's family name .text - Encode the text - * element on any resource (only the very first position may contain a wildcard) .(mandatory) - This - * is a special case which causes any mandatory fields (min 0) to be encoded - */ - public fun encodeElements(encodeElements: String) { - def.encodeElements = encodeElements - } - - /** - * If provided, specifies the elements which should NOT be encoded. Multiple elements can be - * separated by comma when using String parameter. Valid values for this field would include: - * Patient - Don't encode patient and all its children Patient.name - Don't encode the patient's name - * Patient.name.family - Don't encode the patient's family name .text - Don't encode the text element - * on any resource (only the very first position may contain a wildcard) DSTU2 note: Note that values - * including meta, such as Patient.meta will work for DSTU2 parsers, but values with subelements on - * meta such as Patient.meta.lastUpdated will only work in DSTU3 mode. - */ - public fun dontEncodeElements(dontEncodeElements: String) { - def.dontEncodeElements = dontEncodeElements - } - - /** - * If set to true (which is the default), resource references containing a version will have the - * version removed when the resource is encoded. This is generally good behaviour because in most - * situations, references from one resource to another should be to the resource by ID, not by ID and - * version. In some cases though, it may be desirable to preserve the version in resource links. In - * that case, this value should be set to false. This method provides the ability to globally disable - * reference encoding. If finer-grained control is needed, use - * setDontStripVersionsFromReferencesAtPaths(List) - */ - public fun stripVersionsFromReferences(stripVersionsFromReferences: Boolean) { - def.stripVersionsFromReferences = stripVersionsFromReferences.toString() - } - - /** - * If set to true (which is the default), resource references containing a version will have the - * version removed when the resource is encoded. This is generally good behaviour because in most - * situations, references from one resource to another should be to the resource by ID, not by ID and - * version. In some cases though, it may be desirable to preserve the version in resource links. In - * that case, this value should be set to false. This method provides the ability to globally disable - * reference encoding. If finer-grained control is needed, use - * setDontStripVersionsFromReferencesAtPaths(List) - */ - public fun stripVersionsFromReferences(stripVersionsFromReferences: String) { - def.stripVersionsFromReferences = stripVersionsFromReferences - } - - /** - * If set to true (which is the default), the Bundle.entry.fullUrl will override the - * Bundle.entry.resource's resource id if the fullUrl is defined. This behavior happens when parsing - * the source data into a Bundle object. Set this to false if this is not the desired behavior (e.g. - * the client code wishes to perform additional validation checks between the fullUrl and the - * resource id). - */ - public - fun overrideResourceIdWithBundleEntryFullUrl(overrideResourceIdWithBundleEntryFullUrl: Boolean) { - def.overrideResourceIdWithBundleEntryFullUrl = - overrideResourceIdWithBundleEntryFullUrl.toString() - } - - /** - * If set to true (which is the default), the Bundle.entry.fullUrl will override the - * Bundle.entry.resource's resource id if the fullUrl is defined. This behavior happens when parsing - * the source data into a Bundle object. Set this to false if this is not the desired behavior (e.g. - * the client code wishes to perform additional validation checks between the fullUrl and the - * resource id). - */ - public - fun overrideResourceIdWithBundleEntryFullUrl(overrideResourceIdWithBundleEntryFullUrl: String) { - def.overrideResourceIdWithBundleEntryFullUrl = overrideResourceIdWithBundleEntryFullUrl - } - - /** - * If set to true (default is false) only elements marked by the FHIR specification as being - * summary elements will be included. - */ - public fun summaryMode(summaryMode: Boolean) { - def.summaryMode = summaryMode.toString() - } - - /** - * If set to true (default is false) only elements marked by the FHIR specification as being - * summary elements will be included. - */ - public fun summaryMode(summaryMode: String) { - def.summaryMode = summaryMode - } - - /** - * If set to true (default is false), narratives will not be included in the encoded values. - */ - public fun suppressNarratives(suppressNarratives: Boolean) { - def.suppressNarratives = suppressNarratives.toString() - } - - /** - * If set to true (default is false), narratives will not be included in the encoded values. - */ - public fun suppressNarratives(suppressNarratives: String) { - def.suppressNarratives = suppressNarratives - } - - /** - * If supplied value(s), any resource references at the specified paths will have their resource - * versions encoded instead of being automatically stripped during the encoding process. This setting - * has no effect on the parsing process. Multiple elements can be separated by comma when using - * String parameter. This method provides a finer-grained level of control than - * setStripVersionsFromReferences(String) and any paths specified by this method will be encoded even - * if setStripVersionsFromReferences(String) has been set to true (which is the default) - */ - public - fun dontStripVersionsFromReferencesAtPaths(dontStripVersionsFromReferencesAtPaths: String) { - def.dontStripVersionsFromReferencesAtPaths = dontStripVersionsFromReferencesAtPaths - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: Boolean) { - def.contentTypeHeader = contentTypeHeader.toString() - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: String) { - def.contentTypeHeader = contentTypeHeader - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FlatpackDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FlatpackDataFormatDsl.kt deleted file mode 100644 index 2a630bb27ecaf..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/FlatpackDataFormatDsl.kt +++ /dev/null @@ -1,134 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.FlatpackDataFormat - -/** - * Marshal and unmarshal Java lists and maps to/from flat files (such as CSV, delimited, or fixed - * length formats) using Flatpack library. - */ -public fun DataFormatDsl.flatpack(i: FlatpackDataFormatDsl.() -> Unit) { - def = FlatpackDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class FlatpackDataFormatDsl { - public val def: FlatpackDataFormat - - init { - def = FlatpackDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The flatpack pzmap configuration file. Can be omitted in simpler situations, but its preferred - * to use the pzmap. - */ - public fun definition(definition: String) { - def.definition = definition - } - - /** - * Delimited or fixed. Is by default false = delimited - */ - public fun fixed(fixed: Boolean) { - def.fixed = fixed.toString() - } - - /** - * Delimited or fixed. Is by default false = delimited - */ - public fun fixed(fixed: String) { - def.fixed = fixed - } - - /** - * The delimiter char (could be ; , or similar) - */ - public fun delimiter(delimiter: String) { - def.delimiter = delimiter - } - - /** - * Whether the first line is ignored for delimited files (for the column headers). Is by default - * true. - */ - public fun ignoreFirstRecord(ignoreFirstRecord: Boolean) { - def.ignoreFirstRecord = ignoreFirstRecord.toString() - } - - /** - * Whether the first line is ignored for delimited files (for the column headers). Is by default - * true. - */ - public fun ignoreFirstRecord(ignoreFirstRecord: String) { - def.ignoreFirstRecord = ignoreFirstRecord - } - - /** - * Allows for lines to be shorter than expected and ignores the extra characters - */ - public fun allowShortLines(allowShortLines: Boolean) { - def.allowShortLines = allowShortLines.toString() - } - - /** - * Allows for lines to be shorter than expected and ignores the extra characters - */ - public fun allowShortLines(allowShortLines: String) { - def.allowShortLines = allowShortLines - } - - /** - * Allows for lines to be longer than expected and ignores the extra characters. - */ - public fun ignoreExtraColumns(ignoreExtraColumns: Boolean) { - def.ignoreExtraColumns = ignoreExtraColumns.toString() - } - - /** - * Allows for lines to be longer than expected and ignores the extra characters. - */ - public fun ignoreExtraColumns(ignoreExtraColumns: String) { - def.ignoreExtraColumns = ignoreExtraColumns - } - - /** - * If the text is qualified with a character. Uses quote character by default. - */ - public fun textQualifier(textQualifier: String) { - def.textQualifier = textQualifier - } - - /** - * References to a custom parser factory to lookup in the registry - */ - public fun parserFactoryRef(parserFactoryRef: String) { - def.parserFactoryRef = parserFactoryRef - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/GrokDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/GrokDataFormatDsl.kt deleted file mode 100644 index 71e558efde00c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/GrokDataFormatDsl.kt +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.GrokDataFormat - -/** - * Unmarshal unstructured data to objects using Logstash based Grok patterns. - */ -public fun DataFormatDsl.grok(i: GrokDataFormatDsl.() -> Unit) { - def = GrokDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class GrokDataFormatDsl { - public val def: GrokDataFormat - - init { - def = GrokDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The grok pattern to match lines of input - */ - public fun pattern(pattern: String) { - def.pattern = pattern - } - - /** - * Turns on flattened mode. In flattened mode the exception is thrown when there are multiple - * pattern matches with same key. - */ - public fun flattened(flattened: Boolean) { - def.flattened = flattened.toString() - } - - /** - * Turns on flattened mode. In flattened mode the exception is thrown when there are multiple - * pattern matches with same key. - */ - public fun flattened(flattened: String) { - def.flattened = flattened - } - - /** - * If false, every line of input is matched for pattern only once. Otherwise the line can be - * scanned multiple times when non-terminal pattern is used. - */ - public fun allowMultipleMatchesPerLine(allowMultipleMatchesPerLine: Boolean) { - def.allowMultipleMatchesPerLine = allowMultipleMatchesPerLine.toString() - } - - /** - * If false, every line of input is matched for pattern only once. Otherwise the line can be - * scanned multiple times when non-terminal pattern is used. - */ - public fun allowMultipleMatchesPerLine(allowMultipleMatchesPerLine: String) { - def.allowMultipleMatchesPerLine = allowMultipleMatchesPerLine - } - - /** - * Whether to capture named expressions only or not (i.e. %{IP:ip} but not ${IP}) - */ - public fun namedOnly(namedOnly: Boolean) { - def.namedOnly = namedOnly.toString() - } - - /** - * Whether to capture named expressions only or not (i.e. %{IP:ip} but not ${IP}) - */ - public fun namedOnly(namedOnly: String) { - def.namedOnly = namedOnly - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/GsonDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/GsonDataFormatDsl.kt deleted file mode 100644 index 8534dbd0cd57e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/GsonDataFormatDsl.kt +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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.kotlin.dataformats - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.JsonDataFormat - -/** - * Marshal POJOs to JSON and back using Gson - */ -public fun DataFormatDsl.gson(i: GsonDataFormatDsl.() -> Unit) { - def = GsonDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class GsonDataFormatDsl { - public val def: JsonDataFormat - - init { - def = JsonDataFormat()} - - /** - * To enable pretty printing output nicely formatted. Is by default false. - */ - public fun prettyPrint(prettyPrint: Boolean) { - def.prettyPrint = prettyPrint.toString() - } - - /** - * To enable pretty printing output nicely formatted. Is by default false. - */ - public fun prettyPrint(prettyPrint: String) { - def.prettyPrint = prettyPrint - } - - /** - * Class name of the java type to use when unmarshalling - */ - public fun unmarshalType(unmarshalType: Class<*>) { - def.unmarshalType = unmarshalType - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: Boolean) { - def.contentTypeHeader = contentTypeHeader.toString() - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: String) { - def.contentTypeHeader = contentTypeHeader - } - - /** - * To configure the date format while marshall or unmarshall Date fields in JSON using Gson - */ - public fun dateFormatPattern(dateFormatPattern: String) { - def.dateFormatPattern = dateFormatPattern - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/GzipDeflaterDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/GzipDeflaterDataFormatDsl.kt deleted file mode 100644 index db7bb144a0526..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/GzipDeflaterDataFormatDsl.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.GzipDeflaterDataFormat - -/** - * Compress and decompress messages using java.util.zip.GZIPStream. - */ -public fun DataFormatDsl.gzipDeflater(i: GzipDeflaterDataFormatDsl.() -> Unit) { - def = GzipDeflaterDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class GzipDeflaterDataFormatDsl { - public val def: GzipDeflaterDataFormat - - init { - def = GzipDeflaterDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/Hl7DataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/Hl7DataFormatDsl.kt deleted file mode 100644 index d80eeb0a49580..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/Hl7DataFormatDsl.kt +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.HL7DataFormat - -/** - * Marshal and unmarshal HL7 (Health Care) model objects using the HL7 MLLP codec. - */ -public fun DataFormatDsl.hl7(i: Hl7DataFormatDsl.() -> Unit) { - def = Hl7DataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class Hl7DataFormatDsl { - public val def: HL7DataFormat - - init { - def = HL7DataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Whether to validate the HL7 message Is by default true. - */ - public fun validate(validate: Boolean) { - def.validate = validate.toString() - } - - /** - * Whether to validate the HL7 message Is by default true. - */ - public fun validate(validate: String) { - def.validate = validate - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/IcalDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/IcalDataFormatDsl.kt deleted file mode 100644 index 89ec685782c70..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/IcalDataFormatDsl.kt +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.IcalDataFormat - -/** - * Marshal and unmarshal iCal (.ics) documents to/from model objects. - */ -public fun DataFormatDsl.ical(i: IcalDataFormatDsl.() -> Unit) { - def = IcalDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class IcalDataFormatDsl { - public val def: IcalDataFormat - - init { - def = IcalDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Whether to validate. - */ - public fun validating(validating: Boolean) { - def.validating = validating.toString() - } - - /** - * Whether to validate. - */ - public fun validating(validating: String) { - def.validating = validating - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JacksonDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JacksonDataFormatDsl.kt deleted file mode 100644 index 24cdd9664f0a3..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JacksonDataFormatDsl.kt +++ /dev/null @@ -1,267 +0,0 @@ -/* - * 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.kotlin.dataformats - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.JsonDataFormat - -/** - * Marshal POJOs to JSON and back using Jackson. - */ -public fun DataFormatDsl.jackson(i: JacksonDataFormatDsl.() -> Unit) { - def = JacksonDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class JacksonDataFormatDsl { - public val def: JsonDataFormat - - init { - def = JsonDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Lookup and use the existing ObjectMapper with the given id when using Jackson. - */ - public fun objectMapper(objectMapper: String) { - def.objectMapper = objectMapper - } - - /** - * Whether to lookup and use default Jackson ObjectMapper from the registry. - */ - public fun useDefaultObjectMapper(useDefaultObjectMapper: Boolean) { - def.useDefaultObjectMapper = useDefaultObjectMapper.toString() - } - - /** - * Whether to lookup and use default Jackson ObjectMapper from the registry. - */ - public fun useDefaultObjectMapper(useDefaultObjectMapper: String) { - def.useDefaultObjectMapper = useDefaultObjectMapper - } - - /** - * If set to true then Jackson will look for an objectMapper to use from the registry - */ - public fun autoDiscoverObjectMapper(autoDiscoverObjectMapper: Boolean) { - def.autoDiscoverObjectMapper = autoDiscoverObjectMapper.toString() - } - - /** - * If set to true then Jackson will look for an objectMapper to use from the registry - */ - public fun autoDiscoverObjectMapper(autoDiscoverObjectMapper: String) { - def.autoDiscoverObjectMapper = autoDiscoverObjectMapper - } - - /** - * To enable pretty printing output nicely formatted. Is by default false. - */ - public fun prettyPrint(prettyPrint: Boolean) { - def.prettyPrint = prettyPrint.toString() - } - - /** - * To enable pretty printing output nicely formatted. Is by default false. - */ - public fun prettyPrint(prettyPrint: String) { - def.prettyPrint = prettyPrint - } - - /** - * Class name of the java type to use when unmarshalling - */ - public fun unmarshalType(unmarshalType: Class<*>) { - def.unmarshalType = unmarshalType - } - - /** - * When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. - * With Jackson you can use JSON views to accomplish this. This option is to refer to the class which - * has JsonView annotations - */ - public fun jsonView(jsonView: Class<*>) { - def.jsonView = jsonView - } - - /** - * If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you - * want to skip these null values, you can set this option to NON_NULL - */ - public fun include(include: String) { - def.include = include - } - - /** - * Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to - * use to unmarshal to. - */ - public fun allowJmsType(allowJmsType: Boolean) { - def.allowJmsType = allowJmsType.toString() - } - - /** - * Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to - * use to unmarshal to. - */ - public fun allowJmsType(allowJmsType: String) { - def.allowJmsType = allowJmsType - } - - /** - * Refers to a custom collection type to lookup in the registry to use. This option should rarely - * be used, but allows using different collection types than java.util.Collection based as default. - */ - public fun collectionType(collectionType: Class<*>) { - def.collectionType = collectionType - } - - /** - * To unmarshal to a List of Map or a List of Pojo. - */ - public fun useList(useList: Boolean) { - def.useList = useList.toString() - } - - /** - * To unmarshal to a List of Map or a List of Pojo. - */ - public fun useList(useList: String) { - def.useList = useList - } - - /** - * To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with - * FQN class names. Multiple classes can be separated by comma. - */ - public fun moduleClassNames(moduleClassNames: String) { - def.moduleClassNames = moduleClassNames - } - - /** - * To use custom Jackson modules referred from the Camel registry. Multiple modules can be - * separated by comma. - */ - public fun moduleRefs(moduleRefs: String) { - def.moduleRefs = moduleRefs - } - - /** - * Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The - * features should be a name that matches a enum from - * com.fasterxml.jackson.databind.SerializationFeature, - * com.fasterxml.jackson.databind.DeserializationFeature, or - * com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma - */ - public fun enableFeatures(enableFeatures: String) { - def.enableFeatures = enableFeatures - } - - /** - * Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The - * features should be a name that matches a enum from - * com.fasterxml.jackson.databind.SerializationFeature, - * com.fasterxml.jackson.databind.DeserializationFeature, or - * com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma - */ - public fun disableFeatures(disableFeatures: String) { - def.disableFeatures = disableFeatures - } - - /** - * If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header - * during the unmarshalling. This should only be enabled when desired to be used. - */ - public fun allowUnmarshallType(allowUnmarshallType: Boolean) { - def.allowUnmarshallType = allowUnmarshallType.toString() - } - - /** - * If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header - * during the unmarshalling. This should only be enabled when desired to be used. - */ - public fun allowUnmarshallType(allowUnmarshallType: String) { - def.allowUnmarshallType = allowUnmarshallType - } - - /** - * If set then Jackson will use the Timezone when marshalling/unmarshalling. This option will have - * no effect on the others Json DataFormat, like gson and fastjson. - */ - public fun timezone(timezone: String) { - def.timezone = timezone - } - - /** - * Optional schema resolver used to lookup schemas for the data in transit. - */ - public fun schemaResolver(schemaResolver: String) { - def.schemaResolver = schemaResolver - } - - /** - * When not disabled, the SchemaResolver will be looked up into the registry - */ - public fun autoDiscoverSchemaResolver(autoDiscoverSchemaResolver: Boolean) { - def.autoDiscoverSchemaResolver = autoDiscoverSchemaResolver.toString() - } - - /** - * When not disabled, the SchemaResolver will be looked up into the registry - */ - public fun autoDiscoverSchemaResolver(autoDiscoverSchemaResolver: String) { - def.autoDiscoverSchemaResolver = autoDiscoverSchemaResolver - } - - /** - * If set then Jackson will use the the defined Property Naming Strategy.Possible values are: - * LOWER_CAMEL_CASE, LOWER_DOT_CASE, LOWER_CASE, KEBAB_CASE, SNAKE_CASE and UPPER_CAMEL_CASE - */ - public fun namingStrategy(namingStrategy: String) { - def.namingStrategy = namingStrategy - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: Boolean) { - def.contentTypeHeader = contentTypeHeader.toString() - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: String) { - def.contentTypeHeader = contentTypeHeader - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JacksonXmlDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JacksonXmlDataFormatDsl.kt deleted file mode 100644 index c32013381fa2e..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JacksonXmlDataFormatDsl.kt +++ /dev/null @@ -1,225 +0,0 @@ -/* - * 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.kotlin.dataformats - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.JacksonXMLDataFormat - -/** - * Unmarshal an XML payloads to POJOs and back using XMLMapper extension of Jackson. - */ -public fun DataFormatDsl.jacksonXml(i: JacksonXmlDataFormatDsl.() -> Unit) { - def = JacksonXmlDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class JacksonXmlDataFormatDsl { - public val def: JacksonXMLDataFormat - - init { - def = JacksonXMLDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Lookup and use the existing XmlMapper with the given id. - */ - public fun xmlMapper(xmlMapper: String) { - def.xmlMapper = xmlMapper - } - - /** - * To enable pretty printing output nicely formatted. Is by default false. - */ - public fun prettyPrint(prettyPrint: Boolean) { - def.prettyPrint = prettyPrint.toString() - } - - /** - * To enable pretty printing output nicely formatted. Is by default false. - */ - public fun prettyPrint(prettyPrint: String) { - def.prettyPrint = prettyPrint - } - - /** - * Class name of the java type to use when unmarshalling - */ - public fun unmarshalType(unmarshalType: Class<*>) { - def.unmarshalType = unmarshalType - } - - /** - * If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header - * during the unmarshalling. This should only be enabled when desired to be used. - */ - public fun allowUnmarshallType(allowUnmarshallType: Boolean) { - def.allowUnmarshallType = allowUnmarshallType.toString() - } - - /** - * If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header - * during the unmarshalling. This should only be enabled when desired to be used. - */ - public fun allowUnmarshallType(allowUnmarshallType: String) { - def.allowUnmarshallType = allowUnmarshallType - } - - /** - * When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. - * With Jackson you can use JSON views to accomplish this. This option is to refer to the class which - * has JsonView annotations - */ - public fun jsonView(jsonView: Class<*>) { - def.jsonView = jsonView - } - - /** - * If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you - * want to skip these null values, you can set this option to NON_NULL - */ - public fun include(include: String) { - def.include = include - } - - /** - * Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to - * use to unmarshal to. - */ - public fun allowJmsType(allowJmsType: Boolean) { - def.allowJmsType = allowJmsType.toString() - } - - /** - * Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to - * use to unmarshal to. - */ - public fun allowJmsType(allowJmsType: String) { - def.allowJmsType = allowJmsType - } - - /** - * Refers to a custom collection type to lookup in the registry to use. This option should rarely - * be used, but allows to use different collection types than java.util.Collection based as default. - */ - public fun collectionType(collectionType: Class<*>) { - def.collectionType = collectionType - } - - /** - * To unmarshal to a List of Map or a List of Pojo. - */ - public fun useList(useList: Boolean) { - def.useList = useList.toString() - } - - /** - * To unmarshal to a List of Map or a List of Pojo. - */ - public fun useList(useList: String) { - def.useList = useList - } - - /** - * If set then Jackson will use the Timezone when marshalling/unmarshalling. - */ - public fun timezone(timezone: String) { - def.timezone = timezone - } - - /** - * Whether to enable the JAXB annotations module when using jackson. When enabled then JAXB - * annotations can be used by Jackson. - */ - public fun enableJaxbAnnotationModule(enableJaxbAnnotationModule: Boolean) { - def.enableJaxbAnnotationModule = enableJaxbAnnotationModule.toString() - } - - /** - * Whether to enable the JAXB annotations module when using jackson. When enabled then JAXB - * annotations can be used by Jackson. - */ - public fun enableJaxbAnnotationModule(enableJaxbAnnotationModule: String) { - def.enableJaxbAnnotationModule = enableJaxbAnnotationModule - } - - /** - * To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with - * FQN class names. Multiple classes can be separated by comma. - */ - public fun moduleClassNames(moduleClassNames: String) { - def.moduleClassNames = moduleClassNames - } - - /** - * To use custom Jackson modules referred from the Camel registry. Multiple modules can be - * separated by comma. - */ - public fun moduleRefs(moduleRefs: String) { - def.moduleRefs = moduleRefs - } - - /** - * Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The - * features should be a name that matches a enum from - * com.fasterxml.jackson.databind.SerializationFeature, - * com.fasterxml.jackson.databind.DeserializationFeature, or - * com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma - */ - public fun enableFeatures(enableFeatures: String) { - def.enableFeatures = enableFeatures - } - - /** - * Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The - * features should be a name that matches a enum from - * com.fasterxml.jackson.databind.SerializationFeature, - * com.fasterxml.jackson.databind.DeserializationFeature, or - * com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma - */ - public fun disableFeatures(disableFeatures: String) { - def.disableFeatures = disableFeatures - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: Boolean) { - def.contentTypeHeader = contentTypeHeader.toString() - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: String) { - def.contentTypeHeader = contentTypeHeader - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JaxbDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JaxbDataFormatDsl.kt deleted file mode 100644 index 8d463f7a53886..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JaxbDataFormatDsl.kt +++ /dev/null @@ -1,287 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.JaxbDataFormat - -/** - * Unmarshal XML payloads to POJOs and back using JAXB2 XML marshalling standard. - */ -public fun DataFormatDsl.jaxb(i: JaxbDataFormatDsl.() -> Unit) { - def = JaxbDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class JaxbDataFormatDsl { - public val def: JaxbDataFormat - - init { - def = JaxbDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Package name where your JAXB classes are located. - */ - public fun contextPath(contextPath: String) { - def.contextPath = contextPath - } - - /** - * This can be set to true to mark that the contextPath is referring to a classname and not a - * package name. - */ - public fun contextPathIsClassName(contextPathIsClassName: Boolean) { - def.contextPathIsClassName = contextPathIsClassName.toString() - } - - /** - * This can be set to true to mark that the contextPath is referring to a classname and not a - * package name. - */ - public fun contextPathIsClassName(contextPathIsClassName: String) { - def.contextPathIsClassName = contextPathIsClassName - } - - /** - * To validate against an existing schema. Your can use the prefix classpath:, file: or http: to - * specify how the resource should be resolved. You can separate multiple schema files by using the - * ',' character. - */ - public fun schema(schema: String) { - def.schema = schema - } - - /** - * Sets the schema severity level to use when validating against a schema. This level determines - * the minimum severity error that triggers JAXB to stop continue parsing. The default value of 0 - * (warning) means that any error (warning, error or fatal error) will trigger JAXB to stop. There - * are the following three levels: 0=warning, 1=error, 2=fatal error. - */ - public fun schemaSeverityLevel(schemaSeverityLevel: Int) { - def.schemaSeverityLevel = schemaSeverityLevel.toString() - } - - /** - * Sets the schema severity level to use when validating against a schema. This level determines - * the minimum severity error that triggers JAXB to stop continue parsing. The default value of 0 - * (warning) means that any error (warning, error or fatal error) will trigger JAXB to stop. There - * are the following three levels: 0=warning, 1=error, 2=fatal error. - */ - public fun schemaSeverityLevel(schemaSeverityLevel: String) { - def.schemaSeverityLevel = schemaSeverityLevel - } - - /** - * To enable pretty printing output nicely formatted. Is by default false. - */ - public fun prettyPrint(prettyPrint: Boolean) { - def.prettyPrint = prettyPrint.toString() - } - - /** - * To enable pretty printing output nicely formatted. Is by default false. - */ - public fun prettyPrint(prettyPrint: String) { - def.prettyPrint = prettyPrint - } - - /** - * Whether to allow using ObjectFactory classes to create the POJO classes during marshalling. - * This only applies to POJO classes that has not been annotated with JAXB and providing jaxb.index - * descriptor files. - */ - public fun objectFactory(objectFactory: Boolean) { - def.objectFactory = objectFactory.toString() - } - - /** - * Whether to allow using ObjectFactory classes to create the POJO classes during marshalling. - * This only applies to POJO classes that has not been annotated with JAXB and providing jaxb.index - * descriptor files. - */ - public fun objectFactory(objectFactory: String) { - def.objectFactory = objectFactory - } - - /** - * Whether to ignore JAXBElement elements - only needed to be set to false in very special - * use-cases. - */ - public fun ignoreJAXBElement(ignoreJAXBElement: Boolean) { - def.ignoreJAXBElement = ignoreJAXBElement.toString() - } - - /** - * Whether to ignore JAXBElement elements - only needed to be set to false in very special - * use-cases. - */ - public fun ignoreJAXBElement(ignoreJAXBElement: String) { - def.ignoreJAXBElement = ignoreJAXBElement - } - - /** - * Whether marhsalling must be java objects with JAXB annotations. And if not then it fails. This - * option can be set to false to relax that, such as when the data is already in XML format. - */ - public fun mustBeJAXBElement(mustBeJAXBElement: Boolean) { - def.mustBeJAXBElement = mustBeJAXBElement.toString() - } - - /** - * Whether marhsalling must be java objects with JAXB annotations. And if not then it fails. This - * option can be set to false to relax that, such as when the data is already in XML format. - */ - public fun mustBeJAXBElement(mustBeJAXBElement: String) { - def.mustBeJAXBElement = mustBeJAXBElement - } - - /** - * To ignore non xml characheters and replace them with an empty space. - */ - public fun filterNonXmlChars(filterNonXmlChars: Boolean) { - def.filterNonXmlChars = filterNonXmlChars.toString() - } - - /** - * To ignore non xml characheters and replace them with an empty space. - */ - public fun filterNonXmlChars(filterNonXmlChars: String) { - def.filterNonXmlChars = filterNonXmlChars - } - - /** - * To overrule and use a specific encoding - */ - public fun encoding(encoding: String) { - def.encoding = encoding - } - - /** - * To turn on marshalling XML fragment trees. By default JAXB looks for XmlRootElement annotation - * on given class to operate on whole XML tree. This is useful but not always - sometimes generated - * code does not have XmlRootElement annotation, sometimes you need unmarshall only part of tree. In - * that case you can use partial unmarshalling. To enable this behaviours you need set property - * partClass. Camel will pass this class to JAXB's unmarshaler. - */ - public fun fragment(fragment: Boolean) { - def.fragment = fragment.toString() - } - - /** - * To turn on marshalling XML fragment trees. By default JAXB looks for XmlRootElement annotation - * on given class to operate on whole XML tree. This is useful but not always - sometimes generated - * code does not have XmlRootElement annotation, sometimes you need unmarshall only part of tree. In - * that case you can use partial unmarshalling. To enable this behaviours you need set property - * partClass. Camel will pass this class to JAXB's unmarshaler. - */ - public fun fragment(fragment: String) { - def.fragment = fragment - } - - /** - * Name of class used for fragment parsing. See more details at the fragment option. - */ - public fun partClass(partClass: String) { - def.partClass = partClass - } - - /** - * XML namespace to use for fragment parsing. See more details at the fragment option. - */ - public fun partNamespace(partNamespace: String) { - def.partNamespace = partNamespace - } - - /** - * When marshalling using JAXB or SOAP then the JAXB implementation will automatic assign - * namespace prefixes, such as ns2, ns3, ns4 etc. To control this mapping, Camel allows you to refer - * to a map which contains the desired mapping. - */ - public fun namespacePrefixRef(namespacePrefixRef: String) { - def.namespacePrefixRef = namespacePrefixRef - } - - /** - * To use a custom xml stream writer. - */ - public fun xmlStreamWriterWrapper(xmlStreamWriterWrapper: String) { - def.xmlStreamWriterWrapper = xmlStreamWriterWrapper - } - - /** - * To define the location of the schema - */ - public fun schemaLocation(schemaLocation: String) { - def.schemaLocation = schemaLocation - } - - /** - * To define the location of the namespaceless schema - */ - public fun noNamespaceSchemaLocation(noNamespaceSchemaLocation: String) { - def.noNamespaceSchemaLocation = noNamespaceSchemaLocation - } - - /** - * Refers to a custom java.util.Map to lookup in the registry containing custom JAXB provider - * properties to be used with the JAXB marshaller. - */ - public fun jaxbProviderProperties(jaxbProviderProperties: String) { - def.jaxbProviderProperties = jaxbProviderProperties - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: Boolean) { - def.contentTypeHeader = contentTypeHeader.toString() - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: String) { - def.contentTypeHeader = contentTypeHeader - } - - /** - * Only in use if schema validation has been enabled. Restrict access to the protocols specified - * for external reference set by the schemaLocation attribute, Import and Include element. Examples - * of protocols are file, http, jar:file. false or none to deny all access to external references; a - * specific protocol, such as file, to give permission to only the protocol; the keyword all to grant - * permission to all protocols. - */ - public fun accessExternalSchemaProtocols(accessExternalSchemaProtocols: String) { - def.accessExternalSchemaProtocols = accessExternalSchemaProtocols - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JsonApiDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JsonApiDataFormatDsl.kt deleted file mode 100644 index 9cf88954336ca..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JsonApiDataFormatDsl.kt +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.JsonApiDataFormat - -/** - * Marshal and unmarshal JSON:API resources using JSONAPI-Converter library. - */ -public fun DataFormatDsl.jsonApi(i: JsonApiDataFormatDsl.() -> Unit) { - def = JsonApiDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class JsonApiDataFormatDsl { - public val def: JsonApiDataFormat - - init { - def = JsonApiDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The classes to take into account for the marshalling. Multiple classes can be separated by - * comma. - */ - public fun dataFormatTypes(dataFormatTypes: String) { - def.dataFormatTypes = dataFormatTypes - } - - /** - * The class to take into account while unmarshalling. - */ - public fun mainFormatType(mainFormatType: String) { - def.mainFormatType = mainFormatType - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JsonbDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JsonbDataFormatDsl.kt deleted file mode 100644 index c3b8fab6c30ab..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/JsonbDataFormatDsl.kt +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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.kotlin.dataformats - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.JsonDataFormat - -/** - * Marshal POJOs to JSON and back using JSON-B. - */ -public fun DataFormatDsl.jsonb(i: JsonbDataFormatDsl.() -> Unit) { - def = JsonbDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class JsonbDataFormatDsl { - public val def: JsonDataFormat - - init { - def = JsonDataFormat()} - - /** - * Lookup and use the existing Jsonb instance with the given id. - */ - public fun objectMapper(objectMapper: String) { - def.objectMapper = objectMapper - } - - /** - * To enable pretty printing output nicely formatted. Is by default false. - */ - public fun prettyPrint(prettyPrint: Boolean) { - def.prettyPrint = prettyPrint.toString() - } - - /** - * To enable pretty printing output nicely formatted. Is by default false. - */ - public fun prettyPrint(prettyPrint: String) { - def.prettyPrint = prettyPrint - } - - /** - * Class name of the java type to use when unmarshalling - */ - public fun unmarshalType(unmarshalType: Class<*>) { - def.unmarshalType = unmarshalType - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/LzfDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/LzfDataFormatDsl.kt deleted file mode 100644 index 089f37b827817..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/LzfDataFormatDsl.kt +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.LZFDataFormat - -/** - * Compress and decompress streams using LZF deflate algorithm. - */ -public fun DataFormatDsl.lzf(i: LzfDataFormatDsl.() -> Unit) { - def = LzfDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class LzfDataFormatDsl { - public val def: LZFDataFormat - - init { - def = LZFDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Enable encoding (compress) using multiple processing cores. - */ - public fun usingParallelCompression(usingParallelCompression: Boolean) { - def.usingParallelCompression = usingParallelCompression.toString() - } - - /** - * Enable encoding (compress) using multiple processing cores. - */ - public fun usingParallelCompression(usingParallelCompression: String) { - def.usingParallelCompression = usingParallelCompression - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/MimeMultipartDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/MimeMultipartDataFormatDsl.kt deleted file mode 100644 index 73e129ba5b11f..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/MimeMultipartDataFormatDsl.kt +++ /dev/null @@ -1,109 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.MimeMultipartDataFormat - -/** - * Marshal Camel messages with attachments into MIME-Multipart messages and back. - */ -public fun DataFormatDsl.mimeMultipart(i: MimeMultipartDataFormatDsl.() -> Unit) { - def = MimeMultipartDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class MimeMultipartDataFormatDsl { - public val def: MimeMultipartDataFormat - - init { - def = MimeMultipartDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Specify the subtype of the MIME Multipart. Default is mixed. - */ - public fun multipartSubType(multipartSubType: String) { - def.multipartSubType = multipartSubType - } - - /** - * Defines whether a message without attachment is also marshaled into a MIME Multipart (with only - * one body part). Default is false. - */ - public fun multipartWithoutAttachment(multipartWithoutAttachment: Boolean) { - def.multipartWithoutAttachment = multipartWithoutAttachment.toString() - } - - /** - * Defines whether a message without attachment is also marshaled into a MIME Multipart (with only - * one body part). Default is false. - */ - public fun multipartWithoutAttachment(multipartWithoutAttachment: String) { - def.multipartWithoutAttachment = multipartWithoutAttachment - } - - /** - * Defines whether the MIME-Multipart headers are part of the message body (true) or are set as - * Camel headers (false). Default is false. - */ - public fun headersInline(headersInline: Boolean) { - def.headersInline = headersInline.toString() - } - - /** - * Defines whether the MIME-Multipart headers are part of the message body (true) or are set as - * Camel headers (false). Default is false. - */ - public fun headersInline(headersInline: String) { - def.headersInline = headersInline - } - - /** - * A regex that defines which Camel headers are also included as MIME headers into the MIME - * multipart. This will only work if headersInline is set to true. Default is to include no headers - */ - public fun includeHeaders(includeHeaders: String) { - def.includeHeaders = includeHeaders - } - - /** - * Defines whether the content of binary parts in the MIME multipart is binary (true) or Base-64 - * encoded (false) Default is false. - */ - public fun binaryContent(binaryContent: Boolean) { - def.binaryContent = binaryContent.toString() - } - - /** - * Defines whether the content of binary parts in the MIME multipart is binary (true) or Base-64 - * encoded (false) Default is false. - */ - public fun binaryContent(binaryContent: String) { - def.binaryContent = binaryContent - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ParquetAvroDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ParquetAvroDataFormatDsl.kt deleted file mode 100644 index a78814bfac44f..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ParquetAvroDataFormatDsl.kt +++ /dev/null @@ -1,78 +0,0 @@ -/* - * 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.kotlin.dataformats - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.ParquetAvroDataFormat - -/** - * Parquet Avro serialization and de-serialization. - */ -public fun DataFormatDsl.parquetAvro(i: ParquetAvroDataFormatDsl.() -> Unit) { - def = ParquetAvroDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class ParquetAvroDataFormatDsl { - public val def: ParquetAvroDataFormat - - init { - def = ParquetAvroDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Compression codec to use when marshalling. - */ - public fun compressionCodecName(compressionCodecName: String) { - def.compressionCodecName = compressionCodecName - } - - /** - * Class to use when (un)marshalling. If omitted, parquet files are converted into Avro's - * GenericRecords for unmarshalling and input objects are assumed as GenericRecords for marshalling. - */ - public fun unmarshalType(unmarshalType: Class<*>) { - def.unmarshalType = unmarshalType - } - - /** - * Whether the unmarshalling should produce an iterator of records or read all the records at - * once. - */ - public fun lazyLoad(lazyLoad: Boolean) { - def.lazyLoad = lazyLoad.toString() - } - - /** - * Whether the unmarshalling should produce an iterator of records or read all the records at - * once. - */ - public fun lazyLoad(lazyLoad: String) { - def.lazyLoad = lazyLoad - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/PgpDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/PgpDataFormatDsl.kt deleted file mode 100644 index 9d2e05c7d76ae..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/PgpDataFormatDsl.kt +++ /dev/null @@ -1,214 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.PGPDataFormat - -/** - * Encrypt and decrypt messages using Java Cryptographic Extension (JCE) and PGP. - */ -public fun DataFormatDsl.pgp(i: PgpDataFormatDsl.() -> Unit) { - def = PgpDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class PgpDataFormatDsl { - public val def: PGPDataFormat - - init { - def = PGPDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The user ID of the key in the PGP keyring used during encryption. Can also be only a part of a - * user ID. For example, if the user ID is Test User then you can use the part Test User or to - * address the user ID. - */ - public fun keyUserid(keyUserid: String) { - def.keyUserid = keyUserid - } - - /** - * User ID of the key in the PGP keyring used for signing (during encryption) or signature - * verification (during decryption). During the signature verification process the specified User ID - * restricts the public keys from the public keyring which can be used for the verification. If no - * User ID is specified for the signature verficiation then any public key in the public keyring can - * be used for the verification. Can also be only a part of a user ID. For example, if the user ID is - * Test User then you can use the part Test User or to address the User ID. - */ - public fun signatureKeyUserid(signatureKeyUserid: String) { - def.signatureKeyUserid = signatureKeyUserid - } - - /** - * Password used when opening the private key (not used for encryption). - */ - public fun password(password: String) { - def.password = password - } - - /** - * Password used when opening the private key used for signing (during encryption). - */ - public fun signaturePassword(signaturePassword: String) { - def.signaturePassword = signaturePassword - } - - /** - * Filename of the keyring; must be accessible as a classpath resource (but you can specify a - * location in the file system by using the file: prefix). - */ - public fun keyFileName(keyFileName: String) { - def.keyFileName = keyFileName - } - - /** - * Filename of the keyring to use for signing (during encryption) or for signature verification - * (during decryption); must be accessible as a classpath resource (but you can specify a location in - * the file system by using the file: prefix). - */ - public fun signatureKeyFileName(signatureKeyFileName: String) { - def.signatureKeyFileName = signatureKeyFileName - } - - /** - * Keyring used for signing/verifying as byte array. You can not set the signatureKeyFileName and - * signatureKeyRing at the same time. - */ - public fun signatureKeyRing(signatureKeyRing: String) { - def.signatureKeyRing = signatureKeyRing - } - - /** - * This option will cause PGP to base64 encode the encrypted text, making it available for - * copy/paste, etc. - */ - public fun armored(armored: Boolean) { - def.armored = armored.toString() - } - - /** - * This option will cause PGP to base64 encode the encrypted text, making it available for - * copy/paste, etc. - */ - public fun armored(armored: String) { - def.armored = armored - } - - /** - * Adds an integrity check/sign into the encryption file. The default value is true. - */ - public fun integrity(integrity: Boolean) { - def.integrity = integrity.toString() - } - - /** - * Adds an integrity check/sign into the encryption file. The default value is true. - */ - public fun integrity(integrity: String) { - def.integrity = integrity - } - - /** - * Java Cryptography Extension (JCE) provider, default is Bouncy Castle (BC). Alternatively you - * can use, for example, the IAIK JCE provider; in this case the provider must be registered - * beforehand and the Bouncy Castle provider must not be registered beforehand. The Sun JCE provider - * does not work. - */ - public fun provider(provider: String) { - def.provider = provider - } - - /** - * Symmetric key encryption algorithm; possible values are defined in - * org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 2 (= TRIPLE DES), 3 (= CAST5), 4 (= - * BLOWFISH), 6 (= DES), 7 (= AES_128). Only relevant for encrypting. - */ - public fun algorithm(algorithm: Int) { - def.algorithm = algorithm.toString() - } - - /** - * Symmetric key encryption algorithm; possible values are defined in - * org.bouncycastle.bcpg.SymmetricKeyAlgorithmTags; for example 2 (= TRIPLE DES), 3 (= CAST5), 4 (= - * BLOWFISH), 6 (= DES), 7 (= AES_128). Only relevant for encrypting. - */ - public fun algorithm(algorithm: String) { - def.algorithm = algorithm - } - - /** - * Compression algorithm; possible values are defined in - * org.bouncycastle.bcpg.CompressionAlgorithmTags; for example 0 (= UNCOMPRESSED), 1 (= ZIP), 2 (= - * ZLIB), 3 (= BZIP2). Only relevant for encrypting. - */ - public fun compressionAlgorithm(compressionAlgorithm: Int) { - def.compressionAlgorithm = compressionAlgorithm.toString() - } - - /** - * Compression algorithm; possible values are defined in - * org.bouncycastle.bcpg.CompressionAlgorithmTags; for example 0 (= UNCOMPRESSED), 1 (= ZIP), 2 (= - * ZLIB), 3 (= BZIP2). Only relevant for encrypting. - */ - public fun compressionAlgorithm(compressionAlgorithm: String) { - def.compressionAlgorithm = compressionAlgorithm - } - - /** - * Signature hash algorithm; possible values are defined in - * org.bouncycastle.bcpg.HashAlgorithmTags; for example 2 (= SHA1), 8 (= SHA256), 9 (= SHA384), 10 (= - * SHA512), 11 (=SHA224). Only relevant for signing. - */ - public fun hashAlgorithm(hashAlgorithm: Int) { - def.hashAlgorithm = hashAlgorithm.toString() - } - - /** - * Signature hash algorithm; possible values are defined in - * org.bouncycastle.bcpg.HashAlgorithmTags; for example 2 (= SHA1), 8 (= SHA256), 9 (= SHA384), 10 (= - * SHA512), 11 (=SHA224). Only relevant for signing. - */ - public fun hashAlgorithm(hashAlgorithm: String) { - def.hashAlgorithm = hashAlgorithm - } - - /** - * Controls the behavior for verifying the signature during unmarshaling. There are 4 values - * possible: optional: The PGP message may or may not contain signatures; if it does contain - * signatures, then a signature verification is executed. required: The PGP message must contain at - * least one signature; if this is not the case an exception (PGPException) is thrown. A signature - * verification is executed. ignore: Contained signatures in the PGP message are ignored; no - * signature verification is executed. no_signature_allowed: The PGP message must not contain a - * signature; otherwise an exception (PGPException) is thrown. - */ - public fun signatureVerificationOption(signatureVerificationOption: String) { - def.signatureVerificationOption = signatureVerificationOption - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ProtobufDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ProtobufDataFormatDsl.kt deleted file mode 100644 index 71dbedd81d47d..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ProtobufDataFormatDsl.kt +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.ProtobufDataFormat - -/** - * Serialize and deserialize Java objects using Google's Protocol buffers. - */ -public fun DataFormatDsl.protobuf(i: ProtobufDataFormatDsl.() -> Unit) { - def = ProtobufDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class ProtobufDataFormatDsl { - public val def: ProtobufDataFormat - - init { - def = ProtobufDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Name of class to use when unmarshalling - */ - public fun instanceClass(instanceClass: String) { - def.instanceClass = instanceClass - } - - /** - * Defines a content type format in which protobuf message will be serialized/deserialized - * from(to) the Java been. The format can either be native or json for either native protobuf or json - * fields representation. The default value is native. - */ - public fun contentTypeFormat(contentTypeFormat: String) { - def.contentTypeFormat = contentTypeFormat - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: Boolean) { - def.contentTypeHeader = contentTypeHeader.toString() - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: String) { - def.contentTypeHeader = contentTypeHeader - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ProtobufJacksonDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ProtobufJacksonDataFormatDsl.kt deleted file mode 100644 index 6a793ed027629..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ProtobufJacksonDataFormatDsl.kt +++ /dev/null @@ -1,244 +0,0 @@ -/* - * 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.kotlin.dataformats - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.ProtobufDataFormat - -/** - * Marshal POJOs to Protobuf and back using Jackson. - */ -public fun DataFormatDsl.protobufJackson(i: ProtobufJacksonDataFormatDsl.() -> Unit) { - def = ProtobufJacksonDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class ProtobufJacksonDataFormatDsl { - public val def: ProtobufDataFormat - - init { - def = ProtobufDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Lookup and use the existing ObjectMapper with the given id when using Jackson. - */ - public fun objectMapper(objectMapper: String) { - def.objectMapper = objectMapper - } - - /** - * Whether to lookup and use default Jackson ObjectMapper from the registry. - */ - public fun useDefaultObjectMapper(useDefaultObjectMapper: Boolean) { - def.useDefaultObjectMapper = useDefaultObjectMapper.toString() - } - - /** - * Whether to lookup and use default Jackson ObjectMapper from the registry. - */ - public fun useDefaultObjectMapper(useDefaultObjectMapper: String) { - def.useDefaultObjectMapper = useDefaultObjectMapper - } - - /** - * If set to true then Jackson will lookup for an objectMapper into the registry - */ - public fun autoDiscoverObjectMapper(autoDiscoverObjectMapper: Boolean) { - def.autoDiscoverObjectMapper = autoDiscoverObjectMapper.toString() - } - - /** - * If set to true then Jackson will lookup for an objectMapper into the registry - */ - public fun autoDiscoverObjectMapper(autoDiscoverObjectMapper: String) { - def.autoDiscoverObjectMapper = autoDiscoverObjectMapper - } - - /** - * Class name of the java type to use when unmarshalling - */ - public fun unmarshalType(unmarshalType: Class<*>) { - def.unmarshalType = unmarshalType - } - - /** - * When marshalling a POJO to JSON you might want to exclude certain fields from the JSON output. - * With Jackson you can use JSON views to accomplish this. This option is to refer to the class which - * has JsonView annotations - */ - public fun jsonView(jsonView: Class<*>) { - def.jsonView = jsonView - } - - /** - * If you want to marshal a pojo to JSON, and the pojo has some fields with null values. And you - * want to skip these null values, you can set this option to NON_NULL - */ - public fun include(include: String) { - def.include = include - } - - /** - * Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to - * use to unmarshal to. - */ - public fun allowJmsType(allowJmsType: Boolean) { - def.allowJmsType = allowJmsType.toString() - } - - /** - * Used for JMS users to allow the JMSType header from the JMS spec to specify a FQN classname to - * use to unmarshal to. - */ - public fun allowJmsType(allowJmsType: String) { - def.allowJmsType = allowJmsType - } - - /** - * Refers to a custom collection type to lookup in the registry to use. This option should rarely - * be used, but allows to use different collection types than java.util.Collection based as default. - */ - public fun collectionType(collectionType: Class<*>) { - def.collectionType = collectionType - } - - /** - * To unmarshal to a List of Map or a List of Pojo. - */ - public fun useList(useList: Boolean) { - def.useList = useList.toString() - } - - /** - * To unmarshal to a List of Map or a List of Pojo. - */ - public fun useList(useList: String) { - def.useList = useList - } - - /** - * To use custom Jackson modules com.fasterxml.jackson.databind.Module specified as a String with - * FQN class names. Multiple classes can be separated by comma. - */ - public fun moduleClassNames(moduleClassNames: String) { - def.moduleClassNames = moduleClassNames - } - - /** - * To use custom Jackson modules referred from the Camel registry. Multiple modules can be - * separated by comma. - */ - public fun moduleRefs(moduleRefs: String) { - def.moduleRefs = moduleRefs - } - - /** - * Set of features to enable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The - * features should be a name that matches a enum from - * com.fasterxml.jackson.databind.SerializationFeature, - * com.fasterxml.jackson.databind.DeserializationFeature, or - * com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma - */ - public fun enableFeatures(enableFeatures: String) { - def.enableFeatures = enableFeatures - } - - /** - * Set of features to disable on the Jackson com.fasterxml.jackson.databind.ObjectMapper. The - * features should be a name that matches a enum from - * com.fasterxml.jackson.databind.SerializationFeature, - * com.fasterxml.jackson.databind.DeserializationFeature, or - * com.fasterxml.jackson.databind.MapperFeature Multiple features can be separated by comma - */ - public fun disableFeatures(disableFeatures: String) { - def.disableFeatures = disableFeatures - } - - /** - * If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header - * during the unmarshalling. This should only be enabled when desired to be used. - */ - public fun allowUnmarshallType(allowUnmarshallType: Boolean) { - def.allowUnmarshallType = allowUnmarshallType.toString() - } - - /** - * If enabled then Jackson is allowed to attempt to use the CamelJacksonUnmarshalType header - * during the unmarshalling. This should only be enabled when desired to be used. - */ - public fun allowUnmarshallType(allowUnmarshallType: String) { - def.allowUnmarshallType = allowUnmarshallType - } - - /** - * If set then Jackson will use the Timezone when marshalling/unmarshalling. - */ - public fun timezone(timezone: String) { - def.timezone = timezone - } - - /** - * Optional schema resolver used to lookup schemas for the data in transit. - */ - public fun schemaResolver(schemaResolver: String) { - def.schemaResolver = schemaResolver - } - - /** - * When not disabled, the SchemaResolver will be looked up into the registry - */ - public fun autoDiscoverSchemaResolver(autoDiscoverSchemaResolver: Boolean) { - def.autoDiscoverSchemaResolver = autoDiscoverSchemaResolver.toString() - } - - /** - * When not disabled, the SchemaResolver will be looked up into the registry - */ - public fun autoDiscoverSchemaResolver(autoDiscoverSchemaResolver: String) { - def.autoDiscoverSchemaResolver = autoDiscoverSchemaResolver - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: Boolean) { - def.contentTypeHeader = contentTypeHeader.toString() - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: String) { - def.contentTypeHeader = contentTypeHeader - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/RssDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/RssDataFormatDsl.kt deleted file mode 100644 index 1a9bcbfdfa3c2..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/RssDataFormatDsl.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.RssDataFormat - -/** - * Transform from ROME SyndFeed Java Objects to XML and vice-versa. - */ -public fun DataFormatDsl.rss(i: RssDataFormatDsl.() -> Unit) { - def = RssDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class RssDataFormatDsl { - public val def: RssDataFormat - - init { - def = RssDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SnakeYamlDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SnakeYamlDataFormatDsl.kt deleted file mode 100644 index eb35c3b60e566..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SnakeYamlDataFormatDsl.kt +++ /dev/null @@ -1,170 +0,0 @@ -/* - * 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.kotlin.dataformats - -import java.lang.Class -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import kotlin.collections.MutableList -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.YAMLDataFormat -import org.apache.camel.model.dataformat.YAMLLibrary -import org.apache.camel.model.dataformat.YAMLTypeFilterDefinition - -/** - * Marshal and unmarshal Java objects to and from YAML using SnakeYAML - */ -public fun DataFormatDsl.snakeYaml(i: SnakeYamlDataFormatDsl.() -> Unit) { - def = SnakeYamlDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class SnakeYamlDataFormatDsl { - public val def: YAMLDataFormat - - init { - def = YAMLDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Which yaml library to use. By default it is SnakeYAML - */ - public fun library(library: YAMLLibrary) { - def.library = library - } - - /** - * Class name of the java type to use when unmarshalling - */ - public fun unmarshalType(unmarshalType: Class<*>) { - def.unmarshalType = unmarshalType - } - - /** - * BaseConstructor to construct incoming documents. - */ - public fun `constructor`(`constructor`: String) { - def.constructor = constructor - } - - /** - * Representer to emit outgoing objects. - */ - public fun representer(representer: String) { - def.representer = representer - } - - /** - * DumperOptions to configure outgoing objects. - */ - public fun dumperOptions(dumperOptions: String) { - def.dumperOptions = dumperOptions - } - - /** - * Resolver to detect implicit type - */ - public fun resolver(resolver: String) { - def.resolver = resolver - } - - /** - * Use ApplicationContextClassLoader as custom ClassLoader - */ - public fun useApplicationContextClassLoader(useApplicationContextClassLoader: Boolean) { - def.useApplicationContextClassLoader = useApplicationContextClassLoader.toString() - } - - /** - * Use ApplicationContextClassLoader as custom ClassLoader - */ - public fun useApplicationContextClassLoader(useApplicationContextClassLoader: String) { - def.useApplicationContextClassLoader = useApplicationContextClassLoader - } - - /** - * Force the emitter to produce a pretty YAML document when using the flow style. - */ - public fun prettyFlow(prettyFlow: Boolean) { - def.prettyFlow = prettyFlow.toString() - } - - /** - * Force the emitter to produce a pretty YAML document when using the flow style. - */ - public fun prettyFlow(prettyFlow: String) { - def.prettyFlow = prettyFlow - } - - /** - * Allow any class to be un-marshaled - */ - public fun allowAnyType(allowAnyType: Boolean) { - def.allowAnyType = allowAnyType.toString() - } - - /** - * Allow any class to be un-marshaled - */ - public fun allowAnyType(allowAnyType: String) { - def.allowAnyType = allowAnyType - } - - /** - * Set the types SnakeYAML is allowed to un-marshall - */ - public fun typeFilters(typeFilters: MutableList) { - def.typeFilters = typeFilters - } - - /** - * Set the maximum amount of aliases allowed for collections. - */ - public fun maxAliasesForCollections(maxAliasesForCollections: Int) { - def.maxAliasesForCollections = maxAliasesForCollections.toString() - } - - /** - * Set the maximum amount of aliases allowed for collections. - */ - public fun maxAliasesForCollections(maxAliasesForCollections: String) { - def.maxAliasesForCollections = maxAliasesForCollections - } - - /** - * Set whether recursive keys are allowed. - */ - public fun allowRecursiveKeys(allowRecursiveKeys: Boolean) { - def.allowRecursiveKeys = allowRecursiveKeys.toString() - } - - /** - * Set whether recursive keys are allowed. - */ - public fun allowRecursiveKeys(allowRecursiveKeys: String) { - def.allowRecursiveKeys = allowRecursiveKeys - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SoapDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SoapDataFormatDsl.kt deleted file mode 100644 index ef7ef6e0a8b46..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SoapDataFormatDsl.kt +++ /dev/null @@ -1,102 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.SoapDataFormat - -/** - * Marshal Java objects to SOAP messages and back. - */ -public fun DataFormatDsl.soap(i: SoapDataFormatDsl.() -> Unit) { - def = SoapDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class SoapDataFormatDsl { - public val def: SoapDataFormat - - init { - def = SoapDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Package name where your JAXB classes are located. - */ - public fun contextPath(contextPath: String) { - def.contextPath = contextPath - } - - /** - * To overrule and use a specific encoding - */ - public fun encoding(encoding: String) { - def.encoding = encoding - } - - /** - * Refers to an element strategy to lookup from the registry. An element name strategy is used for - * two purposes. The first is to find a xml element name for a given object and soap action when - * marshaling the object into a SOAP message. The second is to find an Exception class for a given - * soap fault name. The following three element strategy class name is provided out of the box. - * QNameStrategy - Uses a fixed qName that is configured on instantiation. Exception lookup is not - * supported TypeNameStrategy - Uses the name and namespace from the XMLType annotation of the given - * type. If no namespace is set then package-info is used. Exception lookup is not supported - * ServiceInterfaceStrategy - Uses information from a webservice interface to determine the type name - * and to find the exception class for a SOAP fault All three classes is located in the package name - * org.apache.camel.dataformat.soap.name If you have generated the web service stub code with - * cxf-codegen or a similar tool then you probably will want to use the ServiceInterfaceStrategy. In - * the case you have no annotated service interface you should use QNameStrategy or TypeNameStrategy. - */ - public fun elementNameStrategyRef(elementNameStrategyRef: String) { - def.elementNameStrategyRef = elementNameStrategyRef - } - - /** - * SOAP version should either be 1.1 or 1.2. Is by default 1.1 - */ - public fun version(version: String) { - def.version = version - } - - /** - * When marshalling using JAXB or SOAP then the JAXB implementation will automatic assign - * namespace prefixes, such as ns2, ns3, ns4 etc. To control this mapping, Camel allows you to refer - * to a map which contains the desired mapping. - */ - public fun namespacePrefixRef(namespacePrefixRef: String) { - def.namespacePrefixRef = namespacePrefixRef - } - - /** - * To validate against an existing schema. Your can use the prefix classpath:, file: or http: to - * specify how the resource should be resolved. You can separate multiple schema files by using the - * ',' character. - */ - public fun schema(schema: String) { - def.schema = schema - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SwiftMtDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SwiftMtDataFormatDsl.kt deleted file mode 100644 index b78180f0bccfc..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SwiftMtDataFormatDsl.kt +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.SwiftMtDataFormat - -/** - * Encode and decode SWIFT MT messages. - */ -public fun DataFormatDsl.swiftMt(i: SwiftMtDataFormatDsl.() -> Unit) { - def = SwiftMtDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class SwiftMtDataFormatDsl { - public val def: SwiftMtDataFormat - - init { - def = SwiftMtDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The flag indicating that messages must be marshalled in a JSON format. - */ - public fun writeInJson(writeInJson: Boolean) { - def.writeInJson = writeInJson.toString() - } - - /** - * The flag indicating that messages must be marshalled in a JSON format. - */ - public fun writeInJson(writeInJson: String) { - def.writeInJson = writeInJson - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SwiftMxDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SwiftMxDataFormatDsl.kt deleted file mode 100644 index 7767ef48e9ef0..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SwiftMxDataFormatDsl.kt +++ /dev/null @@ -1,84 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.SwiftMxDataFormat - -/** - * Encode and decode SWIFT MX messages. - */ -public fun DataFormatDsl.swiftMx(i: SwiftMxDataFormatDsl.() -> Unit) { - def = SwiftMxDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class SwiftMxDataFormatDsl { - public val def: SwiftMxDataFormat - - init { - def = SwiftMxDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Refers to a specific configuration to use when marshalling a message to lookup from the - * registry. - */ - public fun writeConfigRef(writeConfigRef: String) { - def.writeConfigRef = writeConfigRef - } - - /** - * The flag indicating that messages must be marshalled in a JSON format. - */ - public fun writeInJson(writeInJson: Boolean) { - def.writeInJson = writeInJson.toString() - } - - /** - * The flag indicating that messages must be marshalled in a JSON format. - */ - public fun writeInJson(writeInJson: String) { - def.writeInJson = writeInJson - } - - /** - * The type of MX message to produce when unmarshalling an input stream. If not set, it will be - * automatically detected from the namespace used. - */ - public fun readMessageId(readMessageId: String) { - def.readMessageId = readMessageId - } - - /** - * Refers to a specific configuration to use when unmarshalling an input stream to lookup from the - * registry. - */ - public fun readConfigRef(readConfigRef: String) { - def.readConfigRef = readConfigRef - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SyslogDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SyslogDataFormatDsl.kt deleted file mode 100644 index bef6ba437533a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/SyslogDataFormatDsl.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.SyslogDataFormat - -/** - * Marshall SyslogMessages to RFC3164 and RFC5424 messages and back. - */ -public fun DataFormatDsl.syslog(i: SyslogDataFormatDsl.() -> Unit) { - def = SyslogDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class SyslogDataFormatDsl { - public val def: SyslogDataFormat - - init { - def = SyslogDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/TarFileDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/TarFileDataFormatDsl.kt deleted file mode 100644 index f1426c4fcf787..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/TarFileDataFormatDsl.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.Long -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.TarFileDataFormat - -/** - * Archive files into tarballs or extract files from tarballs. - */ -public fun DataFormatDsl.tarFile(i: TarFileDataFormatDsl.() -> Unit) { - def = TarFileDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class TarFileDataFormatDsl { - public val def: TarFileDataFormat - - init { - def = TarFileDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * If the tar file has more than one entry, the setting this option to true, allows working with - * the splitter EIP, to split the data using an iterator in a streaming mode. - */ - public fun usingIterator(usingIterator: Boolean) { - def.usingIterator = usingIterator.toString() - } - - /** - * If the tar file has more than one entry, the setting this option to true, allows working with - * the splitter EIP, to split the data using an iterator in a streaming mode. - */ - public fun usingIterator(usingIterator: String) { - def.usingIterator = usingIterator - } - - /** - * If the tar file has more than one entry, setting this option to true, allows to get the - * iterator even if the directory is empty - */ - public fun allowEmptyDirectory(allowEmptyDirectory: Boolean) { - def.allowEmptyDirectory = allowEmptyDirectory.toString() - } - - /** - * If the tar file has more than one entry, setting this option to true, allows to get the - * iterator even if the directory is empty - */ - public fun allowEmptyDirectory(allowEmptyDirectory: String) { - def.allowEmptyDirectory = allowEmptyDirectory - } - - /** - * If the file name contains path elements, setting this option to true, allows the path to be - * maintained in the tar file. - */ - public fun preservePathElements(preservePathElements: Boolean) { - def.preservePathElements = preservePathElements.toString() - } - - /** - * If the file name contains path elements, setting this option to true, allows the path to be - * maintained in the tar file. - */ - public fun preservePathElements(preservePathElements: String) { - def.preservePathElements = preservePathElements - } - - /** - * Set the maximum decompressed size of a tar file (in bytes). The default value if not specified - * corresponds to 1 gigabyte. An IOException will be thrown if the decompressed size exceeds this - * amount. Set to -1 to disable setting a maximum decompressed size. - */ - public fun maxDecompressedSize(maxDecompressedSize: Long) { - def.maxDecompressedSize = maxDecompressedSize.toString() - } - - /** - * Set the maximum decompressed size of a tar file (in bytes). The default value if not specified - * corresponds to 1 gigabyte. An IOException will be thrown if the decompressed size exceeds this - * amount. Set to -1 to disable setting a maximum decompressed size. - */ - public fun maxDecompressedSize(maxDecompressedSize: String) { - def.maxDecompressedSize = maxDecompressedSize - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ThriftDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ThriftDataFormatDsl.kt deleted file mode 100644 index 9092f8bba8430..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ThriftDataFormatDsl.kt +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.ThriftDataFormat - -/** - * Serialize and deserialize messages using Apache Thrift binary data format. - */ -public fun DataFormatDsl.thrift(i: ThriftDataFormatDsl.() -> Unit) { - def = ThriftDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class ThriftDataFormatDsl { - public val def: ThriftDataFormat - - init { - def = ThriftDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Name of class to use when unmarshalling - */ - public fun instanceClass(instanceClass: String) { - def.instanceClass = instanceClass - } - - /** - * Defines a content type format in which thrift message will be serialized/deserialized from(to) - * the Java been. The format can either be native or json for either native binary thrift, json or - * simple json fields representation. The default value is binary. - */ - public fun contentTypeFormat(contentTypeFormat: String) { - def.contentTypeFormat = contentTypeFormat - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: Boolean) { - def.contentTypeHeader = contentTypeHeader.toString() - } - - /** - * Whether the data format should set the Content-Type header with the type from the data format. - * For example application/xml for data formats marshalling to XML, or application/json for data - * formats marshalling to JSON - */ - public fun contentTypeHeader(contentTypeHeader: String) { - def.contentTypeHeader = contentTypeHeader - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/UnivocityCsvDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/UnivocityCsvDataFormatDsl.kt deleted file mode 100644 index b5d9d47989dfa..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/UnivocityCsvDataFormatDsl.kt +++ /dev/null @@ -1,238 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.UniVocityCsvDataFormat - -/** - * Marshal and unmarshal Java objects from and to CSV (Comma Separated Values) using UniVocity - * Parsers. - */ -public fun DataFormatDsl.univocityCsv(i: UnivocityCsvDataFormatDsl.() -> Unit) { - def = UnivocityCsvDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class UnivocityCsvDataFormatDsl { - public val def: UniVocityCsvDataFormat - - init { - def = UniVocityCsvDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The delimiter of values - */ - public fun delimiter(delimiter: String) { - def.delimiter = delimiter - } - - /** - * Whether or not all values must be quoted when writing them. - */ - public fun quoteAllFields(quoteAllFields: Boolean) { - def.quoteAllFields = quoteAllFields.toString() - } - - /** - * Whether or not all values must be quoted when writing them. - */ - public fun quoteAllFields(quoteAllFields: String) { - def.quoteAllFields = quoteAllFields - } - - /** - * The quote symbol. - */ - public fun quote(quote: String) { - def.quote = quote - } - - /** - * The quote escape symbol - */ - public fun quoteEscape(quoteEscape: String) { - def.quoteEscape = quoteEscape - } - - /** - * The string representation of a null value. The default value is null - */ - public fun nullValue(nullValue: String) { - def.nullValue = nullValue - } - - /** - * Whether or not the empty lines must be ignored. The default value is true - */ - public fun skipEmptyLines(skipEmptyLines: Boolean) { - def.skipEmptyLines = skipEmptyLines.toString() - } - - /** - * Whether or not the empty lines must be ignored. The default value is true - */ - public fun skipEmptyLines(skipEmptyLines: String) { - def.skipEmptyLines = skipEmptyLines - } - - /** - * Whether or not the trailing white spaces must be ignored. The default value is true - */ - public fun ignoreTrailingWhitespaces(ignoreTrailingWhitespaces: Boolean) { - def.ignoreTrailingWhitespaces = ignoreTrailingWhitespaces.toString() - } - - /** - * Whether or not the trailing white spaces must be ignored. The default value is true - */ - public fun ignoreTrailingWhitespaces(ignoreTrailingWhitespaces: String) { - def.ignoreTrailingWhitespaces = ignoreTrailingWhitespaces - } - - /** - * Whether or not the leading white spaces must be ignored. The default value is true - */ - public fun ignoreLeadingWhitespaces(ignoreLeadingWhitespaces: Boolean) { - def.ignoreLeadingWhitespaces = ignoreLeadingWhitespaces.toString() - } - - /** - * Whether or not the leading white spaces must be ignored. The default value is true - */ - public fun ignoreLeadingWhitespaces(ignoreLeadingWhitespaces: String) { - def.ignoreLeadingWhitespaces = ignoreLeadingWhitespaces - } - - /** - * Whether or not the headers are disabled. When defined, this option explicitly sets the headers - * as null which indicates that there is no header. The default value is false - */ - public fun headersDisabled(headersDisabled: Boolean) { - def.headersDisabled = headersDisabled.toString() - } - - /** - * Whether or not the headers are disabled. When defined, this option explicitly sets the headers - * as null which indicates that there is no header. The default value is false - */ - public fun headersDisabled(headersDisabled: String) { - def.headersDisabled = headersDisabled - } - - /** - * Whether or not the header must be read in the first line of the test document. The default - * value is false - */ - public fun headerExtractionEnabled(headerExtractionEnabled: Boolean) { - def.headerExtractionEnabled = headerExtractionEnabled.toString() - } - - /** - * Whether or not the header must be read in the first line of the test document. The default - * value is false - */ - public fun headerExtractionEnabled(headerExtractionEnabled: String) { - def.headerExtractionEnabled = headerExtractionEnabled - } - - /** - * The maximum number of record to read. - */ - public fun numberOfRecordsToRead(numberOfRecordsToRead: Int) { - def.numberOfRecordsToRead = numberOfRecordsToRead.toString() - } - - /** - * The maximum number of record to read. - */ - public fun numberOfRecordsToRead(numberOfRecordsToRead: String) { - def.numberOfRecordsToRead = numberOfRecordsToRead - } - - /** - * The String representation of an empty value. - */ - public fun emptyValue(emptyValue: String) { - def.emptyValue = emptyValue - } - - /** - * The line separator of the files. The default value is to use the JVM platform line separator - */ - public fun lineSeparator(lineSeparator: String) { - def.lineSeparator = lineSeparator - } - - /** - * The normalized line separator of the files. The default value is a new line character. - */ - public fun normalizedLineSeparator(normalizedLineSeparator: String) { - def.normalizedLineSeparator = normalizedLineSeparator - } - - /** - * The comment symbol. The default value is # - */ - public fun comment(comment: String) { - def.comment = comment - } - - /** - * Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all - * the lines must be read at once. The default value is false - */ - public fun lazyLoad(lazyLoad: Boolean) { - def.lazyLoad = lazyLoad.toString() - } - - /** - * Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all - * the lines must be read at once. The default value is false - */ - public fun lazyLoad(lazyLoad: String) { - def.lazyLoad = lazyLoad - } - - /** - * Whether the unmarshalling should produce maps for the lines values instead of lists. It - * requires to have header (either defined or collected). The default value is false - */ - public fun asMap(asMap: Boolean) { - def.asMap = asMap.toString() - } - - /** - * Whether the unmarshalling should produce maps for the lines values instead of lists. It - * requires to have header (either defined or collected). The default value is false - */ - public fun asMap(asMap: String) { - def.asMap = asMap - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/UnivocityFixedDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/UnivocityFixedDataFormatDsl.kt deleted file mode 100644 index b5d789400aba2..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/UnivocityFixedDataFormatDsl.kt +++ /dev/null @@ -1,239 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.UniVocityFixedDataFormat - -/** - * Marshal and unmarshal Java objects from and to fixed length records using UniVocity Parsers. - */ -public fun DataFormatDsl.univocityFixed(i: UnivocityFixedDataFormatDsl.() -> Unit) { - def = UnivocityFixedDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class UnivocityFixedDataFormatDsl { - public val def: UniVocityFixedDataFormat - - init { - def = UniVocityFixedDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The padding character. The default value is a space - */ - public fun padding(padding: String) { - def.padding = padding - } - - /** - * Whether or not the trailing characters until new line must be ignored. The default value is - * false - */ - public fun skipTrailingCharsUntilNewline(skipTrailingCharsUntilNewline: Boolean) { - def.skipTrailingCharsUntilNewline = skipTrailingCharsUntilNewline.toString() - } - - /** - * Whether or not the trailing characters until new line must be ignored. The default value is - * false - */ - public fun skipTrailingCharsUntilNewline(skipTrailingCharsUntilNewline: String) { - def.skipTrailingCharsUntilNewline = skipTrailingCharsUntilNewline - } - - /** - * Whether or not the record ends on new line. The default value is false - */ - public fun recordEndsOnNewline(recordEndsOnNewline: Boolean) { - def.recordEndsOnNewline = recordEndsOnNewline.toString() - } - - /** - * Whether or not the record ends on new line. The default value is false - */ - public fun recordEndsOnNewline(recordEndsOnNewline: String) { - def.recordEndsOnNewline = recordEndsOnNewline - } - - /** - * The string representation of a null value. The default value is null - */ - public fun nullValue(nullValue: String) { - def.nullValue = nullValue - } - - /** - * Whether or not the empty lines must be ignored. The default value is true - */ - public fun skipEmptyLines(skipEmptyLines: Boolean) { - def.skipEmptyLines = skipEmptyLines.toString() - } - - /** - * Whether or not the empty lines must be ignored. The default value is true - */ - public fun skipEmptyLines(skipEmptyLines: String) { - def.skipEmptyLines = skipEmptyLines - } - - /** - * Whether or not the trailing white spaces must be ignored. The default value is true - */ - public fun ignoreTrailingWhitespaces(ignoreTrailingWhitespaces: Boolean) { - def.ignoreTrailingWhitespaces = ignoreTrailingWhitespaces.toString() - } - - /** - * Whether or not the trailing white spaces must be ignored. The default value is true - */ - public fun ignoreTrailingWhitespaces(ignoreTrailingWhitespaces: String) { - def.ignoreTrailingWhitespaces = ignoreTrailingWhitespaces - } - - /** - * Whether or not the leading white spaces must be ignored. The default value is true - */ - public fun ignoreLeadingWhitespaces(ignoreLeadingWhitespaces: Boolean) { - def.ignoreLeadingWhitespaces = ignoreLeadingWhitespaces.toString() - } - - /** - * Whether or not the leading white spaces must be ignored. The default value is true - */ - public fun ignoreLeadingWhitespaces(ignoreLeadingWhitespaces: String) { - def.ignoreLeadingWhitespaces = ignoreLeadingWhitespaces - } - - /** - * Whether or not the headers are disabled. When defined, this option explicitly sets the headers - * as null which indicates that there is no header. The default value is false - */ - public fun headersDisabled(headersDisabled: Boolean) { - def.headersDisabled = headersDisabled.toString() - } - - /** - * Whether or not the headers are disabled. When defined, this option explicitly sets the headers - * as null which indicates that there is no header. The default value is false - */ - public fun headersDisabled(headersDisabled: String) { - def.headersDisabled = headersDisabled - } - - /** - * Whether or not the header must be read in the first line of the test document. The default - * value is false - */ - public fun headerExtractionEnabled(headerExtractionEnabled: Boolean) { - def.headerExtractionEnabled = headerExtractionEnabled.toString() - } - - /** - * Whether or not the header must be read in the first line of the test document. The default - * value is false - */ - public fun headerExtractionEnabled(headerExtractionEnabled: String) { - def.headerExtractionEnabled = headerExtractionEnabled - } - - /** - * The maximum number of record to read. - */ - public fun numberOfRecordsToRead(numberOfRecordsToRead: Int) { - def.numberOfRecordsToRead = numberOfRecordsToRead.toString() - } - - /** - * The maximum number of record to read. - */ - public fun numberOfRecordsToRead(numberOfRecordsToRead: String) { - def.numberOfRecordsToRead = numberOfRecordsToRead - } - - /** - * The String representation of an empty value. - */ - public fun emptyValue(emptyValue: String) { - def.emptyValue = emptyValue - } - - /** - * The line separator of the files. The default value is to use the JVM platform line separator - */ - public fun lineSeparator(lineSeparator: String) { - def.lineSeparator = lineSeparator - } - - /** - * The normalized line separator of the files. The default value is a new line character. - */ - public fun normalizedLineSeparator(normalizedLineSeparator: String) { - def.normalizedLineSeparator = normalizedLineSeparator - } - - /** - * The comment symbol. The default value is # - */ - public fun comment(comment: String) { - def.comment = comment - } - - /** - * Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all - * the lines must be read at once. The default value is false - */ - public fun lazyLoad(lazyLoad: Boolean) { - def.lazyLoad = lazyLoad.toString() - } - - /** - * Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all - * the lines must be read at once. The default value is false - */ - public fun lazyLoad(lazyLoad: String) { - def.lazyLoad = lazyLoad - } - - /** - * Whether the unmarshalling should produce maps for the lines values instead of lists. It - * requires to have header (either defined or collected). The default value is false - */ - public fun asMap(asMap: Boolean) { - def.asMap = asMap.toString() - } - - /** - * Whether the unmarshalling should produce maps for the lines values instead of lists. It - * requires to have header (either defined or collected). The default value is false - */ - public fun asMap(asMap: String) { - def.asMap = asMap - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/UnivocityTsvDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/UnivocityTsvDataFormatDsl.kt deleted file mode 100644 index 75d60095dd234..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/UnivocityTsvDataFormatDsl.kt +++ /dev/null @@ -1,210 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.UniVocityTsvDataFormat - -/** - * Marshal and unmarshal Java objects from and to TSV (Tab-Separated Values) records using UniVocity - * Parsers. - */ -public fun DataFormatDsl.univocityTsv(i: UnivocityTsvDataFormatDsl.() -> Unit) { - def = UnivocityTsvDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class UnivocityTsvDataFormatDsl { - public val def: UniVocityTsvDataFormat - - init { - def = UniVocityTsvDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The escape character. - */ - public fun escapeChar(escapeChar: String) { - def.escapeChar = escapeChar - } - - /** - * The string representation of a null value. The default value is null - */ - public fun nullValue(nullValue: String) { - def.nullValue = nullValue - } - - /** - * Whether or not the empty lines must be ignored. The default value is true - */ - public fun skipEmptyLines(skipEmptyLines: Boolean) { - def.skipEmptyLines = skipEmptyLines.toString() - } - - /** - * Whether or not the empty lines must be ignored. The default value is true - */ - public fun skipEmptyLines(skipEmptyLines: String) { - def.skipEmptyLines = skipEmptyLines - } - - /** - * Whether or not the trailing white spaces must be ignored. The default value is true - */ - public fun ignoreTrailingWhitespaces(ignoreTrailingWhitespaces: Boolean) { - def.ignoreTrailingWhitespaces = ignoreTrailingWhitespaces.toString() - } - - /** - * Whether or not the trailing white spaces must be ignored. The default value is true - */ - public fun ignoreTrailingWhitespaces(ignoreTrailingWhitespaces: String) { - def.ignoreTrailingWhitespaces = ignoreTrailingWhitespaces - } - - /** - * Whether or not the leading white spaces must be ignored. The default value is true - */ - public fun ignoreLeadingWhitespaces(ignoreLeadingWhitespaces: Boolean) { - def.ignoreLeadingWhitespaces = ignoreLeadingWhitespaces.toString() - } - - /** - * Whether or not the leading white spaces must be ignored. The default value is true - */ - public fun ignoreLeadingWhitespaces(ignoreLeadingWhitespaces: String) { - def.ignoreLeadingWhitespaces = ignoreLeadingWhitespaces - } - - /** - * Whether or not the headers are disabled. When defined, this option explicitly sets the headers - * as null which indicates that there is no header. The default value is false - */ - public fun headersDisabled(headersDisabled: Boolean) { - def.headersDisabled = headersDisabled.toString() - } - - /** - * Whether or not the headers are disabled. When defined, this option explicitly sets the headers - * as null which indicates that there is no header. The default value is false - */ - public fun headersDisabled(headersDisabled: String) { - def.headersDisabled = headersDisabled - } - - /** - * Whether or not the header must be read in the first line of the test document. The default - * value is false - */ - public fun headerExtractionEnabled(headerExtractionEnabled: Boolean) { - def.headerExtractionEnabled = headerExtractionEnabled.toString() - } - - /** - * Whether or not the header must be read in the first line of the test document. The default - * value is false - */ - public fun headerExtractionEnabled(headerExtractionEnabled: String) { - def.headerExtractionEnabled = headerExtractionEnabled - } - - /** - * The maximum number of record to read. - */ - public fun numberOfRecordsToRead(numberOfRecordsToRead: Int) { - def.numberOfRecordsToRead = numberOfRecordsToRead.toString() - } - - /** - * The maximum number of record to read. - */ - public fun numberOfRecordsToRead(numberOfRecordsToRead: String) { - def.numberOfRecordsToRead = numberOfRecordsToRead - } - - /** - * The String representation of an empty value. - */ - public fun emptyValue(emptyValue: String) { - def.emptyValue = emptyValue - } - - /** - * The line separator of the files. The default value is to use the JVM platform line separator - */ - public fun lineSeparator(lineSeparator: String) { - def.lineSeparator = lineSeparator - } - - /** - * The normalized line separator of the files. The default value is a new line character. - */ - public fun normalizedLineSeparator(normalizedLineSeparator: String) { - def.normalizedLineSeparator = normalizedLineSeparator - } - - /** - * The comment symbol. The default value is # - */ - public fun comment(comment: String) { - def.comment = comment - } - - /** - * Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all - * the lines must be read at once. The default value is false - */ - public fun lazyLoad(lazyLoad: Boolean) { - def.lazyLoad = lazyLoad.toString() - } - - /** - * Whether the unmarshalling should produce an iterator that reads the lines on the fly or if all - * the lines must be read at once. The default value is false - */ - public fun lazyLoad(lazyLoad: String) { - def.lazyLoad = lazyLoad - } - - /** - * Whether the unmarshalling should produce maps for the lines values instead of lists. It - * requires to have header (either defined or collected). The default value is false - */ - public fun asMap(asMap: Boolean) { - def.asMap = asMap.toString() - } - - /** - * Whether the unmarshalling should produce maps for the lines values instead of lists. It - * requires to have header (either defined or collected). The default value is false - */ - public fun asMap(asMap: String) { - def.asMap = asMap - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/XmlSecurityDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/XmlSecurityDataFormatDsl.kt deleted file mode 100644 index e162308ea02d4..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/XmlSecurityDataFormatDsl.kt +++ /dev/null @@ -1,167 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.ByteArray -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.XMLSecurityDataFormat - -/** - * Encrypt and decrypt XML payloads using Apache Santuario. - */ -public fun DataFormatDsl.xmlSecurity(i: XmlSecurityDataFormatDsl.() -> Unit) { - def = XmlSecurityDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class XmlSecurityDataFormatDsl { - public val def: XMLSecurityDataFormat - - init { - def = XMLSecurityDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The cipher algorithm to be used for encryption/decryption of the XML message content. The - * available choices are: XMLCipher.TRIPLEDES XMLCipher.AES_128 XMLCipher.AES_128_GCM - * XMLCipher.AES_192 XMLCipher.AES_192_GCM XMLCipher.AES_256 XMLCipher.AES_256_GCM XMLCipher.SEED_128 - * XMLCipher.CAMELLIA_128 XMLCipher.CAMELLIA_192 XMLCipher.CAMELLIA_256 The default value is - * XMLCipher.AES_256_GCM - */ - public fun xmlCipherAlgorithm(xmlCipherAlgorithm: String) { - def.xmlCipherAlgorithm = xmlCipherAlgorithm - } - - /** - * A String used as passPhrase to encrypt/decrypt content. The passPhrase has to be provided. The - * passPhrase needs to be put together in conjunction with the appropriate encryption algorithm. For - * example using TRIPLEDES the passPhase can be a Only another 24 Byte key - */ - public fun passPhrase(passPhrase: String) { - def.passPhrase = passPhrase - } - - /** - * A byte used as passPhrase to encrypt/decrypt content. The passPhrase has to be provided. The - * passPhrase needs to be put together in conjunction with the appropriate encryption algorithm. For - * example using TRIPLEDES the passPhase can be a Only another 24 Byte key - */ - public fun passPhraseByte(passPhraseByte: ByteArray) { - def.passPhraseByte = passPhraseByte - } - - /** - * The XPath reference to the XML Element selected for encryption/decryption. If no tag is - * specified, the entire payload is encrypted/decrypted. - */ - public fun secureTag(secureTag: String) { - def.secureTag = secureTag - } - - /** - * A boolean value to specify whether the XML Element is to be encrypted or the contents of the - * XML Element. false = Element Level. true = Element Content Level. - */ - public fun secureTagContents(secureTagContents: Boolean) { - def.secureTagContents = secureTagContents.toString() - } - - /** - * A boolean value to specify whether the XML Element is to be encrypted or the contents of the - * XML Element. false = Element Level. true = Element Content Level. - */ - public fun secureTagContents(secureTagContents: String) { - def.secureTagContents = secureTagContents - } - - /** - * The cipher algorithm to be used for encryption/decryption of the asymmetric key. The available - * choices are: XMLCipher.RSA_v1dot5 XMLCipher.RSA_OAEP XMLCipher.RSA_OAEP_11 The default value is - * XMLCipher.RSA_OAEP - */ - public fun keyCipherAlgorithm(keyCipherAlgorithm: String) { - def.keyCipherAlgorithm = keyCipherAlgorithm - } - - /** - * The key alias to be used when retrieving the recipient's public or private key from a KeyStore - * when performing asymmetric key encryption or decryption. - */ - public fun recipientKeyAlias(recipientKeyAlias: String) { - def.recipientKeyAlias = recipientKeyAlias - } - - /** - * Refers to a KeyStore instance to lookup in the registry, which is used for configuration - * options for creating and loading a KeyStore instance that represents the sender's trustStore or - * recipient's keyStore. - */ - public fun keyOrTrustStoreParametersRef(keyOrTrustStoreParametersRef: String) { - def.keyOrTrustStoreParametersRef = keyOrTrustStoreParametersRef - } - - /** - * The password to be used for retrieving the private key from the KeyStore. This key is used for - * asymmetric decryption. - */ - public fun keyPassword(keyPassword: String) { - def.keyPassword = keyPassword - } - - /** - * The digest algorithm to use with the RSA OAEP algorithm. The available choices are: - * XMLCipher.SHA1 XMLCipher.SHA256 XMLCipher.SHA512 The default value is XMLCipher.SHA1 - */ - public fun digestAlgorithm(digestAlgorithm: String) { - def.digestAlgorithm = digestAlgorithm - } - - /** - * The MGF Algorithm to use with the RSA OAEP algorithm. The available choices are: - * EncryptionConstants.MGF1_SHA1 EncryptionConstants.MGF1_SHA256 EncryptionConstants.MGF1_SHA512 The - * default value is EncryptionConstants.MGF1_SHA1 - */ - public fun mgfAlgorithm(mgfAlgorithm: String) { - def.mgfAlgorithm = mgfAlgorithm - } - - /** - * Whether to add the public key used to encrypt the session key as a KeyValue in the EncryptedKey - * structure or not. - */ - public fun addKeyValueForEncryptedKey(addKeyValueForEncryptedKey: Boolean) { - def.addKeyValueForEncryptedKey = addKeyValueForEncryptedKey.toString() - } - - /** - * Whether to add the public key used to encrypt the session key as a KeyValue in the EncryptedKey - * structure or not. - */ - public fun addKeyValueForEncryptedKey(addKeyValueForEncryptedKey: String) { - def.addKeyValueForEncryptedKey = addKeyValueForEncryptedKey - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ZipDeflaterDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ZipDeflaterDataFormatDsl.kt deleted file mode 100644 index 66136939b0ab6..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ZipDeflaterDataFormatDsl.kt +++ /dev/null @@ -1,62 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Int -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.ZipDeflaterDataFormat - -/** - * Compress and decompress streams using java.util.zip.Deflater and java.util.zip.Inflater. - */ -public fun DataFormatDsl.zipDeflater(i: ZipDeflaterDataFormatDsl.() -> Unit) { - def = ZipDeflaterDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class ZipDeflaterDataFormatDsl { - public val def: ZipDeflaterDataFormat - - init { - def = ZipDeflaterDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * To specify a specific compression between 0-9. -1 is default compression, 0 is no compression, - * and 9 is the best compression. - */ - public fun compressionLevel(compressionLevel: Int) { - def.compressionLevel = compressionLevel.toString() - } - - /** - * To specify a specific compression between 0-9. -1 is default compression, 0 is no compression, - * and 9 is the best compression. - */ - public fun compressionLevel(compressionLevel: String) { - def.compressionLevel = compressionLevel - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ZipFileDataFormatDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ZipFileDataFormatDsl.kt deleted file mode 100644 index 1d7bb5e7a2110..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/dataformats/ZipFileDataFormatDsl.kt +++ /dev/null @@ -1,113 +0,0 @@ -/* - * 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.kotlin.dataformats - -import kotlin.Boolean -import kotlin.Long -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.DataFormatDsl -import org.apache.camel.model.dataformat.ZipFileDataFormat - -/** - * Compression and decompress streams using java.util.zip.ZipStream. - */ -public fun DataFormatDsl.zipFile(i: ZipFileDataFormatDsl.() -> Unit) { - def = ZipFileDataFormatDsl().apply(i).def -} - -@CamelDslMarker -public class ZipFileDataFormatDsl { - public val def: ZipFileDataFormat - - init { - def = ZipFileDataFormat()} - - /** - * The id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * If the zip file has more than one entry, the setting this option to true, allows working with - * the splitter EIP, to split the data using an iterator in a streaming mode. - */ - public fun usingIterator(usingIterator: Boolean) { - def.usingIterator = usingIterator.toString() - } - - /** - * If the zip file has more than one entry, the setting this option to true, allows working with - * the splitter EIP, to split the data using an iterator in a streaming mode. - */ - public fun usingIterator(usingIterator: String) { - def.usingIterator = usingIterator - } - - /** - * If the zip file has more than one entry, setting this option to true, allows to get the - * iterator even if the directory is empty - */ - public fun allowEmptyDirectory(allowEmptyDirectory: Boolean) { - def.allowEmptyDirectory = allowEmptyDirectory.toString() - } - - /** - * If the zip file has more than one entry, setting this option to true, allows to get the - * iterator even if the directory is empty - */ - public fun allowEmptyDirectory(allowEmptyDirectory: String) { - def.allowEmptyDirectory = allowEmptyDirectory - } - - /** - * If the file name contains path elements, setting this option to true, allows the path to be - * maintained in the zip file. - */ - public fun preservePathElements(preservePathElements: Boolean) { - def.preservePathElements = preservePathElements.toString() - } - - /** - * If the file name contains path elements, setting this option to true, allows the path to be - * maintained in the zip file. - */ - public fun preservePathElements(preservePathElements: String) { - def.preservePathElements = preservePathElements - } - - /** - * Set the maximum decompressed size of a zip file (in bytes). The default value if not specified - * corresponds to 1 gigabyte. An IOException will be thrown if the decompressed size exceeds this - * amount. Set to -1 to disable setting a maximum decompressed size. - */ - public fun maxDecompressedSize(maxDecompressedSize: Long) { - def.maxDecompressedSize = maxDecompressedSize.toString() - } - - /** - * Set the maximum decompressed size of a zip file (in bytes). The default value if not specified - * corresponds to 1 gigabyte. An IOException will be thrown if the decompressed size exceeds this - * amount. Set to -1 to disable setting a maximum decompressed size. - */ - public fun maxDecompressedSize(maxDecompressedSize: String) { - def.maxDecompressedSize = maxDecompressedSize - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/BeanLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/BeanLanguageDsl.kt deleted file mode 100644 index 276e6f00f5994..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/BeanLanguageDsl.kt +++ /dev/null @@ -1,125 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.MethodCallExpression - -/** - * Calls a Java bean method. - */ -public fun bean(bean: String, i: BeanLanguageDsl.() -> Unit = {}): MethodCallExpression { - val def = MethodCallExpression(bean) - BeanLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class BeanLanguageDsl( - def: MethodCallExpression, -) { - public val def: MethodCallExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Reference to an existing bean (bean id) to lookup in the registry - */ - public fun ref(ref: String) { - def.ref = ref - } - - /** - * Name of method to call - */ - public fun method(method: String) { - def.method = method - } - - /** - * Class name (fully qualified) of the bean to use Will lookup in registry and if there is a - * single instance of the same type, then the existing bean is used, otherwise a new bean is created - * (requires a default no-arg constructor). - */ - public fun beanType(beanType: Class<*>) { - def.beanType = beanType - } - - /** - * Scope of bean. When using singleton scope (default) the bean is created or looked up only once - * and reused for the lifetime of the endpoint. The bean should be thread-safe in case concurrent - * threads is calling the bean at the same time. When using request scope the bean is created or - * looked up once per request (exchange). This can be used if you want to store state on a bean while - * processing a request and you want to call the same bean instance multiple times while processing - * the request. The bean does not have to be thread-safe as the instance is only called from the same - * request. When using prototype scope, then the bean will be looked up or created per call. However - * in case of lookup then this is delegated to the bean registry such as Spring or CDI (if in use), - * which depends on their configuration can act as either singleton or prototype scope. So when using - * prototype scope then this depends on the bean registry implementation. - */ - public fun scope(scope: String) { - def.scope = scope - } - - /** - * Whether to validate the bean has the configured method. - */ - public fun validate(validate: Boolean) { - def.validate = validate.toString() - } - - /** - * Whether to validate the bean has the configured method. - */ - public fun validate(validate: String) { - def.validate = validate - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/ConstantLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/ConstantLanguageDsl.kt deleted file mode 100644 index 85ee058e0c150..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/ConstantLanguageDsl.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.ConstantExpression - -/** - * A fixed value set only once during the route startup. - */ -public fun constant(constant: String, i: ConstantLanguageDsl.() -> Unit = {}): ConstantExpression { - val def = ConstantExpression(constant) - ConstantLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class ConstantLanguageDsl( - def: ConstantExpression, -) { - public val def: ConstantExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/CsimpleLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/CsimpleLanguageDsl.kt deleted file mode 100644 index 00cd30ba57e3c..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/CsimpleLanguageDsl.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.CSimpleExpression - -/** - * Evaluate a compiled simple expression. - */ -public fun csimple(csimple: String, i: CsimpleLanguageDsl.() -> Unit = {}): CSimpleExpression { - val def = CSimpleExpression(csimple) - CsimpleLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class CsimpleLanguageDsl( - def: CSimpleExpression, -) { - public val def: CSimpleExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/DatasonnetLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/DatasonnetLanguageDsl.kt deleted file mode 100644 index 0420d4e7d3dc7..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/DatasonnetLanguageDsl.kt +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.DatasonnetExpression - -/** - * To use DataSonnet scripts for message transformations. - */ -public fun datasonnet(datasonnet: String, i: DatasonnetLanguageDsl.() -> Unit = {}): - DatasonnetExpression { - val def = DatasonnetExpression(datasonnet) - DatasonnetLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class DatasonnetLanguageDsl( - def: DatasonnetExpression, -) { - public val def: DatasonnetExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The String representation of the message's body MediaType - */ - public fun bodyMediaType(bodyMediaType: String) { - def.bodyMediaType = bodyMediaType - } - - /** - * The String representation of the MediaType to output - */ - public fun outputMediaType(outputMediaType: String) { - def.outputMediaType = outputMediaType - } - - /** - * Source to use, instead of message body. You can prefix with variable:, header:, or property: to - * specify kind of source. Otherwise, the source is assumed to be a variable. Use empty or null to - * use default source, which is the message body. - */ - public fun source(source: String) { - def.source = source - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/ExchangePropertyLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/ExchangePropertyLanguageDsl.kt deleted file mode 100644 index 66f80d90b38b7..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/ExchangePropertyLanguageDsl.kt +++ /dev/null @@ -1,65 +0,0 @@ -/* - * 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.kotlin.languages - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.ExchangePropertyExpression - -/** - * Gets a property from the Exchange. - */ -public fun exchangeProperty(exchangeProperty: String, i: ExchangePropertyLanguageDsl.() -> Unit = - {}): ExchangePropertyExpression { - val def = ExchangePropertyExpression(exchangeProperty) - ExchangePropertyLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class ExchangePropertyLanguageDsl( - def: ExchangePropertyExpression, -) { - public val def: ExchangePropertyExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/FileLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/FileLanguageDsl.kt deleted file mode 100644 index 5d6eb9e874caa..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/FileLanguageDsl.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.SimpleExpression - -/** - * File related capabilities for the Simple language - */ -public fun `file`(`file`: String, i: FileLanguageDsl.() -> Unit = {}): SimpleExpression { - val def = SimpleExpression(file) - FileLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class FileLanguageDsl( - def: SimpleExpression, -) { - public val def: SimpleExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/GroovyLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/GroovyLanguageDsl.kt deleted file mode 100644 index d2f14b4bb1a07..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/GroovyLanguageDsl.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.GroovyExpression - -/** - * Evaluates a Groovy script. - */ -public fun groovy(groovy: String, i: GroovyLanguageDsl.() -> Unit = {}): GroovyExpression { - val def = GroovyExpression(groovy) - GroovyLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class GroovyLanguageDsl( - def: GroovyExpression, -) { - public val def: GroovyExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/HeaderLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/HeaderLanguageDsl.kt deleted file mode 100644 index 457920e12f285..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/HeaderLanguageDsl.kt +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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.kotlin.languages - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.HeaderExpression - -/** - * Gets a header from the Exchange. - */ -public fun `header`(`header`: String, i: HeaderLanguageDsl.() -> Unit = {}): HeaderExpression { - val def = HeaderExpression(header) - HeaderLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class HeaderLanguageDsl( - def: HeaderExpression, -) { - public val def: HeaderExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/Hl7terserLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/Hl7terserLanguageDsl.kt deleted file mode 100644 index 3188b68a3f829..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/Hl7terserLanguageDsl.kt +++ /dev/null @@ -1,82 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.Hl7TerserExpression - -/** - * Get the value of a HL7 message field specified by terse location specification syntax. - */ -public fun hl7terser(hl7terser: String, i: Hl7terserLanguageDsl.() -> Unit = {}): - Hl7TerserExpression { - val def = Hl7TerserExpression(hl7terser) - Hl7terserLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class Hl7terserLanguageDsl( - def: Hl7TerserExpression, -) { - public val def: Hl7TerserExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Source to use, instead of message body. You can prefix with variable:, header:, or property: to - * specify kind of source. Otherwise, the source is assumed to be a variable. Use empty or null to - * use default source, which is the message body. - */ - public fun source(source: String) { - def.source = source - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JavaLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JavaLanguageDsl.kt deleted file mode 100644 index f29505dce2338..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JavaLanguageDsl.kt +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.JavaExpression - -/** - * Evaluates a Java (Java compiled once at runtime) expression. - */ -public fun java(java: String, i: JavaLanguageDsl.() -> Unit = {}): JavaExpression { - val def = JavaExpression(java) - JavaLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class JavaLanguageDsl( - def: JavaExpression, -) { - public val def: JavaExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Whether the expression should be pre compiled once during initialization phase. If this is - * turned off, then the expression is reloaded and compiled on each evaluation. - */ - public fun preCompile(preCompile: Boolean) { - def.preCompile = preCompile.toString() - } - - /** - * Whether the expression should be pre compiled once during initialization phase. If this is - * turned off, then the expression is reloaded and compiled on each evaluation. - */ - public fun preCompile(preCompile: String) { - def.preCompile = preCompile - } - - /** - * Whether single quotes can be used as replacement for double quotes. This is convenient when you - * need to work with strings inside strings. - */ - public fun singleQuotes(singleQuotes: Boolean) { - def.singleQuotes = singleQuotes.toString() - } - - /** - * Whether single quotes can be used as replacement for double quotes. This is convenient when you - * need to work with strings inside strings. - */ - public fun singleQuotes(singleQuotes: String) { - def.singleQuotes = singleQuotes - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JoorLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JoorLanguageDsl.kt deleted file mode 100644 index 0b351bf31b930..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JoorLanguageDsl.kt +++ /dev/null @@ -1,104 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.JoorExpression - -/** - * Evaluates a jOOR (Java compiled once at runtime) expression. - */ -public fun joor(joor: String, i: JoorLanguageDsl.() -> Unit = {}): JoorExpression { - val def = JoorExpression(joor) - JoorLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class JoorLanguageDsl( - def: JoorExpression, -) { - public val def: JoorExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Whether the expression should be pre compiled once during initialization phase. If this is - * turned off, then the expression is reloaded and compiled on each evaluation. - */ - public fun preCompile(preCompile: Boolean) { - def.preCompile = preCompile.toString() - } - - /** - * Whether the expression should be pre compiled once during initialization phase. If this is - * turned off, then the expression is reloaded and compiled on each evaluation. - */ - public fun preCompile(preCompile: String) { - def.preCompile = preCompile - } - - /** - * Whether single quotes can be used as replacement for double quotes. This is convenient when you - * need to work with strings inside strings. - */ - public fun singleQuotes(singleQuotes: Boolean) { - def.singleQuotes = singleQuotes.toString() - } - - /** - * Whether single quotes can be used as replacement for double quotes. This is convenient when you - * need to work with strings inside strings. - */ - public fun singleQuotes(singleQuotes: String) { - def.singleQuotes = singleQuotes - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JqLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JqLanguageDsl.kt deleted file mode 100644 index 1c6cee19eb528..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JqLanguageDsl.kt +++ /dev/null @@ -1,81 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.JqExpression - -/** - * Evaluates a JQ expression against a JSON message body. - */ -public fun jq(jq: String, i: JqLanguageDsl.() -> Unit = {}): JqExpression { - val def = JqExpression(jq) - JqLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class JqLanguageDsl( - def: JqExpression, -) { - public val def: JqExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Source to use, instead of message body. You can prefix with variable:, header:, or property: to - * specify kind of source. Otherwise, the source is assumed to be a variable. Use empty or null to - * use default source, which is the message body. - */ - public fun source(source: String) { - def.source = source - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JsLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JsLanguageDsl.kt deleted file mode 100644 index 4e1c41718fb94..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JsLanguageDsl.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.JavaScriptExpression - -/** - * Evaluates a JavaScript expression. - */ -public fun js(js: String, i: JsLanguageDsl.() -> Unit = {}): JavaScriptExpression { - val def = JavaScriptExpression(js) - JsLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class JsLanguageDsl( - def: JavaScriptExpression, -) { - public val def: JavaScriptExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JsonpathLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JsonpathLanguageDsl.kt deleted file mode 100644 index 4ec7da51efedb..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/JsonpathLanguageDsl.kt +++ /dev/null @@ -1,160 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.JsonPathExpression - -/** - * Evaluates a JSONPath expression against a JSON message body. - */ -public fun jsonpath(jsonpath: String, i: JsonpathLanguageDsl.() -> Unit = {}): JsonPathExpression { - val def = JsonPathExpression(jsonpath) - JsonpathLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class JsonpathLanguageDsl( - def: JsonPathExpression, -) { - public val def: JsonPathExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Whether to suppress exceptions such as PathNotFoundException. - */ - public fun suppressExceptions(suppressExceptions: Boolean) { - def.suppressExceptions = suppressExceptions.toString() - } - - /** - * Whether to suppress exceptions such as PathNotFoundException. - */ - public fun suppressExceptions(suppressExceptions: String) { - def.suppressExceptions = suppressExceptions - } - - /** - * Whether to allow in inlined Simple exceptions in the JSONPath expression - */ - public fun allowSimple(allowSimple: Boolean) { - def.allowSimple = allowSimple.toString() - } - - /** - * Whether to allow in inlined Simple exceptions in the JSONPath expression - */ - public fun allowSimple(allowSimple: String) { - def.allowSimple = allowSimple - } - - /** - * Whether to allow using the easy predicate parser to pre-parse predicates. - */ - public fun allowEasyPredicate(allowEasyPredicate: Boolean) { - def.allowEasyPredicate = allowEasyPredicate.toString() - } - - /** - * Whether to allow using the easy predicate parser to pre-parse predicates. - */ - public fun allowEasyPredicate(allowEasyPredicate: String) { - def.allowEasyPredicate = allowEasyPredicate - } - - /** - * Whether to write the output of each row/element as a JSON String value instead of a Map/POJO - * value. - */ - public fun writeAsString(writeAsString: Boolean) { - def.writeAsString = writeAsString.toString() - } - - /** - * Whether to write the output of each row/element as a JSON String value instead of a Map/POJO - * value. - */ - public fun writeAsString(writeAsString: String) { - def.writeAsString = writeAsString - } - - /** - * Whether to unpack a single element json-array into an object. - */ - public fun unpackArray(unpackArray: Boolean) { - def.unpackArray = unpackArray.toString() - } - - /** - * Whether to unpack a single element json-array into an object. - */ - public fun unpackArray(unpackArray: String) { - def.unpackArray = unpackArray - } - - /** - * To configure additional options on JSONPath. Multiple values can be separated by comma. - */ - public fun option(option: String) { - def.option = option - } - - /** - * Source to use, instead of message body. You can prefix with variable:, header:, or property: to - * specify kind of source. Otherwise, the source is assumed to be a variable. Use empty or null to - * use default source, which is the message body. - */ - public fun source(source: String) { - def.source = source - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/MvelLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/MvelLanguageDsl.kt deleted file mode 100644 index 73b6c6c5190b2..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/MvelLanguageDsl.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.MvelExpression - -/** - * Evaluates a MVEL template. - */ -public fun mvel(mvel: String, i: MvelLanguageDsl.() -> Unit = {}): MvelExpression { - val def = MvelExpression(mvel) - MvelLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class MvelLanguageDsl( - def: MvelExpression, -) { - public val def: MvelExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/OgnlLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/OgnlLanguageDsl.kt deleted file mode 100644 index d65a7a443e283..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/OgnlLanguageDsl.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.OgnlExpression - -/** - * Evaluates an OGNL expression (Apache Commons OGNL). - */ -public fun ognl(ognl: String, i: OgnlLanguageDsl.() -> Unit = {}): OgnlExpression { - val def = OgnlExpression(ognl) - OgnlLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class OgnlLanguageDsl( - def: OgnlExpression, -) { - public val def: OgnlExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/PythonLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/PythonLanguageDsl.kt deleted file mode 100644 index 8c6726aa763a1..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/PythonLanguageDsl.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.PythonExpression - -/** - * Evaluates a Python expression. - */ -public fun python(python: String, i: PythonLanguageDsl.() -> Unit = {}): PythonExpression { - val def = PythonExpression(python) - PythonLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class PythonLanguageDsl( - def: PythonExpression, -) { - public val def: PythonExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/RefLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/RefLanguageDsl.kt deleted file mode 100644 index ac1c799c58534..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/RefLanguageDsl.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.RefExpression - -/** - * Uses an existing expression from the registry. - */ -public fun ref(ref: String, i: RefLanguageDsl.() -> Unit = {}): RefExpression { - val def = RefExpression(ref) - RefLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class RefLanguageDsl( - def: RefExpression, -) { - public val def: RefExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/SimpleLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/SimpleLanguageDsl.kt deleted file mode 100644 index 3957b6b52d0a4..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/SimpleLanguageDsl.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.SimpleExpression - -/** - * Evaluates a Camel simple expression. - */ -public fun simple(simple: String, i: SimpleLanguageDsl.() -> Unit = {}): SimpleExpression { - val def = SimpleExpression(simple) - SimpleLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class SimpleLanguageDsl( - def: SimpleExpression, -) { - public val def: SimpleExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/SpelLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/SpelLanguageDsl.kt deleted file mode 100644 index c49ffa2d1b2ac..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/SpelLanguageDsl.kt +++ /dev/null @@ -1,72 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.SpELExpression - -/** - * Evaluates a Spring expression (SpEL). - */ -public fun spel(spel: String, i: SpelLanguageDsl.() -> Unit = {}): SpELExpression { - val def = SpELExpression(spel) - SpelLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class SpelLanguageDsl( - def: SpELExpression, -) { - public val def: SpELExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/TokenizeLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/TokenizeLanguageDsl.kt deleted file mode 100644 index eda6e427bb19a..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/TokenizeLanguageDsl.kt +++ /dev/null @@ -1,181 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.TokenizerExpression - -/** - * Tokenize text payloads using delimiter patterns. - */ -public fun tokenize(tokenize: String, i: TokenizeLanguageDsl.() -> Unit = {}): TokenizerExpression { - val def = TokenizerExpression(tokenize) - TokenizeLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class TokenizeLanguageDsl( - def: TokenizerExpression, -) { - public val def: TokenizerExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The (start) token to use as tokenizer, for example you can use the new line token. You can use - * simple language as the token to support dynamic tokens. - */ - public fun token(token: String) { - def.token = token - } - - /** - * The end token to use as tokenizer if using start/end token pairs. You can use simple language - * as the token to support dynamic tokens. - */ - public fun endToken(endToken: String) { - def.endToken = endToken - } - - /** - * To inherit namespaces from a root/parent tag name when using XML You can use simple language as - * the tag name to support dynamic names. - */ - public fun inheritNamespaceTagName(inheritNamespaceTagName: String) { - def.inheritNamespaceTagName = inheritNamespaceTagName - } - - /** - * If the token is a regular expression pattern. The default value is false - */ - public fun regex(regex: Boolean) { - def.regex = regex.toString() - } - - /** - * If the token is a regular expression pattern. The default value is false - */ - public fun regex(regex: String) { - def.regex = regex - } - - /** - * Whether the input is XML messages. This option must be set to true if working with XML - * payloads. - */ - public fun xml(xml: Boolean) { - def.xml = xml.toString() - } - - /** - * Whether the input is XML messages. This option must be set to true if working with XML - * payloads. - */ - public fun xml(xml: String) { - def.xml = xml - } - - /** - * Whether to include the tokens in the parts when using pairs. When including tokens then the - * endToken property must also be configured (to use pair mode). The default value is false - */ - public fun includeTokens(includeTokens: Boolean) { - def.includeTokens = includeTokens.toString() - } - - /** - * Whether to include the tokens in the parts when using pairs. When including tokens then the - * endToken property must also be configured (to use pair mode). The default value is false - */ - public fun includeTokens(includeTokens: String) { - def.includeTokens = includeTokens - } - - /** - * To group N parts together, for example to split big files into chunks of 1000 lines. You can - * use simple language as the group to support dynamic group sizes. - */ - public fun group(group: String) { - def.group = group - } - - /** - * Sets the delimiter to use when grouping. If this has not been set then token will be used as - * the delimiter. - */ - public fun groupDelimiter(groupDelimiter: String) { - def.groupDelimiter = groupDelimiter - } - - /** - * To skip the very first element - */ - public fun skipFirst(skipFirst: Boolean) { - def.skipFirst = skipFirst.toString() - } - - /** - * To skip the very first element - */ - public fun skipFirst(skipFirst: String) { - def.skipFirst = skipFirst - } - - /** - * Source to use, instead of message body. You can prefix with variable:, header:, or property: to - * specify kind of source. Otherwise, the source is assumed to be a variable. Use empty or null to - * use default source, which is the message body. - */ - public fun source(source: String) { - def.source = source - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/VariableLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/VariableLanguageDsl.kt deleted file mode 100644 index 480f3ed636daa..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/VariableLanguageDsl.kt +++ /dev/null @@ -1,64 +0,0 @@ -/* - * 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.kotlin.languages - -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.VariableExpression - -/** - * Gets a variable - */ -public fun variable(variable: String, i: VariableLanguageDsl.() -> Unit = {}): VariableExpression { - val def = VariableExpression(variable) - VariableLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class VariableLanguageDsl( - def: VariableExpression, -) { - public val def: VariableExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/WasmLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/WasmLanguageDsl.kt deleted file mode 100644 index 09f840f37fcff..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/WasmLanguageDsl.kt +++ /dev/null @@ -1,80 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.language.WasmExpression - -/** - * Call a wasm (web assembly) function. - */ -public fun wasm(wasm: String, i: WasmLanguageDsl.() -> Unit = {}): WasmExpression { - val def = WasmExpression(wasm) - WasmLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class WasmLanguageDsl( - def: WasmExpression, -) { - public val def: WasmExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Set the module (the distributable, loadable, and executable unit of code in WebAssembly) - * resource that provides the expression function. - */ - public fun module(module: String) { - def.module = module - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/XpathLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/XpathLanguageDsl.kt deleted file mode 100644 index c4a0dc649c5ae..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/XpathLanguageDsl.kt +++ /dev/null @@ -1,194 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import kotlin.collections.MutableList -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.PropertyDefinition -import org.apache.camel.model.language.XPathExpression - -/** - * Evaluates an XPath expression against an XML payload. - */ -public fun xpath(xpath: String, i: XpathLanguageDsl.() -> Unit = {}): XPathExpression { - val def = XPathExpression(xpath) - XpathLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class XpathLanguageDsl( - def: XPathExpression, -) { - public val def: XPathExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Name of class for document type The default value is org.w3c.dom.Document - */ - public fun documentType(documentType: Class<*>) { - def.documentType = documentType - } - - /** - * Sets the output type supported by XPath. - */ - public fun resultQName(resultQName: String) { - def.resultQName = resultQName - } - - /** - * Whether to use Saxon. - */ - public fun saxon(saxon: Boolean) { - def.saxon = saxon.toString() - } - - /** - * Whether to use Saxon. - */ - public fun saxon(saxon: String) { - def.saxon = saxon - } - - /** - * References to a custom XPathFactory to lookup in the registry - */ - public fun factoryRef(factoryRef: String) { - def.factoryRef = factoryRef - } - - /** - * The XPath object model to use - */ - public fun objectModel(objectModel: String) { - def.objectModel = objectModel - } - - /** - * Whether to log namespaces which can assist during troubleshooting - */ - public fun logNamespaces(logNamespaces: Boolean) { - def.logNamespaces = logNamespaces.toString() - } - - /** - * Whether to log namespaces which can assist during troubleshooting - */ - public fun logNamespaces(logNamespaces: String) { - def.logNamespaces = logNamespaces - } - - /** - * Whether to enable thread-safety for the returned result of the xpath expression. This applies - * to when using NODESET as the result type, and the returned set has multiple elements. In this - * situation there can be thread-safety issues if you process the NODESET concurrently such as from a - * Camel Splitter EIP in parallel processing mode. This option prevents concurrency issues by doing - * defensive copies of the nodes. It is recommended to turn this option on if you are using - * camel-saxon or Saxon in your application. Saxon has thread-safety issues which can be prevented by - * turning this option on. - */ - public fun threadSafety(threadSafety: Boolean) { - def.threadSafety = threadSafety.toString() - } - - /** - * Whether to enable thread-safety for the returned result of the xpath expression. This applies - * to when using NODESET as the result type, and the returned set has multiple elements. In this - * situation there can be thread-safety issues if you process the NODESET concurrently such as from a - * Camel Splitter EIP in parallel processing mode. This option prevents concurrency issues by doing - * defensive copies of the nodes. It is recommended to turn this option on if you are using - * camel-saxon or Saxon in your application. Saxon has thread-safety issues which can be prevented by - * turning this option on. - */ - public fun threadSafety(threadSafety: String) { - def.threadSafety = threadSafety - } - - /** - * Whether to enable pre-compiling the xpath expression during initialization phase. pre-compile - * is enabled by default. This can be used to turn off, for example in cases the compilation phase is - * desired at the starting phase, such as if the application is ahead of time compiled (for example - * with camel-quarkus) which would then load the xpath factory of the built operating system, and not - * a JVM runtime. - */ - public fun preCompile(preCompile: Boolean) { - def.preCompile = preCompile.toString() - } - - /** - * Whether to enable pre-compiling the xpath expression during initialization phase. pre-compile - * is enabled by default. This can be used to turn off, for example in cases the compilation phase is - * desired at the starting phase, such as if the application is ahead of time compiled (for example - * with camel-quarkus) which would then load the xpath factory of the built operating system, and not - * a JVM runtime. - */ - public fun preCompile(preCompile: String) { - def.preCompile = preCompile - } - - /** - * Injects the XML Namespaces of prefix - uri mappings - */ - public fun namespace(namespace: MutableList) { - def.namespace = namespace - } - - /** - * Source to use, instead of message body. You can prefix with variable:, header:, or property: to - * specify kind of source. Otherwise, the source is assumed to be a variable. Use empty or null to - * use default source, which is the message body. - */ - public fun source(source: String) { - def.source = source - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/XqueryLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/XqueryLanguageDsl.kt deleted file mode 100644 index f6fdf888ca857..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/XqueryLanguageDsl.kt +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.String -import kotlin.Unit -import kotlin.collections.MutableList -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.PropertyDefinition -import org.apache.camel.model.language.XQueryExpression - -/** - * Evaluates an XQuery expressions against an XML payload. - */ -public fun xquery(xquery: String, i: XqueryLanguageDsl.() -> Unit = {}): XQueryExpression { - val def = XQueryExpression(xquery) - XqueryLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class XqueryLanguageDsl( - def: XQueryExpression, -) { - public val def: XQueryExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * Reference to a saxon configuration instance in the registry to use for xquery (requires - * camel-saxon). This may be needed to add custom functions to a saxon configuration, so these custom - * functions can be used in xquery expressions. - */ - public fun configurationRef(configurationRef: String) { - def.configurationRef = configurationRef - } - - /** - * Injects the XML Namespaces of prefix - uri mappings - */ - public fun namespace(namespace: MutableList) { - def.namespace = namespace - } - - /** - * Source to use, instead of message body. You can prefix with variable:, header:, or property: to - * specify kind of source. Otherwise, the source is assumed to be a variable. Use empty or null to - * use default source, which is the message body. - */ - public fun source(source: String) { - def.source = source - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/XtokenizeLanguageDsl.kt b/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/XtokenizeLanguageDsl.kt deleted file mode 100644 index 7963cc432adea..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/kotlin/org/apache/camel/kotlin/languages/XtokenizeLanguageDsl.kt +++ /dev/null @@ -1,116 +0,0 @@ -/* - * 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.kotlin.languages - -import java.lang.Class -import kotlin.Boolean -import kotlin.Int -import kotlin.String -import kotlin.Unit -import kotlin.collections.MutableList -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.PropertyDefinition -import org.apache.camel.model.language.XMLTokenizerExpression - -/** - * Tokenize XML payloads. - */ -public fun xtokenize(xtokenize: String, i: XtokenizeLanguageDsl.() -> Unit = {}): - XMLTokenizerExpression { - val def = XMLTokenizerExpression(xtokenize) - XtokenizeLanguageDsl(def).apply(i) - return def -} - -@CamelDslMarker -public class XtokenizeLanguageDsl( - def: XMLTokenizerExpression, -) { - public val def: XMLTokenizerExpression - - init { - this.def = def - } - - /** - * Sets the id of this node - */ - public fun id(id: String) { - def.id = id - } - - /** - * The extraction mode. The available extraction modes are: i - injecting the contextual namespace - * bindings into the extracted token (default) w - wrapping the extracted token in its ancestor - * context u - unwrapping the extracted token to its child content t - extracting the text content of - * the specified element - */ - public fun mode(mode: String) { - def.mode = mode - } - - /** - * To group N parts together - */ - public fun group(group: Int) { - def.group = group.toString() - } - - /** - * To group N parts together - */ - public fun group(group: String) { - def.group = group - } - - /** - * Injects the XML Namespaces of prefix - uri mappings - */ - public fun namespace(namespace: MutableList) { - def.namespace = namespace - } - - /** - * Source to use, instead of message body. You can prefix with variable:, header:, or property: to - * specify kind of source. Otherwise, the source is assumed to be a variable. Use empty or null to - * use default source, which is the message body. - */ - public fun source(source: String) { - def.source = source - } - - /** - * Sets the class of the result type (type from output) - */ - public fun resultType(resultType: Class<*>) { - def.resultType = resultType - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: Boolean) { - def.trim = trim.toString() - } - - /** - * Whether to trim the value to remove leading and trailing whitespaces and line breaks - */ - public fun trim(trim: String) { - def.trim = trim - } -} diff --git a/dsl/camel-kotlin-api/src/generated/resources/META-INF/services/org/apache/camel/other.properties b/dsl/camel-kotlin-api/src/generated/resources/META-INF/services/org/apache/camel/other.properties deleted file mode 100644 index 7c072fbe6f382..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/resources/META-INF/services/org/apache/camel/other.properties +++ /dev/null @@ -1,7 +0,0 @@ -# Generated by camel build tools - do NOT edit this file! -name=kotlin-api -groupId=org.apache.camel -artifactId=camel-kotlin-api -version=4.8.0-SNAPSHOT -projectName=Camel :: Kotlin API (deprecated) -projectDescription=Camel Kotlin API (deprecated) diff --git a/dsl/camel-kotlin-api/src/generated/resources/kotlin-api.json b/dsl/camel-kotlin-api/src/generated/resources/kotlin-api.json deleted file mode 100644 index 4e73d4b4aba71..0000000000000 --- a/dsl/camel-kotlin-api/src/generated/resources/kotlin-api.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "other": { - "kind": "other", - "name": "kotlin-api", - "title": "Kotlin API", - "description": "Camel Kotlin API (deprecated)", - "deprecated": true, - "firstVersion": "4.4.0", - "label": "dsl", - "supportLevel": "Experimental", - "groupId": "org.apache.camel", - "artifactId": "camel-kotlin-api", - "version": "4.8.0-SNAPSHOT" - } -} diff --git a/dsl/camel-kotlin-api/src/main/docs/kotlin-api.adoc b/dsl/camel-kotlin-api/src/main/docs/kotlin-api.adoc deleted file mode 100644 index 065914dfb764a..0000000000000 --- a/dsl/camel-kotlin-api/src/main/docs/kotlin-api.adoc +++ /dev/null @@ -1,332 +0,0 @@ -= Kotlin API Component (deprecated) -:doctitle: Kotlin API -:shortname: kotlin-api -:artifactid: camel-kotlin-api -:description: Camel Kotlin API (deprecated) -:since: 4.4 -:supportlevel: Experimental-deprecated -:deprecated: *deprecated* -:tabs-sync-option: -//Manually maintained attributes -:group: DSL - -*Since Camel {since}* - -IMPORTANT: This API is experimental support level and is not recommended being used for production - -Kotlin API provides alternative approach to define routes. - -== Defining a route - -To define route using Kotlin API you need to retrieve `CamelContext` and pass it to function `camel`: - -[source,kotlin] ----- -import org.apache.camel.kotlin.camel - -val ctx: CamelContext = ... - -camel(ctx) { ... } ----- - -Then you can define route in `route` block: - -[source,kotlin] ----- -camel(ctx) { - route { <1> - from { <2> - component("direct") - url("input") - } - steps { <3> - to { - component("mock") - url("output") - } - } - } -} ----- -<1> Definition of route -<2> Definition of consuming endpoint -<3> Definition of processing steps - -You can find a number of handful methods in `route` block, for example, setting route id: - -[source,kotlin] ----- -camel(ctx) { - route { - id("my-route") - } -} ----- - -== Defining endpoints - -Here and further `camel(ctx)` block will be omitted to make code less annoying. - -=== Raw endpoints - -Raw endpoint constructs from three components: `component`, `url` and a number of `property`-es. They all connected with each other and form resulting uri by the following rule: - -[source,kotlin] ----- -"$component:$url?${property1.key}=${property1.value}&..." ----- - -So to define consumer from `netty-http` you can write the following: - -[source,kotlin] ----- -route { - from { - component("netty-http") - url("http://localhost:8080") - property("keepAlive", "false") - property("reuseAddress", "false") - } -} ----- - -Also you can omit `component` and write only `url` by the following schema: - -[source,kotlin] ----- -route { - from { - url("netty-http:http://localhost:8080") - property("keepAlive", "false") - property("reuseAddress", "false") - } -} ----- - -Moreover, you can omit `property` at all and write full uri in `url` function: - -[source,kotlin] ----- -route { - from { - url("netty-http:http://localhost:8080?keepAlive=false&reuseAddress=false") - } -} ----- - -This three definitions are equivalent. - -`property` method accepts only `String` value type. This is because it builds raw uri, not `Endpoint`. That means that if you need to define property of complex type, you must define bean in registry. Also that behaviour may be very useful in the following situations: - -- usage of property placeholders -- `toD` and `enrich` EIPs accepts simple language in uri, so it will be handful to use simple in property values - -=== Endpoint DSL - -Defining string-based uris may not be very handy. So there is Endpoint DSL for building uris. For each Camel component exists an extension function with the name of that component. An example: - -[source,kotlin] ----- -import org.apache.camel.kotlin.components.`netty-http` -import org.apache.camel.kotlin.components.mock - -route { - from { - `netty-http` { - protocol("http") - host("localhost") - port(8080) - - keepAlive(false) - reuseAddress(false) - } - } - steps { - to { mock { name("output") } } - } -} ----- - -Rules remain the same: all non-primitive types must be defined as beans in registry and referenced in properties by `#name`. - -== Defining EIPs - -In that section we will take a look at several important EIPs to demonstrate logic of their definition. - -=== Marshal, Unmarshal and DataFormat DSL - -Marshal and Unmarshal EIPs come with DataFormat DSL. This DSL is the only way to define both EIPs. Example: - -[source,kotlin] ----- -import org.apache.camel.kotlin.dataformats.csv - -route { - from { direct { name("input") } } - steps { - unmarshal { - csv { - delimiter(";") - } - } - } -} ----- - -=== LoadBalance and nested DSLs - -Some of EIPs provide additional complex configuration for their fields. For example, Load Balance EIP: there we can define various variants of which algorithm to use. So all that options are wrapped into their own DSL. Example: - -[source,kotlin] ----- -route { - from { direct { name("input") } } - steps { - loadBalance { - failover { - maximumFailoverAttempts(1) - } - } - } -} ----- - -=== Filter, Multicast, Pipeline and outputs - -Some of EIPs defines their own subroutes, for example, Filter and Multicast. In that cases use `outputs` property of EIP's block. Filter example: - -[source,kotlin] ----- -route { - from { direct { name("input") } } - steps { - filter(constant("true")) { - outputs { - log("only calls in filter block") - } - } - log("calls after filter block executed") - } -} ----- - -Multicast example: - -[source,kotlin] ----- -route { - from { direct { name("input") } } - steps { - multicast { - outputs { - to { direct { name("first") } } - to { direct { name("second") } } - } - } - } -} ----- - -That behaviour differs for Pipeline EIP, which has not any properties and so all nested steps defines in `pipeline` block: - -[source,kotlin] ----- -route { - from { direct { name("input") } } - steps { - pipeline { - log("first pipeline") - } - pipeline { - log("second pipeline") - } - } -} ----- - -== Defining beans - -=== Direct object binding - -You can just provide instance of any type for Camel context: - -[source,kotlin] ----- -val map = mapOf() - -camel(ctx) { - bean("myMap", map) -} ----- - -Or use supplier-function: - -[source,kotlin] ----- -camel(ctx) { - bean("myMap") { - mapOf() - } -} ----- - -Or construct bean using builder: - -[source,kotlin] ----- -camel(ctx) { - bean("myBean") { - myField = "value" - } -} ----- - -=== Runtime object binding - -Use other way is to use declarative approach of defining beans, without referencing beans at compile-time: - -[source,kotlin] ----- -class Example { - lateinit var map: MutableMap -} - -camel(ctx) { - bean("map", mutableMapOf(Pair("key", "value"))) - bean { - name("test") - type("org.apache.camel.kotlin.Example") - property("map", "#map") - } -} ----- - -When you cross-reference beans like in example (bean `test` reference `map`) be sure you declare beans in the dependency order: first dependencies, last dependents. - -== Using languages, expressions and predicates - -There are a number of functions that provides Camel languages like `constant` or `simple` and a number of helper functions for building predicates/expressions like `body` or `header`. All of them are in the package `org.apache.camel.kotlin.languages`. - -There are two useful extension functions: - -- `Expression.toPredicate(): Predicate` converts any expression to predicate type -- `Expression.which(): ValueBuilder` converts any expression to `ValueBuiler`, makes possible to write expressions like: -+ -[source,kotlin] ----- -body().which().isInstanceOf(String::class) ----- - -== Fallback to Java API - -For `camel` block there is `routeBuilder` field which can help to define any Camel entity using Java API. For each other block there is `def` field present. It can be used if some functionality is missing. Example: - -[source,kotlin] ----- -route { - from { direct { name("input") } } - steps { - def.pipeline().log("Java API").end() - } -} ----- diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/BeanFactoryDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/BeanFactoryDsl.kt deleted file mode 100644 index aea48b22b4bd4..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/BeanFactoryDsl.kt +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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.kotlin - -import org.apache.camel.model.BeanFactoryDefinition - -@CamelDslMarker -class BeanFactoryDsl( - val def: BeanFactoryDefinition -) { - - init { - def.properties = mutableMapOf() - } - - fun name(name: String) { - def.name = name; - } - - fun type(type: String) { - def.type = type - } - - fun property(property: String, value: Any) { - def.properties[property] = value - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/DataFormatDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/DataFormatDsl.kt deleted file mode 100644 index 91ffd2a90a177..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/DataFormatDsl.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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.kotlin - -import org.apache.camel.model.DataFormatDefinition - -@CamelDslMarker -class DataFormatDsl { - - lateinit var def: DataFormatDefinition -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/Main.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/Main.kt deleted file mode 100644 index 872208e21eb81..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/Main.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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.kotlin - -import org.apache.camel.model.ModelCamelContext - -@DslMarker -annotation class CamelDslMarker - -fun camel(camelContext: ModelCamelContext, i: RootDsl.() -> Unit) { - RootDsl(camelContext).apply(i).build() -} - -fun camelUri(i: UriDsl.() -> Unit): String { - return UriDsl().apply(i).toUri() -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/Predicates.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/Predicates.kt deleted file mode 100644 index b91127c209342..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/Predicates.kt +++ /dev/null @@ -1,115 +0,0 @@ -/* - * 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.kotlin - -import org.apache.camel.Expression -import org.apache.camel.Predicate -import org.apache.camel.builder.PredicateBuilder -import java.util.regex.Pattern -import kotlin.reflect.KClass - -fun Expression.toPredicate(): Predicate { - return PredicateBuilder.toPredicate(this) -} - -fun Predicate.not(): Predicate { - return PredicateBuilder.not(this) -} - -infix fun Predicate.and(and: Predicate): Predicate { - return PredicateBuilder.and(this, and) -} - -infix fun Predicate.or(or: Predicate): Predicate { - return PredicateBuilder.or(this, or) -} - -fun and(vararg and: Predicate): Predicate { - return PredicateBuilder.and(*and) -} - -fun or(vararg or: Predicate): Predicate { - return PredicateBuilder.or(*or) -} - -fun `in`(vararg `in`: Predicate): Predicate { - return PredicateBuilder.`in`(*`in`) -} - -infix fun Expression.isEqualTo(isEqualTo: Expression): Predicate { - return PredicateBuilder.isEqualTo(this, isEqualTo) -} - -infix fun Expression.isEqualToIgnoreCase(isEqualToIgnoreCase: Expression): Predicate { - return PredicateBuilder.isEqualToIgnoreCase(this, isEqualToIgnoreCase) -} - -infix fun Expression.isNotEqualTo(isNotEqualTo: Expression): Predicate { - return PredicateBuilder.isNotEqualTo(this, isNotEqualTo) -} - -infix fun Expression.isLessThan(isLessThan: Expression): Predicate { - return PredicateBuilder.isLessThan(this, isLessThan) -} - -infix fun Expression.isLessThanOrEqualTo(isLessThanOrEqualTo: Expression): Predicate { - return PredicateBuilder.isLessThanOrEqualTo(this, isLessThanOrEqualTo) -} - -infix fun Expression.isGreaterThan(isGreaterThan: Expression): Predicate { - return PredicateBuilder.isGreaterThan(this, isGreaterThan) -} - -infix fun Expression.isGreaterThanOrEqualTo(isGreaterThanOrEqualTo: Expression): Predicate { - return PredicateBuilder.isGreaterThanOrEqualTo(this, isGreaterThanOrEqualTo) -} - -infix fun Expression.contains(contains: Expression): Predicate { - return PredicateBuilder.contains(this, contains) -} - -infix fun Expression.containsIgnoreCase(containsIgnoreCase: Expression): Predicate { - return PredicateBuilder.containsIgnoreCase(this, containsIgnoreCase) -} - -fun Expression.isNull(): Predicate { - return PredicateBuilder.isNull(this) -} - -fun Expression.isNotNull(): Predicate { - return PredicateBuilder.isNotNull(this) -} - -infix fun Expression.isInstanceOf(isInstanceOf: KClass<*>): Predicate { - return PredicateBuilder.isInstanceOf(this, isInstanceOf.java) -} - -infix fun Expression.startsWith(startsWith: Expression): Predicate { - return PredicateBuilder.startsWith(this, startsWith) -} - -infix fun Expression.endsWith(endsWith: Expression): Predicate { - return PredicateBuilder.endsWith(this, endsWith) -} - -infix fun Expression.regex(regex: String): Predicate { - return PredicateBuilder.regex(this, regex) -} - -infix fun Expression.regex(regex: Pattern): Predicate { - return PredicateBuilder.regex(this, regex) -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/RootDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/RootDsl.kt deleted file mode 100644 index be1d590281a27..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/RootDsl.kt +++ /dev/null @@ -1,99 +0,0 @@ -/* - * 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.kotlin - -import org.apache.camel.kotlin.model.InterceptDsl -import org.apache.camel.kotlin.model.InterceptFromDsl -import org.apache.camel.kotlin.model.InterceptSendToEndpointDsl -import org.apache.camel.kotlin.model.OnExceptionDsl -import org.apache.camel.kotlin.model.rest.RestDsl -import org.apache.camel.model.BeanFactoryDefinition -import org.apache.camel.model.ModelCamelContext -import org.apache.camel.model.rest.RestConfigurationDefinition -import org.apache.camel.support.PropertyBindingSupport -import kotlin.reflect.KClass - -@CamelDslMarker -class RootDsl( - val ctx: ModelCamelContext -) { - - val routeBuilder = RouteBuilderImpl(ctx) - - internal fun build() { - routeBuilder.addRoutesToCamelContext(ctx) - } - - fun route(i: RouteDsl.() -> Unit) { - val def = routeBuilder.routeCollection.route() - RouteDsl(def).apply(i) - } - - fun bean(bean: String, value: Any) { - ctx.registry.bind(bean, value) - } - - inline fun bean(bean: String, i: T.() -> Unit) { - val instance = ctx.injector.newInstance(T::class.java) - instance.apply(i) - ctx.registry.bind(bean, instance) - } - - inline fun bean(name: String, crossinline function: () -> Any) { - ctx.registry.bind(name, function()) - } - - fun bean(i: BeanFactoryDsl.() -> Unit) { - val def = BeanFactoryDefinition() - BeanFactoryDsl(def).apply(i) - val type = ctx.classResolver.resolveMandatoryClass(def.type) - val instance = ctx.injector.newInstance(type) - if (!def.properties.isNullOrEmpty()) { - PropertyBindingSupport.bindProperties(ctx, instance, def.properties) - } - ctx.registry.bind(def.name, instance) - } - - fun restConfiguration(i: RestConfigurationDefinition.() -> Unit) { - routeBuilder.restConfiguration().apply(i) - } - - fun rest(rest: String? = null, i: RestDsl.() -> Unit) { - val restDef = routeBuilder.rest(rest) - RestDsl(restDef).apply(i) - } - - fun onException(vararg exceptions: KClass, i: OnExceptionDsl.() -> Unit) { - val def = routeBuilder.onException(*exceptions.map { it.java }.toTypedArray()) - OnExceptionDsl(def).apply(i) - } - - fun intercept(i: InterceptDsl.() -> Unit) { - val def = routeBuilder.intercept() - InterceptDsl(def).apply(i) - } - - fun interceptFrom(i: InterceptFromDsl.() -> Unit) { - val def = routeBuilder.interceptFrom() - InterceptFromDsl(def).apply(i) - } - - fun interceptSendToEndpoint(uri: String, i: InterceptSendToEndpointDsl.() -> Unit) { - val def = routeBuilder.interceptSendToEndpoint(uri) - InterceptSendToEndpointDsl(def).apply(i) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/RouteBuilderImpl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/RouteBuilderImpl.kt deleted file mode 100644 index a04b2f28860ce..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/RouteBuilderImpl.kt +++ /dev/null @@ -1,24 +0,0 @@ -/* - * 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.kotlin - -import org.apache.camel.CamelContext -import org.apache.camel.builder.RouteBuilder - -class RouteBuilderImpl(context: CamelContext?) : RouteBuilder(context) { - override fun configure() {} -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/RouteDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/RouteDsl.kt deleted file mode 100644 index ae6049b2a50ae..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/RouteDsl.kt +++ /dev/null @@ -1,191 +0,0 @@ -/* - * 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.kotlin - -import org.apache.camel.ErrorHandlerFactory -import org.apache.camel.ShutdownRoute -import org.apache.camel.ShutdownRunningTask -import org.apache.camel.kotlin.model.OnExceptionDsl -import org.apache.camel.model.RouteDefinition -import org.apache.camel.spi.RoutePolicy -import kotlin.reflect.KClass - -@CamelDslMarker -class RouteDsl( - val def: RouteDefinition -) { - - fun from(i: UriDsl.() -> Unit) { - val dsl = UriDsl().apply(i) - val uri = dsl.toUri() - def.from(uri) - } - - fun steps(i: StepsDsl.() -> Unit) { - StepsDsl(def).apply(i) - } - - fun onException(vararg exceptions: KClass, i: OnExceptionDsl.() -> Unit) { - val onExceptionDef = def.onException(*exceptions.map { it.java }.toTypedArray()) - OnExceptionDsl(onExceptionDef).apply(i) - onExceptionDef.end() - } - - fun id(id: String) { - def.routeId(id) - } - - fun group(group: String) { - def.group(group) - } - - fun description(description: String) { - def.description(description) - } - - fun nodePrefixId(nodePrefixId: String) { - def.nodePrefixId(nodePrefixId) - } - - fun streamCaching(streamCaching: Boolean) { - def.streamCache = streamCaching.toString() - } - - fun streamCaching(streamCaching: String) { - def.streamCache = streamCaching - } - - fun tracing(tracing: Boolean) { - def.trace = tracing.toString() - } - - fun tracing(tracing: String) { - def.trace = tracing - } - - fun messageHistory(messageHistory: Boolean) { - def.messageHistory = messageHistory.toString() - } - - fun messageHistory(messageHistory: String) { - def.messageHistory = messageHistory - } - - fun logMask(logMask: Boolean) { - def.logMask = logMask.toString() - } - - fun logMask(logMask: String) { - def.logMask = logMask - } - - fun noDelayer() { - def.noDelayer() - } - - fun delayer(delayer: Long) { - def.delayer(delayer) - } - - fun errorHandler(errorHandler: String) { - def.errorHandler(errorHandler) - } - - fun errorHandler(errorHandler: ErrorHandlerFactory) { - def.errorHandler(errorHandler) - } - - fun autoStartup(autoStartup: Boolean) { - def.autoStartup(autoStartup) - } - - fun autoStartup(autoStartup: String) { - def.autoStartup(autoStartup) - } - - fun precondition(precondition: String) { - def.precondition(precondition) - } - - fun startupOrder(startupOrder: Int) { - def.startupOrder(startupOrder) - } - - fun routePolicy(vararg routePolicy: RoutePolicy) { - def.routePolicy(*routePolicy) - } - - fun routePolicy(function: () -> RoutePolicy) { - def.routePolicy(function) - } - - fun routePolicyRef(routePolicyRef: String) { - def.routePolicyRef(routePolicyRef) - } - - fun shutdownRoute(shutdownRoute: ShutdownRoute) { - def.shutdownRoute(shutdownRoute) - } - - fun shutdownRoute(shutdownRoute: String) { - def.shutdownRoute(shutdownRoute) - } - - fun shutdownRunningTask(shutdownRunningTask: ShutdownRunningTask) { - def.shutdownRunningTask(shutdownRunningTask) - } - - fun shutdownRunningTask(shutdownRunningTask: String) { - def.shutdownRunningTask(shutdownRunningTask) - } - - fun inputType(inputType: String) { - def.inputType(inputType) - } - - fun inputType(inputType: KClass<*>) { - def.inputType(inputType.java) - } - - fun inputTypeWithValidate(inputTypeWithValidate: String) { - def.inputTypeWithValidate(inputTypeWithValidate) - } - - fun inputTypeWithValidate(inputTypeWithValidate: KClass<*>) { - def.inputTypeWithValidate(inputTypeWithValidate.java) - } - - fun outputType(outputType: String) { - def.outputType(outputType) - } - - fun outputType(outputType: KClass<*>) { - def.outputType(outputType.java) - } - - fun outputTypeWithValidate(outputTypeWithValidate: String) { - def.outputTypeWithValidate(outputTypeWithValidate) - } - - fun outputTypeWithValidate(outputTypeWithValidate: KClass<*>) { - def.outputTypeWithValidate(outputTypeWithValidate.java) - } - - fun routeProperty(routeProperty: String, value: String) { - def.routeProperty(routeProperty, value) - } -} diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/StepsDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/StepsDsl.kt deleted file mode 100644 index 501c28a2cc247..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/StepsDsl.kt +++ /dev/null @@ -1,450 +0,0 @@ -/* - * 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.kotlin - -import org.apache.camel.Exchange -import org.apache.camel.ExchangePattern -import org.apache.camel.Expression -import org.apache.camel.Predicate -import org.apache.camel.kotlin.languages.constant -import org.apache.camel.kotlin.model.* -import org.apache.camel.model.* -import org.apache.camel.spi.DataType -import org.apache.camel.spi.Policy -import kotlin.reflect.KClass - -@CamelDslMarker -class StepsDsl( - val def: ProcessorDefinition<*> -) { - - fun aggregate(aggregate: Expression, i: AggregateDsl.() -> Unit) { - val aggregateDef = def.aggregate(aggregate) - AggregateDsl(aggregateDef).apply(i) - } - - fun bean(i: BeanDsl.() -> Unit) { - val beanDef = BeanDefinition() - def.addOutput(beanDef) - BeanDsl(beanDef).apply(i) - } - - fun choice(i: ChoiceDsl.() -> Unit) { - val choiceDef = def.choice() - ChoiceDsl(choiceDef).apply(i) - choiceDef.end() - } - - fun circuitBreaker(i: CircuitBreakerDsl.() -> Unit) { - val circuitBreakerDef = def.circuitBreaker() - CircuitBreakerDsl(circuitBreakerDef).apply(i) - circuitBreakerDef.end() - } - - fun claimCheck(i: ClaimCheckDsl.() -> Unit) { - val claimCheckDef = def.claimCheck() - ClaimCheckDsl(claimCheckDef).apply(i) - } - - fun convertBodyTo(convertBodyTo: KClass<*>, i: ConvertBodyDsl.() -> Unit = {}) { - val convertBodyDef = ConvertBodyDefinition(convertBodyTo.java) - def.addOutput(convertBodyDef) - ConvertBodyDsl(convertBodyDef).apply(i) - } - - fun convertBodyTo(convertBodyTo: String, i: ConvertBodyDsl.() -> Unit = {}) { - val convertBodyDef = ConvertBodyDefinition(convertBodyTo) - def.addOutput(convertBodyDef) - ConvertBodyDsl(convertBodyDef).apply(i) - } - - fun convertHeaderTo(convertHeaderTo: String, type: KClass<*>, i: ConvertHeaderDsl.() -> Unit = {}) { - val convertHeaderDef = ConvertHeaderDefinition(convertHeaderTo, type.java) - def.addOutput(convertHeaderDef) - ConvertHeaderDsl(convertHeaderDef).apply(i) - } - - fun convertHeaderTo(convertHeaderTo: String, type: String, i: ConvertHeaderDsl.() -> Unit = {}) { - val convertHeaderDef = ConvertHeaderDefinition(convertHeaderTo, type) - def.addOutput(convertHeaderDef) - ConvertHeaderDsl(convertHeaderDef).apply(i) - } - - fun convertVariableTo(convertVariableTo: String, type: KClass<*>, i: ConvertVariableDsl.() -> Unit = {}) { - val convertVarDef = ConvertVariableDefinition(convertVariableTo, type.java) - def.addOutput(convertVarDef) - ConvertVariableDsl(convertVarDef).apply(i) - } - - fun convertVariableTo(convertVariableTo: String, type: String, i: ConvertVariableDsl.() -> Unit = {}) { - val convertVarDef = ConvertVariableDefinition(convertVariableTo, type) - def.addOutput(convertVarDef) - ConvertVariableDsl(convertVarDef).apply(i) - } - - fun delay(delay: Long, i: DelayDsl.() -> Unit = {}) { - val delayDef = def.delay(delay) - DelayDsl(delayDef).apply(i) - } - - fun delay(delay: Expression, i: DelayDsl.() -> Unit = {}) { - val delayDef = def.delay(delay) - DelayDsl(delayDef).apply(i) - } - - fun dynamicRouter(expression: Expression, i: DynamicRouterDsl.() -> Unit) { - val dynamicRouterDef = def.dynamicRouter(expression) - DynamicRouterDsl(dynamicRouterDef).apply(i) - } - - fun filter(filter: Predicate, i: FilterDsl.() -> Unit) { - val filterDef = def.filter(filter) - FilterDsl(filterDef).apply(i) - filterDef.end() - } - - fun enrich(i: EnrichDsl.() -> Unit) { - val enrichDef = EnrichDefinition() - def.addOutput(enrichDef) - EnrichDsl(enrichDef).apply(i) - } - - fun idempotentConsumer(idempotentConsumer: Expression, i: IdempotentConsumerDsl.() -> Unit) { - val idempotentConsumerDef = def.idempotentConsumer(idempotentConsumer) - IdempotentConsumerDsl(idempotentConsumerDef).apply(i) - } - - fun loadBalance(i: LoadBalanceDsl.() -> Unit) { - val loadBalanceDef = def.loadBalance() - LoadBalanceDsl(loadBalanceDef).apply(i) - loadBalanceDef.end() - } - - fun log(i: LogDsl.() -> Unit) { - val logDef = LogDefinition() - def.addOutput(logDef) - LogDsl(logDef).apply(i) - } - - fun log(message: String, i: LogDsl.() -> Unit = {}) { - val logDef = LogDefinition(message) - def.addOutput(logDef) - LogDsl(logDef).apply(i) - } - - fun loop(loop: Expression, i: LoopDsl.() -> Unit = {}) { - val loopDef = def.loop(loop) - LoopDsl(loopDef).apply(i) - loopDef.end() - } - - fun loop(loop: Int, i: LoopDsl.() -> Unit = {}) { - loop(constant(loop.toString()), i) - } - - fun loopDoWhile(loop: Predicate, i: LoopDsl.() -> Unit = {}) { - val loopDef = def.loopDoWhile(loop) - LoopDsl(loopDef).apply(i) - loopDef.end() - } - - fun marshal(i: DataFormatDsl.() -> Unit) { - val dsl = DataFormatDsl().apply(i) - def.marshal(dsl.def) - } - - fun multicast(i: MulticastDsl.() -> Unit) { - val multicastDef = def.multicast() - MulticastDsl(multicastDef).apply(i) - multicastDef.end() - } - - fun pausable(i: PausableDsl.() -> Unit) { - val pausableDef = def.pausable() - PausableDsl(pausableDef).apply(i) - } - - fun pipeline(i: StepsDsl.() -> Unit) { - val pipelineDef = def.pipeline() - StepsDsl(pipelineDef).apply(i) - pipelineDef.end() - } - - fun policy(policy: String) { - def.policy(policy) - } - - fun policy(policy: Policy) { - def.policy(policy) - } - - fun pollEnrich(i: PollEnrichDsl.() -> Unit) { - val pollEnrichDef = PollEnrichDefinition() - PollEnrichDsl(pollEnrichDef).apply(i) - def.addOutput(pollEnrichDef) - } - - fun process(process: (Exchange) -> Unit) { - def.process(process) - } - - fun recipientList(recipientList: Expression, i: RecipientListDsl.() -> Unit) { - val recipientListDef = def.recipientList(recipientList) - RecipientListDsl(recipientListDef).apply(i) - } - - fun removeHeader(removeHeader: String) { - def.removeHeader(removeHeader) - } - - fun removeHeaders(removeHeaders: String) { - def.removeHeaders(removeHeaders) - } - - fun removeHeaders(removeHeaders: String, vararg excludePatterns: String) { - def.removeHeaders(removeHeaders, *excludePatterns) - } - - fun removeProperties(removeProperties: String) { - def.removeProperties(removeProperties) - } - - fun removeProperties(removeProperties: String, vararg excludePatterns: String) { - def.removeProperties(removeProperties, *excludePatterns) - } - - fun removeProperty(removeProperty: String) { - def.removeProperty(removeProperty) - } - - fun removeVariable(removeVariable: String) { - def.removeVariable(removeVariable) - } - - fun resequence(resequence: Expression, i: ResequenceDsl.() -> Unit = {}) { - val resequenceDef = def.resequence(resequence) - ResequenceDsl(resequenceDef).apply(i) - } - - fun resumable(i: ResumableDsl.() -> Unit) { - val resumableDef = def.resumable() - ResumableDsl(resumableDef).apply(i) - } - - fun rollback() { - def.rollback() - } - - fun rollback(rollback: String) { - def.rollback(rollback) - } - - fun markRollbackOnly() { - def.markRollbackOnly() - } - - fun markRollbackOnlyLast() { - def.markRollbackOnlyLast() - } - - fun routingSlip(routingSlip: Expression, i: RoutingSlipDsl.() -> Unit = {}) { - val routingSlipDef = def.routingSlip(routingSlip) - RoutingSlipDsl(routingSlipDef).apply(i) - } - - fun saga(i: SagaDsl.() -> Unit) { - val sagaDef = def.saga() - SagaDsl(sagaDef).apply(i) - sagaDef.end() - } - - fun sample(i: SampleDsl.() -> Unit = {}) { - val sampleDef = def.sample() - SampleDsl(sampleDef).apply(i) - } - - fun script(script: Expression) { - def.script(script) - } - - fun setBody(setBody: Expression) { - def.setBody(setBody) - } - - fun setBody(function: (Exchange) -> Any) { - def.setBody(function) - } - - fun setExchangePattern(setExchangePattern: ExchangePattern) { - def.setExchangePattern(setExchangePattern) - } - - fun setExchangePattern(setExchangePattern: String) { - def.setExchangePattern(setExchangePattern) - } - - fun setHeader(setHeader: String, value: String) { - def.setHeader(setHeader, constant(value)) - } - - fun setHeader(setHeader: String, expression: Expression) { - def.setHeader(setHeader, expression) - } - - fun setHeaders(setHeader: String, vararg variableNamesAndValues: Any) { - def.setHeaders(setHeader, variableNamesAndValues) - } - - fun setHeader(setHeader: String, function: () -> Any) { - def.setHeader(setHeader, function) - } - - fun setProperty(setProperty: String, value: String) { - def.setProperty(setProperty, constant(value)) - } - - fun setProperty(setProperty: String, expression: Expression) { - def.setProperty(setProperty, expression) - } - - fun setProperty(setProperty: String, function: () -> Any) { - def.setProperty(setProperty, function) - } - - fun setVariable(setVariable: String, expression: Expression) { - def.setVariable(setVariable, expression) - } - - fun setVariables(setHeader: String, vararg variableNamesAndValues: Any) { - def.setVariables(setHeader, variableNamesAndValues) - } - - fun setVariable(setVariable: String, function: () -> Any) { - def.setVariable(setVariable, function) - } - - fun sort(sort: Expression, comparator: Comparator<*>? = null) { - def.sort(sort, comparator) - } - - fun split(split: Expression, i: SplitDsl.() -> Unit = {}) { - val splitDef = def.split(split) - SplitDsl(splitDef).apply(i) - } - - fun step(i: StepsDsl.() -> Unit) { - val stepDef = def.step() - StepsDsl(stepDef).apply(i) - stepDef.end() - } - - fun stop() { - def.stop() - } - - fun threads(i: ThreadsDsl.() -> Unit) { - val threadsDef = def.threads() - ThreadsDsl(threadsDef).apply(i) - } - - fun threads(poolSize: Int, i: ThreadsDsl.() -> Unit = {}) { - val threadsDef = def.threads(poolSize) - ThreadsDsl(threadsDef).apply(i) - } - - fun throttle(throttle: Long, i: ThrottleDsl.() -> Unit) { - this.throttle(constant(throttle.toString()), i) - } - - fun throttle(throttle: Expression, i: ThrottleDsl.() -> Unit) { - val throttleDef = def.throttle(throttle) - ThrottleDsl(throttleDef).apply(i) - } - - fun throwException(throwException: Exception) { - def.throwException(throwException) - } - - fun throwException(throwException: KClass, message: String) { - def.throwException(throwException.java, message) - } - - fun to(i: UriDsl.() -> Unit) { - val dsl = UriDsl().apply(i) - val uri = dsl.toUri() - def.to(uri) - } - - fun toD(config: ToDynamicDsl.() -> Unit = {}, i: UriDsl.() -> Unit) { - val toDDef = ToDynamicDefinition() - ToDynamicDsl(toDDef).apply(config) - val dsl = UriDsl().apply(i) - val uri = dsl.toUri() - toDDef.uri = uri - def.addOutput(toDDef) - } - - fun transacted() { - def.transacted() - } - - fun transacted(ref: String) { - def.transacted(ref) - } - - fun transform(transform: Expression) { - def.transform(transform) - } - - fun transform(to: DataType) { - def.transform(to) - } - - fun transform(from: DataType, to: DataType) { - def.transform(from, to) - } - - fun doTry(i: TryDsl.() -> Unit) { - val tryDef = def.doTry() - TryDsl(tryDef).apply(i) - tryDef.end() - } - - fun unmarshal(i: DataFormatDsl.() -> Unit) { - val dsl = DataFormatDsl().apply(i) - def.unmarshal(dsl.def) - } - - fun unmarshal(allowNullBody: Boolean, i: DataFormatDsl.() -> Unit) { - val dsl = DataFormatDsl().apply(i) - def.unmarshal(dsl.def, allowNullBody) - } - - fun validate(validate: Predicate, i: ValidateDsl.() -> Unit = {}) { - val validateDef = def.validate(validate) - ValidateDsl(validateDef).apply(i) - } - - fun wireTap(config: WireTapDsl.() -> Unit = {}, i: UriDsl.() -> Unit) { - val dsl = UriDsl().apply(i) - val uri = dsl.toUri() - val wireTapDef = WireTapDefinition() - wireTapDef.uri(uri) - def.addOutput(wireTapDef) - WireTapDsl(wireTapDef).apply(config) - } -} diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/UriDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/UriDsl.kt deleted file mode 100644 index e9be56a9218c2..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/UriDsl.kt +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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.kotlin - -@CamelDslMarker -class UriDsl { - - private var component: String = "" - private var url: String = "" - private val properties: MutableMap = mutableMapOf() - - fun component(component: String) { - this.component = component - } - - fun url(url: String) { - this.url = url - } - - fun property(property: String, value: String) { - properties[property] = value - } - - internal fun toUri(): String { - val sb = StringBuilder() - sb.append(component) - if (component != "") { - sb.append(":") - } - sb.append(url) - var first = '?' - for (property in properties) { - sb.append(first) - first = '&' - sb.append(property.key) - sb.append('=') - sb.append(property.value) - } - return sb.toString() - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/languages/Expressions.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/languages/Expressions.kt deleted file mode 100644 index 5731f1161998e..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/languages/Expressions.kt +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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.kotlin.languages - -import org.apache.camel.Expression -import org.apache.camel.builder.ExpressionBuilder -import org.apache.camel.builder.ValueBuilder -import org.apache.camel.model.PropertyDefinition - -fun body(): Expression { - return ExpressionBuilder.bodyExpression() -} - -fun Expression.which(): ValueBuilder { - return ValueBuilder(this) -} - -fun XpathLanguageDsl.namespace(namespace: Map) { - this.namespace(namespace.entries.map { PropertyDefinition(it.key, it.value) }.toMutableList()) -} - -fun XqueryLanguageDsl.namespace(namespace: Map) { - this.namespace(namespace.entries.map { PropertyDefinition(it.key, it.value) }.toMutableList()) -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/AggregateDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/AggregateDsl.kt deleted file mode 100644 index 68f9d6f152d99..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/AggregateDsl.kt +++ /dev/null @@ -1,271 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.AggregationStrategy -import org.apache.camel.Expression -import org.apache.camel.Predicate -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.AggregateDefinition -import org.apache.camel.model.OptimisticLockRetryPolicyDefinition -import org.apache.camel.processor.aggregate.AggregateController -import org.apache.camel.processor.aggregate.OptimisticLockRetryPolicy -import org.apache.camel.spi.AggregationRepository -import java.util.concurrent.ExecutorService -import java.util.concurrent.ScheduledExecutorService - -@CamelDslMarker -class AggregateDsl( - val def: AggregateDefinition -) : OptionalIdentifiedDsl(def) { - - fun eagerCheckCompletion(eagerCheckCompletion: Boolean) { - def.eagerCheckCompletion = eagerCheckCompletion.toString() - } - - fun eagerCheckCompletion(eagerCheckCompletion: String) { - def.eagerCheckCompletion = eagerCheckCompletion - } - - fun ignoreInvalidCorrelationKeys(ignoreInvalidCorrelationKeys: Boolean) { - def.ignoreInvalidCorrelationKeys = ignoreInvalidCorrelationKeys.toString() - } - - fun ignoreInvalidCorrelationKeys(ignoreInvalidCorrelationKeys: String) { - def.ignoreInvalidCorrelationKeys = ignoreInvalidCorrelationKeys - } - - fun closeCorrelationKeyOnCompletion(capacity: Int) { - def.closeCorrelationKeyOnCompletion(capacity) - } - - fun closeCorrelationKeyOnCompletion(capacity: String) { - def.closeCorrelationKeyOnCompletion = capacity - } - - fun discardOnCompletionTimeout(discardOnCompletionTimeout: Boolean) { - def.discardOnCompletionTimeout = discardOnCompletionTimeout.toString() - } - - fun discardOnCompletionTimeout(discardOnCompletionTimeout: String) { - def.discardOnCompletionTimeout = discardOnCompletionTimeout - } - - fun discardOnAggregationFailure(discardOnAggregationFailure: Boolean) { - def.discardOnAggregationFailure = discardOnAggregationFailure.toString() - } - - fun discardOnAggregationFailure(discardOnAggregationFailure: String) { - def.discardOnAggregationFailure = discardOnAggregationFailure - } - - fun completionFromBatchConsumer(completionFromBatchConsumer: Boolean) { - def.completionFromBatchConsumer = completionFromBatchConsumer.toString() - } - - fun completionFromBatchConsumer(completionFromBatchConsumer: String) { - def.completionFromBatchConsumer = completionFromBatchConsumer - } - - fun completionOnNewCorrelationGroup(completionOnNewCorrelationGroup: Boolean) { - def.completionOnNewCorrelationGroup = completionOnNewCorrelationGroup.toString() - } - - fun completionOnNewCorrelationGroup(completionOnNewCorrelationGroup: String) { - def.completionOnNewCorrelationGroup = completionOnNewCorrelationGroup - } - - fun completionSize(completionSize: Int) { - def.completionSize(completionSize) - } - - fun completionSize(completionSize: String) { - def.completionSize(completionSize) - } - - fun completionSize(completionSize: Expression) { - def.completionSize(completionSize) - } - - fun completionInterval(completionInterval: Long) { - def.completionInterval(completionInterval) - } - - fun completionInterval(completionInterval: String) { - def.completionInterval(completionInterval) - } - - fun completionTimeout(completionTimeout: Long) { - def.completionTimeout(completionTimeout) - } - - fun completionTimeout(completionTimeout: String) { - def.completionTimeout(completionTimeout) - } - - fun completionTimeout(completionTimeout: Expression) { - def.completionTimeout(completionTimeout) - } - - fun completionTimeoutCheckerInterval(completionTimeoutCheckerInterval: Long) { - def.completionTimeoutCheckerInterval(completionTimeoutCheckerInterval) - } - - fun completionTimeoutCheckerInterval(completionTimeoutCheckerInterval: String) { - def.completionTimeoutCheckerInterval = completionTimeoutCheckerInterval - } - - fun aggregationStrategy(aggregationStrategy: AggregationStrategy) { - def.aggregationStrategy(aggregationStrategy) - } - - fun aggregationStrategy(aggregationStrategy: String) { - def.aggregationStrategy(aggregationStrategy) - } - - fun aggregationStrategyMethodName(aggregationStrategyMethodName: String) { - def.aggregationStrategyMethodName(aggregationStrategyMethodName) - } - - fun aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull: Boolean) { - def.aggregationStrategyMethodAllowNull = aggregationStrategyMethodAllowNull.toString() - } - - fun aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull: String) { - def.aggregationStrategyMethodAllowNull = aggregationStrategyMethodAllowNull - } - - fun aggregationRepository(aggregationRepository: AggregationRepository) { - def.aggregationRepository(aggregationRepository) - } - - fun aggregationRepository(aggregationRepository: String) { - def.aggregationRepository(aggregationRepository) - } - - fun completionPredicate(completionPredicate: Predicate) { - def.completionPredicate(completionPredicate) - } - - fun completion(completion: Predicate) { - completionPredicate(completion) - } - - fun forceCompletionOnStop(forceCompletionOnStop: Boolean) { - def.forceCompletionOnStop = forceCompletionOnStop.toString() - } - - fun forceCompletionOnStop(forceCompletionOnStop: String) { - def.forceCompletionOnStop = forceCompletionOnStop - } - - fun completeAllOnStop(completeAllOnStop: Boolean) { - def.completeAllOnStop = completeAllOnStop.toString() - } - - fun completeAllOnStop(completeAllOnStop: String) { - def.completeAllOnStop = completeAllOnStop - } - - fun parallelProcessing(parallelProcessing: Boolean) { - def.parallelProcessing(parallelProcessing) - } - - fun parallelProcessing(parallelProcessing: String) { - def.parallelProcessing = parallelProcessing - } - - fun optimisticLocking(optimisticLocking: Boolean) { - def.optimisticLocking = optimisticLocking.toString() - } - - fun optimisticLocking(optimisticLocking: String) { - def.optimisticLocking = optimisticLocking - } - - fun optimisticLockRetryPolicy(optimisticLockRetryPolicy: OptimisticLockRetryPolicy) { - def.optimisticLockRetryPolicy(optimisticLockRetryPolicy) - } - - fun optimisticLockRetryPolicy(i: OptimisticLockRetryPolicyDsl.() -> Unit) { - val optimisticLockRetryPolicyDef = OptimisticLockRetryPolicyDefinition() - OptimisticLockRetryPolicyDsl(optimisticLockRetryPolicyDef).apply(i) - def.optimisticLockRetryPolicyDefinition = optimisticLockRetryPolicyDef - } - - fun executorService(executorService: ExecutorService) { - def.executorService(executorService) - } - - fun executorService(executorService: String) { - def.executorService(executorService) - } - - fun timeoutCheckerExecutorService(timeoutCheckerExecutorService: ScheduledExecutorService) { - def.timeoutCheckerExecutorService(timeoutCheckerExecutorService) - } - - fun timeoutCheckerExecutorService(timeoutCheckerExecutorService: String) { - def.timeoutCheckerExecutorService(timeoutCheckerExecutorService) - } - - fun aggregateController(aggregateController: AggregateController) { - def.aggregateController(aggregateController) - } - - fun aggregateController(aggregateController: String) { - def.aggregateController(aggregateController) - } -} - -@CamelDslMarker -class OptimisticLockRetryPolicyDsl( - val def: OptimisticLockRetryPolicyDefinition -) { - - fun maximumRetries(maximumRetries: Int) { - def.maximumRetries = maximumRetries.toString() - } - - fun maximumRetries(maximumRetries: String) { - def.maximumRetries = maximumRetries - } - - fun retryDelay(retryDelay: String) { - def.retryDelay = retryDelay - } - - fun maximumRetryDelay(maximumRetryDelay: String) { - def.maximumRetryDelay = maximumRetryDelay - } - - fun exponentialBackOff(exponentialBackOff: Boolean) { - def.exponentialBackOff = exponentialBackOff.toString() - } - - fun exponentialBackOff(exponentialBackOff: String) { - def.exponentialBackOff = exponentialBackOff - } - - fun randomBackOff(randomBackOff: Boolean) { - def.randomBackOff = randomBackOff.toString() - } - - fun randomBackOff(randomBackOff: String) { - def.randomBackOff = randomBackOff - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/BeanDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/BeanDsl.kt deleted file mode 100644 index 0128a74b6dac9..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/BeanDsl.kt +++ /dev/null @@ -1,55 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.BeanDefinition -import kotlin.reflect.KClass - -@CamelDslMarker -class BeanDsl( - val def: BeanDefinition -) : OptionalIdentifiedDsl(def) { - - fun instance(instance: Any) { - def.bean = instance - } - - fun instance(function: () -> Any) { - def.bean = function() - } - - fun ref(ref: String) { - def.ref = ref - } - - fun method(method: String) { - def.method = method - } - - fun scope(scope: String) { - def.scope = scope - } - - fun type(type: String) { - def.beanType = type - } - - fun type(type: KClass<*>) { - def.setBeanType(type.java) - } -} diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/CatchDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/CatchDsl.kt deleted file mode 100644 index f53476c5bb9fb..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/CatchDsl.kt +++ /dev/null @@ -1,37 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.Predicate -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.StepsDsl -import org.apache.camel.model.CatchDefinition - -@CamelDslMarker -class CatchDsl( - val def: CatchDefinition -) : OptionalIdentifiedDsl(def) { - - fun onWhen(onWhen: Predicate) { - def.onWhen(onWhen) - } - - fun steps(i: StepsDsl.() -> Unit) { - StepsDsl(def).apply(i) - def.endDoCatch() - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ChoiceDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ChoiceDsl.kt deleted file mode 100644 index 17f970143d6ac..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ChoiceDsl.kt +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.Predicate -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.StepsDsl -import org.apache.camel.model.ChoiceDefinition - -@CamelDslMarker -class ChoiceDsl( - val def: ChoiceDefinition -) : OptionalIdentifiedDsl(def) { - - fun `when`(`when`: Predicate, i: StepsDsl.() -> Unit) { - val def = def.`when`(`when`) - StepsDsl(def).apply(i) - def.endChoice() - } - - fun `when`(whenSupplier: () -> Predicate, i: StepsDsl.() -> Unit) { - val def = def.`when`(whenSupplier()) - StepsDsl(def).apply(i) - def.endChoice() - } - - fun otherwise(i: StepsDsl.() -> Unit) { - val def = def.otherwise() - StepsDsl(def).apply(i) - def.endChoice() - } - - fun precondition() { - def.precondition() - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/CircuitBreakerDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/CircuitBreakerDsl.kt deleted file mode 100644 index 0b6ffb747c772..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/CircuitBreakerDsl.kt +++ /dev/null @@ -1,303 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.StepsDsl -import org.apache.camel.model.CircuitBreakerDefinition -import org.apache.camel.model.FaultToleranceConfigurationDefinition -import org.apache.camel.model.Resilience4jConfigurationDefinition - -@CamelDslMarker -class CircuitBreakerDsl( - val def: CircuitBreakerDefinition -) : OptionalIdentifiedDsl(def) { - - fun resilience4jConfiguration(i: Resilience4jConfigurationDsl.() -> Unit) { - val resilience4jDef = def.resilience4jConfiguration() - Resilience4jConfigurationDsl(resilience4jDef).apply(i) - } - - fun faultToleranceConfiguration(i: FaultToleranceConfigurationDsl.() -> Unit) { - val faultToleranceDef = def.faultToleranceConfiguration() - FaultToleranceConfigurationDsl(faultToleranceDef).apply(i) - } - - fun configuration(configuration: String) { - def.configuration(configuration) - } - - fun outputs(i: StepsDsl.() -> Unit) { - StepsDsl(def).apply(i) - } - - fun onFallback(i: StepsDsl.() -> Unit) { - val fallbackDef = def.onFallback() - StepsDsl(fallbackDef).apply(i) - fallbackDef.end() - } - - fun onFallbackViaNetwork(i: StepsDsl.() -> Unit) { - val fallbackDef = def.onFallbackViaNetwork() - StepsDsl(fallbackDef).apply(i) - fallbackDef.end() - } -} - -@CamelDslMarker -class Resilience4jConfigurationDsl( - val def: Resilience4jConfigurationDefinition -) { - - fun circuitBreaker(circuitBreaker: String) { - def.circuitBreaker(circuitBreaker) - } - - fun config(config: String) { - def.config(config) - } - - fun failureRateThreshold(failureRateThreshold: Float) { - def.failureRateThreshold(failureRateThreshold) - } - - fun failureRateThreshold(failureRateThreshold: String) { - def.failureRateThreshold = failureRateThreshold - } - - fun permittedNumberOfCallsInHalfOpenState(permittedNumberOfCallsInHalfOpenState: Int) { - def.permittedNumberOfCallsInHalfOpenState(permittedNumberOfCallsInHalfOpenState) - } - - fun permittedNumberOfCallsInHalfOpenState(permittedNumberOfCallsInHalfOpenState: String) { - def.permittedNumberOfCallsInHalfOpenState = permittedNumberOfCallsInHalfOpenState - } - - fun throwExceptionWhenHalfOpenOrOpenState(throwExceptionWhenHalfOpenOrOpenState: Boolean) { - def.throwExceptionWhenHalfOpenOrOpenState(throwExceptionWhenHalfOpenOrOpenState) - } - - fun throwExceptionWhenHalfOpenOrOpenState(throwExceptionWhenHalfOpenOrOpenState: String) { - def.throwExceptionWhenHalfOpenOrOpenState = throwExceptionWhenHalfOpenOrOpenState - } - - fun slidingWindowSize(slidingWindowSize: Int) { - def.slidingWindowSize(slidingWindowSize) - } - - fun slidingWindowSize(slidingWindowSize: String) { - def.slidingWindowSize = slidingWindowSize - } - - fun slidingWindowType(slidingWindowType: String) { - def.slidingWindowType(slidingWindowType) - } - - fun minimumNumberOfCalls(minimumNumberOfCalls: Int) { - def.minimumNumberOfCalls(minimumNumberOfCalls) - } - - fun minimumNumberOfCalls(minimumNumberOfCalls: String) { - def.minimumNumberOfCalls = minimumNumberOfCalls - } - - fun writableStackTraceEnabled(writableStackTraceEnabled: Boolean) { - def.writableStackTraceEnabled(writableStackTraceEnabled) - } - - fun writableStackTraceEnabled(writableStackTraceEnabled: String) { - def.writableStackTraceEnabled = writableStackTraceEnabled - } - - fun waitDurationInOpenState(waitDurationInOpenState: Int) { - def.waitDurationInOpenState(waitDurationInOpenState) - } - - fun waitDurationInOpenState(waitDurationInOpenState: String) { - def.waitDurationInOpenState = waitDurationInOpenState - } - - fun automaticTransitionFromOpenToHalfOpenEnabled(automaticTransitionFromOpenToHalfOpenEnabled: Boolean) { - def.automaticTransitionFromOpenToHalfOpenEnabled(automaticTransitionFromOpenToHalfOpenEnabled) - } - - fun automaticTransitionFromOpenToHalfOpenEnabled(automaticTransitionFromOpenToHalfOpenEnabled: String) { - def.automaticTransitionFromOpenToHalfOpenEnabled = automaticTransitionFromOpenToHalfOpenEnabled - } - - fun slowCallRateThreshold(slowCallRateThreshold: Float) { - def.slowCallRateThreshold(slowCallRateThreshold) - } - - fun slowCallRateThreshold(slowCallRateThreshold: String) { - def.slowCallRateThreshold = slowCallRateThreshold - } - - fun slowCallDurationThreshold(slowCallDurationThreshold: Int) { - def.slowCallDurationThreshold(slowCallDurationThreshold) - } - - fun slowCallDurationThreshold(slowCallDurationThreshold: String) { - def.slowCallDurationThreshold = slowCallDurationThreshold - } - - fun bulkheadEnabled(bulkheadEnabled: Boolean) { - def.bulkheadEnabled(bulkheadEnabled) - } - - fun bulkheadEnabled(bulkheadEnabled: String) { - def.bulkheadEnabled = bulkheadEnabled - } - - fun bulkheadMaxConcurrentCalls(bulkheadMaxConcurrentCalls: Int) { - def.bulkheadMaxConcurrentCalls(bulkheadMaxConcurrentCalls) - } - - fun bulkheadMaxConcurrentCalls(bulkheadMaxConcurrentCalls: String) { - def.bulkheadMaxConcurrentCalls = bulkheadMaxConcurrentCalls - } - - fun bulkheadMaxWaitDuration(bulkheadMaxWaitDuration: Int) { - def.bulkheadMaxWaitDuration(bulkheadMaxWaitDuration) - } - - fun bulkheadMaxWaitDuration(bulkheadMaxWaitDuration: String) { - def.bulkheadMaxWaitDuration = bulkheadMaxWaitDuration - } - - fun timeoutEnabled(timeoutEnabled: Boolean) { - def.timeoutEnabled(timeoutEnabled) - } - - fun timeoutEnabled(timeoutEnabled: String) { - def.timeoutEnabled = timeoutEnabled - } - - fun timeoutExecutorService(timeoutExecutorService: String) { - def.timeoutExecutorService(timeoutExecutorService) - } - - fun timeoutDuration(timeoutDuration: Int) { - def.timeoutDuration(timeoutDuration) - } - - fun timeoutDuration(timeoutDuration: String) { - def.timeoutDuration = timeoutDuration - } - - fun timeoutCancelRunningFuture(timeoutCancelRunningFuture: String) { - def.timeoutCancelRunningFuture = timeoutCancelRunningFuture - } -} - -@CamelDslMarker -class FaultToleranceConfigurationDsl( - val def: FaultToleranceConfigurationDefinition -) { - - fun circuitBreaker(circuitBreaker: String) { - def.circuitBreaker(circuitBreaker) - } - - fun delay(delay: Long) { - def.delay(delay) - } - - fun delay(delay: String) { - def.delay(delay) - } - - fun successThreshold(successThreshold: Int) { - def.successThreshold(successThreshold) - } - - fun successThreshold(successThreshold: String) { - def.successThreshold = successThreshold - } - - fun requestVolumeThreshold(requestVolumeThreshold: Int) { - def.requestVolumeThreshold(requestVolumeThreshold) - } - - fun requestVolumeThreshold(requestVolumeThreshold: String) { - def.requestVolumeThreshold = requestVolumeThreshold - } - - fun failureRatio(failureRatio: Int) { - def.failureRatio(failureRatio) - } - - fun failureRatio(failureRatio: String) { - def.failureRatio = failureRatio - } - - fun timeoutEnabled(timeoutEnabled: Boolean) { - def.timeoutEnabled(timeoutEnabled) - } - - fun timeoutEnabled(timeoutEnabled: String) { - def.timeoutEnabled = timeoutEnabled - } - - fun timeoutDuration(timeoutDuration: Long) { - def.timeoutDuration(timeoutDuration) - } - - fun timeoutDuration(timeoutDuration: String) { - def.timeoutDuration(timeoutDuration) - } - - fun timeoutPoolSize(timeoutPoolSize: Int) { - def.timeoutPoolSize(timeoutPoolSize) - } - - fun timeoutPoolSize(timeoutPoolSize: String) { - def.timeoutPoolSize = timeoutPoolSize - } - - fun timeoutScheduledExecutorService(timeoutScheduledExecutorService: String) { - def.timeoutScheduledExecutorService(timeoutScheduledExecutorService) - } - - fun bulkheadEnabled(bulkheadEnabled: Boolean) { - def.bulkheadEnabled(bulkheadEnabled) - } - - fun bulkheadEnabled(bulkheadEnabled: String) { - def.bulkheadEnabled = bulkheadEnabled - } - - fun bulkheadMaxConcurrentCalls(bulkheadMaxConcurrentCalls: Int) { - def.bulkheadMaxConcurrentCalls(bulkheadMaxConcurrentCalls) - } - - fun bulkheadMaxConcurrentCalls(bulkheadMaxConcurrentCalls: String) { - def.bulkheadMaxConcurrentCalls = bulkheadMaxConcurrentCalls - } - - fun bulkheadWaitingTaskQueue(bulkheadWaitingTaskQueue: Int) { - def.bulkheadWaitingTaskQueue(bulkheadWaitingTaskQueue) - } - - fun bulkheadWaitingTaskQueue(bulkheadWaitingTaskQueue: String) { - def.bulkheadWaitingTaskQueue = bulkheadWaitingTaskQueue - } - - fun bulkheadExecutorService(bulkheadExecutorService: String) { - def.bulkheadExecutorService(bulkheadExecutorService) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ClaimCheckDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ClaimCheckDsl.kt deleted file mode 100644 index 02a1a2dfa0314..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ClaimCheckDsl.kt +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.AggregationStrategy -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.ClaimCheckDefinition -import org.apache.camel.model.ClaimCheckOperation - -@CamelDslMarker -class ClaimCheckDsl( - val def: ClaimCheckDefinition -) : OptionalIdentifiedDsl(def) { - - fun operation(operation: ClaimCheckOperation) { - def.operation(operation) - } - - fun operation(operation: String) { - def.operation(operation) - } - - fun key(key: String) { - def.key(key) - } - - fun filter(filter: String) { - def.filter(filter) - } - - fun aggregationStrategy(aggregationStrategy: AggregationStrategy) { - def.aggregationStrategy(aggregationStrategy) - } - - fun aggregationStrategy(aggregationStrategy: String) { - def.aggregationStrategy(aggregationStrategy) - } - - fun aggregationStrategyMethodName(aggregationStrategyMethodName: String) { - def.aggregationStrategyMethodName(aggregationStrategyMethodName) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ConvertBodyDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ConvertBodyDsl.kt deleted file mode 100644 index 161d0ae495a3e..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ConvertBodyDsl.kt +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.ConvertBodyDefinition - -@CamelDslMarker -class ConvertBodyDsl( - val def: ConvertBodyDefinition -) : OptionalIdentifiedDsl(def) { - - fun mandatory(mandatory: Boolean) { - def.mandatory = mandatory.toString() - } - - fun mandatory(mandatory: String) { - def.mandatory = mandatory - } - - fun charset(charset: String) { - def.charset = charset - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ConvertHeaderDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ConvertHeaderDsl.kt deleted file mode 100644 index 0653aa5ec4c1d..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ConvertHeaderDsl.kt +++ /dev/null @@ -1,38 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.ConvertHeaderDefinition - -@CamelDslMarker -class ConvertHeaderDsl( - val def: ConvertHeaderDefinition -) : OptionalIdentifiedDsl(def) { - - fun mandatory(mandatory: Boolean) { - def.mandatory = mandatory.toString() - } - - fun mandatory(mandatory: String) { - def.mandatory = mandatory - } - - fun charset(charset: String) { - def.charset = charset - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ConvertVariableDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ConvertVariableDsl.kt deleted file mode 100644 index 1314391d6a695..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ConvertVariableDsl.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.ConvertVariableDefinition - -@CamelDslMarker -class ConvertVariableDsl( - val def: ConvertVariableDefinition -) : OptionalIdentifiedDsl(def) { - - fun toName(toName: String) { - def.toName = toName - } - - fun mandatory(mandatory: Boolean) { - def.mandatory = mandatory.toString() - } - - fun mandatory(mandatory: String) { - def.mandatory = mandatory - } - - fun charset(charset: String) { - def.charset = charset - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/DelayDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/DelayDsl.kt deleted file mode 100644 index ac8793dbe9f11..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/DelayDsl.kt +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.DelayDefinition -import java.util.concurrent.ExecutorService - -@CamelDslMarker -class DelayDsl( - val def: DelayDefinition -) : OptionalIdentifiedDsl(def) { - - fun asyncDelayed(asyncDelayed: Boolean) { - def.asyncDelayed = asyncDelayed.toString() - } - - fun asyncDelayed(asyncDelayed: String) { - def.asyncDelayed = asyncDelayed - } - - fun callerRunsWhenRejected(callerRunsWhenRejected: Boolean) { - def.callerRunsWhenRejected = callerRunsWhenRejected.toString() - } - - fun callerRunsWhenRejected(callerRunsWhenRejected: String) { - def.callerRunsWhenRejected = callerRunsWhenRejected - } - - fun executorService(executorService: ExecutorService) { - def.executorService(executorService) - } - - fun executorService(executorService: String) { - def.executorService(executorService) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/DynamicRouterDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/DynamicRouterDsl.kt deleted file mode 100644 index 186c9841f334e..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/DynamicRouterDsl.kt +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.DynamicRouterDefinition - -@CamelDslMarker -class DynamicRouterDsl( - val def: DynamicRouterDefinition<*> -) : OptionalIdentifiedDsl(def) { - - fun uriDelimiter(uriDelimiter: String) { - def.uriDelimiter(uriDelimiter) - } - - fun ignoreInvalidEndpoints(ignoreInvalidEndpoints: Boolean) { - def.ignoreInvalidEndpoints = ignoreInvalidEndpoints.toString() - } - - fun ignoreInvalidEndpoints(ignoreInvalidEndpoints: String) { - def.ignoreInvalidEndpoints = ignoreInvalidEndpoints - } - - fun cacheSize(cacheSize: Int) { - def.cacheSize(cacheSize) - } - - fun cacheSize(cacheSize: String) { - def.cacheSize(cacheSize) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/EnrichDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/EnrichDsl.kt deleted file mode 100644 index 4807f8eda4581..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/EnrichDsl.kt +++ /dev/null @@ -1,108 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.AggregationStrategy -import org.apache.camel.Expression -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl -import org.apache.camel.model.EnrichDefinition -import org.apache.camel.model.language.SimpleExpression - -@CamelDslMarker -class EnrichDsl( - val def: EnrichDefinition -) : OptionalIdentifiedDsl(def) { - - fun uri(i: UriDsl.() -> Unit) { - val dsl = UriDsl().apply(i) - val uri = dsl.toUri() - def.expression = SimpleExpression(uri) - } - - fun uri(uri: Expression) { - def.setExpression(uri) - } - - fun aggregationStrategy(aggregationStrategy: AggregationStrategy) { - def.aggregationStrategy(aggregationStrategy) - } - - fun aggregationStrategy(aggregationStrategy: String) { - def.aggregationStrategy(aggregationStrategy) - } - - fun aggregationStrategyMethodName(aggregationStrategyMethodName: String) { - def.aggregationStrategyMethodName(aggregationStrategyMethodName) - } - - fun aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull: Boolean) { - def.aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull) - } - - fun aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull: String) { - def.aggregationStrategyMethodAllowNull = aggregationStrategyMethodAllowNull - } - - fun aggregateOnException(aggregateOnException: Boolean) { - def.aggregateOnException(aggregateOnException) - } - - fun aggregateOnException(aggregateOnException: String) { - def.aggregateOnException = aggregateOnException - } - - fun shareUnitOfWork(shareUnitOfWork: Boolean) { - def.shareUnitOfWork = shareUnitOfWork.toString() - } - - fun shareUnitOfWork(shareUnitOfWork: String) { - def.shareUnitOfWork = shareUnitOfWork - } - - fun cacheSize(cacheSize: Int) { - def.cacheSize = cacheSize.toString() - } - - fun cacheSize(cacheSize: String){ - def.cacheSize = cacheSize - } - - fun ignoreInvalidEndpoint(ignoreInvalidEndpoint: Boolean = true) { - def.ignoreInvalidEndpoint = ignoreInvalidEndpoint.toString() - } - - fun ignoreInvalidEndpoint(ignoreInvalidEndpoint: String) { - def.ignoreInvalidEndpoint = ignoreInvalidEndpoint - } - - fun allowOptimisedComponents(allowOptimisedComponents: Boolean) { - def.allowOptimisedComponents(allowOptimisedComponents) - } - - fun allowOptimisedComponents(allowOptimisedComponents: String) { - def.allowOptimisedComponents(allowOptimisedComponents) - } - - fun autoStartComponents(autoStartComponents: Boolean) { - def.autoStartComponents(autoStartComponents.toString()) - } - - fun autoStartComponents(autoStartComponents: String) { - def.autoStartComponents(autoStartComponents) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/FilterDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/FilterDsl.kt deleted file mode 100644 index d532f335ccee0..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/FilterDsl.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.StepsDsl -import org.apache.camel.model.FilterDefinition - -@CamelDslMarker -class FilterDsl( - val def: FilterDefinition -) : OptionalIdentifiedDsl(def) { - - fun statusPropertyName(statusPropertyName: String) { - def.statusPropertyName = statusPropertyName - } - - fun outputs(i: StepsDsl.() -> Unit) { - StepsDsl(def).apply(i) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/IdempotentConsumerDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/IdempotentConsumerDsl.kt deleted file mode 100644 index 29d72bf37aab2..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/IdempotentConsumerDsl.kt +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.IdempotentConsumerDefinition -import org.apache.camel.spi.IdempotentRepository - -@CamelDslMarker -class IdempotentConsumerDsl( - val def: IdempotentConsumerDefinition -) : OptionalIdentifiedDsl(def) { - - fun idempotentRepository(idempotentRepository: String) { - def.idempotentRepository(idempotentRepository) - } - - fun idempotentRepository(idempotentRepository: IdempotentRepository) { - def.idempotentRepository(idempotentRepository) - } - - fun eager(eager: Boolean) { - def.eager(eager) - } - - fun eager(eager: String) { - def.eager = eager - } - - fun completionEager(completionEager: Boolean) { - def.completionEager(completionEager) - } - - fun completionEager(completionEager: String) { - def.completionEager = completionEager - } - - fun removeOnFailure(removeOnFailure: Boolean) { - def.removeOnFailure(removeOnFailure) - } - - fun removeOnFailure(removeOnFailure: String) { - def.removeOnFailure = removeOnFailure - } - - fun skipDuplicate(skipDuplicate: Boolean) { - def.skipDuplicate(skipDuplicate) - } - - fun skipDuplicate(skipDuplicate: String) { - def.skipDuplicate = skipDuplicate - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/InterceptDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/InterceptDsl.kt deleted file mode 100644 index 8ffbbada8cb8b..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/InterceptDsl.kt +++ /dev/null @@ -1,36 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.Predicate -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.StepsDsl -import org.apache.camel.model.InterceptDefinition - -@CamelDslMarker -class InterceptDsl( - val def: InterceptDefinition -) { - - fun onWhen(onWhen: Predicate) { - def.`when`(onWhen) - } - - fun outputs(i: StepsDsl.() -> Unit) { - StepsDsl(def).apply(i) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/InterceptFromDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/InterceptFromDsl.kt deleted file mode 100644 index 125be4d01c7f8..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/InterceptFromDsl.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.StepsDsl -import org.apache.camel.model.InterceptFromDefinition - -@CamelDslMarker -class InterceptFromDsl( - val def: InterceptFromDefinition -) { - - fun uri(uri: String) { - def.uri = uri - } - - fun outputs(i: StepsDsl.() -> Unit) { - StepsDsl(def).apply(i) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/InterceptSendToEndpointDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/InterceptSendToEndpointDsl.kt deleted file mode 100644 index 678188b6f4b48..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/InterceptSendToEndpointDsl.kt +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.Predicate -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.StepsDsl -import org.apache.camel.model.InterceptSendToEndpointDefinition - -@CamelDslMarker -class InterceptSendToEndpointDsl( - val def: InterceptSendToEndpointDefinition -) { - - fun outputs(i: StepsDsl.() -> Unit) { - StepsDsl(def).apply(i) - } - - fun onWhen(onWhen: Predicate) { - def.`when`(onWhen) - } - - fun skipSendToOriginalEndpoint(skipSendToOriginalEndpoint: Boolean) { - def.skipSendToOriginalEndpoint = skipSendToOriginalEndpoint.toString() - } - - fun skipSendToOriginalEndpoint(skipSendToOriginalEndpoint: String) { - def.skipSendToOriginalEndpoint = skipSendToOriginalEndpoint.toString() - } - - fun afterUri(afterUri: String) { - def.afterUri(afterUri) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/LoadBalanceDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/LoadBalanceDsl.kt deleted file mode 100644 index 8a59891fb27a7..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/LoadBalanceDsl.kt +++ /dev/null @@ -1,136 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.Expression -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.StepsDsl -import org.apache.camel.model.LoadBalanceDefinition -import org.apache.camel.model.loadbalancer.FailoverLoadBalancerDefinition -import org.apache.camel.model.loadbalancer.WeightedLoadBalancerDefinition -import org.apache.camel.processor.loadbalancer.LoadBalancer -import kotlin.reflect.KClass - -@CamelDslMarker -class LoadBalanceDsl( - val def: LoadBalanceDefinition -) { - - fun inheritErrorHandler(inheritErrorHandler: Boolean) { - def.inheritErrorHandler(inheritErrorHandler) - } - - fun custom(custom: LoadBalancer) { - def.loadBalance(custom) - } - - fun custom(custom: String) { - def.custom(custom) - } - - fun failover(i: FailoverLoadBalancerDsl.() -> Unit = {}) { - val failoverDef = FailoverLoadBalancerDefinition() - FailoverLoadBalancerDsl(failoverDef).apply(i) - def.loadBalancerType = failoverDef - } - - fun weighted(i: WeightedLoadBalancerDsl.() -> Unit) { - val weightedDef = WeightedLoadBalancerDefinition() - WeightedLoadBalancerDsl(weightedDef).apply(i) - def.loadBalancerType = weightedDef - } - - fun roundRobin() { - def.roundRobin() - } - - fun random() { - def.random() - } - - fun sticky(sticky: Expression) { - def.sticky(sticky) - } - - fun topic() { - def.topic() - } - - fun outputs(i: StepsDsl.() -> Unit) { - StepsDsl(def).apply(i) - } -} - -@CamelDslMarker -class FailoverLoadBalancerDsl( - val def: FailoverLoadBalancerDefinition -) { - - fun exceptions(vararg exceptions: String) { - def.exceptions = exceptions.toMutableList() - } - - fun exceptionTypes(vararg exceptionTypes: KClass<*>) { - def.exceptionTypes = exceptionTypes.map { it.java }.toMutableList() - } - - fun maximumFailoverAttempts(maximumFailoverAttempts: Int) { - def.maximumFailoverAttempts = maximumFailoverAttempts.toString() - } - - fun maximumFailoverAttempts(maximumFailoverAttempts: String) { - def.maximumFailoverAttempts = maximumFailoverAttempts - } - - fun roundRobin(roundRobin: Boolean) { - def.roundRobin = roundRobin.toString() - } - - fun roundRobin(roundRobin: String) { - def.roundRobin = roundRobin - } - - fun sticky(sticky: Boolean) { - def.sticky = sticky.toString() - } - - fun sticky(sticky: String) { - def.sticky = sticky - } -} - -@CamelDslMarker -class WeightedLoadBalancerDsl( - val def: WeightedLoadBalancerDefinition -) { - - fun distributionRatio(distributionRatio: String) { - def.distributionRatio = distributionRatio - } - - fun distributionRatioDelimiter(distributionRatioDelimiter: String) { - def.distributionRatioDelimiter = distributionRatioDelimiter - } - - fun roundRobin(roundRobin: Boolean) { - def.roundRobin = roundRobin.toString() - } - - fun roundRobin(roundRobin: String) { - def.roundRobin = roundRobin - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/LogDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/LogDsl.kt deleted file mode 100644 index b060e37a3376e..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/LogDsl.kt +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.LoggingLevel -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.LogDefinition -import org.slf4j.Logger - -@CamelDslMarker -class LogDsl( - val def: LogDefinition -) : OptionalIdentifiedDsl(def) { - - fun message(message: String) { - def.message = message - } - - fun loggingLevel(loggingLevel: LoggingLevel) { - def.loggingLevel = loggingLevel.name - } - - fun loggingLevel(loggingLevel: String) { - def.loggingLevel = loggingLevel - } - - fun logName(logName: String) { - def.logName = logName - } - - fun marker(marker: String) { - def.marker = marker - } - - fun logger(logger: Logger) { - def.setLogger(logger) - } - - fun logger(logger: String) { - def.logger = logger - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/LoopDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/LoopDsl.kt deleted file mode 100644 index 1c9bd776b4b15..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/LoopDsl.kt +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.LoopDefinition - -@CamelDslMarker -class LoopDsl( - val def: LoopDefinition -) : OptionalIdentifiedDsl(def) { - - fun copy(copy: Boolean) { - def.copy = copy.toString() - } - - fun copy(copy: String) { - def.copy = copy - } - - fun breakOnShutdown(breakOnShutdown: Boolean) { - def.breakOnShutdown = breakOnShutdown.toString() - } - - fun breakOnShutdown(breakOnShutdown: String) { - def.breakOnShutdown = breakOnShutdown - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/MulticastDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/MulticastDsl.kt deleted file mode 100644 index e7e80b4b2010a..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/MulticastDsl.kt +++ /dev/null @@ -1,124 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.AggregationStrategy -import org.apache.camel.Processor -import org.apache.camel.kotlin.StepsDsl -import org.apache.camel.model.MulticastDefinition -import java.util.concurrent.ExecutorService - -class MulticastDsl( - val def: MulticastDefinition -) : OptionalIdentifiedDsl(def) { - - fun outputs(i: StepsDsl.() -> Unit) { - StepsDsl(def).apply(i) - } - - fun aggregationStrategy(aggregationStrategy: AggregationStrategy) { - def.aggregationStrategy(aggregationStrategy) - } - - fun aggregationStrategy(aggregationStrategy: String) { - def.aggregationStrategy(aggregationStrategy) - } - - fun aggregationStrategyMethodName(aggregationStrategyMethodName: String) { - def.aggregationStrategyMethodName(aggregationStrategyMethodName) - } - - fun aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull: Boolean) { - def.aggregationStrategyMethodAllowNull = aggregationStrategyMethodAllowNull.toString() - } - - fun aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull: String) { - def.aggregationStrategyMethodAllowNull = aggregationStrategyMethodAllowNull - } - - fun parallelProcessing(parallelProcessing: Boolean) { - def.parallelProcessing = parallelProcessing.toString() - } - - fun parallelProcessing(parallelProcessing: String) { - def.parallelProcessing = parallelProcessing - } - - fun synchronous(synchronous: Boolean) { - def.synchronous(synchronous) - } - - fun synchronous(synchronous: String) { - def.synchronous(synchronous) - } - - fun parallelAggregate(parallelAggregate: Boolean) { - def.parallelAggregate(parallelAggregate) - } - - fun parallelAggregate(parallelAggregate: String) { - def.parallelAggregate(parallelAggregate) - } - - fun streaming(streaming: Boolean) { - def.streaming = streaming.toString() - } - - fun streaming(streaming: String) { - def.streaming = streaming - } - - fun stopOnException(stopOnException: Boolean) { - def.stopOnException = stopOnException.toString() - } - - fun stopOnException(stopOnException: String) { - def.stopOnException = stopOnException - } - - fun executorService(executorService: ExecutorService) { - def.executorService(executorService) - } - - fun executorService(executorService: String) { - def.executorService(executorService) - } - - fun onPrepare(onPrepare: Processor) { - def.onPrepare(onPrepare) - } - - fun onPrepare(onPrepare: String) { - def.onPrepare(onPrepare) - } - - fun timeout(timeout: Long) { - def.timeout(timeout) - } - - fun timeout(timeout: String) { - def.timeout(timeout) - } - - fun shareUnitOfWork(shareUnitOfWork: Boolean) { - def.shareUnitOfWork = shareUnitOfWork.toString() - } - - fun shareUnitOfWork(shareUnitOfWork: String) { - def.shareUnitOfWork = shareUnitOfWork - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/OnExceptionDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/OnExceptionDsl.kt deleted file mode 100644 index 0010e3aedcdf4..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/OnExceptionDsl.kt +++ /dev/null @@ -1,235 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.Expression -import org.apache.camel.LoggingLevel -import org.apache.camel.Predicate -import org.apache.camel.Processor -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.StepsDsl -import org.apache.camel.model.OnExceptionDefinition - -@CamelDslMarker -class OnExceptionDsl( - val def: OnExceptionDefinition -) { - - fun outputs(i: StepsDsl.() -> Unit) { - StepsDsl(def).apply(i) - } - - fun handled(handled: Boolean) { - def.handled(handled) - } - - fun handled(handled: Predicate) { - def.handled(handled) - } - - fun handled(handled: Expression) { - def.handled(handled) - } - - fun continued(continued: Boolean) { - def.continued(continued) - } - - fun continued(continued: Predicate) { - def.continued(continued) - } - - fun continued(continued: Expression) { - def.continued(continued) - } - - fun onWhen(onWhen: Predicate) { - def.onWhen(onWhen) - } - - fun retryWhile(retryWhile: Predicate) { - def.retryWhile(retryWhile) - } - - fun backOffMultiplier(backOffMultiplier: Double) { - def.backOffMultiplier(backOffMultiplier) - } - - fun backOffMultiplier(backOffMultiplier: String) { - def.backOffMultiplier(backOffMultiplier) - } - - fun collisionAvoidanceFactor(collisionAvoidanceFactor: Double) { - def.collisionAvoidanceFactor(collisionAvoidanceFactor) - } - - fun collisionAvoidanceFactor(collisionAvoidanceFactor: String) { - def.collisionAvoidanceFactor(collisionAvoidanceFactor) - } - - fun collisionAvoidancePercent(collisionAvoidancePercent: Double) { - def.collisionAvoidancePercent(collisionAvoidancePercent) - } - - fun redeliveryDelay(redeliveryDelay: Long) { - def.redeliveryDelay(redeliveryDelay) - } - - fun redeliveryDelay(redeliveryDelay: String) { - def.redeliveryDelay(redeliveryDelay) - } - - fun asyncDelayedRedelivery() { - def.asyncDelayedRedelivery() - } - - fun retriesExhaustedLogLevel(retriesExhaustedLogLevel: LoggingLevel) { - def.retriesExhaustedLogLevel(retriesExhaustedLogLevel) - } - - fun retryAttemptedLogLevel(retryAttemptedLogLevel: LoggingLevel) { - def.retryAttemptedLogLevel(retryAttemptedLogLevel) - } - - fun logStackTrace(logStackTrace: Boolean) { - def.logStackTrace(logStackTrace) - } - - fun logStackTrace(logStackTrace: String) { - def.logStackTrace(logStackTrace) - } - - fun logRetryStackTrace(logRetryStackTrace: Boolean) { - def.logRetryStackTrace(logRetryStackTrace) - } - - fun logRetryStackTrace(logRetryStackTrace: String) { - def.logRetryStackTrace(logRetryStackTrace) - } - - fun logHandled(logHandled: Boolean) { - def.logHandled(logHandled) - } - - fun logHandled(logHandled: String) { - def.logHandled(logHandled) - } - - fun logNewException(logNewException: Boolean) { - def.logNewException(logNewException) - } - - fun logNewException(logNewException: String) { - def.logNewException(logNewException) - } - - fun logContinued(logContinued: Boolean) { - def.logContinued(logContinued) - } - - fun logContinued(logContinued: String) { - def.logContinued(logContinued) - } - - fun logRetryAttempted(logRetryAttempted: Boolean) { - def.logRetryAttempted(logRetryAttempted) - } - - fun logRetryAttempted(logRetryAttempted: String) { - def.logRetryAttempted(logRetryAttempted) - } - - fun logExhausted(logExhausted: Boolean) { - def.logExhausted(logExhausted) - } - - fun logExhausted(logExhausted: String) { - def.logExhausted(logExhausted) - } - - fun logExhaustedMessageHistory(logExhaustedMessageHistory: Boolean) { - def.logExhaustedMessageHistory(logExhaustedMessageHistory) - } - - fun logExhaustedMessageHistory(logExhaustedMessageHistory: String) { - def.logExhaustedMessageHistory(logExhaustedMessageHistory) - } - - fun logExhaustedMessageBody(logExhaustedMessageBody: Boolean) { - def.logExhaustedMessageBody(logExhaustedMessageBody) - } - - fun logExhaustedMessageBody(logExhaustedMessageBody: String) { - def.logExhaustedMessageBody(logExhaustedMessageBody) - } - - fun maximumRedeliveries(maximumRedeliveries: Int) { - def.maximumRedeliveries(maximumRedeliveries) - } - - fun maximumRedeliveries(maximumRedeliveries: String) { - def.maximumRedeliveries(maximumRedeliveries) - } - - fun useCollisionAvoidance() { - def.useCollisionAvoidance() - } - - fun useExponentialBackOff() { - def.useExponentialBackOff() - } - - fun maximumRedeliveryDelay(maximumRedeliveryDelay: Long) { - def.maximumRedeliveryDelay(maximumRedeliveryDelay) - } - - fun maximumRedeliveryDelay(maximumRedeliveryDelay: String) { - def.maximumRedeliveryDelay(maximumRedeliveryDelay) - } - - fun redeliveryPolicyRef(redeliveryPolicyRef: String) { - def.redeliveryPolicyRef(redeliveryPolicyRef) - } - - fun delayPattern(delayPattern: String) { - def.delayPattern(delayPattern) - } - - fun useOriginalMessage() { - def.useOriginalMessage() - } - - fun useOriginalBody() { - def.useOriginalBody() - } - - fun onRedelivery(onRedelivery: Processor) { - def.onRedelivery(onRedelivery) - } - - fun onRedeliveryRef(onRedeliveryRef: String) { - def.onRedeliveryRef(onRedeliveryRef) - } - - fun onExceptionOccurred(onExceptionOccurred: Processor) { - def.onExceptionOccurred(onExceptionOccurred) - } - - fun onExceptionOccurredRef(onExceptionOccurredRef: String) { - def.onExceptionOccurredRef(onExceptionOccurredRef) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/OptionalIdentifiedDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/OptionalIdentifiedDsl.kt deleted file mode 100644 index d1a531b6a4614..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/OptionalIdentifiedDsl.kt +++ /dev/null @@ -1,32 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.model.OptionalIdentifiedDefinition - -abstract class OptionalIdentifiedDsl( - private val def: OptionalIdentifiedDefinition<*> -) { - - fun id(id: String) { - def.id(id) - } - - fun description(description: String) { - def.description(description) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/PausableDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/PausableDsl.kt deleted file mode 100644 index a0f1215874c16..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/PausableDsl.kt +++ /dev/null @@ -1,44 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.PausableDefinition -import org.apache.camel.resume.ConsumerListener -import java.util.function.Predicate - -@CamelDslMarker -class PausableDsl( - val def: PausableDefinition -) : OptionalIdentifiedDsl(def) { - - fun consumerListener(consumerListener: ConsumerListener<*, *>) { - def.consumerListener(consumerListener) - } - - fun consumerListener(consumerListener: String) { - def.consumerListener(consumerListener) - } - - fun untilCheck(untilCheck: Predicate<*>) { - def.untilCheck(untilCheck) - } - - fun untilCheck(untilCheck: String) { - def.untilCheck(untilCheck) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/PollEnrichDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/PollEnrichDsl.kt deleted file mode 100644 index 7b65a1225a16e..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/PollEnrichDsl.kt +++ /dev/null @@ -1,100 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.AggregationStrategy -import org.apache.camel.Expression -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl -import org.apache.camel.model.PollEnrichDefinition -import org.apache.camel.model.language.SimpleExpression - -@CamelDslMarker -class PollEnrichDsl( - val def: PollEnrichDefinition -) : OptionalIdentifiedDsl(def) { - - fun uri(i: UriDsl.() -> Unit) { - val dsl = UriDsl().apply(i) - val uri = dsl.toUri() - def.expression = SimpleExpression(uri) - } - - fun uri(uri: Expression) { - def.setExpression(uri) - } - - fun timeout(timeout: Long) { - def.timeout(timeout) - } - - fun timeout(timeout: String) { - def.timeout(timeout) - } - - fun aggregationStrategy(aggregationStrategy: AggregationStrategy) { - def.aggregationStrategy(aggregationStrategy) - } - - fun aggregationStrategy(aggregationStrategy: String) { - def.aggregationStrategy(aggregationStrategy) - } - - fun aggregationStrategyMethodName(aggregationStrategyMethodName: String) { - def.aggregationStrategyMethodName(aggregationStrategyMethodName) - } - - fun aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull: Boolean) { - def.aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull) - } - - fun aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull: String) { - def.aggregationStrategyMethodAllowNull = aggregationStrategyMethodAllowNull - } - - fun aggregateOnException(aggregateOnException: Boolean) { - def.aggregateOnException(aggregateOnException) - } - - fun aggregateOnException(aggregateOnException: String) { - def.aggregateOnException = aggregateOnException - } - - fun cacheSize(cacheSize: Int) { - def.cacheSize = cacheSize.toString() - } - - fun cacheSize(cacheSize: String){ - def.cacheSize = cacheSize - } - - fun ignoreInvalidEndpoint(ignoreInvalidEndpoint: Boolean = true) { - def.ignoreInvalidEndpoint = ignoreInvalidEndpoint.toString() - } - - fun ignoreInvalidEndpoint(ignoreInvalidEndpoint: String) { - def.ignoreInvalidEndpoint = ignoreInvalidEndpoint - } - - fun autoStartComponents(autoStartComponents: Boolean) { - def.autoStartComponents(autoStartComponents.toString()) - } - - fun autoStartComponents(autoStartComponents: String) { - def.autoStartComponents(autoStartComponents) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/RecipientListDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/RecipientListDsl.kt deleted file mode 100644 index 226491e87b5c8..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/RecipientListDsl.kt +++ /dev/null @@ -1,141 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.AggregationStrategy -import org.apache.camel.Processor -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.RecipientListDefinition -import java.util.concurrent.ExecutorService - -@CamelDslMarker -class RecipientListDsl( - val def: RecipientListDefinition<*> -) : OptionalIdentifiedDsl(def) { - - fun delimiter(delimiter: String) { - def.delimiter(delimiter) - } - - fun aggregationStrategy(aggregationStrategy: AggregationStrategy) { - def.aggregationStrategy(aggregationStrategy) - } - - fun aggregationStrategy(aggregationStrategy: String) { - def.aggregationStrategy(aggregationStrategy) - } - - fun aggregationStrategyMethodName(aggregationStrategyMethodName: String) { - def.aggregationStrategyMethodName(aggregationStrategyMethodName) - } - - fun aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull: Boolean) { - def.aggregationStrategyMethodAllowNull = aggregationStrategyMethodAllowNull.toString() - } - - fun aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull: String) { - def.aggregationStrategyMethodAllowNull = aggregationStrategyMethodAllowNull - } - - fun ignoreInvalidEndpoints(ignoreInvalidEndpoints: Boolean) { - def.ignoreInvalidEndpoints = ignoreInvalidEndpoints.toString() - } - - fun ignoreInvalidEndpoints(ignoreInvalidEndpoints: String) { - def.ignoreInvalidEndpoints = ignoreInvalidEndpoints - } - - fun parallelProcessing(parallelProcessing: Boolean) { - def.parallelProcessing = parallelProcessing.toString() - } - - fun parallelProcessing(parallelProcessing: String) { - def.parallelProcessing = parallelProcessing - } - - fun parallelAggregate(parallelAggregate: Boolean) { - def.parallelAggregate(parallelAggregate) - } - - fun parallelAggregate(parallelAggregate: String) { - def.parallelAggregate(parallelAggregate) - } - - fun synchronous(synchronous: Boolean) { - def.synchronous(synchronous) - } - - fun synchronous(synchronous: String) { - def.synchronous(synchronous) - } - - fun streaming(streaming: Boolean) { - def.streaming = streaming.toString() - } - - fun streaming(streaming: String) { - def.streaming = streaming - } - - fun stopOnException(stopOnException: Boolean) { - def.stopOnException = stopOnException.toString() - } - - fun stopOnException(stopOnException: String) { - def.stopOnException = stopOnException - } - - fun executorService(executorService: ExecutorService) { - def.executorService(executorService) - } - - fun executorService(executorService: String) { - def.executorService(executorService) - } - - fun onPrepare(onPrepare: Processor) { - def.onPrepare(onPrepare) - } - - fun onPrepare(onPrepare: String) { - def.onPrepare(onPrepare) - } - - fun timeout(timeout: Long) { - def.timeout(timeout) - } - - fun timeout(timeout: String) { - def.timeout = timeout - } - - fun shareUnitOfWork(shareUnitOfWork: Boolean) { - def.shareUnitOfWork = shareUnitOfWork.toString() - } - - fun shareUnitOfWork(shareUnitOfWork: String) { - def.shareUnitOfWork = shareUnitOfWork - } - - fun cacheSize(cacheSize: Int) { - def.cacheSize(cacheSize) - } - - fun cacheSize(cacheSize: String) { - def.cacheSize(cacheSize) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ResequenceDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ResequenceDsl.kt deleted file mode 100644 index 6f25ab2413e29..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ResequenceDsl.kt +++ /dev/null @@ -1,155 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.ResequenceDefinition -import org.apache.camel.model.config.BatchResequencerConfig -import org.apache.camel.model.config.StreamResequencerConfig -import org.apache.camel.processor.resequencer.ExpressionResultComparator -import org.apache.camel.util.TimeUtils -import java.time.Duration - -@CamelDslMarker -class ResequenceDsl( - val def: ResequenceDefinition -) : OptionalIdentifiedDsl(def) { - - fun batch(i: BatchResequenceDsl.() -> Unit = {}) { - val config = BatchResequencerConfig.getDefault() - BatchResequenceDsl(config).apply(i) - def.batch(config) - } - - fun stream(i: StreamResequenceDsl.() -> Unit = {}) { - val config = StreamResequencerConfig.getDefault() - StreamResequenceDsl(config).apply(i) - def.stream(config) - } -} - -@CamelDslMarker -class BatchResequenceDsl( - val def: BatchResequencerConfig -) { - - fun batchSize(batchSize: Int) { - def.batchSize = batchSize.toString() - } - - fun batchSize(batchSize: String) { - def.batchSize = batchSize - } - - fun batchTimeout(batchTimeout: Duration) { - def.batchTimeout = TimeUtils.printDuration(batchTimeout, true) - } - - fun batchTimeout(batchTimeout: Long) { - def.batchTimeout = batchTimeout.toString() - } - - fun batchTimeout(batchTimeout: String) { - def.batchTimeout = batchTimeout - } - - fun allowDuplicates(allowDuplicates: Boolean) { - def.allowDuplicates = allowDuplicates.toString() - } - - fun allowDuplicates(allowDuplicates: String) { - def.allowDuplicates = allowDuplicates - } - - fun reverse(reverse: Boolean) { - def.reverse = reverse.toString() - } - - fun reverse(reverse: String) { - def.reverse = reverse - } - - fun ignoreInvalidExchanges(ignoreInvalidExchanges: Boolean) { - def.ignoreInvalidExchanges = ignoreInvalidExchanges.toString() - } - - fun ignoreInvalidExchanges(ignoreInvalidExchanges: String) { - def.ignoreInvalidExchanges = ignoreInvalidExchanges - } -} - -@CamelDslMarker -class StreamResequenceDsl( - val def: StreamResequencerConfig -) { - - fun capacity(capacity: Int) { - def.capacity = capacity.toString() - } - - fun capacity(capacity: String) { - def.capacity = capacity - } - - fun timeout(timeout: Duration) { - def.timeout = TimeUtils.printDuration(timeout, true) - } - - fun timeout(timeout: Long) { - def.timeout = timeout.toString() - } - - fun timeout(timeout: String) { - def.timeout = timeout - } - - fun deliveryAttemptInterval(deliveryAttemptInterval: Duration) { - def.deliveryAttemptInterval = TimeUtils.printDuration(deliveryAttemptInterval, true) - } - - fun deliveryAttemptInterval(deliveryAttemptInterval: Long) { - def.deliveryAttemptInterval = deliveryAttemptInterval.toString() - } - - fun deliveryAttemptInterval(deliveryAttemptInterval: String) { - def.deliveryAttemptInterval = deliveryAttemptInterval - } - - fun ignoreInvalidExchanges(ignoreInvalidExchanges: Boolean) { - def.ignoreInvalidExchanges = ignoreInvalidExchanges.toString() - } - - fun ignoreInvalidExchanges(ignoreInvalidExchanges: String) { - def.ignoreInvalidExchanges = ignoreInvalidExchanges - } - - fun rejectOld(rejectOld: Boolean) { - def.rejectOld = rejectOld.toString() - } - - fun rejectOld(rejectOld: String) { - def.rejectOld = rejectOld - } - - fun comparator(comparator: ExpressionResultComparator) { - def.comparatorBean = comparator - } - - fun comparator(comparator: String) { - def.comparator = comparator - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ResumableDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ResumableDsl.kt deleted file mode 100644 index a0fede01ffea8..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ResumableDsl.kt +++ /dev/null @@ -1,58 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.LoggingLevel -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.ResumableDefinition -import org.apache.camel.resume.ResumeStrategy -import org.apache.camel.resume.ResumeStrategyConfiguration -import org.apache.camel.resume.ResumeStrategyConfigurationBuilder - -@CamelDslMarker -class ResumableDsl( - val def: ResumableDefinition -) : OptionalIdentifiedDsl(def) { - - fun resumeStrategy(resumeStrategy: String) { - def.resumeStrategy(resumeStrategy) - } - - fun resumeStrategy(resumeStrategy: ResumeStrategy) { - def.resumeStrategy(resumeStrategy) - } - - fun loggingLevel(loggingLevel: LoggingLevel) { - def.loggingLevel = loggingLevel.name - } - - fun loggingLevel(loggingLevel: String) { - def.loggingLevel = loggingLevel - } - - fun intermittent(intermittent: Boolean) { - def.intermittent = intermittent.toString() - } - - fun intermittent(intermittent: String) { - def.intermittent = intermittent - } - - fun configuration(configuration: ResumeStrategyConfigurationBuilder, out ResumeStrategyConfiguration>) { - def.configuration(configuration) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/RoutingSlipDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/RoutingSlipDsl.kt deleted file mode 100644 index 202d8ffabd7cb..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/RoutingSlipDsl.kt +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.RoutingSlipDefinition - -@CamelDslMarker -class RoutingSlipDsl( - val def: RoutingSlipDefinition<*> -) : OptionalIdentifiedDsl(def) { - - fun uriDelimiter(uriDelimiter: String) { - def.uriDelimiter(uriDelimiter) - } - - fun ignoreInvalidEndpoints(ignoreInvalidEndpoints: Boolean) { - def.ignoreInvalidEndpoints(ignoreInvalidEndpoints) - } - - fun ignoreInvalidEndpoints(ignoreInvalidEndpoints: String) { - def.ignoreInvalidEndpoints(ignoreInvalidEndpoints) - } - - fun cacheSize(cacheSize: Int) { - def.cacheSize(cacheSize) - } - - fun cacheSize(cacheSize: String) { - def.cacheSize(cacheSize) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/SagaDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/SagaDsl.kt deleted file mode 100644 index 82b8fdce855ac..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/SagaDsl.kt +++ /dev/null @@ -1,85 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.Expression -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.StepsDsl -import org.apache.camel.kotlin.UriDsl -import org.apache.camel.model.SagaCompletionMode -import org.apache.camel.model.SagaDefinition -import org.apache.camel.model.SagaPropagation -import org.apache.camel.saga.CamelSagaService -import java.time.Duration - -@CamelDslMarker -class SagaDsl( - val def: SagaDefinition -) : OptionalIdentifiedDsl(def) { - - fun outputs(i: StepsDsl.() -> Unit) { - StepsDsl(def).apply(i) - } - - fun compensation(i: UriDsl.() -> Unit) { - val dsl = UriDsl().apply(i) - val uri = dsl.toUri() - def.compensation(uri) - } - - fun completion(i: UriDsl.() -> Unit) { - val dsl = UriDsl().apply(i) - val uri = dsl.toUri() - def.completion(uri) - } - - fun propagation(propagation: SagaPropagation) { - def.propagation(propagation) - } - - fun propagation(propagation: String) { - def.propagation = propagation - } - - fun sagaService(sagaService: CamelSagaService) { - def.sagaService(sagaService) - } - - fun sagaService(sagaService: String) { - def.sagaService(sagaService) - } - - fun completionMode(completionMode: SagaCompletionMode) { - def.completionMode(completionMode) - } - - fun completionMode(completionMode: String) { - def.completionMode(completionMode) - } - - fun option(option: String, expression: Expression) { - def.option(option, expression) - } - - fun timeout(timeout: Duration) { - def.timeout(timeout) - } - - fun timeout(timeout: String) { - def.timeout(timeout) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/SampleDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/SampleDsl.kt deleted file mode 100644 index 330e80f5fbbd5..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/SampleDsl.kt +++ /dev/null @@ -1,43 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.SamplingDefinition -import java.time.Duration - -@CamelDslMarker -class SampleDsl( - val def: SamplingDefinition -) : OptionalIdentifiedDsl(def) { - - fun sampleMessageFrequency(sampleMessageFrequency: Long) { - def.sampleMessageFrequency(sampleMessageFrequency) - } - - fun samplePeriod(samplePeriod: Duration) { - def.samplePeriod(samplePeriod) - } - - fun samplePeriod(samplePeriod: String) { - def.samplePeriod(samplePeriod) - } - - fun samplePeriod(samplePeriod: Long) { - def.samplePeriod(samplePeriod) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/SplitDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/SplitDsl.kt deleted file mode 100644 index 211075d6ae9da..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/SplitDsl.kt +++ /dev/null @@ -1,125 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.AggregationStrategy -import org.apache.camel.Processor -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.SplitDefinition -import java.util.concurrent.ExecutorService - -@CamelDslMarker -class SplitDsl( - val def: SplitDefinition -) : OptionalIdentifiedDsl(def) { - - fun delimiter(delimiter: String) { - def.delimiter(delimiter) - } - - fun aggregationStrategy(aggregationStrategy: AggregationStrategy) { - def.aggregationStrategy(aggregationStrategy) - } - - fun aggregationStrategy(aggregationStrategy: String) { - def.aggregationStrategy(aggregationStrategy) - } - - fun aggregationStrategyMethodName(aggregationStrategyMethodName: String) { - def.aggregationStrategyMethodName(aggregationStrategyMethodName) - } - - fun aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull: Boolean) { - def.aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull) - } - - fun aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull: String) { - def.aggregationStrategyMethodAllowNull(aggregationStrategyMethodAllowNull) - } - - fun parallelProcessing(parallelProcessing: Boolean) { - def.parallelProcessing(parallelProcessing) - } - - fun parallelProcessing(parallelProcessing: String) { - def.parallelProcessing(parallelProcessing) - } - - fun parallelAggregate(parallelAggregate: Boolean) { - def.parallelAggregate(parallelAggregate) - } - - fun parallelAggregate(parallelAggregate: String) { - def.parallelAggregate(parallelAggregate) - } - - fun synchronous(synchronous: Boolean) { - def.synchronous(synchronous) - } - - fun synchronous(synchronous: String) { - def.synchronous(synchronous) - } - - fun streaming(streaming: Boolean) { - def.streaming(streaming) - } - - fun streaming(streaming: String) { - def.streaming(streaming) - } - - fun stopOnException(stopOnException: Boolean) { - def.stopOnException(stopOnException) - } - - fun stopOnException(stopOnException: String) { - def.stopOnException(stopOnException) - } - - fun executorService(executorService: ExecutorService) { - def.executorService(executorService) - } - - fun executorService(executorService: String) { - def.executorService(executorService) - } - - fun onPrepare(onPrepare: Processor) { - def.onPrepare(onPrepare) - } - - fun onPrepare(onPrepare: String) { - def.onPrepare(onPrepare) - } - - fun timeout(timeout: Long) { - def.timeout(timeout) - } - - fun timeout(timeout: String) { - def.timeout(timeout) - } - - fun shareUnitOfWork(shareUnitOfWork: Boolean) { - def.shareUnitOfWork(shareUnitOfWork) - } - - fun shareUnitOfWork(shareUnitOfWork: String) { - def.shareUnitOfWork(shareUnitOfWork) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ThreadsDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ThreadsDsl.kt deleted file mode 100644 index b2c6e24c1415e..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ThreadsDsl.kt +++ /dev/null @@ -1,105 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.ThreadsDefinition -import org.apache.camel.util.concurrent.ThreadPoolRejectedPolicy -import java.util.concurrent.ExecutorService -import java.util.concurrent.TimeUnit - -@CamelDslMarker -class ThreadsDsl( - val def: ThreadsDefinition -) : OptionalIdentifiedDsl(def) { - - fun executorService(executorService: String) { - def.executorService(executorService) - } - - fun executorService(executorService: ExecutorService) { - def.executorService(executorService) - } - - fun poolSize(poolSize: Int) { - def.poolSize(poolSize) - } - - fun poolSize(poolSize: String) { - def.poolSize(poolSize) - } - - fun maxPoolSize(poolSize: Int) { - def.maxPoolSize(poolSize) - } - - fun maxPoolSize(poolSize: String) { - def.maxPoolSize(poolSize) - } - - fun keepAliveTime(keepAliveTime: Long) { - def.keepAliveTime(keepAliveTime) - } - - fun keepAliveTime(keepAliveTime: String) { - def.keepAliveTime(keepAliveTime) - } - - fun timeUnit(timeUnit: TimeUnit) { - def.timeUnit(timeUnit) - } - - fun timeUnit(timeUnit: String) { - def.timeUnit(timeUnit) - } - - fun maxQueueSize(maxQueueSize: Int) { - def.maxQueueSize(maxQueueSize) - } - - fun maxQueueSize(maxQueueSize: String) { - def.maxQueueSize(maxQueueSize) - } - - fun rejectedPolicy(rejectedPolicy: ThreadPoolRejectedPolicy) { - def.rejectedPolicy(rejectedPolicy) - } - - fun rejectedPolicy(rejectedPolicy: String) { - def.rejectedPolicy(rejectedPolicy) - } - - fun threadName(threadName: String) { - def.threadName(threadName) - } - - fun callerRunsWhenRejected(callerRunsWhenRejected: Boolean) { - def.callerRunsWhenRejected(callerRunsWhenRejected) - } - - fun callerRunsWhenRejected(callerRunsWhenRejected: String) { - def.callerRunsWhenRejected(callerRunsWhenRejected) - } - - fun allowCoreThreadTimeOut(allowCoreThreadTimeOut: Boolean) { - def.allowCoreThreadTimeOut(allowCoreThreadTimeOut) - } - - fun allowCoreThreadTimeOut(allowCoreThreadTimeOut: String) { - def.allowCoreThreadTimeOut(allowCoreThreadTimeOut) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ThrottleDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ThrottleDsl.kt deleted file mode 100644 index 51f557a429f18..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ThrottleDsl.kt +++ /dev/null @@ -1,76 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.Expression -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.ThrottleDefinition -import java.util.concurrent.ExecutorService - -@CamelDslMarker -class ThrottleDsl( - val def: ThrottleDefinition -) : OptionalIdentifiedDsl(def) { - - fun mode(mode: String) { - def.mode(mode) - } - - fun correlationExpression(correlationExpression: Expression) { - def.correlationExpression(correlationExpression) - } - - fun callerRunsWhenRejected(callerRunsWhenRejected: Boolean) { - def.callerRunsWhenRejected(callerRunsWhenRejected) - } - - fun callerRunsWhenRejected(callerRunsWhenRejected: String) { - def.callerRunsWhenRejected(callerRunsWhenRejected) - } - - fun asyncDelayed(asyncDelayed: Boolean) { - def.asyncDelayed(asyncDelayed) - } - - fun asyncDelayed(asyncDelayed: String) { - def.asyncDelayed(asyncDelayed) - } - - fun rejectExecution(rejectExecution: Boolean) { - def.rejectExecution(rejectExecution) - } - - fun rejectExecution(rejectExecution: String) { - def.rejectExecution(rejectExecution) - } - - fun timePeriodMillis(timePeriodMillis: String) { - def.timePeriodMillis = timePeriodMillis - } - - fun timePeriodMillis(timePeriodMillis: Long) { - def.timePeriodMillis = timePeriodMillis.toString() - } - - fun executorService(executorService: ExecutorService) { - def.executorService(executorService) - } - - fun executorService(executorService: String) { - def.executorService(executorService) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ToDynamicDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ToDynamicDsl.kt deleted file mode 100644 index c1217202de9ba..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ToDynamicDsl.kt +++ /dev/null @@ -1,67 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.ExchangePattern -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.ToDynamicDefinition - -@CamelDslMarker -open class ToDynamicDsl( - open val def: ToDynamicDefinition -) : OptionalIdentifiedDsl(def) { - - fun cacheSize(cacheSize: Int) { - def.cacheSize(cacheSize) - } - - fun cacheSize(cacheSize: String) { - def.cacheSize(cacheSize) - } - - fun pattern(pattern: ExchangePattern) { - def.pattern(pattern) - } - - fun pattern(pattern: String) { - def.pattern(pattern) - } - - fun ignoreInvalidEndpoint(ignoreInvalidEndpoint: Boolean) { - def.ignoreInvalidEndpoint(ignoreInvalidEndpoint) - } - - fun ignoreInvalidEndpoint(ignoreInvalidEndpoint: String) { - def.ignoreInvalidEndpoint(ignoreInvalidEndpoint) - } - - fun allowOptimisedComponents(allowOptimisedComponents: Boolean) { - def.allowOptimisedComponents(allowOptimisedComponents) - } - - fun allowOptimisedComponents(allowOptimisedComponents: String) { - def.allowOptimisedComponents(allowOptimisedComponents) - } - - fun autoStartComponents(autoStartComponents: Boolean) { - def.autoStartComponents(autoStartComponents.toString()) - } - - fun autoStartComponents(autoStartComponents: String) { - def.autoStartComponents(autoStartComponents) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/TryDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/TryDsl.kt deleted file mode 100644 index db5c09e378008..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/TryDsl.kt +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.StepsDsl -import org.apache.camel.model.CatchDefinition -import org.apache.camel.model.FinallyDefinition -import org.apache.camel.model.TryDefinition -import kotlin.reflect.KClass - -@CamelDslMarker -class TryDsl( - val def: TryDefinition -) : OptionalIdentifiedDsl(def) { - - fun steps(i: StepsDsl.() -> Unit) { - StepsDsl(def).apply(i) - def.endDoTry() - } - - fun doCatch(vararg doCatch: KClass, i: CatchDsl.() -> Unit) { - val catchDef = CatchDefinition() - catchDef.exception(*doCatch.map { it.java }.toTypedArray()) - CatchDsl(catchDef).apply(i) - def.catchClauses.add(catchDef) - } - - fun doFinally(i: StepsDsl.() -> Unit) { - val finallyDef = FinallyDefinition() - StepsDsl(finallyDef).apply(i) - def.finallyClause = finallyDef - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ValidateDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ValidateDsl.kt deleted file mode 100644 index 4f64b6b6fcf89..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/ValidateDsl.kt +++ /dev/null @@ -1,35 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.ValidateDefinition -import org.apache.camel.spi.PredicateExceptionFactory - -@CamelDslMarker -class ValidateDsl( - val def: ValidateDefinition -) { - - fun predicateExceptionFactory(predicateExceptionFactory: String) { - def.predicateExceptionFactory(predicateExceptionFactory) - } - - fun predicateExceptionFactory(predicateExceptionFactory: PredicateExceptionFactory) { - def.predicateExceptionFactory(predicateExceptionFactory) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/WireTapDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/WireTapDsl.kt deleted file mode 100644 index c881453587c31..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/WireTapDsl.kt +++ /dev/null @@ -1,60 +0,0 @@ -/* - * 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.kotlin.model - -import org.apache.camel.Processor -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.WireTapDefinition -import java.util.concurrent.ExecutorService - -@CamelDslMarker -class WireTapDsl( - override val def: WireTapDefinition<*> -): ToDynamicDsl(def) { - - fun executorService(executorService: ExecutorService) { - def.executorService(executorService) - } - - fun executorService(executorService: String) { - def.executorService(executorService) - } - - fun copy(copy: Boolean) { - def.copy = copy.toString() - } - - fun copy(copy: String) { - def.copy(copy) - } - - fun dynamicUri(dynamicUri: Boolean) { - def.dynamicUri(dynamicUri) - } - - fun dynamicUri(dynamicUri: String) { - def.dynamicUri(dynamicUri) - } - - fun onPrepare(onPrepare: Processor) { - def.onPrepare(onPrepare) - } - - fun onPrepare(onPrepare: String) { - def.onPrepare(onPrepare) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ApiKeyDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ApiKeyDsl.kt deleted file mode 100644 index 529ffa7a9274e..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ApiKeyDsl.kt +++ /dev/null @@ -1,54 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.rest.ApiKeyDefinition - -@CamelDslMarker -class ApiKeyDsl( - override val def: ApiKeyDefinition -) : RestSecurityDsl(def) { - - fun name(name: String) { - def.name = name - } - - fun inHeader(inHeader: Boolean) { - def.inHeader = inHeader.toString() - } - - fun inHeader(inHeader: String) { - def.inHeader = inHeader - } - - fun inQuery(inQuery: Boolean) { - def.inHeader = inQuery.toString() - } - - fun inQuery(inQuery: String) { - def.inQuery = inQuery - } - - fun inCookie(inCookie: Boolean) { - def.inCookie = inCookie.toString() - } - - fun inCookie(inCookie: String) { - def.inCookie = inCookie - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/BasicAuthDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/BasicAuthDsl.kt deleted file mode 100644 index fd532a2c49148..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/BasicAuthDsl.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.rest.BasicAuthDefinition - -@CamelDslMarker -class BasicAuthDsl( - override val def: BasicAuthDefinition -) : RestSecurityDsl(def) \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/BearerTokenDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/BearerTokenDsl.kt deleted file mode 100644 index 25a5e9775a23b..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/BearerTokenDsl.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.rest.BearerTokenDefinition - -@CamelDslMarker -class BearerTokenDsl( - override val def: BearerTokenDefinition -) : RestSecurityDsl(def) { - - fun format(format: String) { - def.format = format - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/MutualTLSDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/MutualTLSDsl.kt deleted file mode 100644 index 5386d36ddb677..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/MutualTLSDsl.kt +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.rest.MutualTLSDefinition - -@CamelDslMarker -class MutualTLSDsl( - override val def: MutualTLSDefinition -) : RestSecurityDsl(def) \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/OAuth2Dsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/OAuth2Dsl.kt deleted file mode 100644 index 9898f68ecd544..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/OAuth2Dsl.kt +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.rest.OAuth2Definition -import org.apache.camel.model.rest.RestPropertyDefinition - -@CamelDslMarker -class OAuth2Dsl( - override val def: OAuth2Definition -) : RestSecurityDsl(def) { - - fun authorizationUrl(authorizationUrl: String) { - def.authorizationUrl = authorizationUrl - } - - fun tokenUrl(tokenUrl: String) { - def.tokenUrl = tokenUrl - } - - fun refreshUrl(refreshUrl: String) { - def.refreshUrl = refreshUrl - } - - fun flow(flow: String) { - def.flow = flow - } - - fun withScope(key: String, description: String) { - def.scopes.add(RestPropertyDefinition(key, description)) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/OpenIdConnectDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/OpenIdConnectDsl.kt deleted file mode 100644 index 3ecda2d446a75..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/OpenIdConnectDsl.kt +++ /dev/null @@ -1,30 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.rest.OpenIdConnectDefinition - -@CamelDslMarker -class OpenIdConnectDsl( - override val def: OpenIdConnectDefinition -) : RestSecurityDsl(def) { - - fun url(url: String) { - def.url = url - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ParamDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ParamDsl.kt deleted file mode 100644 index 7dc18130d4b03..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ParamDsl.kt +++ /dev/null @@ -1,87 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.ValueDefinition -import org.apache.camel.model.rest.CollectionFormat -import org.apache.camel.model.rest.ParamDefinition -import org.apache.camel.model.rest.RestParamType -import org.apache.camel.model.rest.RestPropertyDefinition - -@CamelDslMarker -class ParamDsl( - val def: ParamDefinition -) { - - fun name(name: String) { - def.name = name - } - - fun type(type: RestParamType) { - def.type = type - } - - fun description(description: String) { - def.description = description - } - - fun defaultValue(defaultValue: String) { - def.defaultValue = defaultValue - } - - fun defaultValue(defaultValue: Any) { - def.defaultValue = defaultValue.toString() - } - - fun required(required: Boolean) { - def.required = required - } - - fun collectionFormat(collectionFormat: CollectionFormat) { - def.collectionFormat = collectionFormat - } - - fun arrayType(arrayType: String) { - def.arrayType = arrayType - } - - fun dataType(dataType: String) { - def.dataType = dataType - } - - fun dataFormat(dataFormat: String) { - def.dataFormat = dataFormat - } - - fun allowableValues(allowableValues: List) { - def.allowableValues = allowableValues.map { ValueDefinition(it) } - } - - fun allowableValues(vararg allowableValues: String) { - def.allowableValues = allowableValues.map { ValueDefinition(it) } - } - - fun allowableValues(allowableValues: String) { - def.allowableValues = allowableValues.split(",").map { ValueDefinition(it) } - } - - fun withExample(key: String, value: String) { - if (def.examples == null) def.examples = mutableListOf() - def.examples.add(RestPropertyDefinition(key, value)) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ParamsDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ParamsDsl.kt deleted file mode 100644 index 48a27a7ec8368..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ParamsDsl.kt +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.rest.ParamDefinition -import org.apache.camel.model.rest.VerbDefinition - -@CamelDslMarker -class ParamsDsl( - val def: MutableList, - private val verb: VerbDefinition -) { - - fun param(i: ParamDsl.() -> Unit) { - val paramDef = ParamDefinition(verb) - ParamDsl(paramDef).apply(i) - def.add(paramDef) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ResponseHeaderDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ResponseHeaderDsl.kt deleted file mode 100644 index 9a9ecaf19075b..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ResponseHeaderDsl.kt +++ /dev/null @@ -1,68 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.ValueDefinition -import org.apache.camel.model.rest.CollectionFormat -import org.apache.camel.model.rest.ResponseHeaderDefinition - -@CamelDslMarker -class ResponseHeaderDsl( - val def: ResponseHeaderDefinition -) { - - fun name(name: String) { - def.name = name - } - - fun description(description: String) { - def.description = description - } - - fun collectionFormat(collectionFormat: CollectionFormat) { - def.collectionFormat = collectionFormat - } - - fun arrayType(arrayType: String) { - def.arrayType = arrayType - } - - fun dataType(dataType: String) { - def.dataType = dataType - } - - fun dataFormat(dataFormat: String) { - def.dataFormat = dataFormat - } - - fun allowableValues(allowableValues: List) { - def.allowableValues = allowableValues.map { ValueDefinition(it) } - } - - fun allowableValues(vararg allowableValues: String) { - def.allowableValues = allowableValues.map { ValueDefinition(it) } - } - - fun allowableValues(allowableValues: String) { - def.allowableValues = allowableValues.split(",").map { ValueDefinition(it) } - } - - fun example(example: String) { - def.example = example - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ResponseMessageDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ResponseMessageDsl.kt deleted file mode 100644 index 4fb956f99fec2..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ResponseMessageDsl.kt +++ /dev/null @@ -1,56 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.rest.ResponseHeaderDefinition -import org.apache.camel.model.rest.ResponseMessageDefinition -import org.apache.camel.model.rest.RestPropertyDefinition - -@CamelDslMarker -class ResponseMessageDsl( - val def: ResponseMessageDefinition -) { - - fun code(code: Int) { - def.code = code.toString() - } - - fun code(code: String) { - def.code = code - } - - fun description(description: String) { - def.message = description - } - - fun responseModel(responseModel: String) { - def.responseModel = responseModel - } - - fun withHeader(i: ResponseHeaderDsl.() -> Unit) { - if (def.headers == null) def.headers = mutableListOf() - val headerDef = ResponseHeaderDefinition(def) - ResponseHeaderDsl(headerDef).apply(i) - def.headers.add(headerDef) - } - - fun withExample(key: String, value: String) { - if (def.examples == null) def.examples = mutableListOf() - def.examples.add(RestPropertyDefinition(key, value)) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ResponsesDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ResponsesDsl.kt deleted file mode 100644 index efa4bfd1aa084..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/ResponsesDsl.kt +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.rest.ResponseMessageDefinition -import org.apache.camel.model.rest.VerbDefinition - -@CamelDslMarker -class ResponsesDsl( - val def: MutableList, - private val verb: VerbDefinition -) { - - fun response(i: ResponseMessageDsl.() -> Unit) { - val responseDef = ResponseMessageDefinition(verb) - ResponseMessageDsl(responseDef).apply(i) - def.add(responseDef) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestDsl.kt deleted file mode 100644 index 821e1d61e6883..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestDsl.kt +++ /dev/null @@ -1,145 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.rest.* -import java.util.* - -@CamelDslMarker -class RestDsl( - val def: RestDefinition -) { - - fun get(get: String? = null, i: RestVerbDsl.() -> Unit) { - verb("get", get, i) - } - - fun post(post: String? = null, i: RestVerbDsl.() -> Unit) { - verb("post", post, i) - } - - fun put(put: String? = null, i: RestVerbDsl.() -> Unit) { - verb("put", put, i) - } - - fun patch(patch: String? = null, i: RestVerbDsl.() -> Unit) { - verb("patch", patch, i) - } - - fun delete(delete: String? = null, i: RestVerbDsl.() -> Unit) { - verb("delete", delete, i) - } - - fun head(head: String? = null, i: RestVerbDsl.() -> Unit) { - verb("head", head, i) - } - - fun verb(verb: String, uri: String? = null, i: RestVerbDsl.() -> Unit) { - val answer = when (verb) { - "get" -> GetDefinition() - "post" -> PostDefinition() - "delete" -> DeleteDefinition() - "head" -> HeadDefinition() - "put" -> PutDefinition() - "patch" -> PatchDefinition() - else -> throw IllegalArgumentException("Verb $verb not supported") - } - def.verbs.add(answer) - answer.rest = def - answer.path = uri - RestVerbDsl(answer).apply(i) - } - - fun consumes(consumes: String) { - def.consumes = consumes - } - - fun produces(produces: String) { - def.produces = produces - } - - fun disabled(disabled: Boolean) { - def.disabled = disabled.toString() - } - - fun disabled(disabled: String) { - def.disabled = disabled - } - - fun bindingMode(bindingMode: RestBindingMode) { - bindingMode(bindingMode.name) - } - - fun bindingMode(bindingMode: String) { - def.bindingMode = bindingMode.lowercase(Locale.getDefault()) - } - - fun skipBindingOnErrorCode(skipBindingOnErrorCode: Boolean) { - def.skipBindingOnErrorCode = skipBindingOnErrorCode.toString() - } - - fun skipBindingOnErrorCode(skipBindingOnErrorCode: String) { - def.skipBindingOnErrorCode = skipBindingOnErrorCode - } - - fun clientRequestValidation(clientRequestValidation: Boolean) { - def.clientRequestValidation = clientRequestValidation.toString() - } - - fun clientRequestValidation(clientRequestValidation: String) { - def.clientRequestValidation = clientRequestValidation - } - - fun enableCORS(enableCORS: Boolean) { - def.enableCORS = enableCORS.toString() - } - - fun enableCORS(enableCORS: String) { - def.enableCORS = enableCORS - } - - fun enableNoContentResponse(enableNoContentResponse: Boolean) { - def.enableNoContentResponse = enableNoContentResponse.toString() - } - - fun enableNoContentResponse(enableNoContentResponse: String) { - def.enableNoContentResponse = enableNoContentResponse - } - - fun apiDocs(apiDocs: Boolean) { - def.apiDocs = apiDocs.toString() - } - - fun apiDocs(apiDocs: String) { - def.apiDocs = apiDocs - } - - fun tag(tag: String) { - def.tag = tag - } - - fun securityDefinitions(i: RestSecuritiesDsl.() -> Unit) { - if (def.securityDefinitions == null) def.securityDefinitions = RestSecuritiesDefinition(def) - RestSecuritiesDsl(def.securityDefinitions, def).apply(i) - } - - fun securityRequirements(i: SecuritiesDsl.() -> Unit) { - if (def.securityRequirements == null) def.securityRequirements = mutableListOf() - SecuritiesDsl(def.securityRequirements).apply(i) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestSecuritiesDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestSecuritiesDsl.kt deleted file mode 100644 index ea9cf3b6c73b1..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestSecuritiesDsl.kt +++ /dev/null @@ -1,63 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.rest.* - -@CamelDslMarker -class RestSecuritiesDsl( - val def: RestSecuritiesDefinition, - private val rest: RestDefinition -) { - - fun apiKey(i: ApiKeyDsl.() -> Unit) { - val apiKeyDef = ApiKeyDefinition(rest) - ApiKeyDsl(apiKeyDef).apply(i) - def.securityDefinitions.add(apiKeyDef) - } - - fun basicAuth(i: BasicAuthDsl.() -> Unit) { - val basicAuthDef = BasicAuthDefinition(rest) - BasicAuthDsl(basicAuthDef).apply(i) - def.securityDefinitions.add(basicAuthDef) - } - - fun bearer(i: BearerTokenDsl.() -> Unit) { - val bearerDef = BearerTokenDefinition(rest) - BearerTokenDsl(bearerDef).apply(i) - def.securityDefinitions.add(bearerDef) - } - - fun oauth2(i: OAuth2Dsl.() -> Unit) { - val oauth2Def = OAuth2Definition(rest) - OAuth2Dsl(oauth2Def).apply(i) - def.securityDefinitions.add(oauth2Def) - } - - fun openIdConnect(i: OpenIdConnectDsl.() -> Unit) { - val openIdConnectDef = OpenIdConnectDefinition(rest) - OpenIdConnectDsl(openIdConnectDef).apply(i) - def.securityDefinitions.add(openIdConnectDef) - } - - fun mutualTLS(i: MutualTLSDsl.() -> Unit) { - val mutualTLSDef = MutualTLSDefinition(rest) - MutualTLSDsl(mutualTLSDef).apply(i) - def.securityDefinitions.add(mutualTLSDef) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestSecurityDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestSecurityDsl.kt deleted file mode 100644 index 93c0a6a49e49e..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestSecurityDsl.kt +++ /dev/null @@ -1,34 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.rest.RestSecurityDefinition - -@CamelDslMarker -open class RestSecurityDsl( - open val def: RestSecurityDefinition -) { - - fun key(key: String) { - def.key = key - } - - fun description(description: String) { - def.description = description - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestVerbDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestVerbDsl.kt deleted file mode 100644 index 63174434cab83..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/RestVerbDsl.kt +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.kotlin.UriDsl -import org.apache.camel.model.ToDefinition -import org.apache.camel.model.rest.RestBindingMode -import org.apache.camel.model.rest.VerbDefinition -import java.util.* -import kotlin.reflect.KClass - -@CamelDslMarker -class RestVerbDsl( - val def: VerbDefinition -) { - - fun params(i: ParamsDsl.() -> Unit) { - ParamsDsl(def.params, def).apply(i) - } - - fun responses(i: ResponsesDsl.() -> Unit) { - if (def.responseMsgs == null) def.responseMsgs = mutableListOf() - ResponsesDsl(def.responseMsgs, def).apply(i) - } - - fun security(i: SecuritiesDsl.() -> Unit) { - SecuritiesDsl(def.security).apply(i) - } - - fun consumes(consumes: String) { - def.consumes = consumes - } - - fun produces(produces: String) { - def.produces = produces - } - - fun disabled(disabled: Boolean) { - def.disabled = disabled.toString() - } - - fun disabled(disabled: String) { - def.disabled = disabled - } - - fun type(type: KClass<*>) { - def.typeClass = type.java - } - - fun type(type: String) { - def.type = type - } - - fun outType(outType: KClass<*>) { - def.outTypeClass = outType.java - } - - fun outType(outType: String) { - def.outType = outType - } - - fun bindingMode(bindingMode: RestBindingMode) { - bindingMode(bindingMode.name) - } - - fun bindingMode(bindingMode: String) { - def.bindingMode = bindingMode.lowercase(Locale.getDefault()) - } - - fun skipBindingOnErrorCode(skipBindingOnErrorCode: Boolean) { - def.skipBindingOnErrorCode = skipBindingOnErrorCode.toString() - } - - fun skipBindingOnErrorCode(skipBindingOnErrorCode: String) { - def.skipBindingOnErrorCode = skipBindingOnErrorCode - } - - fun clientRequestValidation(clientRequestValidation: Boolean) { - def.clientRequestValidation = clientRequestValidation.toString() - } - - fun clientRequestValidation(clientRequestValidation: String) { - def.clientRequestValidation = clientRequestValidation - } - - fun enableCORS(enableCORS: Boolean) { - def.enableCORS = enableCORS.toString() - } - - fun enableCORS(enableCORS: String) { - def.enableCORS = enableCORS - } - - fun enableNoContentResponse(enableNoContentResponse: Boolean) { - def.enableNoContentResponse = enableNoContentResponse.toString() - } - - fun enableNoContentResponse(enableNoContentResponse: String) { - def.enableNoContentResponse = enableNoContentResponse - } - - fun apiDocs(apiDocs: Boolean) { - def.apiDocs = apiDocs.toString() - } - - fun apiDocs(apiDocs: String) { - def.apiDocs = apiDocs - } - - fun deprecated(deprecated: Boolean) { - def.deprecated = deprecated.toString() - } - - fun deprecated(deprecated: String) { - def.deprecated = deprecated - } - - fun routeId(routeId: String) { - def.routeId = routeId - } - - fun to(i: UriDsl.() -> Unit) { - val dsl = UriDsl().apply(i) - val uri = dsl.toUri() - def.to = ToDefinition(uri) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/SecuritiesDsl.kt b/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/SecuritiesDsl.kt deleted file mode 100644 index d3822c35e11e2..0000000000000 --- a/dsl/camel-kotlin-api/src/main/kotlin/org/apache/camel/kotlin/model/rest/SecuritiesDsl.kt +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.kotlin.model.rest - -import org.apache.camel.kotlin.CamelDslMarker -import org.apache.camel.model.rest.SecurityDefinition - -@CamelDslMarker -class SecuritiesDsl( - val def: MutableList -) { - - fun item(key: String, scopes: String) { - val secDef = SecurityDefinition() - secDef.key = key - secDef.scopes = scopes - def.add(secDef) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/test/kotlin/org/apache/camel/kotlin/ComplexScenarioTest.kt b/dsl/camel-kotlin-api/src/test/kotlin/org/apache/camel/kotlin/ComplexScenarioTest.kt deleted file mode 100644 index e5cc88279b4da..0000000000000 --- a/dsl/camel-kotlin-api/src/test/kotlin/org/apache/camel/kotlin/ComplexScenarioTest.kt +++ /dev/null @@ -1,129 +0,0 @@ -/* - * 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.kotlin - -import org.apache.camel.impl.DefaultCamelContext -import org.apache.camel.kotlin.components.direct -import org.apache.camel.kotlin.languages.body -import org.apache.camel.kotlin.languages.constant -import org.junit.jupiter.api.AfterEach -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test -import java.util.concurrent.atomic.AtomicBoolean - -class ComplexScenarioTest { - - private lateinit var ctx: DefaultCamelContext - - @BeforeEach - fun beforeEach() { - ctx = DefaultCamelContext() - } - - @AfterEach - fun afterEach() { - ctx.stop() - } - - @Test - fun test() { - val producer = ctx.createProducerTemplate() - - val input = AtomicBoolean() - val firstWhen = AtomicBoolean() - val secondWhen = AtomicBoolean() - val otherwise = AtomicBoolean() - val enrich = AtomicBoolean() - val afterEnrich = AtomicBoolean() - val filtered = AtomicBoolean() - val afterFilter = AtomicBoolean() - - val clean = { - input.set(false) - firstWhen.set(false) - secondWhen.set(false) - otherwise.set(false) - enrich.set(false) - afterEnrich.set(false) - filtered.set(false) - afterFilter.set(false) - } - - camel(ctx) { - route { - from { direct { name("input") } } - steps { - process { input.set(true) } - choice { - `when`(body().contains(constant("x"))) { - process { firstWhen.set(true) } - } - `when`(body().contains(constant("y"))) { - process { secondWhen.set(true) } - } - otherwise { - process { otherwise.set(true) } - } - } - enrich { - uri { - direct { name("enrich") } - } - } - process { - afterEnrich.set(true) - } - filter(body().contains(constant("x"))) { - outputs { - process { filtered.set(true) } - } - } - process { afterFilter.set(true) } - } - } - route { - from { direct { name("enrich") } } - steps { - process { enrich.set(true) } - } - } - } - ctx.start() - - clean() - producer.sendBody("direct:input", "x") - assert(input.get()) - assert(firstWhen.get()) - assert(secondWhen.get().not()) - assert(otherwise.get().not()) - assert(enrich.get()) - assert(afterEnrich.get()) - assert(filtered.get()) - assert(afterFilter.get()) - - clean() - producer.sendBody("direct:input", "y") - assert(input.get()) - assert(firstWhen.get().not()) - assert(secondWhen.get()) - assert(otherwise.get().not()) - assert(enrich.get()) - assert(afterEnrich.get()) - assert(filtered.get().not()) - assert(afterFilter.get()) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/test/kotlin/org/apache/camel/kotlin/EipsTest.kt b/dsl/camel-kotlin-api/src/test/kotlin/org/apache/camel/kotlin/EipsTest.kt deleted file mode 100644 index cd837bcf7725d..0000000000000 --- a/dsl/camel-kotlin-api/src/test/kotlin/org/apache/camel/kotlin/EipsTest.kt +++ /dev/null @@ -1,164 +0,0 @@ -/* - * 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.kotlin - -import org.apache.camel.CamelExecutionException -import org.apache.camel.Exchange -import org.apache.camel.impl.DefaultCamelContext -import org.apache.camel.kotlin.components.direct -import org.apache.camel.kotlin.dataformats.csv -import org.apache.camel.kotlin.languages.body -import org.apache.camel.kotlin.languages.constant -import org.junit.jupiter.api.AfterEach -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test -import org.junit.jupiter.api.assertThrows -import java.util.concurrent.ConcurrentLinkedDeque -import java.util.concurrent.atomic.AtomicBoolean -import java.util.concurrent.atomic.AtomicReference -import kotlin.test.assertEquals -import kotlin.test.assertNotNull -import kotlin.test.assertTrue - -class EipsTest { - - private lateinit var ctx: DefaultCamelContext - - @BeforeEach - fun beforeEach() { - ctx = DefaultCamelContext() - } - - @AfterEach - fun afterEach() { - ctx.stop() - } - - @Test - fun testOnException() { - val producer = ctx.createProducerTemplate() - val handled = AtomicBoolean(false) - - camel(ctx) { - onException(Exception::class) { - handled(true) - outputs { - process { handled.set(true) } - } - } - route { - from { direct { name("input") } } - steps { - throwException(Exception("some")) - } - } - } - ctx.start() - - producer.sendBody("direct:input", null) - assertTrue(handled.get()) - } - - @Test - fun testTryCatch() { - val producer = ctx.createProducerTemplate() - val exchange = AtomicReference() - camel(ctx) { - route { - from { direct { name("first") } } - steps { - doTry { - steps { - throwException(Exception("raised")) - } - doCatch(Exception::class) { - onWhen(body() contains constant("some")) - steps { - process { exchange.set(it) } - } - } - } - } - } - } - ctx.start() - producer.sendBody("direct:first", "some") - assertEquals("some", exchange.get().message.body) - } - - @Test - fun testUnmarshal() { - val producer = ctx.createProducerTemplate() - val exchange = AtomicReference() - camel(ctx) { - route { - from { direct { name("first") } } - steps { - unmarshal { csv { } } - process { exchange.set(it) } - } - } - } - ctx.start() - producer.sendBody("direct:first", "1,2,3,4") - assertEquals("[[1, 2, 3, 4]]", exchange.get().message.body.toString()) - } - - @Test - fun testMulticast() { - val producer = ctx.createProducerTemplate() - val exchanges = ConcurrentLinkedDeque() - camel(ctx) { - route { - from { direct { name("first") } } - steps { - multicast { - outputs { - process { exchanges.add(it) } - process { exchanges.add(it) } - process { exchanges.add(it) } - } - } - } - } - } - ctx.start() - producer.sendBody("direct:first", null) - assertEquals(3, exchanges.size) - } - - @Test - fun testValidate() { - val producer = ctx.createProducerTemplate() - val exchange = AtomicReference() - camel(ctx) { - route { - from { direct { name("first") } } - steps { - validate(body().toPredicate()) - process { exchange.set(it) } - } - } - } - ctx.start() - producer.sendBody("direct:first", true) - assertNotNull(exchange.get()) - assertThrows { - producer.sendBody("direct:first", false) - } - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/test/kotlin/org/apache/camel/kotlin/RestTest.kt b/dsl/camel-kotlin-api/src/test/kotlin/org/apache/camel/kotlin/RestTest.kt deleted file mode 100644 index 1caaa06556ff2..0000000000000 --- a/dsl/camel-kotlin-api/src/test/kotlin/org/apache/camel/kotlin/RestTest.kt +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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.kotlin - -import org.apache.camel.impl.DefaultCamelContext -import org.apache.camel.kotlin.components.direct -import org.junit.jupiter.api.AfterEach -import org.junit.jupiter.api.BeforeEach -import org.junit.jupiter.api.Test -import java.util.concurrent.atomic.AtomicBoolean - -class RestTest { - - private lateinit var ctx: DefaultCamelContext - - @BeforeEach - fun beforeEach() { - ctx = DefaultCamelContext() - } - - @AfterEach - fun afterEach() { - ctx.stop() - } - - @Test - fun testRests() { - val someReached = AtomicBoolean(false) - - camel(ctx) { - restConfiguration { - host("localhost") - port(port) - component("jetty") - contextPath("/") - apiContextPath("/openapi") - } - - rest("/q") { - get("/some") { - to { - direct { name("some") } - } - } - } - - route { - from { direct { name("some") } } - steps { - process { someReached.set(true) } - } - } - } - - ctx.start() - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-api/src/test/resources/log4j2-test.properties b/dsl/camel-kotlin-api/src/test/resources/log4j2-test.properties deleted file mode 100644 index 15ff5ee69d3a8..0000000000000 --- a/dsl/camel-kotlin-api/src/test/resources/log4j2-test.properties +++ /dev/null @@ -1,31 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- - -appender.file.type = File -appender.file.name = file -appender.file.fileName = target/camel-kotlin-api-test.log -appender.file.layout.type = PatternLayout -appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n - -appender.out.type = Console -appender.out.name = out -appender.out.layout.type = PatternLayout -appender.out.layout.pattern = [%30.30t] %-30.30c{1} %-5p %m%n - -rootLogger.level = INFO -rootLogger.appenderRef.file.ref = file -#rootLogger.appenderRef.out.ref = out diff --git a/dsl/camel-kotlin-dsl/pom.xml b/dsl/camel-kotlin-dsl/pom.xml deleted file mode 100644 index 2e4101cca1b0c..0000000000000 --- a/dsl/camel-kotlin-dsl/pom.xml +++ /dev/null @@ -1,219 +0,0 @@ - - - - - 4.0.0 - - - org.apache.camel - dsl - 4.8.0-SNAPSHOT - - - camel-kotlin-dsl - jar - Camel :: Kotlin DSL (deprecated) - Camel DSL with Kotlin (deprecated) - - - 3.9.0 - Kotlin DSL - - Experimental - - **/resources/**/My*.java - - - ${sourcecheckExcludes}, - - - routes.language=kotlin - - - false - - - - - org.apache.camel - camel-endpointdsl-support - - - - org.jetbrains.kotlin - kotlin-scripting-jvm - ${kotlin-version} - - - org.jetbrains.kotlin - kotlin-scripting-jvm-host - ${kotlin-version} - - - - org.apache.camel - camel-main - test - - - org.apache.camel - camel-jackson - test - - - org.apache.camel - camel-direct - test - - - org.apache.camel - camel-rest - test - - - org.apache.camel - camel-mock - test - - - org.apache.camel - camel-core-languages - test - - - org.apache.camel - camel-bean - test - - - org.apache.camel - camel-log - test - - - org.apache.camel - camel-telegram - test - - - org.apache.camel - camel-seda - test - - - - org.assertj - assertj-core - ${assertj-version} - test - - - org.apache.camel - camel-test-junit5 - test - - - - org.apache.logging.log4j - log4j-core - test - - - org.apache.logging.log4j - log4j-slf4j2-impl - test - - - org.apache.logging.log4j - log4j-jcl - test - - - - - - - org.jetbrains.kotlin - kotlin-maven-plugin - ${kotlin-version} - - ${jdk.version} - - - - compile - - compile - - - ${jdk.version} - - src/main/kotlin - - true - - - - test-compile - - test-compile - - - ${jdk.version} - - src/test/kotlin - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - - default-compile - none - - - - default-testCompile - none - - - java-compile - compile - - compile - - - - java-test-compile - test-compile - - testCompile - - - - - - - diff --git a/dsl/camel-kotlin-dsl/src/generated/resources/META-INF/services/org/apache/camel/other.properties b/dsl/camel-kotlin-dsl/src/generated/resources/META-INF/services/org/apache/camel/other.properties deleted file mode 100644 index e6368c65a8f62..0000000000000 --- a/dsl/camel-kotlin-dsl/src/generated/resources/META-INF/services/org/apache/camel/other.properties +++ /dev/null @@ -1,8 +0,0 @@ -# Generated by camel build tools - do NOT edit this file! -name=kotlin-dsl -groupId=org.apache.camel -artifactId=camel-kotlin-dsl -version=4.8.0-SNAPSHOT -projectName=Camel :: Kotlin DSL (deprecated) -projectDescription=Camel DSL with Kotlin (deprecated) -annotations=routes.language=kotlin diff --git a/dsl/camel-kotlin-dsl/src/generated/resources/META-INF/services/org/apache/camel/routes-loader/kts b/dsl/camel-kotlin-dsl/src/generated/resources/META-INF/services/org/apache/camel/routes-loader/kts deleted file mode 100644 index fa0fdbcb61dca..0000000000000 --- a/dsl/camel-kotlin-dsl/src/generated/resources/META-INF/services/org/apache/camel/routes-loader/kts +++ /dev/null @@ -1,2 +0,0 @@ -# Generated by camel build tools - do NOT edit this file! -class=org.apache.camel.dsl.kotlin.KotlinRoutesBuilderLoader diff --git a/dsl/camel-kotlin-dsl/src/generated/resources/kotlin-dsl.json b/dsl/camel-kotlin-dsl/src/generated/resources/kotlin-dsl.json deleted file mode 100644 index 8c27da4d36873..0000000000000 --- a/dsl/camel-kotlin-dsl/src/generated/resources/kotlin-dsl.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "other": { - "kind": "other", - "name": "kotlin-dsl", - "title": "Kotlin DSL", - "description": "Camel DSL with Kotlin (deprecated)", - "deprecated": true, - "firstVersion": "3.9.0", - "label": "dsl", - "supportLevel": "Experimental", - "metadata": { "routes.language": "kotlin" }, - "groupId": "org.apache.camel", - "artifactId": "camel-kotlin-dsl", - "version": "4.8.0-SNAPSHOT" - } -} diff --git a/dsl/camel-kotlin-dsl/src/main/docs/kotlin-dsl.adoc b/dsl/camel-kotlin-dsl/src/main/docs/kotlin-dsl.adoc deleted file mode 100644 index 897e2a38256ce..0000000000000 --- a/dsl/camel-kotlin-dsl/src/main/docs/kotlin-dsl.adoc +++ /dev/null @@ -1,103 +0,0 @@ -= Kotlin DSL Component (deprecated) -:doctitle: Kotlin DSL -:shortname: kotlin-dsl -:artifactid: camel-kotlin-dsl -:description: Camel DSL with Kotlin (deprecated) -:since: 3.9 -:supportlevel: Experimental-deprecated -:deprecated: *deprecated* -:tabs-sync-option: -//Manually maintained attributes -:group: DSL - -*Since Camel {since}* - -IMPORTANT: This DSL is experimental support level and is not recommended being used for production - -The `java-kotlin-dsl` is used for runtime compiling Kotlin routes in an existing running Camel integration. -This was invented for Camel K and later ported to Apache Camel. - -This means that Camel will load the `.kts` source during startup and let Kotlin compile this to Java byte code. - -== Example - -The following `hello.kts` source file: - -.hello.kts -[source,kotlin] ----- -from("timer:tick") - .process { e -> e.getIn().body = "Hello Camel K!" } - .to("log:info") ----- - -Can then be loaded and run with Camel CLI or Camel K. - -.Running with Camel K - -[source,bash] ----- -kamel run hello.kts ----- - -.Running with Camel CLI - -[source,bash] ----- -camel run hello.kts ----- - -== Rest Example - -REST endpoints can be configured using the top level _rest_ block: - -.my-rest.kts -[source,kotlin] ----- -rest { - configuration { - host = "localhost" - port = "8080" - } - - path("/hello") { - get("/get") { - produces("application/json") - to("direct:get") - } - } - - path("/bye") { - post("/post") { - produces("application/json") - to("direct:post") - } - } -} - -from("direct:get") - .process { e -> e.getIn().body = "{ 'message': 'Hello GET' }" } - -from("direct:post") - .process { e -> e.getIn().body = "{ 'message': 'Hello POST' }" } ----- - -Can then be loaded and run with Camel CLI or Camel K. - -.Running with Camel K - -[source,bash] ----- -kamel run my-rest.kts ----- - -.Running with Camel CLI - -[source,bash] ----- -camel run my-rest.kts ----- - -== See Also - -See xref:manual:ROOT:dsl.adoc[DSL] diff --git a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinCompilationConfiguration.kt b/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinCompilationConfiguration.kt deleted file mode 100644 index 5ae97dd90ac24..0000000000000 --- a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinCompilationConfiguration.kt +++ /dev/null @@ -1,52 +0,0 @@ -/* - * 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.dsl.kotlin - -import kotlin.script.experimental.api.* -import kotlin.script.experimental.jvm.dependenciesFromClassloader -import kotlin.script.experimental.jvm.jvm - -class KotlinCompilationConfiguration : ScriptCompilationConfiguration( -{ - defaultImports( - "org.apache.camel", - "org.apache.camel.spi" - ) - - jvm { - // - // The Kotlin script compiler does not inherit - // the classpath by default. - // - dependenciesFromClassloader(wholeClasspath = true) - - // - // Scripts have to be compiled with the same - // jvm target level as the loader. - // - compilerOptions.append("-jvm-target") - compilerOptions.append(JVM_TARGET) - - // - // We may remove when https://youtrack.jetbrains.com/issue/KT-57907 is solved - // - compilerOptions.append("-Xadd-modules=ALL-MODULE-PATH") - } - ide { - acceptedLocations(ScriptAcceptedLocation.Everywhere) - } -}) \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinConstants.kt b/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinConstants.kt deleted file mode 100644 index 7146480fa6703..0000000000000 --- a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinConstants.kt +++ /dev/null @@ -1,20 +0,0 @@ -/* - * 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.dsl.kotlin - -const val EXTENSION = "kts" -const val JVM_TARGET = "17" \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinDSL.kt b/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinDSL.kt deleted file mode 100644 index 08e87fe2238ee..0000000000000 --- a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinDSL.kt +++ /dev/null @@ -1,96 +0,0 @@ -/* - * 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.dsl.kotlin - -import org.apache.camel.ErrorHandlerFactory -import org.apache.camel.Exchange -import org.apache.camel.Predicate -import org.apache.camel.Processor -import org.apache.camel.builder.BuilderSupport -import org.apache.camel.builder.EndpointConsumerBuilder -import org.apache.camel.builder.endpoint.EndpointBuilderFactory -import org.apache.camel.builder.endpoint.EndpointRouteBuilder -import org.apache.camel.dsl.kotlin.model.BeansConfiguration -import org.apache.camel.dsl.kotlin.model.CamelConfiguration -import org.apache.camel.dsl.kotlin.model.RestConfiguration -import org.apache.camel.model.* -import org.apache.camel.model.rest.RestDefinition -import kotlin.script.experimental.annotations.KotlinScript - -@KotlinScript(fileExtension = EXTENSION, compilationConfiguration = KotlinCompilationConfiguration::class) -abstract class KotlinDSL( - private val builder : EndpointRouteBuilder) : BuilderSupport(builder.context), EndpointBuilderFactory { - - fun rest(): RestDefinition { - return builder.rest() - } - - fun rest(block: RestConfiguration.() -> Unit) { - RestConfiguration(builder).block() - } - - fun beans(block: BeansConfiguration.() -> Unit) { - BeansConfiguration(context).block() - } - - fun camel(block: CamelConfiguration.() -> Unit) { - CamelConfiguration(context).block() - } - - fun from(uri: String): RouteDefinition { - return builder.from(uri) - } - - fun from(endpoint: EndpointConsumerBuilder): RouteDefinition { - return builder.from(endpoint) - } - - fun intercept() : InterceptDefinition { - return builder.intercept() - } - - fun onException(exception: Class) : OnExceptionDefinition { - return builder.onException(exception) - } - - fun onCompletion() : OnCompletionDefinition { - return builder.onCompletion() - } - - fun interceptFrom() : InterceptFromDefinition { - return builder.interceptFrom() - } - - fun interceptFrom(uri: String) : InterceptFromDefinition{ - return builder.interceptFrom(uri) - } - - fun interceptSendToEndpoint(uri: String) : InterceptSendToEndpointDefinition { - return builder.interceptSendToEndpoint(uri) - } - - fun errorHandler(handler: ErrorHandlerFactory) { - builder.errorHandler(handler) - } - - fun processor(fn: (Exchange) -> Unit) : Processor { - return Processor { exchange -> fn(exchange) } - } - fun predicate(fn: (Exchange) -> Boolean) : Predicate { - return Predicate { exchange -> fn(exchange) } - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinRoutesBuilderLoader.kt b/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinRoutesBuilderLoader.kt deleted file mode 100644 index 04bbd26fe362b..0000000000000 --- a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/KotlinRoutesBuilderLoader.kt +++ /dev/null @@ -1,71 +0,0 @@ -/* - * 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.dsl.kotlin - -import org.apache.camel.Experimental -import org.apache.camel.RuntimeCamelException -import org.apache.camel.api.management.ManagedResource -import org.apache.camel.builder.endpoint.EndpointRouteBuilder -import org.apache.camel.endpointdsl.support.EndpointRouteBuilderLoaderSupport -import org.apache.camel.spi.annotations.RoutesLoader -import org.slf4j.LoggerFactory -import java.io.Reader -import kotlin.script.experimental.api.* -import kotlin.script.experimental.host.toScriptSource -import kotlin.script.experimental.jvmhost.BasicJvmScriptingHost -import kotlin.script.experimental.jvmhost.createJvmCompilationConfigurationFromTemplate - -@Experimental -@ManagedResource(description = "Managed KotlinRoutesBuilderLoader") -@RoutesLoader(EXTENSION) -class KotlinRoutesBuilderLoader : EndpointRouteBuilderLoaderSupport(EXTENSION) { - @Throws(Exception::class) - override fun doLoadEndpointRouteBuilder(reader: Reader, builder: EndpointRouteBuilder) { - val host = BasicJvmScriptingHost() - val config = createJvmCompilationConfigurationFromTemplate() - - val result = host.eval( - reader.readText().toScriptSource(), - config, - ScriptEvaluationConfiguration { - // - // Arguments used to initialize the script base class (IntegrationConfiguration) - // - constructorArgs(builder) - } - ) - - // ensure evaluation errors propagation - when(val rv = result.valueOrNull()?.returnValue) { - is ResultValue.Error -> throw RuntimeCamelException(rv.error) - else -> {} // result is okay - } - - if (result.reports.isNotEmpty()) { - val logger = LoggerFactory.getLogger(KotlinRoutesBuilderLoader::class.java) - for (report in result.reports) { - when (report.severity) { - ScriptDiagnostic.Severity.FATAL -> logger.error(report.message, report.exception) - ScriptDiagnostic.Severity.ERROR -> logger.error(report.message, report.exception) - ScriptDiagnostic.Severity.WARNING -> logger.warn(report.message, report.exception) - ScriptDiagnostic.Severity.INFO -> logger.info(report.message) - ScriptDiagnostic.Severity.DEBUG -> logger.debug(report.message) - } - } - } - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/BeansConfiguration.kt b/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/BeansConfiguration.kt deleted file mode 100644 index 6b7c63c9cf58d..0000000000000 --- a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/BeansConfiguration.kt +++ /dev/null @@ -1,46 +0,0 @@ -/* - * 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.dsl.kotlin.model - -import org.apache.camel.CamelContext -import org.apache.camel.Exchange -import org.apache.camel.Predicate -import org.apache.camel.Processor -import org.apache.camel.builder.endpoint.EndpointBuilderFactory - -class BeansConfiguration( - val context: CamelContext) : EndpointBuilderFactory { - - inline fun bean(name: String, block: T.() -> Unit) { - val bean = context.injector.newInstance(T::class.java) - bean.block() - - context.registry.bind(name, T::class.java, bean) - } - - inline fun bean(name: String, crossinline function: () -> Any ) { - context.registry.bind(name, function()) - } - - fun processor(name: String, fn: (Exchange) -> Unit) { - context.registry.bind(name, Processor { exchange -> fn(exchange) } ) - } - - fun predicate(name: String, fn: (Exchange) -> Boolean) { - context.registry.bind(name, Predicate { exchange -> fn(exchange) } ) - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/CamelConfiguration.kt b/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/CamelConfiguration.kt deleted file mode 100644 index 151ad32a387ac..0000000000000 --- a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/CamelConfiguration.kt +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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.dsl.kotlin.model - -import org.apache.camel.CamelContext - -class CamelConfiguration ( - private val context: CamelContext) { - - fun components(block: ComponentsConfiguration.() -> Unit): ComponentsConfiguration { - val delegate = ComponentsConfiguration(context) - delegate.block() - return delegate - } - - fun languages(block: LanguagesConfiguration.() -> Unit): LanguagesConfiguration { - val delegate = LanguagesConfiguration(context) - delegate.block() - return delegate - } - - fun dataFormats(block: DataFormatsConfiguration.() -> Unit): DataFormatsConfiguration { - val delegate = DataFormatsConfiguration(context) - delegate.block() - return delegate - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/ComponentsConfiguration.kt b/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/ComponentsConfiguration.kt deleted file mode 100644 index ae62c381e1361..0000000000000 --- a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/ComponentsConfiguration.kt +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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.dsl.kotlin.model - -import org.apache.camel.CamelContext -import org.apache.camel.Component - -class ComponentsConfiguration(val context: CamelContext) { - inline fun component(name: String, block: T.() -> Unit) : T { - var target = context.getComponent(name, true, false) - var bind = false - - if (target != null && !T::class.java.isInstance(target)) { - throw IllegalArgumentException("Type mismatch, expected: ${T::class.java}, got: ${target.javaClass}") - } - - // if the component is not found, let's create a new one. This is - // equivalent to create a new named component, useful to create - // multiple instances of the same component but with different setup - if (target == null) { - target = context.injector.newInstance(T::class.java) - bind = true - } - - block.invoke(target as T) - - if (bind) { - context.registry.bind(name, T::class.java, target) - } - - return target - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/DataFormatsConfiguration.kt b/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/DataFormatsConfiguration.kt deleted file mode 100644 index 9e89ef3fee1ae..0000000000000 --- a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/DataFormatsConfiguration.kt +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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.dsl.kotlin.model - -import org.apache.camel.CamelContext -import org.apache.camel.spi.DataFormat - -class DataFormatsConfiguration(val context: CamelContext) { - inline fun dataFormat(name: String, block: T.() -> Unit) : T { - var target = context.registry.lookupByNameAndType(name, T::class.java) - var bind = false - - if (target == null) { - target = context.injector.newInstance(T::class.java) - bind = true - } - - block.invoke(target) - - if (bind) { - context.registry.bind(name, T::class.java, target) - } - - return target - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/LanguagesConfiguration.kt b/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/LanguagesConfiguration.kt deleted file mode 100644 index bab0573497dda..0000000000000 --- a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/LanguagesConfiguration.kt +++ /dev/null @@ -1,40 +0,0 @@ -/* - * 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.dsl.kotlin.model - -import org.apache.camel.CamelContext -import org.apache.camel.spi.Language - -class LanguagesConfiguration(val context: CamelContext) { - inline fun language(name: String, block: T.() -> Unit) : T { - var target = context.registry.lookupByNameAndType(name, T::class.java) - var bind = false - - if (target == null) { - target = context.injector.newInstance(T::class.java) - bind = true - } - - block.invoke(target) - - if (bind) { - context.registry.bind(name, T::class.java, target) - } - - return target - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/RegistryConfiguration.kt b/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/RegistryConfiguration.kt deleted file mode 100644 index e555d03a6e4ae..0000000000000 --- a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/RegistryConfiguration.kt +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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.dsl.kotlin.model - -import org.apache.camel.spi.Registry - - -class RegistryConfiguration(val registry: Registry) { - fun bind(name: String, value: Any) { - registry.bind(name, value) - } -} diff --git a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/RestConfiguration.kt b/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/RestConfiguration.kt deleted file mode 100644 index 0870fa1a883ad..0000000000000 --- a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/RestConfiguration.kt +++ /dev/null @@ -1,33 +0,0 @@ -/* - * 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.dsl.kotlin.model - -import org.apache.camel.builder.RouteBuilder -import org.apache.camel.model.rest.RestConfigurationDefinition - -class RestConfiguration( - private val builder: RouteBuilder) : RestVerbConfiguration(builder, builder.rest()) { - - fun configuration(block: RestConfigurationDefinition.() -> Unit) { - val delegate = builder.restConfiguration() - delegate.block() - } - - fun path(path: String, block: RestVerbConfiguration.() -> Unit) { - RestVerbConfiguration(builder, path).block() - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/RestVerbConfiguration.kt b/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/RestVerbConfiguration.kt deleted file mode 100644 index 2c986196093a2..0000000000000 --- a/dsl/camel-kotlin-dsl/src/main/kotlin/org/apache/camel/dsl/kotlin/model/RestVerbConfiguration.kt +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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.dsl.kotlin.model - -import org.apache.camel.builder.RouteBuilder -import org.apache.camel.model.rest.RestDefinition - -open class RestVerbConfiguration( - private val builder: RouteBuilder, - private val definition: RestDefinition) { - - constructor(builder: RouteBuilder, path: String): this(builder, builder.rest(path)) - - fun get(path: String, block: RestDefinition.() -> Unit) = definition.get(path).block() - fun get(block: RestDefinition.() -> Unit) = definition.get().block() - - fun post(path: String, block: RestDefinition.() -> Unit) = definition.post(path).block() - fun post(block: RestDefinition.() -> Unit) = definition.post().block() - - fun delete(path: String, block: RestDefinition.() -> Unit) = definition.delete(path).block() - fun delete(block: RestDefinition.() -> Unit) = definition.delete().block() - - fun head(path: String, block: RestDefinition.() -> Unit) = definition.head(path).block() - fun head(block: RestDefinition.() -> Unit) = definition.head().block() - - fun put(path: String, block: RestDefinition.() -> Unit) = definition.put(path).block() - fun put(block: RestDefinition.() -> Unit) = definition.put().block() - - fun patch(path: String, block: RestDefinition.() -> Unit) = definition.patch(path).block() - fun patch(block: RestDefinition.() -> Unit) = definition.patch().block() -} \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/main/resources/META-INF/kotlin/script/templates/org.apache.camel.dsl.kotlin.KotlinDSL.classname b/dsl/camel-kotlin-dsl/src/main/resources/META-INF/kotlin/script/templates/org.apache.camel.dsl.kotlin.KotlinDSL.classname deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/dsl/camel-kotlin-dsl/src/test/kotlin/org/apache/camel/dsl/kotlin/KotlinRoutesBuilderLoaderTest.kt b/dsl/camel-kotlin-dsl/src/test/kotlin/org/apache/camel/dsl/kotlin/KotlinRoutesBuilderLoaderTest.kt deleted file mode 100644 index 454c349051e71..0000000000000 --- a/dsl/camel-kotlin-dsl/src/test/kotlin/org/apache/camel/dsl/kotlin/KotlinRoutesBuilderLoaderTest.kt +++ /dev/null @@ -1,200 +0,0 @@ -/* - * 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.dsl.kotlin - -import org.apache.camel.Predicate -import org.apache.camel.Processor -import org.apache.camel.RuntimeCamelException -import org.apache.camel.component.jackson.JacksonDataFormat -import org.apache.camel.component.log.LogComponent -import org.apache.camel.component.seda.SedaComponent -import org.apache.camel.dsl.kotlin.support.MyBean -import org.apache.camel.impl.DefaultCamelContext -import org.apache.camel.language.bean.BeanLanguage -import org.apache.camel.model.ProcessDefinition -import org.apache.camel.model.ToDefinition -import org.apache.camel.model.rest.GetDefinition -import org.apache.camel.model.rest.PostDefinition -import org.apache.camel.processor.FatalFallbackErrorHandler -import org.apache.camel.support.DefaultHeaderFilterStrategy -import org.apache.camel.support.PluginHelper -import org.assertj.core.api.Assertions.assertThat -import org.assertj.core.api.Assertions.assertThatExceptionOfType -import org.junit.jupiter.api.Test - -class KotlinRoutesBuilderLoaderTest { - - @Test - fun `load routes`() { - val ctx = DefaultCamelContext() - val res = PluginHelper.getResourceLoader(ctx).resolveResource("/routes/routes.kts") - - PluginHelper.getRoutesLoader(ctx).loadRoutes(res) - - val routes = ctx.routeDefinitions - - assertThat(routes).hasSize(1) - assertThat(routes[0].input.endpointUri).isEqualTo("timer:tick") - assertThat(routes[0].outputs[0]).isInstanceOf(ProcessDefinition::class.java) - assertThat(routes[0].outputs[1]).isInstanceOf(ToDefinition::class.java) - } - - @Test - fun `load routes with endpoint dsl`() { - val ctx = DefaultCamelContext() - val res = PluginHelper.getResourceLoader(ctx).resolveResource("/routes/routes-with-endpoint-dsl.kts") - - PluginHelper.getRoutesLoader(ctx).loadRoutes(res) - - val routes = ctx.routeDefinitions - - assertThat(routes).hasSize(1) - assertThat(routes[0].input.endpointUri).isEqualTo("timer://tick?period=1s") - assertThat(routes[0].outputs[0]).isInstanceOfSatisfying(ToDefinition::class.java) { - assertThat(it.endpointUri).isEqualTo("log://info") - } - } - - - @Test - fun `load integration with rest`() { - val ctx = DefaultCamelContext() - val res = PluginHelper.getResourceLoader(ctx).resolveResource("/routes/routes-with-rest.kts") - - PluginHelper.getRoutesLoader(ctx).loadRoutes(res) - - assertThat(ctx.restConfiguration.host).isEqualTo("my-host") - assertThat(ctx.restConfiguration.port).isEqualTo(9192) - assertThat(ctx.restDefinitions.size).isEqualTo(2) - - with(ctx.restDefinitions.find { it.path == "/my/path" }) { - assertThat(this?.verbs).hasSize(1) - - with(this?.verbs?.get(0) as GetDefinition) { - assertThat(path).isEqualTo("/get") - assertThat(consumes).isEqualTo("application/json") - assertThat(produces).isEqualTo("application/json") - assertThat(to).hasFieldOrPropertyWithValue("endpointUri", "direct:get") - } - } - - with(ctx.restDefinitions.find { it.path == "/post" }) { - assertThat(this?.verbs).hasSize(1) - - with(this?.verbs?.get(0) as PostDefinition) { - assertThat(path).isNull() - assertThat(consumes).isEqualTo("application/json") - assertThat(produces).isEqualTo("application/json") - assertThat(to).hasFieldOrPropertyWithValue("endpointUri", "direct:post") - } - } - } - - @Test - fun `load integration with beans`() { - val ctx = DefaultCamelContext() - val res = PluginHelper.getResourceLoader(ctx).resolveResource("/routes/routes-with-beans.kts") - - PluginHelper.getRoutesLoader(ctx).loadRoutes(res) - - assertThat(ctx.registry.findByType(MyBean::class.java)).hasSize(1) - assertThat(ctx.registry.lookupByName("myBean")).isInstanceOf(MyBean::class.java) - assertThat(ctx.registry.findByType(DefaultHeaderFilterStrategy::class.java)).hasSize(1) - assertThat(ctx.registry.lookupByName("filterStrategy")).isInstanceOf(DefaultHeaderFilterStrategy::class.java) - assertThat(ctx.registry.lookupByName("myProcessor")).isInstanceOf(Processor::class.java) - assertThat(ctx.registry.lookupByName("myPredicate")).isInstanceOf(Predicate::class.java) - } - - @Test - fun `load integration with components configuration`() { - val ctx = DefaultCamelContext() - val res = PluginHelper.getResourceLoader(ctx).resolveResource("/routes/routes-with-components-configuration.kts") - - PluginHelper.getRoutesLoader(ctx).loadRoutes(res) - - val seda = ctx.getComponent("seda", SedaComponent::class.java) - val mySeda = ctx.getComponent("mySeda", SedaComponent::class.java) - val log = ctx.getComponent("log", LogComponent::class.java) - - assertThat(seda.queueSize).isEqualTo(1234) - assertThat(seda.concurrentConsumers).isEqualTo(12) - assertThat(mySeda.queueSize).isEqualTo(4321) - assertThat(mySeda.concurrentConsumers).isEqualTo(21) - assertThat(log.exchangeFormatter).isNotNull - } - - @Test - fun `load integration with components configuration error`() { - assertThatExceptionOfType(RuntimeCamelException::class.java) - .isThrownBy { - val ctx = DefaultCamelContext() - val res = PluginHelper.getResourceLoader(ctx).resolveResource("/routes/routes-with-components-configuration-error.kts") - - PluginHelper.getRoutesLoader(ctx).loadRoutes(res) - } - .withCauseInstanceOf(IllegalArgumentException::class.java) - .withMessageContaining("Type mismatch, expected: class org.apache.camel.component.log.LogComponent, got: class org.apache.camel.component.seda.SedaComponent"); - } - - @Test - fun `load integration with languages configuration`() { - val ctx = DefaultCamelContext() - val res = PluginHelper.getResourceLoader(ctx).resolveResource("/routes/routes-with-languages-configuration.kts") - - PluginHelper.getRoutesLoader(ctx).loadRoutes(res) - - ctx.start() - - val bean = ctx.resolveLanguage("bean") as BeanLanguage - assertThat(bean.isValidate).isFalse() - - val mybean = ctx.resolveLanguage("my-bean") as BeanLanguage - assertThat(mybean.isValidate).isTrue() - } - - @Test - fun `load integration with dataformats configuration`() { - val ctx = DefaultCamelContext() - val res = PluginHelper.getResourceLoader(ctx).resolveResource("/routes/routes-with-dataformats-configuration.kts") - - PluginHelper.getRoutesLoader(ctx).loadRoutes(res) - - val jackson = ctx.resolveDataFormat("jackson") as JacksonDataFormat - assertThat(jackson.unmarshalType).isEqualTo(Map::class.java) - assertThat(jackson.isPrettyPrint).isTrue() - - val myjackson = ctx.resolveDataFormat("my-jackson") as JacksonDataFormat - assertThat(myjackson.unmarshalType).isEqualTo(String::class.java) - assertThat(myjackson.isPrettyPrint).isFalse() - } - - @Test - fun `load integration with error handler`() { - val ctx = DefaultCamelContext() - val res = PluginHelper.getResourceLoader(ctx).resolveResource("/routes/routes-with-error-handler.kts") - - PluginHelper.getRoutesLoader(ctx).loadRoutes(res) - ctx.start() - - try { - assertThat(ctx.routes).hasSize(1) - assertThat(ctx.routes[0].getOnException("my-on-exception")).isInstanceOf(FatalFallbackErrorHandler::class.java) - } finally { - ctx.stop() - } - } -} diff --git a/dsl/camel-kotlin-dsl/src/test/kotlin/org/apache/camel/dsl/kotlin/support/MyBean.kt b/dsl/camel-kotlin-dsl/src/test/kotlin/org/apache/camel/dsl/kotlin/support/MyBean.kt deleted file mode 100644 index 0c963fd6fc370..0000000000000 --- a/dsl/camel-kotlin-dsl/src/test/kotlin/org/apache/camel/dsl/kotlin/support/MyBean.kt +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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.dsl.kotlin.support - -class MyBean { - var name: String = "" -} \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/test/resources/log4j2-test.properties b/dsl/camel-kotlin-dsl/src/test/resources/log4j2-test.properties deleted file mode 100644 index 163f7f87a9e68..0000000000000 --- a/dsl/camel-kotlin-dsl/src/test/resources/log4j2-test.properties +++ /dev/null @@ -1,31 +0,0 @@ -## --------------------------------------------------------------------------- -## 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. -## --------------------------------------------------------------------------- - -appender.file.type = File -appender.file.name = file -appender.file.fileName = target/camel-kotlin-dsl-test.log -appender.file.layout.type = PatternLayout -appender.file.layout.pattern = %d [%-15.15t] %-5p %-30.30c{1} - %m%n - -appender.out.type = Console -appender.out.name = out -appender.out.layout.type = PatternLayout -appender.out.layout.pattern = [%30.30t] %-30.30c{1} %-5p %m%n - -rootLogger.level = INFO -rootLogger.appenderRef.file.ref = file -#rootLogger.appenderRef.out.ref = out diff --git a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-new.kts b/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-new.kts deleted file mode 100644 index 7f8b9237c34e3..0000000000000 --- a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-new.kts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * 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. - */ -println("test") \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-beans.kts b/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-beans.kts deleted file mode 100644 index 7063f51e4abcd..0000000000000 --- a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-beans.kts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -beans { - bean("myBean") { - name = "test" - } - - bean("filterStrategy") { - org.apache.camel.support.DefaultHeaderFilterStrategy() - } - - processor("myProcessor") { - it.getIn().body = "Hello" - } - - predicate("myPredicate") { - false - } -} diff --git a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-components-configuration-error.kts b/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-components-configuration-error.kts deleted file mode 100644 index 3c209b5b738b0..0000000000000 --- a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-components-configuration-error.kts +++ /dev/null @@ -1,27 +0,0 @@ -/* - * 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. - */ -import org.apache.camel.Exchange - -camel { - components { - component("seda") { - setExchangeFormatter { - e: Exchange -> "" + e.getIn().body - } - } - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-components-configuration.kts b/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-components-configuration.kts deleted file mode 100644 index 3fdf39c15c250..0000000000000 --- a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-components-configuration.kts +++ /dev/null @@ -1,42 +0,0 @@ -/* - * 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. - */ -import org.apache.camel.Exchange -import org.apache.camel.component.log.LogComponent -import org.apache.camel.component.seda.SedaComponent - -camel { - components { - component("log") { - setExchangeFormatter { - e: Exchange -> "" + e.getIn().body - } - } - - component("seda") { - queueSize = 1234 - concurrentConsumers = 12 - } - - component("mySeda") { - queueSize = 4321 - concurrentConsumers = 21 - } - } -} - -from("timer:tick") - .to("log:info") \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-dataformats-configuration.kts b/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-dataformats-configuration.kts deleted file mode 100644 index ec8cb00d8d30d..0000000000000 --- a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-dataformats-configuration.kts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * 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. - */ -import org.apache.camel.component.jackson.JacksonDataFormat - -camel { - dataFormats { - dataFormat("jackson") { - unmarshalType = Map::class.java - isPrettyPrint = true - } - - dataFormat("my-jackson") { - unmarshalType = String::class.java - isPrettyPrint = false - } - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-endpoint-dsl.kts b/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-endpoint-dsl.kts deleted file mode 100644 index fc04af96be107..0000000000000 --- a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-endpoint-dsl.kts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ -var f = timer("tick").period("1s") -var t = log("info") - -from(f) - .to(t) \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-error-handler.kts b/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-error-handler.kts deleted file mode 100644 index ed55f493c0fa5..0000000000000 --- a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-error-handler.kts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * 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. - */ -onException(IllegalArgumentException::class.java) - .id("my-on-exception") - .to("log:exception") - -from("timer:tick") - .process().message { - m -> m.headers["MyHeader"] = "MyHeaderValue" - } - .to("log:info") \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-languages-configuration.kts b/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-languages-configuration.kts deleted file mode 100644 index 1987daf4e5de4..0000000000000 --- a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-languages-configuration.kts +++ /dev/null @@ -1,28 +0,0 @@ -/* - * 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. - */ -import org.apache.camel.language.bean.BeanLanguage - -camel { - languages { - language("bean") { - isValidate = false - } - language("my-bean") { - isValidate = true - } - } -} \ No newline at end of file diff --git a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-rest.kts b/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-rest.kts deleted file mode 100644 index d9dd70b6a7e5e..0000000000000 --- a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes-with-rest.kts +++ /dev/null @@ -1,45 +0,0 @@ -/* - * 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. - */ -rest { - configuration { - host = "my-host" - port = "9192" - } - - path("/my/path") { - get("/get") { - consumes("application/json") - produces("application/json") - to("direct:get") - } - } - - post { - path("/post") - consumes("application/json") - produces("application/json") - to("direct:post") - } -} - - - -from("timer:tick") - .process().message { - m -> m.headers["MyHeader"] = "MyHeaderValue" - } - .to("log:info") diff --git a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes.kts b/dsl/camel-kotlin-dsl/src/test/resources/routes/routes.kts deleted file mode 100644 index 7d28bb5b98c8d..0000000000000 --- a/dsl/camel-kotlin-dsl/src/test/resources/routes/routes.kts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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. - */ -from("timer:tick") - .process().message { - m -> m.headers["MyHeader"] = "MyHeaderValue" - } - .to("log:info") \ No newline at end of file diff --git a/dsl/pom.xml b/dsl/pom.xml index a34beae64f1e9..cff8557767094 100644 --- a/dsl/pom.xml +++ b/dsl/pom.xml @@ -53,10 +53,8 @@ camel-yaml-dsl camel-js-dsl camel-jsh-dsl - camel-kotlin-dsl camel-kamelet-main camel-jbang - camel-kotlin-api diff --git a/parent/pom.xml b/parent/pom.xml index 02b817544a70f..f083696382851 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -312,8 +312,6 @@ 1.1.3 3.8.0 6.13.3 - 1.9.24 - 1.18.1 6.13.3 1.17.0 0.34.0 @@ -2688,16 +2686,6 @@ camel-kamelet-main ${project.version} - - org.apache.camel - camel-kotlin-api - ${project.version} - - - org.apache.camel - camel-kotlin-dsl - ${project.version} - org.apache.camel camel-xml-io-dsl diff --git a/pom.xml b/pom.xml index b1151bdf0cb43..2de0b842f846c 100644 --- a/pom.xml +++ b/pom.xml @@ -523,7 +523,6 @@ **/MySecondFooConfigurer.java **/MySecondBarConfigurer.java **/stockquote-response.xml - **/org.apache.camel.dsl.kotlin.KotlinDSL.classname **/quarkus-pom.ftl **/quarkus-docker/* .github/**/* diff --git a/tooling/maven/camel-package-maven-plugin/pom.xml b/tooling/maven/camel-package-maven-plugin/pom.xml index 47225d3d7972e..aa0ae731b9d15 100644 --- a/tooling/maven/camel-package-maven-plugin/pom.xml +++ b/tooling/maven/camel-package-maven-plugin/pom.xml @@ -67,11 +67,6 @@ mvel2 ${mvel-version} - - com.squareup - kotlinpoet-jvm - ${kotlinpoet-version} - org.apache.maven diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/AllDslKotlinMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/AllDslKotlinMojo.java deleted file mode 100644 index 8a023d157b4bc..0000000000000 --- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/AllDslKotlinMojo.java +++ /dev/null @@ -1,667 +0,0 @@ -/* - * 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.maven.packaging; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.lang.reflect.Field; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.URLClassLoader; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.function.Function; -import java.util.function.Predicate; -import java.util.regex.Matcher; -import java.util.regex.Pattern; -import java.util.stream.Collectors; - -import com.squareup.kotlinpoet.ClassName; -import com.squareup.kotlinpoet.ClassNames; -import com.squareup.kotlinpoet.CodeBlock; -import com.squareup.kotlinpoet.FileSpec; -import com.squareup.kotlinpoet.FunSpec; -import com.squareup.kotlinpoet.KModifier; -import com.squareup.kotlinpoet.LambdaTypeName; -import com.squareup.kotlinpoet.ParameterSpec; -import com.squareup.kotlinpoet.ParameterizedTypeName; -import com.squareup.kotlinpoet.PropertySpec; -import com.squareup.kotlinpoet.TypeName; -import com.squareup.kotlinpoet.TypeNames; -import com.squareup.kotlinpoet.TypeSpec; -import com.squareup.kotlinpoet.WildcardTypeName; -import org.apache.camel.tooling.model.BaseModel; -import org.apache.camel.tooling.model.ComponentModel; -import org.apache.camel.tooling.model.DataFormatModel; -import org.apache.camel.tooling.model.JsonMapper; -import org.apache.camel.tooling.model.LanguageModel; -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.reflect.FieldUtils; -import org.apache.commons.text.CaseUtils; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; -import org.apache.maven.plugins.annotations.LifecyclePhase; -import org.apache.maven.plugins.annotations.Mojo; -import org.apache.maven.plugins.annotations.Parameter; -import org.apache.maven.plugins.annotations.ResolutionScope; -import org.apache.maven.project.MavenProject; -import org.apache.maven.project.MavenProjectHelper; -import org.codehaus.plexus.build.BuildContext; - -import static org.apache.camel.tooling.util.PackageHelper.findCamelDirectory; -import static org.apache.camel.tooling.util.PackageHelper.loadText; - -@Mojo( - name = "generate-all-dsl-kotlin", - threadSafe = true, - requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME, - defaultPhase = LifecyclePhase.PROCESS_CLASSES) -public class AllDslKotlinMojo extends AbstractGeneratorMojo { - - @Parameter(defaultValue = "${project.build.directory}") - protected File buildDir; - - @Parameter(defaultValue = "${project.basedir}") - protected File baseDir; - - @Parameter(defaultValue = "org.apache.camel.kotlin.components") - protected String componentsPackageName; - - @Parameter(defaultValue = "org.apache.camel.kotlin.dataformats") - protected String dataFormatsPackageName; - - @Parameter(defaultValue = "org.apache.camel.kotlin.languages") - protected String languagesPackageName; - - @Parameter - protected File sourcesOutputDir; - - @Parameter - protected File outputResourcesDir; - - @Parameter(defaultValue = "${project.basedir}/../../catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components") - protected File componentsJsonDir; - - @Parameter(defaultValue = "${project.basedir}/../../catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/dataformats") - protected File dataFormatsJsonDir; - - @Parameter(defaultValue = "${project.basedir}/../../catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/languages") - protected File languagesJsonDir; - - private transient String licenseHeader; - - private static final Predicate identifierPattern = Pattern.compile("\\w+").asMatchPredicate(); - - private static final Pattern genericPattern = Pattern.compile("<([\\w.?\\s]+)>"); - - @Override - public void execute(MavenProject project, MavenProjectHelper projectHelper, BuildContext buildContext) - throws MojoFailureException, MojoExecutionException { - buildDir = new File(project.getBuild().getDirectory()); - baseDir = project.getBasedir(); - componentsPackageName = "org.apache.camel.kotlin.components"; - super.execute(project, projectHelper, buildContext); - } - - @Override - public void execute() throws MojoExecutionException, MojoFailureException { - File camelDir = findCamelDirectory(baseDir, "dsl/camel-kotlin-api"); - if (camelDir == null) { - getLog().debug("No dsl/camel-kotlin-api folder found, skipping execution"); - return; - } - Path root = camelDir.toPath(); - if (sourcesOutputDir == null) { - sourcesOutputDir = root.resolve("src/generated/kotlin").toFile(); - } - if (outputResourcesDir == null) { - outputResourcesDir = root.resolve("src/generated/resources").toFile(); - } - - try (InputStream is = getClass().getClassLoader().getResourceAsStream("license-header-java.txt")) { - this.licenseHeader = loadText(is); - } catch (Exception e) { - throw new MojoFailureException("Error loading license-header-java.txt file", e); - } - - ClassLoader classLoader = constructClassLoaderForCamelProjects( - "core/camel-core-model", - "core/camel-api", - "core/camel-core-processor"); - - executeLanguages(classLoader); - executeDataFormats(classLoader); - executeComponents(); - } - - // --- Languages DSL --- - - private void executeLanguages(ClassLoader classLoader) throws MojoFailureException { - List models = new ArrayList<>(); - - for (File file : languagesJsonDir.listFiles()) { - try { - LanguageModel result = JsonMapper.generateLanguageModel(Files.readString(file.toPath())); - models.add(result); - } catch (IOException e) { - throw new MojoFailureException("Error while reading language from catalog", e); - } - } - - for (LanguageModel model : models) { - createLanguageDsl(model, classLoader); - } - } - - private void createLanguageDsl(LanguageModel model, ClassLoader classLoader) throws MojoFailureException { - String name = model.getName(); - getLog().debug("Generating Language DSL for " + name); - String pascalCaseName = StringUtils.capitalize(name); - String dslClassName = pascalCaseName + "LanguageDsl"; - Class clazz; - try { - clazz = classLoader.loadClass(model.getModelJavaType()); - } catch (ClassNotFoundException e) { - throw new MojoFailureException("Error while discovering class", e); - } - - String funName = name; - if (name.contains("-") || name.contains("+")) { - funName = "`" + name + "`"; - } - ClassName language = ClassName.bestGuess(model.getModelJavaType()); - - FunSpec.Builder funBuilder = FunSpec.builder(funName); - funBuilder.addParameter(funName, TypeNames.STRING); - funBuilder.addParameter(ParameterSpec - .builder("i", LambdaTypeName.get( - new ClassName(languagesPackageName, dslClassName), - new ArrayList<>(), - TypeNames.UNIT)) - .defaultValue("{}") - .build()); - funBuilder.addCode(""" - val def = %s(%s) - %s(def).apply(i) - return def - """.formatted(language.getSimpleName(), funName, dslClassName)); - funBuilder.returns(language); - funBuilder.addKdoc(sanitizeKDoc(model.getDescription())); - - TypeSpec.Builder typeBuilder = TypeSpec.classBuilder(dslClassName); - typeBuilder.addAnnotation(new ClassName("org.apache.camel.kotlin", "CamelDslMarker")); - typeBuilder.primaryConstructor(FunSpec.constructorBuilder() - .addParameter("def", language) - .build()); - typeBuilder.addProperty("def", language); - typeBuilder.addInitializerBlock(CodeBlock.of("this.def = def\n")); - - for (LanguageModel.LanguageOptionModel property : model.getOptions()) { - String propertyName = property.getName(); - if (propertyName.equals("expression")) { - continue; - } - createProperty(propertyName, clazz, property.getJavaType(), classLoader, - typeBuilder, model.getName(), property.getDescription()); - } - - writeSource( - FileSpec.builder(languagesPackageName, model.getName()) - .addFunction(funBuilder.build()) - .addType(typeBuilder.build()), - dslClassName, languagesPackageName, "Language DSL for " + name); - } - - // --- DataFormat DSL --- - - private void executeDataFormats(ClassLoader classLoader) throws MojoFailureException { - List models = new ArrayList<>(); - - for (File file : dataFormatsJsonDir.listFiles()) { - try { - DataFormatModel result = JsonMapper.generateDataFormatModel(Files.readString(file.toPath())); - models.add(result); - } catch (IOException e) { - throw new MojoFailureException("Error while reading dataformat from catalog", e); - } - } - - for (DataFormatModel model : models) { - createDataFormatDsl(model, classLoader); - } - } - - private void createDataFormatDsl(DataFormatModel model, ClassLoader classLoader) throws MojoFailureException { - String name = model.getName(); - getLog().debug("Generating DataFormat DSL for " + name); - String pascalCaseName = StringUtils.capitalize(name); - String dslClassName = pascalCaseName + "DataFormatDsl"; - Class clazz; - try { - clazz = classLoader.loadClass(model.getModelJavaType()); - } catch (ClassNotFoundException e) { - throw new MojoFailureException("Error while discovering class", e); - } - - String funName = name; - if (name.contains("-") || name.contains("+")) { - funName = "`" + name + "`"; - } - ClassName dataFormatDsl = new ClassName("org.apache.camel.kotlin", "DataFormatDsl"); - ClassName dataFormat = ClassName.bestGuess(model.getModelJavaType()); - - FunSpec.Builder funBuilder = FunSpec.builder(funName); - funBuilder.receiver(dataFormatDsl); - funBuilder.addParameter("i", LambdaTypeName.get( - new ClassName(dataFormatsPackageName, dslClassName), - new ArrayList<>(), - TypeNames.UNIT)); - funBuilder.addCode("def = %s().apply(i).def".formatted(dslClassName)); - funBuilder.addKdoc(sanitizeKDoc(model.getDescription())); - - TypeSpec.Builder typeBuilder = TypeSpec.classBuilder(dslClassName); - typeBuilder.addAnnotation(new ClassName("org.apache.camel.kotlin", "CamelDslMarker")); - typeBuilder.addProperty("def", dataFormat); - typeBuilder.addInitializerBlock(CodeBlock.of("def = %s()".formatted(dataFormat.getSimpleName()))); - - for (DataFormatModel.DataFormatOptionModel property : model.getOptions()) { - String propertyName = extractPropertyName(model, property); - createProperty( - propertyName, clazz, property.getJavaType(), classLoader, - typeBuilder, model.getName(), property.getDescription()); - } - - writeSource( - FileSpec.builder(dataFormatsPackageName, model.getName()) - .addFunction(funBuilder.build()) - .addType(typeBuilder.build()), - dslClassName, dataFormatsPackageName, "DataFormat DSL for " + name); - } - - private String extractPropertyName(DataFormatModel model, DataFormatModel.DataFormatOptionModel property) { - if (model.getModelName().equals("yaml") && property.getName().equals("typeFilter")) { - return "typeFilters"; - } - return property.getName(); - } - - // --- Endpoint DSL --- - - private void executeComponents() throws MojoFailureException { - List models = new ArrayList<>(); - - for (File file : componentsJsonDir.listFiles()) { - BaseModel model = JsonMapper.generateModel(file.toPath()); - models.add((ComponentModel) model); - } - - executeComponent(models); - } - - private void executeComponent(List allModels) throws MojoFailureException { - if (allModels.isEmpty()) { - return; - } - if (getLog().isDebugEnabled()) { - getLog().debug("Found " + allModels.size() + " components"); - } - Map> grModels - = allModels.stream().collect(Collectors.groupingBy(ComponentModel::getJavaType)); - - for (List compModels : grModels.values()) { - if (compModels.size() > 1) { - compModels.sort((o1, o2) -> { - String s1 = o1.getScheme(); - String s2 = o2.getScheme(); - String as = o1.getAlternativeSchemes(); - int i1 = as.indexOf(s1); - int i2 = as.indexOf(s2); - return Integer.compare(i1, i2); - }); - } - - ComponentModel model = compModels.get(0); - createEndpointDsl(model, compModels); - } - } - - private void createEndpointDsl(ComponentModel model, List aliases) throws MojoFailureException { - String name = model.getName(); - getLog().debug("Generating Endpoint DSL for " + name); - String pascalCaseName = toPascalCase(name); - String dslClassName = pascalCaseName + "UriDsl"; - - String funName = name; - if (name.contains("-") || name.contains("+")) { - funName = "`" + name + "`"; - } - ClassName uriDsl = new ClassName("org.apache.camel.kotlin", "UriDsl"); - - FunSpec.Builder funBuilder = FunSpec.builder(funName); - funBuilder.receiver(uriDsl); - funBuilder.addParameter("i", LambdaTypeName.get( - new ClassName(componentsPackageName, dslClassName), - new ArrayList<>(), - TypeNames.UNIT)); - funBuilder.addCode("%s(this).apply(i)".formatted(dslClassName)); - funBuilder.addKdoc(sanitizeKDoc(model.getDescription())); - - TypeSpec.Builder typeBuilder = TypeSpec.classBuilder(dslClassName); - typeBuilder.addAnnotation(new ClassName("org.apache.camel.kotlin", "CamelDslMarker")); - typeBuilder.primaryConstructor(FunSpec.constructorBuilder() - .addParameter(ParameterSpec.builder("it", uriDsl).build()) - .build()); - typeBuilder.addProperty("it", uriDsl, KModifier.PRIVATE); - typeBuilder.addInitializerBlock(CodeBlock.of(""" - this.it = it - this.it.component("%s") - """.formatted(name))); - - processPathOptions(model, typeBuilder); - processParameterOptions(model, typeBuilder); - - writeSource( - FileSpec.builder(componentsPackageName, model.getName()) - .addFunction(funBuilder.build()) - .addType(typeBuilder.build()), - dslClassName, componentsPackageName, "Endpoint DSL for " + name); - } - - private void processPathOptions(ComponentModel model, TypeSpec.Builder typeBuilder) throws MojoFailureException { - String urlExpression = model.getSyntax(); - urlExpression = urlExpression.replaceFirst(model.getScheme() + ":", ""); - StringBuilder sb = new StringBuilder(); - char[] urlExpressionArray = urlExpression.toCharArray(); - boolean wasIdentifier = false; - for (int i = 0; i < urlExpressionArray.length; ++i) { - boolean isIdentifier = identifierPattern.test(String.valueOf(urlExpressionArray[i])); - if (!wasIdentifier && isIdentifier) { - boolean parameterExists = false; - String subUrlExpression = urlExpression.substring(i); - for (ComponentModel.EndpointOptionModel property : model.getEndpointPathOptions()) { - if (subUrlExpression.startsWith(property.getName())) { - parameterExists = true; - break; - } - } - if (parameterExists) { - sb.append('$'); - } - } - sb.append(urlExpressionArray[i]); - wasIdentifier = isIdentifier; - } - urlExpression = sb.toString(); - - for (ComponentModel.EndpointOptionModel property : model.getEndpointPathOptions()) { - PropertySpec.Builder pathPropertyBuilder = PropertySpec.builder(property.getName(), TypeNames.STRING); - pathPropertyBuilder.mutable(true); - pathPropertyBuilder.initializer("\"\""); - pathPropertyBuilder.addModifiers(KModifier.PRIVATE); - typeBuilder.addProperty(pathPropertyBuilder.build()); - FunSpec.Builder propertyBuilder = FunSpec.builder(property.getName()); - propertyBuilder.addParameter(property.getName(), TypeNames.STRING); - propertyBuilder.addCode(CodeBlock.of(""" - this.%s = %s - it.url("%s") - """.formatted(property.getName(), property.getName(), urlExpression))); - propertyBuilder.addKdoc(sanitizeKDoc(property.getDescription())); - typeBuilder.addFunction(propertyBuilder.build()); - ClassName className = parsePropertyType(property.getType()); - if (!className.equals(TypeNames.STRING)) { - FunSpec.Builder stringPropertyBuilder = FunSpec.builder(property.getName()); - stringPropertyBuilder.addParameter(property.getName(), className); - stringPropertyBuilder.addCode(CodeBlock.of(""" - this.%s = %s.toString() - it.url("%s") - """.formatted(property.getName(), property.getName(), urlExpression))); - stringPropertyBuilder.addKdoc(sanitizeKDoc(property.getDescription())); - typeBuilder.addFunction(stringPropertyBuilder.build()); - } - } - } - - private void processParameterOptions(ComponentModel model, TypeSpec.Builder typeBuilder) throws MojoFailureException { - for (ComponentModel.EndpointOptionModel property : model.getEndpointParameterOptions()) { - FunSpec.Builder propertyBuilder = FunSpec.builder(property.getName()); - propertyBuilder.addParameter(property.getName(), TypeNames.STRING); - propertyBuilder.addCode(CodeBlock.of(""" - it.property("%s", %s) - """.formatted(property.getName(), property.getName()))); - propertyBuilder.addKdoc(sanitizeKDoc(property.getDescription())); - typeBuilder.addFunction(propertyBuilder.build()); - ClassName className = parsePropertyType(property.getType()); - if (!className.equals(TypeNames.STRING)) { - FunSpec.Builder stringPropertyBuilder = FunSpec.builder(property.getName()); - stringPropertyBuilder.addParameter(property.getName(), className); - stringPropertyBuilder.addCode(CodeBlock.of(""" - it.property("%s", %s.toString()) - """.formatted(property.getName(), property.getName()))); - stringPropertyBuilder.addKdoc(sanitizeKDoc(property.getDescription())); - typeBuilder.addFunction(stringPropertyBuilder.build()); - } - } - } - - // --- Utils --- - - private ClassName parsePropertyType(String type) throws MojoFailureException { - ClassName className; - switch (type) { - case "string", "object", "duration", "array" -> className = TypeNames.STRING; - case "integer" -> className = TypeNames.INT; - case "number" -> className = TypeNames.DOUBLE; - case "boolean" -> className = TypeNames.BOOLEAN; - default -> throw new MojoFailureException("Unexpected type of parameter: " + type); - } - return className; - } - - private void writeSource( - FileSpec.Builder fileBuilder, - String fileName, - String packageName, - String what) - throws MojoFailureException { - writeSource(fileBuilder, fileName, packageName, what, x -> x); - } - - private void writeSource( - FileSpec.Builder fileBuilder, - String fileName, - String packageName, - String what, - Function postProcessing) - throws MojoFailureException { - StringBuilder codeBuilder = new StringBuilder(); - codeBuilder.append(licenseHeader); - codeBuilder.append("\n"); - try { - fileBuilder.build().writeTo(codeBuilder); - } catch (IOException e) { - throw new MojoFailureException("Error while appending kotlin code", e); - } - String code = codeBuilder.toString(); - String filePath = packageName.replace('.', '/') + "/" + fileName + ".kt"; - if (updateResource(sourcesOutputDir.toPath(), filePath, postProcessing.apply(code))) { - getLog().info("Updated " + what); - } - } - - private String toPascalCase(String name) { - return CaseUtils.toCamelCase(name, true, '-', '+'); - } - - private void appendPropertyBuilder( - TypeSpec.Builder typeBuilder, - String propertyName, - TypeName javaType, - Boolean toString, - String kdoc) { - FunSpec.Builder propertyBuilder = FunSpec.builder(propertyName); - propertyBuilder.addParameter(propertyName, javaType); - String code = "def.%s = %s".formatted(propertyName, propertyName); - if (toString) { - code += ".toString()"; - } - propertyBuilder.addCode(CodeBlock.of(code)); - propertyBuilder.addKdoc(sanitizeKDoc(kdoc)); - typeBuilder.addFunction(propertyBuilder.build()); - } - - private TypeName parseJavaType(String javaType) throws MojoFailureException { - if (javaType.equals("?")) { - return TypeNames.STAR; - } - if (javaType.startsWith("? extends ")) { - return WildcardTypeName.producerOf(parseJavaType(javaType.substring("? extends ".length()))); - } - if (javaType.equals(Object.class.getCanonicalName())) { - return TypeNames.ANY; - } - if (javaType.equals(String.class.getCanonicalName())) { - return TypeNames.STRING; - } - if (javaType.equals(Integer.class.getCanonicalName()) || javaType.equals(int.class.getCanonicalName())) { - return TypeNames.INT; - } - if (javaType.equals(Double.class.getCanonicalName()) || javaType.equals(double.class.getCanonicalName())) { - return TypeNames.DOUBLE; - } - if (javaType.equals(Boolean.class.getCanonicalName()) || javaType.equals(boolean.class.getCanonicalName())) { - return TypeNames.BOOLEAN; - } - if (javaType.equals(Long.class.getCanonicalName()) || javaType.equals(long.class.getCanonicalName())) { - return TypeNames.LONG; - } - if (javaType.equals(Character.class.getCanonicalName()) || javaType.equals(char.class.getCanonicalName())) { - return TypeNames.CHAR; - } - if (javaType.equals("byte[]")) { - return TypeNames.BYTE_ARRAY; - } - if (javaType.equals(Throwable.class.getCanonicalName())) { - return TypeNames.THROWABLE; - } - if (javaType.startsWith(List.class.getCanonicalName())) { - Matcher matcher = genericPattern.matcher(javaType); - if (!matcher.find()) { - try { - return ClassName.bestGuess(javaType); - } catch (Exception e) { - MojoFailureException ex = new MojoFailureException("Unable to resolve java type: " + javaType, e); - getLog().error(ex); - throw ex; - } - } - String typeArgument = matcher.group(1); - return ParameterizedTypeName.get(TypeNames.MUTABLE_LIST, parseJavaType(typeArgument)); - } - if (javaType.startsWith(Class.class.getCanonicalName())) { - Matcher matcher = genericPattern.matcher(javaType); - if (!matcher.find()) { - try { - return ClassName.bestGuess(javaType); - } catch (Exception e) { - MojoFailureException ex = new MojoFailureException("Unable to resolve java type: " + javaType, e); - getLog().error(ex); - throw ex; - } - } - String typeArgument = matcher.group(1); - return ParameterizedTypeName.get(ClassNames.get(Class.class), parseJavaType(typeArgument)); - } - try { - return ClassName.bestGuess(javaType); - } catch (Exception e) { - MojoFailureException ex = new MojoFailureException("Unable to resolve java type: " + javaType, e); - getLog().error(ex); - throw ex; - } - } - - private ClassLoader constructClassLoaderForCamelProjects(String... projectPaths) throws MojoFailureException { - URL[] urls = new URL[projectPaths.length]; - for (int i = 0; i < urls.length; ++i) { - String projectPath = projectPaths[i]; - File buildDirectory = Path.of(baseDir.toPath().toString(), "../../", projectPath, "target/classes").toFile(); - try { - urls[i] = buildDirectory.toURI().toURL(); - } catch (MalformedURLException e) { - throw new RuntimeException("Error while resolving build directory of project " + projectPath, e); - } - } - return new URLClassLoader(urls); - } - - private boolean isPrimitiveTypeName(TypeName type) { - return type.equals(TypeNames.BOOLEAN) - || type.equals(TypeNames.INT) - || type.equals(TypeNames.LONG) - || type.equals(TypeNames.DOUBLE); - } - - private void createProperty( - String propertyName, Class clazz, String propertyJavaType, ClassLoader classLoader, - TypeSpec.Builder typeBuilder, String modelName, String description) - throws MojoFailureException { - Field field = FieldUtils.getField(clazz, propertyName, true); - if (field == null) { - MojoFailureException ex = new MojoFailureException( - "Not found field %s for class %s".formatted(propertyName, clazz.getCanonicalName())); - getLog().error(ex); - throw ex; - } - TypeName javaType = parseJavaType(propertyJavaType); - - if (field.getType().equals(String.class) && !javaType.equals(TypeNames.STRING)) { - if (isPrimitiveTypeName(javaType)) { - appendPropertyBuilder(typeBuilder, propertyName, javaType, true, description); - } else { - try { - Class propertyClass = classLoader.loadClass(propertyJavaType); - if (propertyClass.isEnum()) { - appendPropertyBuilder(typeBuilder, propertyName, javaType, true, description); - } else { - throw new MojoFailureException( - "Error while generating DataFormat DSL '%s': java type '%s' for field '%s'" - .formatted(modelName, javaType.toString(), propertyName)); - } - } catch (ClassNotFoundException ignored) { - // ignoring exception cause in that case we must generate String-argument function - // which is done 3 lines below - } - } - appendPropertyBuilder(typeBuilder, propertyName, TypeNames.STRING, false, description); - } else if (field.getType().equals(Class.class)) { - TypeName clazzTypeName = ParameterizedTypeName.get( - new ClassName("java.lang", "Class"), - TypeNames.STAR); - appendPropertyBuilder(typeBuilder, propertyName, clazzTypeName, false, description); - } else { - appendPropertyBuilder(typeBuilder, propertyName, javaType, false, description); - } - } - - private String sanitizeKDoc(String kdoc) { - return kdoc.replace("%", "%%"); - } -} diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareComponentMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareComponentMojo.java index 4665f8b9c6da0..7dbafbe61520a 100644 --- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareComponentMojo.java +++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareComponentMojo.java @@ -151,12 +151,6 @@ public void execute() throws MojoExecutionException, MojoFailureException { getLog(), project, projectHelper, otherOutDir, schemaOutDir, buildContext).prepareOthers(); count = 1; - } else if (count == 0 && new File(project.getBasedir(), "src/main/kotlin").isDirectory()) { - // camel-kotlin-dsl is not java based so check for kotlin source - new PackageOtherMojo( - getLog(), project, projectHelper, otherOutDir, - schemaOutDir, buildContext).prepareOthers(); - count = 1; } // whether to sync pom in allcomponents/parent