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

com.pulumi.aws.s3.kotlin.inputs.BucketV2LifecycleRuleArgs.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.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.s3.kotlin.inputs

import com.pulumi.aws.s3.inputs.BucketV2LifecycleRuleArgs.builder
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.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property abortIncompleteMultipartUploadDays Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
 * @property enabled Specifies lifecycle rule status.
 * @property expirations Specifies a period in the object's expire. See Expiration below for details.
 * @property id Unique identifier for the rule. Must be less than or equal to 255 characters in length.
 * @property noncurrentVersionExpirations Specifies when noncurrent object versions expire. See Noncurrent Version Expiration below for details.
 * @property noncurrentVersionTransitions Specifies when noncurrent object versions transitions. See Noncurrent Version Transition below for details.
 * @property prefix Object key prefix identifying one or more objects to which the rule applies.
 * @property tags Specifies object tags key and value.
 * @property transitions Specifies a period in the object's transitions. See Transition below for details.
 */
public data class BucketV2LifecycleRuleArgs(
    public val abortIncompleteMultipartUploadDays: Output? = null,
    public val enabled: Output,
    public val expirations: Output>? = null,
    public val id: Output? = null,
    public val noncurrentVersionExpirations: Output>? = null,
    public val noncurrentVersionTransitions: Output>? = null,
    public val prefix: Output? = null,
    public val tags: Output>? = null,
    public val transitions: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.s3.inputs.BucketV2LifecycleRuleArgs =
        com.pulumi.aws.s3.inputs.BucketV2LifecycleRuleArgs.builder()
            .abortIncompleteMultipartUploadDays(
                abortIncompleteMultipartUploadDays?.applyValue({ args0 ->
                    args0
                }),
            )
            .enabled(enabled.applyValue({ args0 -> args0 }))
            .expirations(
                expirations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .id(id?.applyValue({ args0 -> args0 }))
            .noncurrentVersionExpirations(
                noncurrentVersionExpirations?.applyValue({ args0 ->
                    args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .noncurrentVersionTransitions(
                noncurrentVersionTransitions?.applyValue({ args0 ->
                    args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .prefix(prefix?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .transitions(
                transitions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [BucketV2LifecycleRuleArgs].
 */
@PulumiTagMarker
public class BucketV2LifecycleRuleArgsBuilder internal constructor() {
    private var abortIncompleteMultipartUploadDays: Output? = null

    private var enabled: Output? = null

    private var expirations: Output>? = null

    private var id: Output? = null

    private var noncurrentVersionExpirations:
        Output>? = null

    private var noncurrentVersionTransitions:
        Output>? = null

    private var prefix: Output? = null

    private var tags: Output>? = null

    private var transitions: Output>? = null

    /**
     * @param value Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
     */
    @JvmName("gedrjdxmwouwoqvj")
    public suspend fun abortIncompleteMultipartUploadDays(`value`: Output) {
        this.abortIncompleteMultipartUploadDays = value
    }

    /**
     * @param value Specifies lifecycle rule status.
     */
    @JvmName("xtcmevrvbqmrhldu")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value Specifies a period in the object's expire. See Expiration below for details.
     */
    @JvmName("okcneevxdjqbfpmo")
    public suspend fun expirations(`value`: Output>) {
        this.expirations = value
    }

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

    /**
     * @param values Specifies a period in the object's expire. See Expiration below for details.
     */
    @JvmName("exuynbvmdxhwyycl")
    public suspend fun expirations(values: List>) {
        this.expirations = Output.all(values)
    }

    /**
     * @param value Unique identifier for the rule. Must be less than or equal to 255 characters in length.
     */
    @JvmName("tptqurljxiqejrxt")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value Specifies when noncurrent object versions expire. See Noncurrent Version Expiration below for details.
     */
    @JvmName("gluessquyrdcyxdo")
    public suspend fun noncurrentVersionExpirations(`value`: Output>) {
        this.noncurrentVersionExpirations = value
    }

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

    /**
     * @param values Specifies when noncurrent object versions expire. See Noncurrent Version Expiration below for details.
     */
    @JvmName("axeophkonimsweuv")
    public suspend fun noncurrentVersionExpirations(values: List>) {
        this.noncurrentVersionExpirations = Output.all(values)
    }

    /**
     * @param value Specifies when noncurrent object versions transitions. See Noncurrent Version Transition below for details.
     */
    @JvmName("ttcialxsvdhbrequ")
    public suspend fun noncurrentVersionTransitions(`value`: Output>) {
        this.noncurrentVersionTransitions = value
    }

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

    /**
     * @param values Specifies when noncurrent object versions transitions. See Noncurrent Version Transition below for details.
     */
    @JvmName("nhjdwuwbvtiqrjhq")
    public suspend fun noncurrentVersionTransitions(values: List>) {
        this.noncurrentVersionTransitions = Output.all(values)
    }

    /**
     * @param value Object key prefix identifying one or more objects to which the rule applies.
     */
    @JvmName("hagyqfnudnlekdxh")
    public suspend fun prefix(`value`: Output) {
        this.prefix = value
    }

    /**
     * @param value Specifies object tags key and value.
     */
    @JvmName("gvwxhahtsppdsvoq")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Specifies a period in the object's transitions. See Transition below for details.
     */
    @JvmName("ahfdtaggcjgbsujx")
    public suspend fun transitions(`value`: Output>) {
        this.transitions = value
    }

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

    /**
     * @param values Specifies a period in the object's transitions. See Transition below for details.
     */
    @JvmName("ultjismjpnuiexov")
    public suspend fun transitions(values: List>) {
        this.transitions = Output.all(values)
    }

    /**
     * @param value Specifies the number of days after initiating a multipart upload when the multipart upload must be completed.
     */
    @JvmName("tjgsfgvjeptggkjj")
    public suspend fun abortIncompleteMultipartUploadDays(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.abortIncompleteMultipartUploadDays = mapped
    }

    /**
     * @param value Specifies lifecycle rule status.
     */
    @JvmName("cwcstrccaxmvvtlb")
    public suspend fun enabled(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value Specifies a period in the object's expire. See Expiration below for details.
     */
    @JvmName("noytusfvlscbwjbg")
    public suspend fun expirations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.expirations = mapped
    }

    /**
     * @param argument Specifies a period in the object's expire. See Expiration below for details.
     */
    @JvmName("yvculcudgpnphypo")
    public suspend fun expirations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BucketV2LifecycleRuleExpirationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.expirations = mapped
    }

    /**
     * @param argument Specifies a period in the object's expire. See Expiration below for details.
     */
    @JvmName("jckcedaloqlqgfor")
    public suspend fun expirations(vararg argument: suspend BucketV2LifecycleRuleExpirationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BucketV2LifecycleRuleExpirationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.expirations = mapped
    }

    /**
     * @param argument Specifies a period in the object's expire. See Expiration below for details.
     */
    @JvmName("hrmoohxoccnubkud")
    public suspend fun expirations(argument: suspend BucketV2LifecycleRuleExpirationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            BucketV2LifecycleRuleExpirationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.expirations = mapped
    }

    /**
     * @param values Specifies a period in the object's expire. See Expiration below for details.
     */
    @JvmName("wnosqmxtbftbvtio")
    public suspend fun expirations(vararg values: BucketV2LifecycleRuleExpirationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.expirations = mapped
    }

    /**
     * @param value Unique identifier for the rule. Must be less than or equal to 255 characters in length.
     */
    @JvmName("hxtlgipmjdarxcec")
    public suspend fun id(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value Specifies when noncurrent object versions expire. See Noncurrent Version Expiration below for details.
     */
    @JvmName("peocajjivbuuvaix")
    public suspend fun noncurrentVersionExpirations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noncurrentVersionExpirations = mapped
    }

    /**
     * @param argument Specifies when noncurrent object versions expire. See Noncurrent Version Expiration below for details.
     */
    @JvmName("wbtrcaqsfoatnefh")
    public suspend fun noncurrentVersionExpirations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BucketV2LifecycleRuleNoncurrentVersionExpirationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.noncurrentVersionExpirations = mapped
    }

    /**
     * @param argument Specifies when noncurrent object versions expire. See Noncurrent Version Expiration below for details.
     */
    @JvmName("ekflfforvmtthhha")
    public suspend fun noncurrentVersionExpirations(vararg argument: suspend BucketV2LifecycleRuleNoncurrentVersionExpirationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BucketV2LifecycleRuleNoncurrentVersionExpirationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.noncurrentVersionExpirations = mapped
    }

    /**
     * @param argument Specifies when noncurrent object versions expire. See Noncurrent Version Expiration below for details.
     */
    @JvmName("twtdblypufsgrvjk")
    public suspend fun noncurrentVersionExpirations(argument: suspend BucketV2LifecycleRuleNoncurrentVersionExpirationArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                BucketV2LifecycleRuleNoncurrentVersionExpirationArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.noncurrentVersionExpirations = mapped
    }

    /**
     * @param values Specifies when noncurrent object versions expire. See Noncurrent Version Expiration below for details.
     */
    @JvmName("admwleljujdsmirb")
    public suspend fun noncurrentVersionExpirations(vararg values: BucketV2LifecycleRuleNoncurrentVersionExpirationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.noncurrentVersionExpirations = mapped
    }

    /**
     * @param value Specifies when noncurrent object versions transitions. See Noncurrent Version Transition below for details.
     */
    @JvmName("xelbmmqdumwacoss")
    public suspend fun noncurrentVersionTransitions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noncurrentVersionTransitions = mapped
    }

    /**
     * @param argument Specifies when noncurrent object versions transitions. See Noncurrent Version Transition below for details.
     */
    @JvmName("cpfbwbnbdgfjmuka")
    public suspend fun noncurrentVersionTransitions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BucketV2LifecycleRuleNoncurrentVersionTransitionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.noncurrentVersionTransitions = mapped
    }

    /**
     * @param argument Specifies when noncurrent object versions transitions. See Noncurrent Version Transition below for details.
     */
    @JvmName("ukostoyxngtwfdke")
    public suspend fun noncurrentVersionTransitions(vararg argument: suspend BucketV2LifecycleRuleNoncurrentVersionTransitionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BucketV2LifecycleRuleNoncurrentVersionTransitionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.noncurrentVersionTransitions = mapped
    }

    /**
     * @param argument Specifies when noncurrent object versions transitions. See Noncurrent Version Transition below for details.
     */
    @JvmName("txpmvrhjkvcvndik")
    public suspend fun noncurrentVersionTransitions(argument: suspend BucketV2LifecycleRuleNoncurrentVersionTransitionArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                BucketV2LifecycleRuleNoncurrentVersionTransitionArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.noncurrentVersionTransitions = mapped
    }

    /**
     * @param values Specifies when noncurrent object versions transitions. See Noncurrent Version Transition below for details.
     */
    @JvmName("cimvvhmrwyrdogli")
    public suspend fun noncurrentVersionTransitions(vararg values: BucketV2LifecycleRuleNoncurrentVersionTransitionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.noncurrentVersionTransitions = mapped
    }

    /**
     * @param value Object key prefix identifying one or more objects to which the rule applies.
     */
    @JvmName("pcxyonkbnwbfmjne")
    public suspend fun prefix(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.prefix = mapped
    }

    /**
     * @param value Specifies object tags key and value.
     */
    @JvmName("sxycvglouqdiqvxp")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Specifies object tags key and value.
     */
    @JvmName("qxgqxgandvxmuesm")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Specifies a period in the object's transitions. See Transition below for details.
     */
    @JvmName("khqjjjltjuegpdid")
    public suspend fun transitions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.transitions = mapped
    }

    /**
     * @param argument Specifies a period in the object's transitions. See Transition below for details.
     */
    @JvmName("wvypavwgewsenfmd")
    public suspend fun transitions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BucketV2LifecycleRuleTransitionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.transitions = mapped
    }

    /**
     * @param argument Specifies a period in the object's transitions. See Transition below for details.
     */
    @JvmName("kgckjqlojhanhytq")
    public suspend fun transitions(vararg argument: suspend BucketV2LifecycleRuleTransitionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BucketV2LifecycleRuleTransitionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.transitions = mapped
    }

    /**
     * @param argument Specifies a period in the object's transitions. See Transition below for details.
     */
    @JvmName("cwqauwkqwtoxrvfa")
    public suspend fun transitions(argument: suspend BucketV2LifecycleRuleTransitionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            BucketV2LifecycleRuleTransitionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.transitions = mapped
    }

    /**
     * @param values Specifies a period in the object's transitions. See Transition below for details.
     */
    @JvmName("xmcuhhwqxqpukwgb")
    public suspend fun transitions(vararg values: BucketV2LifecycleRuleTransitionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.transitions = mapped
    }

    internal fun build(): BucketV2LifecycleRuleArgs = BucketV2LifecycleRuleArgs(
        abortIncompleteMultipartUploadDays = abortIncompleteMultipartUploadDays,
        enabled = enabled ?: throw PulumiNullFieldException("enabled"),
        expirations = expirations,
        id = id,
        noncurrentVersionExpirations = noncurrentVersionExpirations,
        noncurrentVersionTransitions = noncurrentVersionTransitions,
        prefix = prefix,
        tags = tags,
        transitions = transitions,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy