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

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

package com.pulumi.gcp.storage.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.storage.inputs.BucketLifecycleRuleArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property action The Lifecycle Rule's action configuration. A single block of this type is supported. Structure is documented below.
 * @property condition The Lifecycle Rule's condition configuration. A single block of this type is supported. Structure is documented below.
 */
public data class BucketLifecycleRuleArgs(
    public val action: Output,
    public val condition: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.storage.inputs.BucketLifecycleRuleArgs =
        com.pulumi.gcp.storage.inputs.BucketLifecycleRuleArgs.builder()
            .action(action.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .condition(condition.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [BucketLifecycleRuleArgs].
 */
@PulumiTagMarker
public class BucketLifecycleRuleArgsBuilder internal constructor() {
    private var action: Output? = null

    private var condition: Output? = null

    /**
     * @param value The Lifecycle Rule's action configuration. A single block of this type is supported. Structure is documented below.
     */
    @JvmName("njljrkkqxxerqoin")
    public suspend fun action(`value`: Output) {
        this.action = value
    }

    /**
     * @param value The Lifecycle Rule's condition configuration. A single block of this type is supported. Structure is documented below.
     */
    @JvmName("ioevtwonqtbmexbe")
    public suspend fun condition(`value`: Output) {
        this.condition = value
    }

    /**
     * @param value The Lifecycle Rule's action configuration. A single block of this type is supported. Structure is documented below.
     */
    @JvmName("glvtuhqhcpwlaltx")
    public suspend fun action(`value`: BucketLifecycleRuleActionArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.action = mapped
    }

    /**
     * @param argument The Lifecycle Rule's action configuration. A single block of this type is supported. Structure is documented below.
     */
    @JvmName("giyxvxcabynvnsxr")
    public suspend fun action(argument: suspend BucketLifecycleRuleActionArgsBuilder.() -> Unit) {
        val toBeMapped = BucketLifecycleRuleActionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.action = mapped
    }

    /**
     * @param value The Lifecycle Rule's condition configuration. A single block of this type is supported. Structure is documented below.
     */
    @JvmName("rqkbmnbhbxtgklak")
    public suspend fun condition(`value`: BucketLifecycleRuleConditionArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.condition = mapped
    }

    /**
     * @param argument The Lifecycle Rule's condition configuration. A single block of this type is supported. Structure is documented below.
     */
    @JvmName("qjlrgudusirovfcu")
    public suspend fun condition(argument: suspend BucketLifecycleRuleConditionArgsBuilder.() -> Unit) {
        val toBeMapped = BucketLifecycleRuleConditionArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.condition = mapped
    }

    internal fun build(): BucketLifecycleRuleArgs = BucketLifecycleRuleArgs(
        action = action ?: throw PulumiNullFieldException("action"),
        condition = condition ?: throw PulumiNullFieldException("condition"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy