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

com.pulumi.azurenative.iotoperationsmq.kotlin.inputs.MqttBridgeRoutesArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.iotoperationsmq.kotlin.inputs

import com.pulumi.azurenative.iotoperationsmq.inputs.MqttBridgeRoutesArgs.builder
import com.pulumi.azurenative.iotoperationsmq.kotlin.enums.MqttBridgeRouteDirection
import com.pulumi.core.Either
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * MqttBridgeTopicMap route properties
 * @property direction Direction of the route.
 * @property name Name of the route.
 * @property qos Qos for MQTT connection.
 * @property sharedSubscription Shared subscription topic details.
 * @property source Source topic of the route.
 * @property target Target topic of the route. Ignore if same as source
 */
public data class MqttBridgeRoutesArgs(
    public val direction: Output>,
    public val name: Output,
    public val qos: Output? = null,
    public val sharedSubscription: Output? = null,
    public val source: Output,
    public val target: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.iotoperationsmq.inputs.MqttBridgeRoutesArgs =
        com.pulumi.azurenative.iotoperationsmq.inputs.MqttBridgeRoutesArgs.builder()
            .direction(
                direction.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .name(name.applyValue({ args0 -> args0 }))
            .qos(qos?.applyValue({ args0 -> args0 }))
            .sharedSubscription(
                sharedSubscription?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .source(source.applyValue({ args0 -> args0 }))
            .target(target?.applyValue({ args0 -> args0 })).build()
}

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

    private var name: Output? = null

    private var qos: Output? = null

    private var sharedSubscription: Output? = null

    private var source: Output? = null

    private var target: Output? = null

    /**
     * @param value Direction of the route.
     */
    @JvmName("ufmwktdywiogoewd")
    public suspend fun direction(`value`: Output>) {
        this.direction = value
    }

    /**
     * @param value Name of the route.
     */
    @JvmName("hqwnruuwawqurbbs")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Qos for MQTT connection.
     */
    @JvmName("wjfncxxaemcvvoak")
    public suspend fun qos(`value`: Output) {
        this.qos = value
    }

    /**
     * @param value Shared subscription topic details.
     */
    @JvmName("hohhwyoepjxatugx")
    public suspend fun sharedSubscription(`value`: Output) {
        this.sharedSubscription = value
    }

    /**
     * @param value Source topic of the route.
     */
    @JvmName("pncvknabcfmhchco")
    public suspend fun source(`value`: Output) {
        this.source = value
    }

    /**
     * @param value Target topic of the route. Ignore if same as source
     */
    @JvmName("dswnkqushbymdgtn")
    public suspend fun target(`value`: Output) {
        this.target = value
    }

    /**
     * @param value Direction of the route.
     */
    @JvmName("wswnywgrilansyar")
    public suspend fun direction(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.direction = mapped
    }

    /**
     * @param value Direction of the route.
     */
    @JvmName("bevptgryoknrowux")
    public fun direction(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.direction = mapped
    }

    /**
     * @param value Direction of the route.
     */
    @JvmName("xskllplksnowscqb")
    public fun direction(`value`: MqttBridgeRouteDirection) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.direction = mapped
    }

    /**
     * @param value Name of the route.
     */
    @JvmName("iklwfvorxbwluofg")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Qos for MQTT connection.
     */
    @JvmName("syoedybosievrfrs")
    public suspend fun qos(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.qos = mapped
    }

    /**
     * @param value Shared subscription topic details.
     */
    @JvmName("vtqqpyjkbbbagcfs")
    public suspend fun sharedSubscription(`value`: MqttBridgeRouteSharedSubscriptionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sharedSubscription = mapped
    }

    /**
     * @param argument Shared subscription topic details.
     */
    @JvmName("pkuhioyigjfcwqvu")
    public suspend fun sharedSubscription(argument: suspend MqttBridgeRouteSharedSubscriptionArgsBuilder.() -> Unit) {
        val toBeMapped = MqttBridgeRouteSharedSubscriptionArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.sharedSubscription = mapped
    }

    /**
     * @param value Source topic of the route.
     */
    @JvmName("djbowyubkghoglyt")
    public suspend fun source(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.source = mapped
    }

    /**
     * @param value Target topic of the route. Ignore if same as source
     */
    @JvmName("bvqxqlhkxilbchgu")
    public suspend fun target(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.target = mapped
    }

    internal fun build(): MqttBridgeRoutesArgs = MqttBridgeRoutesArgs(
        direction = direction ?: throw PulumiNullFieldException("direction"),
        name = name ?: throw PulumiNullFieldException("name"),
        qos = qos,
        sharedSubscription = sharedSubscription,
        source = source ?: throw PulumiNullFieldException("source"),
        target = target,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy