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() {
177 fun truststore(truststore: String) = truststore(truststore.asJsonPrimitive())
179 fun truststore(truststore: JsonNode) =
180 property(KafkaSslAuthMessageProducerProperties::truststore, truststore)
182 fun truststorePassword(truststorePassword: String) = truststorePassword(truststorePassword.asJsonPrimitive())
184 fun truststorePassword(truststorePassword: JsonNode) =
185 property(KafkaSslAuthMessageProducerProperties::truststorePassword, truststorePassword)
187 fun truststoreType(truststoreType: String) = truststoreType(truststoreType.asJsonPrimitive())
189 fun truststoreType(truststoreType: JsonNode) =
190 property(KafkaSslAuthMessageProducerProperties::truststoreType, truststoreType)
192 fun keystore(keystore: String) = keystore(keystore.asJsonPrimitive())
194 fun keystore(keystore: JsonNode) =
195 property(KafkaSslAuthMessageProducerProperties::keystore, keystore)
197 fun keystorePassword(keystorePassword: String) = keystorePassword(keystorePassword.asJsonPrimitive())
199 fun keystorePassword(keystorePassword: JsonNode) =
200 property(KafkaSslAuthMessageProducerProperties::keystorePassword, keystorePassword)
202 fun keystoreType(keystoreType: String) = keystoreType(keystoreType.asJsonPrimitive())
204 fun keystoreType(keystoreType: JsonNode) =
205 property(KafkaSslAuthMessageProducerProperties::keystoreType, keystoreType)
207 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: String) =
208 sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm.asJsonPrimitive())
210 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: JsonNode) =
211 property(KafkaSslAuthMessageProducerProperties::sslEndpointIdentificationAlgorithm, sslEndpointIdentificationAlgorithm)
214 class KafkaScramSslAuthMessageProducerPropertiesAssignmentBuilder : KafkaSslAuthMessageProducerPropertiesAssignmentBuilder() {
215 fun saslMechanism(saslMechanism: String) = saslMechanism(saslMechanism.asJsonPrimitive())
217 fun saslMechanism(saslMechanism: JsonNode) =
218 property(KafkaScramSslAuthMessageProducerProperties::saslMechanism, saslMechanism)
220 fun scramUsername(scramUsername: String) = scramUsername(scramUsername.asJsonPrimitive())
222 fun scramUsername(scramUsername: JsonNode) =
223 property(KafkaScramSslAuthMessageProducerProperties::scramUsername, scramUsername)
225 fun scramPassword(scramPassword: String) = scramPassword(scramPassword.asJsonPrimitive())
227 fun scramPassword(scramPassword: JsonNode) =
228 property(KafkaScramSslAuthMessageProducerProperties::scramPassword, scramPassword)
231 /** Relationships Templates DSL for Message Consumer */
232 fun TopologyTemplateBuilder.relationshipTemplateMessageConsumer(
235 block: MessageConsumerRelationshipTemplateBuilder.() -> Unit
237 if (relationshipTemplates == null) relationshipTemplates = hashMapOf()
238 val relationshipTemplate =
239 MessageConsumerRelationshipTemplateBuilder(name, description).apply(block).build()
240 relationshipTemplates!![relationshipTemplate.id!!] = relationshipTemplate
243 class MessageConsumerRelationshipTemplateBuilder(name: String, description: String) :
244 RelationshipTemplateBuilder(
246 BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER, description
249 fun kafkaBasicAuth(block: KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit) {
251 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
252 BluePrintTypes.kafkaBasicAuthMessageConsumerProperties(block)
256 fun kafkaSslAuth(block: KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit) {
258 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
259 BluePrintTypes.kafkaSslAuthMessageConsumerProperties(block)
263 fun kafkaScramSslAuth(block: KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit) {
265 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
266 BluePrintTypes.kafkaScramSslAuthMessageConsumerProperties(block)
270 fun kafkaStreamsBasicAuth(block: KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder.() -> Unit) {
272 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
273 BluePrintTypes.kafkaStreamsBasicAuthConsumerProperties(block)
277 fun kafkaStreamsSslAuth(block: KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit) {
279 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
280 BluePrintTypes.kafkaStreamsSslAuthConsumerProperties(block)
284 fun kafkaStreamsScramSslAuth(block: KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit) {
286 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
287 BluePrintTypes.kafkaStreamsScramSslAuthConsumerProperties(block)
292 fun BluePrintTypes.kafkaBasicAuthMessageConsumerProperties(block: KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
293 val assignments = KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder().apply(block).build()
294 assignments[KafkaBasicAuthMessageConsumerProperties::type.name] =
295 MessageLibConstants.TYPE_KAFKA_BASIC_AUTH.asJsonPrimitive()
296 return assignments.asJsonType()
299 fun BluePrintTypes.kafkaSslAuthMessageConsumerProperties(block: KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
300 val assignments = KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder().apply(block).build()
301 assignments[KafkaSslAuthMessageConsumerProperties::type.name] =
302 MessageLibConstants.TYPE_KAFKA_SSL_AUTH.asJsonPrimitive()
303 return assignments.asJsonType()
306 fun BluePrintTypes.kafkaScramSslAuthMessageConsumerProperties(block: KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
307 val assignments = KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder().apply(block).build()
308 assignments[KafkaScramSslAuthMessageConsumerProperties::type.name] =
309 MessageLibConstants.TYPE_KAFKA_SCRAM_SSL_AUTH.asJsonPrimitive()
310 return assignments.asJsonType()
313 fun BluePrintTypes.kafkaStreamsBasicAuthConsumerProperties(block: KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
314 val assignments = KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder().apply(block).build()
315 assignments[KafkaStreamsBasicAuthConsumerProperties::type.name] =
316 MessageLibConstants.TYPE_KAFKA_STREAMS_BASIC_AUTH.asJsonPrimitive()
317 return assignments.asJsonType()
320 fun BluePrintTypes.kafkaStreamsSslAuthConsumerProperties(block: KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
321 val assignments = KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder().apply(block).build()
322 assignments[KafkaStreamsSslAuthConsumerProperties::type.name] =
323 MessageLibConstants.TYPE_KAFKA_STREAMS_SSL_AUTH.asJsonPrimitive()
324 return assignments.asJsonType()
327 fun BluePrintTypes.kafkaStreamsScramSslAuthConsumerProperties(block: KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
328 val assignments = KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder().apply(block).build()
329 assignments[KafkaStreamsScramSslAuthConsumerProperties::type.name] =
330 MessageLibConstants.TYPE_KAFKA_STREAMS_SCRAM_SSL_AUTH.asJsonPrimitive()
331 return assignments.asJsonType()
334 open class MessageConsumerPropertiesAssignmentBuilder : PropertiesAssignmentBuilder()
336 /** KafkaBasicAuthMessageConsumerProperties assignment builder */
337 open class KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder : MessageConsumerPropertiesAssignmentBuilder() {
339 fun bootstrapServers(bootstrapServers: String) = bootstrapServers(bootstrapServers.asJsonPrimitive())
341 fun bootstrapServers(bootstrapServers: JsonNode) =
342 property(KafkaBasicAuthMessageConsumerProperties::bootstrapServers, bootstrapServers)
344 fun groupId(groupId: String) = groupId(groupId.asJsonPrimitive())
346 fun groupId(groupId: JsonNode) =
347 property(KafkaBasicAuthMessageConsumerProperties::groupId, groupId)
349 fun clientId(clientId: String) = clientId(clientId.asJsonPrimitive())
351 fun clientId(clientId: JsonNode) =
352 property(KafkaBasicAuthMessageConsumerProperties::clientId, clientId)
354 fun topic(topic: String) = topic(topic.asJsonPrimitive())
356 fun topic(topic: JsonNode) =
357 property(KafkaBasicAuthMessageConsumerProperties::topic, topic)
359 fun autoCommit(autoCommit: Boolean) = autoCommit(autoCommit.asJsonPrimitive())
361 fun autoCommit(autoCommit: JsonNode) =
362 property(KafkaBasicAuthMessageConsumerProperties::autoCommit, autoCommit)
364 fun autoOffsetReset(autoOffsetReset: String) = autoOffsetReset(autoOffsetReset.asJsonPrimitive())
366 fun autoOffsetReset(autoOffsetReset: JsonNode) =
367 property(KafkaBasicAuthMessageConsumerProperties::autoOffsetReset, autoOffsetReset)
369 fun pollMillSec(pollMillSec: Int) = pollMillSec(pollMillSec.asJsonPrimitive())
371 fun pollMillSec(pollMillSec: JsonNode) =
372 property(KafkaBasicAuthMessageConsumerProperties::pollMillSec, pollMillSec)
374 fun pollRecords(pollRecords: Int) = pollRecords(pollRecords.asJsonPrimitive())
376 fun pollRecords(pollRecords: JsonNode) =
377 property(KafkaBasicAuthMessageConsumerProperties::pollRecords, pollRecords)
380 open class KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder : KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder() {
381 fun truststore(truststore: String) = truststore(truststore.asJsonPrimitive())
383 fun truststore(truststore: JsonNode) =
384 property(KafkaSslAuthMessageConsumerProperties::truststore, truststore)
386 fun truststorePassword(truststorePassword: String) = truststorePassword(truststorePassword.asJsonPrimitive())
388 fun truststorePassword(truststorePassword: JsonNode) =
389 property(KafkaSslAuthMessageConsumerProperties::truststorePassword, truststorePassword)
391 fun truststoreType(truststoreType: String) = truststoreType(truststoreType.asJsonPrimitive())
393 fun truststoreType(truststoreType: JsonNode) =
394 property(KafkaSslAuthMessageConsumerProperties::truststoreType, truststoreType)
396 fun keystore(keystore: String) = keystore(keystore.asJsonPrimitive())
398 fun keystore(keystore: JsonNode) =
399 property(KafkaSslAuthMessageProducerProperties::keystore, keystore)
401 fun keystorePassword(keystorePassword: String) = keystorePassword(keystorePassword.asJsonPrimitive())
403 fun keystorePassword(keystorePassword: JsonNode) =
404 property(KafkaSslAuthMessageProducerProperties::keystorePassword, keystorePassword)
406 fun keystoreType(keystoreType: String) = keystoreType(keystoreType.asJsonPrimitive())
408 fun keystoreType(keystoreType: JsonNode) =
409 property(KafkaSslAuthMessageProducerProperties::keystoreType, keystoreType)
411 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: String) =
412 sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm.asJsonPrimitive())
414 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: JsonNode) =
415 property(KafkaSslAuthMessageConsumerProperties::sslEndpointIdentificationAlgorithm, sslEndpointIdentificationAlgorithm)
418 class KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder : KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder() {
419 fun saslMechanism(saslMechanism: String) = saslMechanism(saslMechanism.asJsonPrimitive())
421 fun saslMechanism(saslMechanism: JsonNode) =
422 property(KafkaScramSslAuthMessageConsumerProperties::saslMechanism, saslMechanism)
424 fun scramUsername(scramUsername: String) = scramUsername(scramUsername.asJsonPrimitive())
426 fun scramUsername(scramUsername: JsonNode) =
427 property(KafkaScramSslAuthMessageConsumerProperties::scramUsername, scramUsername)
429 fun scramPassword(scramPassword: String) = scramPassword(scramPassword.asJsonPrimitive())
431 fun scramPassword(scramPassword: JsonNode) =
432 property(KafkaScramSslAuthMessageConsumerProperties::scramPassword, scramPassword)
435 /** KafkaStreamsConsumerProperties assignment builder */
436 open class KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder : MessageConsumerPropertiesAssignmentBuilder() {
438 fun bootstrapServers(bootstrapServers: String) = bootstrapServers(bootstrapServers.asJsonPrimitive())
440 fun bootstrapServers(bootstrapServers: JsonNode) =
441 property(KafkaStreamsBasicAuthConsumerProperties::bootstrapServers, bootstrapServers)
443 fun applicationId(applicationId: String) = bootstrapServers(applicationId.asJsonPrimitive())
445 fun applicationId(applicationId: JsonNode) =
446 property(KafkaStreamsBasicAuthConsumerProperties::applicationId, applicationId)
448 fun topic(topic: String) = topic(topic.asJsonPrimitive())
450 fun topic(topic: JsonNode) =
451 property(KafkaStreamsBasicAuthConsumerProperties::topic, topic)
453 fun autoOffsetReset(autoOffsetReset: String) = autoOffsetReset(autoOffsetReset.asJsonPrimitive())
455 fun autoOffsetReset(autoOffsetReset: JsonNode) =
456 property(KafkaStreamsBasicAuthConsumerProperties::autoOffsetReset, autoOffsetReset)
458 fun processingGuarantee(processingGuarantee: String) = processingGuarantee(processingGuarantee.asJsonPrimitive())
460 fun processingGuarantee(processingGuarantee: JsonNode) =
461 property(KafkaStreamsBasicAuthConsumerProperties::processingGuarantee, processingGuarantee)
464 open class KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder : KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder() {
465 fun truststore(truststore: String) = truststore(truststore.asJsonPrimitive())
467 fun truststore(truststore: JsonNode) =
468 property(KafkaStreamsSslAuthConsumerProperties::truststore, truststore)
470 fun truststorePassword(truststorePassword: String) = truststorePassword(truststorePassword.asJsonPrimitive())
472 fun truststorePassword(truststorePassword: JsonNode) =
473 property(KafkaStreamsSslAuthConsumerProperties::truststorePassword, truststorePassword)
475 fun truststoreType(truststoreType: String) = truststoreType(truststoreType.asJsonPrimitive())
477 fun truststoreType(truststoreType: JsonNode) =
478 property(KafkaStreamsSslAuthConsumerProperties::truststoreType, truststoreType)
480 fun keystore(keystore: String) = keystore(keystore.asJsonPrimitive())
482 fun keystore(keystore: JsonNode) =
483 property(KafkaSslAuthMessageProducerProperties::keystore, keystore)
485 fun keystorePassword(keystorePassword: String) = keystorePassword(keystorePassword.asJsonPrimitive())
487 fun keystorePassword(keystorePassword: JsonNode) =
488 property(KafkaSslAuthMessageProducerProperties::keystorePassword, keystorePassword)
490 fun keystoreType(keystoreType: String) = keystoreType(keystoreType.asJsonPrimitive())
492 fun keystoreType(keystoreType: JsonNode) =
493 property(KafkaSslAuthMessageProducerProperties::keystoreType, keystoreType)
495 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: String) =
496 sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm.asJsonPrimitive())
498 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: JsonNode) =
499 property(KafkaStreamsSslAuthConsumerProperties::sslEndpointIdentificationAlgorithm, sslEndpointIdentificationAlgorithm)
502 class KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder : KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder() {
503 fun saslMechanism(saslMechanism: String) = saslMechanism(saslMechanism.asJsonPrimitive())
505 fun saslMechanism(saslMechanism: JsonNode) =
506 property(KafkaStreamsScramSslAuthConsumerProperties::saslMechanism, saslMechanism)
508 fun scramUsername(scramUsername: String) = scramUsername(scramUsername.asJsonPrimitive())
510 fun scramUsername(scramUsername: JsonNode) =
511 property(KafkaStreamsScramSslAuthConsumerProperties::scramUsername, scramUsername)
513 fun scramPassword(scramPassword: String) = scramPassword(scramPassword.asJsonPrimitive())
515 fun scramPassword(scramPassword: JsonNode) =
516 property(KafkaStreamsScramSslAuthConsumerProperties::scramPassword, scramPassword)