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

com.pulumi.azure.iot.kotlin.inputs.IoTHubRouteArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.iot.kotlin.inputs

import com.pulumi.azure.iot.inputs.IoTHubRouteArgs.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 kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property condition The condition that is evaluated to apply the routing rule. Defaults to `true`. For grammar, see: .
 * @property enabled Used to specify whether a route is enabled.
 * @property endpointNames The list of endpoints to which messages that satisfy the condition are routed.
 * @property name The name of the route.
 * @property source The source that the routing rule is to be applied to, such as `DeviceMessages`. Possible values include: `Invalid`, `DeviceMessages`, `TwinChangeEvents`, `DeviceLifecycleEvents`, `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents` and `DigitalTwinChangeEvents`.
 */
public data class IoTHubRouteArgs(
    public val condition: Output? = null,
    public val enabled: Output,
    public val endpointNames: Output>,
    public val name: Output,
    public val source: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.iot.inputs.IoTHubRouteArgs =
        com.pulumi.azure.iot.inputs.IoTHubRouteArgs.builder()
            .condition(condition?.applyValue({ args0 -> args0 }))
            .enabled(enabled.applyValue({ args0 -> args0 }))
            .endpointNames(endpointNames.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .name(name.applyValue({ args0 -> args0 }))
            .source(source.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [IoTHubRouteArgs].
 */
@PulumiTagMarker
public class IoTHubRouteArgsBuilder internal constructor() {
    private var condition: Output? = null

    private var enabled: Output? = null

    private var endpointNames: Output>? = null

    private var name: Output? = null

    private var source: Output? = null

    /**
     * @param value The condition that is evaluated to apply the routing rule. Defaults to `true`. For grammar, see: .
     */
    @JvmName("dajrcfbakajttpgo")
    public suspend fun condition(`value`: Output) {
        this.condition = value
    }

    /**
     * @param value Used to specify whether a route is enabled.
     */
    @JvmName("qehybciftlbmpgye")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value The list of endpoints to which messages that satisfy the condition are routed.
     */
    @JvmName("pnlyjvpndcmvppcj")
    public suspend fun endpointNames(`value`: Output>) {
        this.endpointNames = value
    }

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

    /**
     * @param values The list of endpoints to which messages that satisfy the condition are routed.
     */
    @JvmName("xfcnfbgjeqwxtorp")
    public suspend fun endpointNames(values: List>) {
        this.endpointNames = Output.all(values)
    }

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

    /**
     * @param value The source that the routing rule is to be applied to, such as `DeviceMessages`. Possible values include: `Invalid`, `DeviceMessages`, `TwinChangeEvents`, `DeviceLifecycleEvents`, `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents` and `DigitalTwinChangeEvents`.
     */
    @JvmName("qftwhkbuvqkngblm")
    public suspend fun source(`value`: Output) {
        this.source = value
    }

    /**
     * @param value The condition that is evaluated to apply the routing rule. Defaults to `true`. For grammar, see: .
     */
    @JvmName("vgivoutvegievrey")
    public suspend fun condition(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.condition = mapped
    }

    /**
     * @param value Used to specify whether a route is enabled.
     */
    @JvmName("uiybbgkflcuvbpoi")
    public suspend fun enabled(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value The list of endpoints to which messages that satisfy the condition are routed.
     */
    @JvmName("retkqjbchciugnfl")
    public suspend fun endpointNames(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.endpointNames = mapped
    }

    /**
     * @param values The list of endpoints to which messages that satisfy the condition are routed.
     */
    @JvmName("obkysprwckkdpfow")
    public suspend fun endpointNames(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.endpointNames = mapped
    }

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

    /**
     * @param value The source that the routing rule is to be applied to, such as `DeviceMessages`. Possible values include: `Invalid`, `DeviceMessages`, `TwinChangeEvents`, `DeviceLifecycleEvents`, `DeviceConnectionStateEvents`, `DeviceJobLifecycleEvents` and `DigitalTwinChangeEvents`.
     */
    @JvmName("ajscinhdtqoakcpa")
    public suspend fun source(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.source = mapped
    }

    internal fun build(): IoTHubRouteArgs = IoTHubRouteArgs(
        condition = condition,
        enabled = enabled ?: throw PulumiNullFieldException("enabled"),
        endpointNames = endpointNames ?: throw PulumiNullFieldException("endpointNames"),
        name = name ?: throw PulumiNullFieldException("name"),
        source = source ?: throw PulumiNullFieldException("source"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy