2 * Copyright © 2018-2019 AT&T Intellectual Property.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 package org.onap.ccsdk.cds.blueprintsprocessor.message
19 import com.fasterxml.jackson.databind.JsonNode
20 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintConstants
21 import org.onap.ccsdk.cds.controllerblueprints.core.BluePrintTypes
22 import org.onap.ccsdk.cds.controllerblueprints.core.asJsonPrimitive
23 import org.onap.ccsdk.cds.controllerblueprints.core.asJsonType
24 import org.onap.ccsdk.cds.controllerblueprints.core.data.RelationshipType
25 import org.onap.ccsdk.cds.controllerblueprints.core.dsl.PropertiesAssignmentBuilder
26 import org.onap.ccsdk.cds.controllerblueprints.core.dsl.RelationshipTemplateBuilder
27 import org.onap.ccsdk.cds.controllerblueprints.core.dsl.ServiceTemplateBuilder
28 import org.onap.ccsdk.cds.controllerblueprints.core.dsl.TopologyTemplateBuilder
29 import org.onap.ccsdk.cds.controllerblueprints.core.dsl.relationshipType
31 /** Relationships Types DSL for Message Producer */
32 fun ServiceTemplateBuilder.relationshipTypeConnectsToMessageProducer() {
33 val relationshipType = BluePrintTypes.relationshipTypeConnectsToMessageProducer()
34 if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
35 this.relationshipTypes!![relationshipType.id!!] = relationshipType
38 fun BluePrintTypes.relationshipTypeConnectsToMessageProducer(): RelationshipType {
39 return relationshipType(
40 id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER,
41 version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
42 derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
43 description = "Relationship connects to through message producer."
46 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
47 BluePrintConstants.DATA_TYPE_MAP,
49 "Connection Config details."
51 validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
55 fun ServiceTemplateBuilder.relationshipTypeConnectsToMessageConsumer() {
56 val relationshipType = BluePrintTypes.relationshipTypeConnectsToMessageConsumer()
57 if (this.relationshipTypes == null) this.relationshipTypes = hashMapOf()
58 this.relationshipTypes!![relationshipType.id!!] = relationshipType
61 fun BluePrintTypes.relationshipTypeConnectsToMessageConsumer(): RelationshipType {
62 return relationshipType(
63 id = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER,
64 version = BluePrintConstants.DEFAULT_VERSION_NUMBER,
65 derivedFrom = BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO,
66 description = "Relationship type connects to message consumer."
69 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
70 BluePrintConstants.DATA_TYPE_MAP,
72 "Connection Config details."
74 validTargetTypes(arrayListOf(BluePrintConstants.MODEL_TYPE_CAPABILITY_TYPE_ENDPOINT))
78 /** Relationships Templates DSL for Message Producer */
79 fun TopologyTemplateBuilder.relationshipTemplateMessageProducer(
82 block: MessageProducerRelationshipTemplateBuilder.() -> Unit
84 if (relationshipTemplates == null) relationshipTemplates = hashMapOf()
85 val relationshipTemplate =
86 MessageProducerRelationshipTemplateBuilder(name, description).apply(block).build()
87 relationshipTemplates!![relationshipTemplate.id!!] = relationshipTemplate
90 class MessageProducerRelationshipTemplateBuilder(name: String, description: String) :
91 RelationshipTemplateBuilder(
93 BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_PRODUCER, description
96 fun kafkaBasicAuth(block: KafkaBasicAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit) {
98 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
99 BluePrintTypes.kafkaBasicAuthMessageProducerProperties(block)
103 fun kafkaSslAuth(block: KafkaSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit) {
105 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
106 BluePrintTypes.kafkaSslAuthMessageProducerProperties(block)
110 fun kafkaScramSslAuth(block: KafkaScramSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit) {
112 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
113 BluePrintTypes.kafkaScramSslAuthMessageProducerProperties(block)
118 fun BluePrintTypes.kafkaBasicAuthMessageProducerProperties(block: KafkaBasicAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
119 val assignments = KafkaBasicAuthMessageProducerPropertiesAssignmentBuilder().apply(block).build()
120 assignments[KafkaBasicAuthMessageProducerProperties::type.name] =
121 MessageLibConstants.TYPE_KAFKA_BASIC_AUTH.asJsonPrimitive()
122 return assignments.asJsonType()
125 fun BluePrintTypes.kafkaSslAuthMessageProducerProperties(block: KafkaSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
126 val assignments = KafkaSslAuthMessageProducerPropertiesAssignmentBuilder().apply(block).build()
127 assignments[KafkaSslAuthMessageProducerProperties::type.name] =
128 MessageLibConstants.TYPE_KAFKA_SSL_AUTH.asJsonPrimitive()
129 return assignments.asJsonType()
132 fun BluePrintTypes.kafkaScramSslAuthMessageProducerProperties(block: KafkaScramSslAuthMessageProducerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
133 val assignments = KafkaScramSslAuthMessageProducerPropertiesAssignmentBuilder().apply(block).build()
134 assignments[KafkaScramSslAuthMessageProducerProperties::type.name] =
135 MessageLibConstants.TYPE_KAFKA_SCRAM_SSL_AUTH.asJsonPrimitive()
136 return assignments.asJsonType()
139 open class MessageProducerPropertiesAssignmentBuilder : PropertiesAssignmentBuilder()
141 open class KafkaBasicAuthMessageProducerPropertiesAssignmentBuilder : MessageProducerPropertiesAssignmentBuilder() {
143 fun bootstrapServers(bootstrapServers: String) = bootstrapServers(bootstrapServers.asJsonPrimitive())
145 fun bootstrapServers(bootstrapServers: JsonNode) =
146 property(KafkaBasicAuthMessageProducerProperties::bootstrapServers, bootstrapServers)
148 fun topic(topic: String) = topic(topic.asJsonPrimitive())
150 fun topic(topic: JsonNode) =
151 property(KafkaBasicAuthMessageProducerProperties::topic, topic)
153 fun clientId(clientId: String) = bootstrapServers(clientId.asJsonPrimitive())
155 fun clientId(clientId: JsonNode) =
156 property(KafkaBasicAuthMessageProducerProperties::clientId, clientId)
158 fun acks(acks: String) = acks(acks.asJsonPrimitive())
160 fun acks(acks: JsonNode) = property(KafkaBasicAuthMessageProducerProperties::acks, acks)
162 fun maxBlockMs(maxBlockMs: Int) = maxBlockMs(maxBlockMs.asJsonPrimitive())
164 fun maxBlockMs(maxBlockMs: JsonNode) = property(KafkaBasicAuthMessageProducerProperties::maxBlockMs, maxBlockMs)
166 fun reconnectBackOffMs(reconnectBackOffMs: Int) = reconnectBackOffMs(reconnectBackOffMs.asJsonPrimitive())
168 fun reconnectBackOffMs(reconnectBackOffMs: JsonNode) = property(KafkaBasicAuthMessageProducerProperties::reconnectBackOffMs, reconnectBackOffMs)
170 fun enableIdempotence(enableIdempotence: Boolean) = enableIdempotence(enableIdempotence.asJsonPrimitive())
172 fun enableIdempotence(enableIdempotence: JsonNode) =
173 property(KafkaBasicAuthMessageProducerProperties::enableIdempotence, enableIdempotence)
176 open class KafkaSslAuthMessageProducerPropertiesAssignmentBuilder : KafkaBasicAuthMessageProducerPropertiesAssignmentBuilder() {
178 fun truststore(truststore: String) = truststore(truststore.asJsonPrimitive())
180 fun truststore(truststore: JsonNode) =
181 property(KafkaSslAuthMessageProducerProperties::truststore, truststore)
183 fun truststorePassword(truststorePassword: String) = truststorePassword(truststorePassword.asJsonPrimitive())
185 fun truststorePassword(truststorePassword: JsonNode) =
186 property(KafkaSslAuthMessageProducerProperties::truststorePassword, truststorePassword)
188 fun truststoreType(truststoreType: String) = truststoreType(truststoreType.asJsonPrimitive())
190 fun truststoreType(truststoreType: JsonNode) =
191 property(KafkaSslAuthMessageProducerProperties::truststoreType, truststoreType)
193 fun keystore(keystore: String) = keystore(keystore.asJsonPrimitive())
195 fun keystore(keystore: JsonNode) =
196 property(KafkaSslAuthMessageProducerProperties::keystore, keystore)
198 fun keystorePassword(keystorePassword: String) = keystorePassword(keystorePassword.asJsonPrimitive())
200 fun keystorePassword(keystorePassword: JsonNode) =
201 property(KafkaSslAuthMessageProducerProperties::keystorePassword, keystorePassword)
203 fun keystoreType(keystoreType: String) = keystoreType(keystoreType.asJsonPrimitive())
205 fun keystoreType(keystoreType: JsonNode) =
206 property(KafkaSslAuthMessageProducerProperties::keystoreType, keystoreType)
208 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: String) =
209 sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm.asJsonPrimitive())
211 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: JsonNode) =
212 property(KafkaSslAuthMessageProducerProperties::sslEndpointIdentificationAlgorithm, sslEndpointIdentificationAlgorithm)
215 class KafkaScramSslAuthMessageProducerPropertiesAssignmentBuilder : KafkaSslAuthMessageProducerPropertiesAssignmentBuilder() {
217 fun saslMechanism(saslMechanism: String) = saslMechanism(saslMechanism.asJsonPrimitive())
219 fun saslMechanism(saslMechanism: JsonNode) =
220 property(KafkaScramSslAuthMessageProducerProperties::saslMechanism, saslMechanism)
222 fun scramUsername(scramUsername: String) = scramUsername(scramUsername.asJsonPrimitive())
224 fun scramUsername(scramUsername: JsonNode) =
225 property(KafkaScramSslAuthMessageProducerProperties::scramUsername, scramUsername)
227 fun scramPassword(scramPassword: String) = scramPassword(scramPassword.asJsonPrimitive())
229 fun scramPassword(scramPassword: JsonNode) =
230 property(KafkaScramSslAuthMessageProducerProperties::scramPassword, scramPassword)
233 /** Relationships Templates DSL for Message Consumer */
234 fun TopologyTemplateBuilder.relationshipTemplateMessageConsumer(
237 block: MessageConsumerRelationshipTemplateBuilder.() -> Unit
239 if (relationshipTemplates == null) relationshipTemplates = hashMapOf()
240 val relationshipTemplate =
241 MessageConsumerRelationshipTemplateBuilder(name, description).apply(block).build()
242 relationshipTemplates!![relationshipTemplate.id!!] = relationshipTemplate
245 class MessageConsumerRelationshipTemplateBuilder(name: String, description: String) :
246 RelationshipTemplateBuilder(
248 BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER, description
251 fun kafkaBasicAuth(block: KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit) {
253 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
254 BluePrintTypes.kafkaBasicAuthMessageConsumerProperties(block)
258 fun kafkaSslAuth(block: KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit) {
260 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
261 BluePrintTypes.kafkaSslAuthMessageConsumerProperties(block)
265 fun kafkaScramSslAuth(block: KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit) {
267 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
268 BluePrintTypes.kafkaScramSslAuthMessageConsumerProperties(block)
272 fun kafkaStreamsBasicAuth(block: KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder.() -> Unit) {
274 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
275 BluePrintTypes.kafkaStreamsBasicAuthConsumerProperties(block)
279 fun kafkaStreamsSslAuth(block: KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit) {
281 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
282 BluePrintTypes.kafkaStreamsSslAuthConsumerProperties(block)
286 fun kafkaStreamsScramSslAuth(block: KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit) {
288 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
289 BluePrintTypes.kafkaStreamsScramSslAuthConsumerProperties(block)
294 fun BluePrintTypes.kafkaBasicAuthMessageConsumerProperties(block: KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
295 val assignments = KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder().apply(block).build()
296 assignments[KafkaBasicAuthMessageConsumerProperties::type.name] =
297 MessageLibConstants.TYPE_KAFKA_BASIC_AUTH.asJsonPrimitive()
298 return assignments.asJsonType()
301 fun BluePrintTypes.kafkaSslAuthMessageConsumerProperties(block: KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
302 val assignments = KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder().apply(block).build()
303 assignments[KafkaSslAuthMessageConsumerProperties::type.name] =
304 MessageLibConstants.TYPE_KAFKA_SSL_AUTH.asJsonPrimitive()
305 return assignments.asJsonType()
308 fun BluePrintTypes.kafkaScramSslAuthMessageConsumerProperties(block: KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
309 val assignments = KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder().apply(block).build()
310 assignments[KafkaScramSslAuthMessageConsumerProperties::type.name] =
311 MessageLibConstants.TYPE_KAFKA_SCRAM_SSL_AUTH.asJsonPrimitive()
312 return assignments.asJsonType()
315 fun BluePrintTypes.kafkaStreamsBasicAuthConsumerProperties(block: KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
316 val assignments = KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder().apply(block).build()
317 assignments[KafkaStreamsBasicAuthConsumerProperties::type.name] =
318 MessageLibConstants.TYPE_KAFKA_STREAMS_BASIC_AUTH.asJsonPrimitive()
319 return assignments.asJsonType()
322 fun BluePrintTypes.kafkaStreamsSslAuthConsumerProperties(block: KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
323 val assignments = KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder().apply(block).build()
324 assignments[KafkaStreamsSslAuthConsumerProperties::type.name] =
325 MessageLibConstants.TYPE_KAFKA_STREAMS_SSL_AUTH.asJsonPrimitive()
326 return assignments.asJsonType()
329 fun BluePrintTypes.kafkaStreamsScramSslAuthConsumerProperties(block: KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
330 val assignments = KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder().apply(block).build()
331 assignments[KafkaStreamsScramSslAuthConsumerProperties::type.name] =
332 MessageLibConstants.TYPE_KAFKA_STREAMS_SCRAM_SSL_AUTH.asJsonPrimitive()
333 return assignments.asJsonType()
336 open class MessageConsumerPropertiesAssignmentBuilder : PropertiesAssignmentBuilder()
338 /** KafkaBasicAuthMessageConsumerProperties assignment builder */
339 open class KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder : MessageConsumerPropertiesAssignmentBuilder() {
341 fun bootstrapServers(bootstrapServers: String) = bootstrapServers(bootstrapServers.asJsonPrimitive())
343 fun bootstrapServers(bootstrapServers: JsonNode) =
344 property(KafkaBasicAuthMessageConsumerProperties::bootstrapServers, bootstrapServers)
346 fun groupId(groupId: String) = groupId(groupId.asJsonPrimitive())
348 fun groupId(groupId: JsonNode) =
349 property(KafkaBasicAuthMessageConsumerProperties::groupId, groupId)
351 fun clientId(clientId: String) = clientId(clientId.asJsonPrimitive())
353 fun clientId(clientId: JsonNode) =
354 property(KafkaBasicAuthMessageConsumerProperties::clientId, clientId)
356 fun topic(topic: String) = topic(topic.asJsonPrimitive())
358 fun topic(topic: JsonNode) =
359 property(KafkaBasicAuthMessageConsumerProperties::topic, topic)
361 fun autoCommit(autoCommit: Boolean) = autoCommit(autoCommit.asJsonPrimitive())
363 fun autoCommit(autoCommit: JsonNode) =
364 property(KafkaBasicAuthMessageConsumerProperties::autoCommit, autoCommit)
366 fun autoOffsetReset(autoOffsetReset: String) = autoOffsetReset(autoOffsetReset.asJsonPrimitive())
368 fun autoOffsetReset(autoOffsetReset: JsonNode) =
369 property(KafkaBasicAuthMessageConsumerProperties::autoOffsetReset, autoOffsetReset)
371 fun pollMillSec(pollMillSec: Int) = pollMillSec(pollMillSec.asJsonPrimitive())
373 fun pollMillSec(pollMillSec: JsonNode) =
374 property(KafkaBasicAuthMessageConsumerProperties::pollMillSec, pollMillSec)
376 fun pollRecords(pollRecords: Int) = pollRecords(pollRecords.asJsonPrimitive())
378 fun pollRecords(pollRecords: JsonNode) =
379 property(KafkaBasicAuthMessageConsumerProperties::pollRecords, pollRecords)
382 open class KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder : KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder() {
384 fun truststore(truststore: String) = truststore(truststore.asJsonPrimitive())
386 fun truststore(truststore: JsonNode) =
387 property(KafkaSslAuthMessageConsumerProperties::truststore, truststore)
389 fun truststorePassword(truststorePassword: String) = truststorePassword(truststorePassword.asJsonPrimitive())
391 fun truststorePassword(truststorePassword: JsonNode) =
392 property(KafkaSslAuthMessageConsumerProperties::truststorePassword, truststorePassword)
394 fun truststoreType(truststoreType: String) = truststoreType(truststoreType.asJsonPrimitive())
396 fun truststoreType(truststoreType: JsonNode) =
397 property(KafkaSslAuthMessageConsumerProperties::truststoreType, truststoreType)
399 fun keystore(keystore: String) = keystore(keystore.asJsonPrimitive())
401 fun keystore(keystore: JsonNode) =
402 property(KafkaSslAuthMessageProducerProperties::keystore, keystore)
404 fun keystorePassword(keystorePassword: String) = keystorePassword(keystorePassword.asJsonPrimitive())
406 fun keystorePassword(keystorePassword: JsonNode) =
407 property(KafkaSslAuthMessageProducerProperties::keystorePassword, keystorePassword)
409 fun keystoreType(keystoreType: String) = keystoreType(keystoreType.asJsonPrimitive())
411 fun keystoreType(keystoreType: JsonNode) =
412 property(KafkaSslAuthMessageProducerProperties::keystoreType, keystoreType)
414 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: String) =
415 sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm.asJsonPrimitive())
417 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: JsonNode) =
418 property(KafkaSslAuthMessageConsumerProperties::sslEndpointIdentificationAlgorithm, sslEndpointIdentificationAlgorithm)
421 class KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder : KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder() {
423 fun saslMechanism(saslMechanism: String) = saslMechanism(saslMechanism.asJsonPrimitive())
425 fun saslMechanism(saslMechanism: JsonNode) =
426 property(KafkaScramSslAuthMessageConsumerProperties::saslMechanism, saslMechanism)
428 fun scramUsername(scramUsername: String) = scramUsername(scramUsername.asJsonPrimitive())
430 fun scramUsername(scramUsername: JsonNode) =
431 property(KafkaScramSslAuthMessageConsumerProperties::scramUsername, scramUsername)
433 fun scramPassword(scramPassword: String) = scramPassword(scramPassword.asJsonPrimitive())
435 fun scramPassword(scramPassword: JsonNode) =
436 property(KafkaScramSslAuthMessageConsumerProperties::scramPassword, scramPassword)
439 /** KafkaStreamsConsumerProperties assignment builder */
440 open class KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder : MessageConsumerPropertiesAssignmentBuilder() {
442 fun bootstrapServers(bootstrapServers: String) = bootstrapServers(bootstrapServers.asJsonPrimitive())
444 fun bootstrapServers(bootstrapServers: JsonNode) =
445 property(KafkaStreamsBasicAuthConsumerProperties::bootstrapServers, bootstrapServers)
447 fun applicationId(applicationId: String) = bootstrapServers(applicationId.asJsonPrimitive())
449 fun applicationId(applicationId: JsonNode) =
450 property(KafkaStreamsBasicAuthConsumerProperties::applicationId, applicationId)
452 fun topic(topic: String) = topic(topic.asJsonPrimitive())
454 fun topic(topic: JsonNode) =
455 property(KafkaStreamsBasicAuthConsumerProperties::topic, topic)
457 fun autoOffsetReset(autoOffsetReset: String) = autoOffsetReset(autoOffsetReset.asJsonPrimitive())
459 fun autoOffsetReset(autoOffsetReset: JsonNode) =
460 property(KafkaStreamsBasicAuthConsumerProperties::autoOffsetReset, autoOffsetReset)
462 fun processingGuarantee(processingGuarantee: String) = processingGuarantee(processingGuarantee.asJsonPrimitive())
464 fun processingGuarantee(processingGuarantee: JsonNode) =
465 property(KafkaStreamsBasicAuthConsumerProperties::processingGuarantee, processingGuarantee)
468 open class KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder : KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder() {
470 fun truststore(truststore: String) = truststore(truststore.asJsonPrimitive())
472 fun truststore(truststore: JsonNode) =
473 property(KafkaStreamsSslAuthConsumerProperties::truststore, truststore)
475 fun truststorePassword(truststorePassword: String) = truststorePassword(truststorePassword.asJsonPrimitive())
477 fun truststorePassword(truststorePassword: JsonNode) =
478 property(KafkaStreamsSslAuthConsumerProperties::truststorePassword, truststorePassword)
480 fun truststoreType(truststoreType: String) = truststoreType(truststoreType.asJsonPrimitive())
482 fun truststoreType(truststoreType: JsonNode) =
483 property(KafkaStreamsSslAuthConsumerProperties::truststoreType, truststoreType)
485 fun keystore(keystore: String) = keystore(keystore.asJsonPrimitive())
487 fun keystore(keystore: JsonNode) =
488 property(KafkaSslAuthMessageProducerProperties::keystore, keystore)
490 fun keystorePassword(keystorePassword: String) = keystorePassword(keystorePassword.asJsonPrimitive())
492 fun keystorePassword(keystorePassword: JsonNode) =
493 property(KafkaSslAuthMessageProducerProperties::keystorePassword, keystorePassword)
495 fun keystoreType(keystoreType: String) = keystoreType(keystoreType.asJsonPrimitive())
497 fun keystoreType(keystoreType: JsonNode) =
498 property(KafkaSslAuthMessageProducerProperties::keystoreType, keystoreType)
500 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: String) =
501 sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm.asJsonPrimitive())
503 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: JsonNode) =
504 property(KafkaStreamsSslAuthConsumerProperties::sslEndpointIdentificationAlgorithm, sslEndpointIdentificationAlgorithm)
507 class KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder : KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder() {
509 fun saslMechanism(saslMechanism: String) = saslMechanism(saslMechanism.asJsonPrimitive())
511 fun saslMechanism(saslMechanism: JsonNode) =
512 property(KafkaStreamsScramSslAuthConsumerProperties::saslMechanism, saslMechanism)
514 fun scramUsername(scramUsername: String) = scramUsername(scramUsername.asJsonPrimitive())
516 fun scramUsername(scramUsername: JsonNode) =
517 property(KafkaStreamsScramSslAuthConsumerProperties::scramUsername, scramUsername)
519 fun scramPassword(scramPassword: String) = scramPassword(scramPassword.asJsonPrimitive())
521 fun scramPassword(scramPassword: JsonNode) =
522 property(KafkaStreamsScramSslAuthConsumerProperties::scramPassword, scramPassword)