All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.iot.kotlin.inputs.TopicRuleKafkaActionArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 0.122.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.iot.kotlin.inputs

import com.pulumi.awsnative.iot.inputs.TopicRuleKafkaActionArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property clientProperties Properties of the Apache Kafka producer client.
 * @property destinationArn The ARN of Kafka action's VPC `TopicRuleDestination` .
 * @property headers The list of Kafka headers that you specify.
 * @property key The Kafka message key.
 * @property partition The Kafka message partition.
 * @property topic The Kafka topic for messages to be sent to the Kafka broker.
 */
public data class TopicRuleKafkaActionArgs(
    public val clientProperties: Output>,
    public val destinationArn: Output,
    public val headers: Output>? = null,
    public val key: Output? = null,
    public val partition: Output? = null,
    public val topic: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.iot.inputs.TopicRuleKafkaActionArgs =
        com.pulumi.awsnative.iot.inputs.TopicRuleKafkaActionArgs.builder()
            .clientProperties(
                clientProperties.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .destinationArn(destinationArn.applyValue({ args0 -> args0 }))
            .headers(
                headers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .key(key?.applyValue({ args0 -> args0 }))
            .partition(partition?.applyValue({ args0 -> args0 }))
            .topic(topic.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [TopicRuleKafkaActionArgs].
 */
@PulumiTagMarker
public class TopicRuleKafkaActionArgsBuilder internal constructor() {
    private var clientProperties: Output>? = null

    private var destinationArn: Output? = null

    private var headers: Output>? = null

    private var key: Output? = null

    private var partition: Output? = null

    private var topic: Output? = null

    /**
     * @param value Properties of the Apache Kafka producer client.
     */
    @JvmName("nfgjgpnumayblniw")
    public suspend fun clientProperties(`value`: Output>) {
        this.clientProperties = value
    }

    /**
     * @param value The ARN of Kafka action's VPC `TopicRuleDestination` .
     */
    @JvmName("uxyjihibyyfvjnpm")
    public suspend fun destinationArn(`value`: Output) {
        this.destinationArn = value
    }

    /**
     * @param value The list of Kafka headers that you specify.
     */
    @JvmName("pkepsvtevywhgjsj")
    public suspend fun headers(`value`: Output>) {
        this.headers = value
    }

    @JvmName("hpjedcownsauxflw")
    public suspend fun headers(vararg values: Output) {
        this.headers = Output.all(values.asList())
    }

    /**
     * @param values The list of Kafka headers that you specify.
     */
    @JvmName("chiurkolgpebuwbx")
    public suspend fun headers(values: List>) {
        this.headers = Output.all(values)
    }

    /**
     * @param value The Kafka message key.
     */
    @JvmName("ngcfjaawsamohsry")
    public suspend fun key(`value`: Output) {
        this.key = value
    }

    /**
     * @param value The Kafka message partition.
     */
    @JvmName("kdjkkylbiisdlrqk")
    public suspend fun partition(`value`: Output) {
        this.partition = value
    }

    /**
     * @param value The Kafka topic for messages to be sent to the Kafka broker.
     */
    @JvmName("gtqxrmymxiqjcwws")
    public suspend fun topic(`value`: Output) {
        this.topic = value
    }

    /**
     * @param value Properties of the Apache Kafka producer client.
     */
    @JvmName("bvbfwjapaywiuebw")
    public suspend fun clientProperties(`value`: Map) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.clientProperties = mapped
    }

    /**
     * @param values Properties of the Apache Kafka producer client.
     */
    @JvmName("fkwnfboucjiunekd")
    public fun clientProperties(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.clientProperties = mapped
    }

    /**
     * @param value The ARN of Kafka action's VPC `TopicRuleDestination` .
     */
    @JvmName("nqdxflficsjxorow")
    public suspend fun destinationArn(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destinationArn = mapped
    }

    /**
     * @param value The list of Kafka headers that you specify.
     */
    @JvmName("gvbudltkgqfvkvmg")
    public suspend fun headers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param argument The list of Kafka headers that you specify.
     */
    @JvmName("niruvosxnuydcrxp")
    public suspend fun headers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TopicRuleKafkaActionHeaderArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.headers = mapped
    }

    /**
     * @param argument The list of Kafka headers that you specify.
     */
    @JvmName("ojjsnudnkkalpdnp")
    public suspend fun headers(vararg argument: suspend TopicRuleKafkaActionHeaderArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            TopicRuleKafkaActionHeaderArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.headers = mapped
    }

    /**
     * @param argument The list of Kafka headers that you specify.
     */
    @JvmName("tkycieftqmhpcgmn")
    public suspend fun headers(argument: suspend TopicRuleKafkaActionHeaderArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            TopicRuleKafkaActionHeaderArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.headers = mapped
    }

    /**
     * @param values The list of Kafka headers that you specify.
     */
    @JvmName("rqwyderkcmmjcred")
    public suspend fun headers(vararg values: TopicRuleKafkaActionHeaderArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param value The Kafka message key.
     */
    @JvmName("ufsdbvcoatuplfjv")
    public suspend fun key(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.key = mapped
    }

    /**
     * @param value The Kafka message partition.
     */
    @JvmName("iegscecsgqntnhhd")
    public suspend fun partition(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.partition = mapped
    }

    /**
     * @param value The Kafka topic for messages to be sent to the Kafka broker.
     */
    @JvmName("utyhyjjktmmwwtyg")
    public suspend fun topic(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.topic = mapped
    }

    internal fun build(): TopicRuleKafkaActionArgs = TopicRuleKafkaActionArgs(
        clientProperties = clientProperties ?: throw PulumiNullFieldException("clientProperties"),
        destinationArn = destinationArn ?: throw PulumiNullFieldException("destinationArn"),
        headers = headers,
        key = key,
        partition = partition,
        topic = topic ?: throw PulumiNullFieldException("topic"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy