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 retries(retries: Int) = retries(retries.asJsonPrimitive())
164 fun retries(retries: JsonNode) = property(KafkaBasicAuthMessageProducerProperties::retries, retries)
166 fun enableIdempotence(enableIdempotence: Boolean) = enableIdempotence(enableIdempotence.asJsonPrimitive())
168 fun enableIdempotence(enableIdempotence: JsonNode) =
169 property(KafkaBasicAuthMessageProducerProperties::enableIdempotence, enableIdempotence)
172 open class KafkaSslAuthMessageProducerPropertiesAssignmentBuilder : KafkaBasicAuthMessageProducerPropertiesAssignmentBuilder() {
173 fun truststore(truststore: String) = truststore(truststore.asJsonPrimitive())
175 fun truststore(truststore: JsonNode) =
176 property(KafkaSslAuthMessageProducerProperties::truststore, truststore)
178 fun truststorePassword(truststorePassword: String) = truststorePassword(truststorePassword.asJsonPrimitive())
180 fun truststorePassword(truststorePassword: JsonNode) =
181 property(KafkaSslAuthMessageProducerProperties::truststorePassword, truststorePassword)
183 fun truststoreType(truststoreType: String) = truststoreType(truststoreType.asJsonPrimitive())
185 fun truststoreType(truststoreType: JsonNode) =
186 property(KafkaSslAuthMessageProducerProperties::truststoreType, truststoreType)
188 fun keystore(keystore: String) = keystore(keystore.asJsonPrimitive())
190 fun keystore(keystore: JsonNode) =
191 property(KafkaSslAuthMessageProducerProperties::keystore, keystore)
193 fun keystorePassword(keystorePassword: String) = keystorePassword(keystorePassword.asJsonPrimitive())
195 fun keystorePassword(keystorePassword: JsonNode) =
196 property(KafkaSslAuthMessageProducerProperties::keystorePassword, keystorePassword)
198 fun keystoreType(keystoreType: String) = keystoreType(keystoreType.asJsonPrimitive())
200 fun keystoreType(keystoreType: JsonNode) =
201 property(KafkaSslAuthMessageProducerProperties::keystoreType, keystoreType)
203 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: String) =
204 sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm.asJsonPrimitive())
206 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: JsonNode) =
207 property(KafkaSslAuthMessageProducerProperties::sslEndpointIdentificationAlgorithm, sslEndpointIdentificationAlgorithm)
210 class KafkaScramSslAuthMessageProducerPropertiesAssignmentBuilder : KafkaSslAuthMessageProducerPropertiesAssignmentBuilder() {
211 fun saslMechanism(saslMechanism: String) = saslMechanism(saslMechanism.asJsonPrimitive())
213 fun saslMechanism(saslMechanism: JsonNode) =
214 property(KafkaScramSslAuthMessageProducerProperties::saslMechanism, saslMechanism)
216 fun scramUsername(scramUsername: String) = scramUsername(scramUsername.asJsonPrimitive())
218 fun scramUsername(scramUsername: JsonNode) =
219 property(KafkaScramSslAuthMessageProducerProperties::scramUsername, scramUsername)
221 fun scramPassword(scramPassword: String) = scramPassword(scramPassword.asJsonPrimitive())
223 fun scramPassword(scramPassword: JsonNode) =
224 property(KafkaScramSslAuthMessageProducerProperties::scramPassword, scramPassword)
227 /** Relationships Templates DSL for Message Consumer */
228 fun TopologyTemplateBuilder.relationshipTemplateMessageConsumer(
231 block: MessageConsumerRelationshipTemplateBuilder.() -> Unit
233 if (relationshipTemplates == null) relationshipTemplates = hashMapOf()
234 val relationshipTemplate =
235 MessageConsumerRelationshipTemplateBuilder(name, description).apply(block).build()
236 relationshipTemplates!![relationshipTemplate.id!!] = relationshipTemplate
239 class MessageConsumerRelationshipTemplateBuilder(name: String, description: String) :
240 RelationshipTemplateBuilder(
242 BluePrintConstants.MODEL_TYPE_RELATIONSHIPS_CONNECTS_TO_MESSAGE_CONSUMER, description
245 fun kafkaBasicAuth(block: KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit) {
247 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
248 BluePrintTypes.kafkaBasicAuthMessageConsumerProperties(block)
252 fun kafkaSslAuth(block: KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit) {
254 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
255 BluePrintTypes.kafkaSslAuthMessageConsumerProperties(block)
259 fun kafkaScramSslAuth(block: KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit) {
261 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
262 BluePrintTypes.kafkaScramSslAuthMessageConsumerProperties(block)
266 fun kafkaStreamsBasicAuth(block: KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder.() -> Unit) {
268 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
269 BluePrintTypes.kafkaStreamsBasicAuthConsumerProperties(block)
273 fun kafkaStreamsSslAuth(block: KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit) {
275 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
276 BluePrintTypes.kafkaStreamsSslAuthConsumerProperties(block)
280 fun kafkaStreamsScramSslAuth(block: KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit) {
282 BluePrintConstants.PROPERTY_CONNECTION_CONFIG,
283 BluePrintTypes.kafkaStreamsScramSslAuthConsumerProperties(block)
288 fun BluePrintTypes.kafkaBasicAuthMessageConsumerProperties(block: KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
289 val assignments = KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder().apply(block).build()
290 assignments[KafkaBasicAuthMessageConsumerProperties::type.name] =
291 MessageLibConstants.TYPE_KAFKA_BASIC_AUTH.asJsonPrimitive()
292 return assignments.asJsonType()
295 fun BluePrintTypes.kafkaSslAuthMessageConsumerProperties(block: KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
296 val assignments = KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder().apply(block).build()
297 assignments[KafkaSslAuthMessageConsumerProperties::type.name] =
298 MessageLibConstants.TYPE_KAFKA_SSL_AUTH.asJsonPrimitive()
299 return assignments.asJsonType()
302 fun BluePrintTypes.kafkaScramSslAuthMessageConsumerProperties(block: KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
303 val assignments = KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder().apply(block).build()
304 assignments[KafkaScramSslAuthMessageConsumerProperties::type.name] =
305 MessageLibConstants.TYPE_KAFKA_SCRAM_SSL_AUTH.asJsonPrimitive()
306 return assignments.asJsonType()
309 fun BluePrintTypes.kafkaStreamsBasicAuthConsumerProperties(block: KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
310 val assignments = KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder().apply(block).build()
311 assignments[KafkaStreamsBasicAuthConsumerProperties::type.name] =
312 MessageLibConstants.TYPE_KAFKA_STREAMS_BASIC_AUTH.asJsonPrimitive()
313 return assignments.asJsonType()
316 fun BluePrintTypes.kafkaStreamsSslAuthConsumerProperties(block: KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
317 val assignments = KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder().apply(block).build()
318 assignments[KafkaStreamsSslAuthConsumerProperties::type.name] =
319 MessageLibConstants.TYPE_KAFKA_STREAMS_SSL_AUTH.asJsonPrimitive()
320 return assignments.asJsonType()
323 fun BluePrintTypes.kafkaStreamsScramSslAuthConsumerProperties(block: KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder.() -> Unit): JsonNode {
324 val assignments = KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder().apply(block).build()
325 assignments[KafkaStreamsScramSslAuthConsumerProperties::type.name] =
326 MessageLibConstants.TYPE_KAFKA_STREAMS_SCRAM_SSL_AUTH.asJsonPrimitive()
327 return assignments.asJsonType()
330 open class MessageConsumerPropertiesAssignmentBuilder : PropertiesAssignmentBuilder()
332 /** KafkaBasicAuthMessageConsumerProperties assignment builder */
333 open class KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder : MessageConsumerPropertiesAssignmentBuilder() {
335 fun bootstrapServers(bootstrapServers: String) = bootstrapServers(bootstrapServers.asJsonPrimitive())
337 fun bootstrapServers(bootstrapServers: JsonNode) =
338 property(KafkaBasicAuthMessageConsumerProperties::bootstrapServers, bootstrapServers)
340 fun groupId(groupId: String) = groupId(groupId.asJsonPrimitive())
342 fun groupId(groupId: JsonNode) =
343 property(KafkaBasicAuthMessageConsumerProperties::groupId, groupId)
345 fun clientId(clientId: String) = clientId(clientId.asJsonPrimitive())
347 fun clientId(clientId: JsonNode) =
348 property(KafkaBasicAuthMessageConsumerProperties::clientId, clientId)
350 fun topic(topic: String) = topic(topic.asJsonPrimitive())
352 fun topic(topic: JsonNode) =
353 property(KafkaBasicAuthMessageConsumerProperties::topic, topic)
355 fun autoCommit(autoCommit: Boolean) = autoCommit(autoCommit.asJsonPrimitive())
357 fun autoCommit(autoCommit: JsonNode) =
358 property(KafkaBasicAuthMessageConsumerProperties::autoCommit, autoCommit)
360 fun autoOffsetReset(autoOffsetReset: String) = autoOffsetReset(autoOffsetReset.asJsonPrimitive())
362 fun autoOffsetReset(autoOffsetReset: JsonNode) =
363 property(KafkaBasicAuthMessageConsumerProperties::autoOffsetReset, autoOffsetReset)
365 fun pollMillSec(pollMillSec: Int) = pollMillSec(pollMillSec.asJsonPrimitive())
367 fun pollMillSec(pollMillSec: JsonNode) =
368 property(KafkaBasicAuthMessageConsumerProperties::pollMillSec, pollMillSec)
370 fun pollRecords(pollRecords: Int) = pollRecords(pollRecords.asJsonPrimitive())
372 fun pollRecords(pollRecords: JsonNode) =
373 property(KafkaBasicAuthMessageConsumerProperties::pollRecords, pollRecords)
376 open class KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder : KafkaBasicAuthMessageConsumerPropertiesAssignmentBuilder() {
377 fun truststore(truststore: String) = truststore(truststore.asJsonPrimitive())
379 fun truststore(truststore: JsonNode) =
380 property(KafkaSslAuthMessageConsumerProperties::truststore, truststore)
382 fun truststorePassword(truststorePassword: String) = truststorePassword(truststorePassword.asJsonPrimitive())
384 fun truststorePassword(truststorePassword: JsonNode) =
385 property(KafkaSslAuthMessageConsumerProperties::truststorePassword, truststorePassword)
387 fun truststoreType(truststoreType: String) = truststoreType(truststoreType.asJsonPrimitive())
389 fun truststoreType(truststoreType: JsonNode) =
390 property(KafkaSslAuthMessageConsumerProperties::truststoreType, truststoreType)
392 fun keystore(keystore: String) = keystore(keystore.asJsonPrimitive())
394 fun keystore(keystore: JsonNode) =
395 property(KafkaSslAuthMessageProducerProperties::keystore, keystore)
397 fun keystorePassword(keystorePassword: String) = keystorePassword(keystorePassword.asJsonPrimitive())
399 fun keystorePassword(keystorePassword: JsonNode) =
400 property(KafkaSslAuthMessageProducerProperties::keystorePassword, keystorePassword)
402 fun keystoreType(keystoreType: String) = keystoreType(keystoreType.asJsonPrimitive())
404 fun keystoreType(keystoreType: JsonNode) =
405 property(KafkaSslAuthMessageProducerProperties::keystoreType, keystoreType)
407 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: String) =
408 sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm.asJsonPrimitive())
410 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: JsonNode) =
411 property(KafkaSslAuthMessageConsumerProperties::sslEndpointIdentificationAlgorithm, sslEndpointIdentificationAlgorithm)
414 class KafkaScramSslAuthMessageConsumerPropertiesAssignmentBuilder : KafkaSslAuthMessageConsumerPropertiesAssignmentBuilder() {
415 fun saslMechanism(saslMechanism: String) = saslMechanism(saslMechanism.asJsonPrimitive())
417 fun saslMechanism(saslMechanism: JsonNode) =
418 property(KafkaScramSslAuthMessageConsumerProperties::saslMechanism, saslMechanism)
420 fun scramUsername(scramUsername: String) = scramUsername(scramUsername.asJsonPrimitive())
422 fun scramUsername(scramUsername: JsonNode) =
423 property(KafkaScramSslAuthMessageConsumerProperties::scramUsername, scramUsername)
425 fun scramPassword(scramPassword: String) = scramPassword(scramPassword.asJsonPrimitive())
427 fun scramPassword(scramPassword: JsonNode) =
428 property(KafkaScramSslAuthMessageConsumerProperties::scramPassword, scramPassword)
431 /** KafkaStreamsConsumerProperties assignment builder */
432 open class KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder : MessageConsumerPropertiesAssignmentBuilder() {
434 fun bootstrapServers(bootstrapServers: String) = bootstrapServers(bootstrapServers.asJsonPrimitive())
436 fun bootstrapServers(bootstrapServers: JsonNode) =
437 property(KafkaStreamsBasicAuthConsumerProperties::bootstrapServers, bootstrapServers)
439 fun applicationId(applicationId: String) = bootstrapServers(applicationId.asJsonPrimitive())
441 fun applicationId(applicationId: JsonNode) =
442 property(KafkaStreamsBasicAuthConsumerProperties::applicationId, applicationId)
444 fun topic(topic: String) = topic(topic.asJsonPrimitive())
446 fun topic(topic: JsonNode) =
447 property(KafkaStreamsBasicAuthConsumerProperties::topic, topic)
449 fun autoOffsetReset(autoOffsetReset: String) = autoOffsetReset(autoOffsetReset.asJsonPrimitive())
451 fun autoOffsetReset(autoOffsetReset: JsonNode) =
452 property(KafkaStreamsBasicAuthConsumerProperties::autoOffsetReset, autoOffsetReset)
454 fun processingGuarantee(processingGuarantee: String) = processingGuarantee(processingGuarantee.asJsonPrimitive())
456 fun processingGuarantee(processingGuarantee: JsonNode) =
457 property(KafkaStreamsBasicAuthConsumerProperties::processingGuarantee, processingGuarantee)
460 open class KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder : KafkaStreamsBasicAuthConsumerPropertiesAssignmentBuilder() {
461 fun truststore(truststore: String) = truststore(truststore.asJsonPrimitive())
463 fun truststore(truststore: JsonNode) =
464 property(KafkaStreamsSslAuthConsumerProperties::truststore, truststore)
466 fun truststorePassword(truststorePassword: String) = truststorePassword(truststorePassword.asJsonPrimitive())
468 fun truststorePassword(truststorePassword: JsonNode) =
469 property(KafkaStreamsSslAuthConsumerProperties::truststorePassword, truststorePassword)
471 fun truststoreType(truststoreType: String) = truststoreType(truststoreType.asJsonPrimitive())
473 fun truststoreType(truststoreType: JsonNode) =
474 property(KafkaStreamsSslAuthConsumerProperties::truststoreType, truststoreType)
476 fun keystore(keystore: String) = keystore(keystore.asJsonPrimitive())
478 fun keystore(keystore: JsonNode) =
479 property(KafkaSslAuthMessageProducerProperties::keystore, keystore)
481 fun keystorePassword(keystorePassword: String) = keystorePassword(keystorePassword.asJsonPrimitive())
483 fun keystorePassword(keystorePassword: JsonNode) =
484 property(KafkaSslAuthMessageProducerProperties::keystorePassword, keystorePassword)
486 fun keystoreType(keystoreType: String) = keystoreType(keystoreType.asJsonPrimitive())
488 fun keystoreType(keystoreType: JsonNode) =
489 property(KafkaSslAuthMessageProducerProperties::keystoreType, keystoreType)
491 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: String) =
492 sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm.asJsonPrimitive())
494 fun sslEndpointIdentificationAlgorithm(sslEndpointIdentificationAlgorithm: JsonNode) =
495 property(KafkaStreamsSslAuthConsumerProperties::sslEndpointIdentificationAlgorithm, sslEndpointIdentificationAlgorithm)
498 class KafkaStreamsScramSslAuthConsumerPropertiesAssignmentBuilder : KafkaStreamsSslAuthConsumerPropertiesAssignmentBuilder() {
499 fun saslMechanism(saslMechanism: String) = saslMechanism(saslMechanism.asJsonPrimitive())
501 fun saslMechanism(saslMechanism: JsonNode) =
502 property(KafkaStreamsScramSslAuthConsumerProperties::saslMechanism, saslMechanism)
504 fun scramUsername(scramUsername: String) = scramUsername(scramUsername.asJsonPrimitive())
506 fun scramUsername(scramUsername: JsonNode) =
507 property(KafkaStreamsScramSslAuthConsumerProperties::scramUsername, scramUsername)
509 fun scramPassword(scramPassword: String) = scramPassword(scramPassword.asJsonPrimitive())
511 fun scramPassword(scramPassword: JsonNode) =
512 property(KafkaStreamsScramSslAuthConsumerProperties::scramPassword, scramPassword)