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

com.pulumi.aws.iot.kotlin.inputs.TopicRuleErrorActionKafkaArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.iot.kotlin.inputs

import com.pulumi.aws.iot.inputs.TopicRuleErrorActionKafkaArgs.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. For more info, see the [AWS documentation](https://docs.aws.amazon.com/iot/latest/developerguide/apache-kafka-rule-action.html).
 * @property destinationArn The ARN of Kafka action's VPC `aws.iot.TopicRuleDestination`.
 * @property headers The list of Kafka headers that you specify. Nested arguments below.
 * @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 TopicRuleErrorActionKafkaArgs(
    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.aws.iot.inputs.TopicRuleErrorActionKafkaArgs =
        com.pulumi.aws.iot.inputs.TopicRuleErrorActionKafkaArgs.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 [TopicRuleErrorActionKafkaArgs].
 */
@PulumiTagMarker
public class TopicRuleErrorActionKafkaArgsBuilder 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. For more info, see the [AWS documentation](https://docs.aws.amazon.com/iot/latest/developerguide/apache-kafka-rule-action.html).
     */
    @JvmName("laagjlgvykqufeqd")
    public suspend fun clientProperties(`value`: Output>) {
        this.clientProperties = value
    }

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

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

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

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

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

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

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

    /**
     * @param value Properties of the Apache Kafka producer client. For more info, see the [AWS documentation](https://docs.aws.amazon.com/iot/latest/developerguide/apache-kafka-rule-action.html).
     */
    @JvmName("hhrpksqjreuyyvqq")
    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. For more info, see the [AWS documentation](https://docs.aws.amazon.com/iot/latest/developerguide/apache-kafka-rule-action.html).
     */
    @JvmName("oohlnigoblqhcupo")
    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 `aws.iot.TopicRuleDestination`.
     */
    @JvmName("bcnskvwmawnuewie")
    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. Nested arguments below.
     */
    @JvmName("xgoktyiedhajnqxs")
    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. Nested arguments below.
     */
    @JvmName("rbjwoglrhykktixf")
    public suspend fun headers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            TopicRuleErrorActionKafkaHeaderArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.headers = mapped
    }

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

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

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

    /**
     * @param value The Kafka message key.
     */
    @JvmName("kmglvejqmgrrtubu")
    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("stnxdwppntecnpnu")
    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("wkugnehcrmqommte")
    public suspend fun topic(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.topic = mapped
    }

    internal fun build(): TopicRuleErrorActionKafkaArgs = TopicRuleErrorActionKafkaArgs(
        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