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

com.pulumi.azurenative.iotoperations.kotlin.inputs.TlsCertMethodArgs.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.iotoperations.kotlin.inputs

import com.pulumi.azurenative.iotoperations.inputs.TlsCertMethodArgs.builder
import com.pulumi.azurenative.iotoperations.kotlin.enums.TlsCertMethodMode
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Collection of different TLS types, NOTE- Enum at a time only one of them needs to be supported
 * @property automatic Option 1 - Automatic TLS server certificate management with cert-manager.
 * @property manual Option 2 - Manual TLS server certificate management through a defined secret.
 * @property mode Mode of TLS server certificate management.
 */
public data class TlsCertMethodArgs(
    public val automatic: Output? = null,
    public val manual: Output? = null,
    public val mode: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.iotoperations.inputs.TlsCertMethodArgs =
        com.pulumi.azurenative.iotoperations.inputs.TlsCertMethodArgs.builder()
            .automatic(automatic?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .manual(manual?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .mode(
                mode.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [TlsCertMethodArgs].
 */
@PulumiTagMarker
public class TlsCertMethodArgsBuilder internal constructor() {
    private var automatic: Output? = null

    private var manual: Output? = null

    private var mode: Output>? = null

    /**
     * @param value Option 1 - Automatic TLS server certificate management with cert-manager.
     */
    @JvmName("jffgiomhxulxrksv")
    public suspend fun automatic(`value`: Output) {
        this.automatic = value
    }

    /**
     * @param value Option 2 - Manual TLS server certificate management through a defined secret.
     */
    @JvmName("xbouleuemkeoevgi")
    public suspend fun manual(`value`: Output) {
        this.manual = value
    }

    /**
     * @param value Mode of TLS server certificate management.
     */
    @JvmName("rglnrgjcekjlprkx")
    public suspend fun mode(`value`: Output>) {
        this.mode = value
    }

    /**
     * @param value Option 1 - Automatic TLS server certificate management with cert-manager.
     */
    @JvmName("qaktisxeomgdagjr")
    public suspend fun automatic(`value`: AutomaticCertMethodArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.automatic = mapped
    }

    /**
     * @param argument Option 1 - Automatic TLS server certificate management with cert-manager.
     */
    @JvmName("dxpgxftetrfpexeg")
    public suspend fun automatic(argument: suspend AutomaticCertMethodArgsBuilder.() -> Unit) {
        val toBeMapped = AutomaticCertMethodArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.automatic = mapped
    }

    /**
     * @param value Option 2 - Manual TLS server certificate management through a defined secret.
     */
    @JvmName("hnyckpkhqypalblb")
    public suspend fun manual(`value`: X509ManualCertificateArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.manual = mapped
    }

    /**
     * @param argument Option 2 - Manual TLS server certificate management through a defined secret.
     */
    @JvmName("fbajdmqpnxeajubd")
    public suspend fun manual(argument: suspend X509ManualCertificateArgsBuilder.() -> Unit) {
        val toBeMapped = X509ManualCertificateArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.manual = mapped
    }

    /**
     * @param value Mode of TLS server certificate management.
     */
    @JvmName("luvljxnoeiwlveof")
    public suspend fun mode(`value`: Either) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value Mode of TLS server certificate management.
     */
    @JvmName("qmiqrgxncxexldag")
    public fun mode(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value Mode of TLS server certificate management.
     */
    @JvmName("mrvwcfiqrnvcepdw")
    public fun mode(`value`: TlsCertMethodMode) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    internal fun build(): TlsCertMethodArgs = TlsCertMethodArgs(
        automatic = automatic,
        manual = manual,
        mode = mode ?: throw PulumiNullFieldException("mode"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy