com.pulumi.awsnative.iotevents.kotlin.inputs.AlarmModelIotTopicPublishArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.iotevents.kotlin.inputs
import com.pulumi.awsnative.iotevents.inputs.AlarmModelIotTopicPublishArgs.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* Information required to publish the MQTT message through the AWS IoT message broker.
* @property mqttTopic The MQTT topic of the message. You can use a string expression that includes variables (`$variable.`) and input values (`$input..`) as the topic string.
* @property payload
*/
public data class AlarmModelIotTopicPublishArgs(
public val mqttTopic: Output,
public val payload: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.iotevents.inputs.AlarmModelIotTopicPublishArgs =
com.pulumi.awsnative.iotevents.inputs.AlarmModelIotTopicPublishArgs.builder()
.mqttTopic(mqttTopic.applyValue({ args0 -> args0 }))
.payload(payload?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}
/**
* Builder for [AlarmModelIotTopicPublishArgs].
*/
@PulumiTagMarker
public class AlarmModelIotTopicPublishArgsBuilder internal constructor() {
private var mqttTopic: Output? = null
private var payload: Output? = null
/**
* @param value The MQTT topic of the message. You can use a string expression that includes variables (`$variable.`) and input values (`$input..`) as the topic string.
*/
@JvmName("eaxypowivmnmeuqn")
public suspend fun mqttTopic(`value`: Output) {
this.mqttTopic = value
}
/**
* @param value
*/
@JvmName("ionhejetajkobvtm")
public suspend fun payload(`value`: Output) {
this.payload = value
}
/**
* @param value The MQTT topic of the message. You can use a string expression that includes variables (`$variable.`) and input values (`$input..`) as the topic string.
*/
@JvmName("neiiqpdffwtoxiyd")
public suspend fun mqttTopic(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.mqttTopic = mapped
}
/**
* @param value
*/
@JvmName("qwoltopfpmntwfcx")
public suspend fun payload(`value`: AlarmModelPayloadArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.payload = mapped
}
/**
* @param argument
*/
@JvmName("ysigcipbskobgpsm")
public suspend fun payload(argument: suspend AlarmModelPayloadArgsBuilder.() -> Unit) {
val toBeMapped = AlarmModelPayloadArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.payload = mapped
}
internal fun build(): AlarmModelIotTopicPublishArgs = AlarmModelIotTopicPublishArgs(
mqttTopic = mqttTopic ?: throw PulumiNullFieldException("mqttTopic"),
payload = payload,
)
}