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

com.pulumi.gcp.clouddeploy.kotlin.inputs.AutomationRuleArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.clouddeploy.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.clouddeploy.inputs.AutomationRuleArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property advanceRolloutRule Optional. The `AdvanceRolloutRule` will automatically advance a successful Rollout.
 * Structure is documented below.
 * @property promoteReleaseRule Optional. `PromoteReleaseRule` will automatically promote a release from the current target to a specified target.
 * Structure is documented below.
 */
public data class AutomationRuleArgs(
    public val advanceRolloutRule: Output? = null,
    public val promoteReleaseRule: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.clouddeploy.inputs.AutomationRuleArgs =
        com.pulumi.gcp.clouddeploy.inputs.AutomationRuleArgs.builder()
            .advanceRolloutRule(
                advanceRolloutRule?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .promoteReleaseRule(
                promoteReleaseRule?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [AutomationRuleArgs].
 */
@PulumiTagMarker
public class AutomationRuleArgsBuilder internal constructor() {
    private var advanceRolloutRule: Output? = null

    private var promoteReleaseRule: Output? = null

    /**
     * @param value Optional. The `AdvanceRolloutRule` will automatically advance a successful Rollout.
     * Structure is documented below.
     */
    @JvmName("ejqxaytjbjlcokph")
    public suspend fun advanceRolloutRule(`value`: Output) {
        this.advanceRolloutRule = value
    }

    /**
     * @param value Optional. `PromoteReleaseRule` will automatically promote a release from the current target to a specified target.
     * Structure is documented below.
     */
    @JvmName("dnhrplwlihgoigbo")
    public suspend fun promoteReleaseRule(`value`: Output) {
        this.promoteReleaseRule = value
    }

    /**
     * @param value Optional. The `AdvanceRolloutRule` will automatically advance a successful Rollout.
     * Structure is documented below.
     */
    @JvmName("aaiegujjopamwfxy")
    public suspend fun advanceRolloutRule(`value`: AutomationRuleAdvanceRolloutRuleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.advanceRolloutRule = mapped
    }

    /**
     * @param argument Optional. The `AdvanceRolloutRule` will automatically advance a successful Rollout.
     * Structure is documented below.
     */
    @JvmName("pbvttvtijobhryxk")
    public suspend fun advanceRolloutRule(argument: suspend AutomationRuleAdvanceRolloutRuleArgsBuilder.() -> Unit) {
        val toBeMapped = AutomationRuleAdvanceRolloutRuleArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.advanceRolloutRule = mapped
    }

    /**
     * @param value Optional. `PromoteReleaseRule` will automatically promote a release from the current target to a specified target.
     * Structure is documented below.
     */
    @JvmName("ojyukhykbecswlcr")
    public suspend fun promoteReleaseRule(`value`: AutomationRulePromoteReleaseRuleArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.promoteReleaseRule = mapped
    }

    /**
     * @param argument Optional. `PromoteReleaseRule` will automatically promote a release from the current target to a specified target.
     * Structure is documented below.
     */
    @JvmName("dxaklpnmppowwbco")
    public suspend fun promoteReleaseRule(argument: suspend AutomationRulePromoteReleaseRuleArgsBuilder.() -> Unit) {
        val toBeMapped = AutomationRulePromoteReleaseRuleArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.promoteReleaseRule = mapped
    }

    internal fun build(): AutomationRuleArgs = AutomationRuleArgs(
        advanceRolloutRule = advanceRolloutRule,
        promoteReleaseRule = promoteReleaseRule,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy