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

com.pulumi.azurenative.devices.kotlin.inputs.RoutingPropertiesArgs.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.devices.kotlin.inputs

import com.pulumi.azurenative.devices.inputs.RoutingPropertiesArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * The routing related properties of the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging
 * @property endpoints The properties related to the custom endpoints to which your IoT hub routes messages based on the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs and only 1 custom endpoint is allowed across all endpoint types for free hubs.
 * @property enrichments The list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. See: https://aka.ms/telemetryoneventgrid
 * @property fallbackRoute The properties of the route that is used as a fall-back route when none of the conditions specified in the 'routes' section are met. This is an optional parameter. When this property is not set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint.
 * @property routes The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs.
 */
public data class RoutingPropertiesArgs(
    public val endpoints: Output? = null,
    public val enrichments: Output>? = null,
    public val fallbackRoute: Output? = null,
    public val routes: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.devices.inputs.RoutingPropertiesArgs =
        com.pulumi.azurenative.devices.inputs.RoutingPropertiesArgs.builder()
            .endpoints(endpoints?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .enrichments(
                enrichments?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .fallbackRoute(fallbackRoute?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .routes(
                routes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [RoutingPropertiesArgs].
 */
@PulumiTagMarker
public class RoutingPropertiesArgsBuilder internal constructor() {
    private var endpoints: Output? = null

    private var enrichments: Output>? = null

    private var fallbackRoute: Output? = null

    private var routes: Output>? = null

    /**
     * @param value The properties related to the custom endpoints to which your IoT hub routes messages based on the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs and only 1 custom endpoint is allowed across all endpoint types for free hubs.
     */
    @JvmName("oluhvfmwoxexlgpf")
    public suspend fun endpoints(`value`: Output) {
        this.endpoints = value
    }

    /**
     * @param value The list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. See: https://aka.ms/telemetryoneventgrid
     */
    @JvmName("hywssmkkrokxadrp")
    public suspend fun enrichments(`value`: Output>) {
        this.enrichments = value
    }

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

    /**
     * @param values The list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. See: https://aka.ms/telemetryoneventgrid
     */
    @JvmName("krudhguijaqsmqqi")
    public suspend fun enrichments(values: List>) {
        this.enrichments = Output.all(values)
    }

    /**
     * @param value The properties of the route that is used as a fall-back route when none of the conditions specified in the 'routes' section are met. This is an optional parameter. When this property is not set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint.
     */
    @JvmName("layggkqnwlaljtte")
    public suspend fun fallbackRoute(`value`: Output) {
        this.fallbackRoute = value
    }

    /**
     * @param value The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs.
     */
    @JvmName("ttiowhacassgyear")
    public suspend fun routes(`value`: Output>) {
        this.routes = value
    }

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

    /**
     * @param values The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs.
     */
    @JvmName("qiidrvtwcicseiwt")
    public suspend fun routes(values: List>) {
        this.routes = Output.all(values)
    }

    /**
     * @param value The properties related to the custom endpoints to which your IoT hub routes messages based on the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs and only 1 custom endpoint is allowed across all endpoint types for free hubs.
     */
    @JvmName("hofdnjlxbxxhdrsm")
    public suspend fun endpoints(`value`: RoutingEndpointsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.endpoints = mapped
    }

    /**
     * @param argument The properties related to the custom endpoints to which your IoT hub routes messages based on the routing rules. A maximum of 10 custom endpoints are allowed across all endpoint types for paid hubs and only 1 custom endpoint is allowed across all endpoint types for free hubs.
     */
    @JvmName("dqpvhmhcjqvjyrqo")
    public suspend fun endpoints(argument: suspend RoutingEndpointsArgsBuilder.() -> Unit) {
        val toBeMapped = RoutingEndpointsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.endpoints = mapped
    }

    /**
     * @param value The list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. See: https://aka.ms/telemetryoneventgrid
     */
    @JvmName("ctwgtqqgqtukjojt")
    public suspend fun enrichments(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enrichments = mapped
    }

    /**
     * @param argument The list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. See: https://aka.ms/telemetryoneventgrid
     */
    @JvmName("reogkttppidrgace")
    public suspend fun enrichments(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            EnrichmentPropertiesArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.enrichments = mapped
    }

    /**
     * @param argument The list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. See: https://aka.ms/telemetryoneventgrid
     */
    @JvmName("epowmsjbplhjsneq")
    public suspend fun enrichments(vararg argument: suspend EnrichmentPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            EnrichmentPropertiesArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.enrichments = mapped
    }

    /**
     * @param argument The list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. See: https://aka.ms/telemetryoneventgrid
     */
    @JvmName("yisyrsfdjkmrbems")
    public suspend fun enrichments(argument: suspend EnrichmentPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(EnrichmentPropertiesArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.enrichments = mapped
    }

    /**
     * @param values The list of user-provided enrichments that the IoT hub applies to messages to be delivered to built-in and custom endpoints. See: https://aka.ms/telemetryoneventgrid
     */
    @JvmName("qyxmgyfkbmqfjtyu")
    public suspend fun enrichments(vararg values: EnrichmentPropertiesArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enrichments = mapped
    }

    /**
     * @param value The properties of the route that is used as a fall-back route when none of the conditions specified in the 'routes' section are met. This is an optional parameter. When this property is not set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint.
     */
    @JvmName("olamgjbwatvnewjp")
    public suspend fun fallbackRoute(`value`: FallbackRoutePropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fallbackRoute = mapped
    }

    /**
     * @param argument The properties of the route that is used as a fall-back route when none of the conditions specified in the 'routes' section are met. This is an optional parameter. When this property is not set, the messages which do not meet any of the conditions specified in the 'routes' section get routed to the built-in eventhub endpoint.
     */
    @JvmName("wgcixyshsuchjdcy")
    public suspend fun fallbackRoute(argument: suspend FallbackRoutePropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = FallbackRoutePropertiesArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.fallbackRoute = mapped
    }

    /**
     * @param value The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs.
     */
    @JvmName("xifjositfqpmemnj")
    public suspend fun routes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.routes = mapped
    }

    /**
     * @param argument The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs.
     */
    @JvmName("gbrhblquejejmfpl")
    public suspend fun routes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RoutePropertiesArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.routes = mapped
    }

    /**
     * @param argument The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs.
     */
    @JvmName("auhuunaoopxdceup")
    public suspend fun routes(vararg argument: suspend RoutePropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RoutePropertiesArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.routes = mapped
    }

    /**
     * @param argument The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs.
     */
    @JvmName("fmcqmqkrkcvvbvji")
    public suspend fun routes(argument: suspend RoutePropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(RoutePropertiesArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.routes = mapped
    }

    /**
     * @param values The list of user-provided routing rules that the IoT hub uses to route messages to built-in and custom endpoints. A maximum of 100 routing rules are allowed for paid hubs and a maximum of 5 routing rules are allowed for free hubs.
     */
    @JvmName("bpyqytwejkrhfreg")
    public suspend fun routes(vararg values: RoutePropertiesArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.routes = mapped
    }

    internal fun build(): RoutingPropertiesArgs = RoutingPropertiesArgs(
        endpoints = endpoints,
        enrichments = enrichments,
        fallbackRoute = fallbackRoute,
        routes = routes,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy