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

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

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

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

/**
 *
 * @property defaultTtl The default time to live for cloud-to-device messages, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`.
 * @property feedbacks A `feedback` block as defined below.
 * @property maxDeliveryCount The maximum delivery count for cloud-to-device per-device queues. This value must be between `1` and `100`. Defaults to `10`.
 */
public data class IoTHubCloudToDeviceArgs(
    public val defaultTtl: Output? = null,
    public val feedbacks: Output>? = null,
    public val maxDeliveryCount: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.iot.inputs.IoTHubCloudToDeviceArgs =
        com.pulumi.azure.iot.inputs.IoTHubCloudToDeviceArgs.builder()
            .defaultTtl(defaultTtl?.applyValue({ args0 -> args0 }))
            .feedbacks(
                feedbacks?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .maxDeliveryCount(maxDeliveryCount?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [IoTHubCloudToDeviceArgs].
 */
@PulumiTagMarker
public class IoTHubCloudToDeviceArgsBuilder internal constructor() {
    private var defaultTtl: Output? = null

    private var feedbacks: Output>? = null

    private var maxDeliveryCount: Output? = null

    /**
     * @param value The default time to live for cloud-to-device messages, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`.
     */
    @JvmName("bgvmvlmkrxpbnkli")
    public suspend fun defaultTtl(`value`: Output) {
        this.defaultTtl = value
    }

    /**
     * @param value A `feedback` block as defined below.
     */
    @JvmName("oruaoiipvcpiohua")
    public suspend fun feedbacks(`value`: Output>) {
        this.feedbacks = value
    }

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

    /**
     * @param values A `feedback` block as defined below.
     */
    @JvmName("cjvhnpnqrhwhouxa")
    public suspend fun feedbacks(values: List>) {
        this.feedbacks = Output.all(values)
    }

    /**
     * @param value The maximum delivery count for cloud-to-device per-device queues. This value must be between `1` and `100`. Defaults to `10`.
     */
    @JvmName("wbbkepkdryqgrdog")
    public suspend fun maxDeliveryCount(`value`: Output) {
        this.maxDeliveryCount = value
    }

    /**
     * @param value The default time to live for cloud-to-device messages, specified as an [ISO 8601 timespan duration](https://en.wikipedia.org/wiki/ISO_8601#Durations). This value must be between 1 minute and 48 hours. Defaults to `PT1H`.
     */
    @JvmName("ahvivclqjnvtxsbh")
    public suspend fun defaultTtl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.defaultTtl = mapped
    }

    /**
     * @param value A `feedback` block as defined below.
     */
    @JvmName("vtwjumedexwxvlxo")
    public suspend fun feedbacks(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.feedbacks = mapped
    }

    /**
     * @param argument A `feedback` block as defined below.
     */
    @JvmName("hhroypwstpmilrlf")
    public suspend
    fun feedbacks(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            IoTHubCloudToDeviceFeedbackArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.feedbacks = mapped
    }

    /**
     * @param argument A `feedback` block as defined below.
     */
    @JvmName("fxgargetsqajyaca")
    public suspend fun feedbacks(
        vararg
        argument: suspend IoTHubCloudToDeviceFeedbackArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            IoTHubCloudToDeviceFeedbackArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.feedbacks = mapped
    }

    /**
     * @param argument A `feedback` block as defined below.
     */
    @JvmName("qlmhdiggncrubvfc")
    public suspend
    fun feedbacks(argument: suspend IoTHubCloudToDeviceFeedbackArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            IoTHubCloudToDeviceFeedbackArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.feedbacks = mapped
    }

    /**
     * @param values A `feedback` block as defined below.
     */
    @JvmName("pnticgdvbnltkfxq")
    public suspend fun feedbacks(vararg values: IoTHubCloudToDeviceFeedbackArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.feedbacks = mapped
    }

    /**
     * @param value The maximum delivery count for cloud-to-device per-device queues. This value must be between `1` and `100`. Defaults to `10`.
     */
    @JvmName("pvutbaafyiswiboj")
    public suspend fun maxDeliveryCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxDeliveryCount = mapped
    }

    internal fun build(): IoTHubCloudToDeviceArgs = IoTHubCloudToDeviceArgs(
        defaultTtl = defaultTtl,
        feedbacks = feedbacks,
        maxDeliveryCount = maxDeliveryCount,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy