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

com.pulumi.gcp.storage.kotlin.inputs.BucketLifecycleRuleConditionArgs.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.BucketLifecycleRuleConditionArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property age Minimum age of an object in days to satisfy this condition. If not supplied alongside another condition and without setting `no_age` to `true`, a default `age` of 0 will be set.
 * @property createdBefore A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when an object is created before midnight of the specified date in UTC.
 * @property customTimeBefore A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when the customTime metadata for the object is set to an earlier date than the date used in this lifecycle condition.
 * @property daysSinceCustomTime Number of days elapsed since the user-specified timestamp set on an object.
 * @property daysSinceNoncurrentTime Number of days elapsed since the noncurrent timestamp of an object. This
 * 										condition is relevant only for versioned objects.
 * @property matchesPrefixes One or more matching name prefixes to satisfy this condition.
 * @property matchesStorageClasses [Storage Class](https://cloud.google.com/storage/docs/storage-classes) of objects to satisfy this condition. Supported values include: `STANDARD`, `MULTI_REGIONAL`, `REGIONAL`, `NEARLINE`, `COLDLINE`, `ARCHIVE`, `DURABLE_REDUCED_AVAILABILITY`.
 * @property matchesSuffixes One or more matching name suffixes to satisfy this condition.
 * @property noAge While set `true`, `age` value will be omitted from requests. This prevents a default age of `0` from being applied, and if you do not have an `age` value set, setting this to `true` is strongly recommended. When unset and other conditions are set to zero values, this can result in a rule that applies your action to all files in the bucket.
 * @property noncurrentTimeBefore Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
 * @property numNewerVersions Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
 * @property withState Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: `"LIVE"`, `"ARCHIVED"`, `"ANY"`.
 */
public data class BucketLifecycleRuleConditionArgs(
    public val age: Output? = null,
    public val createdBefore: Output? = null,
    public val customTimeBefore: Output? = null,
    public val daysSinceCustomTime: Output? = null,
    public val daysSinceNoncurrentTime: Output? = null,
    public val matchesPrefixes: Output>? = null,
    public val matchesStorageClasses: Output>? = null,
    public val matchesSuffixes: Output>? = null,
    public val noAge: Output? = null,
    public val noncurrentTimeBefore: Output? = null,
    public val numNewerVersions: Output? = null,
    public val withState: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.storage.inputs.BucketLifecycleRuleConditionArgs =
        com.pulumi.gcp.storage.inputs.BucketLifecycleRuleConditionArgs.builder()
            .age(age?.applyValue({ args0 -> args0 }))
            .createdBefore(createdBefore?.applyValue({ args0 -> args0 }))
            .customTimeBefore(customTimeBefore?.applyValue({ args0 -> args0 }))
            .daysSinceCustomTime(daysSinceCustomTime?.applyValue({ args0 -> args0 }))
            .daysSinceNoncurrentTime(daysSinceNoncurrentTime?.applyValue({ args0 -> args0 }))
            .matchesPrefixes(matchesPrefixes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .matchesStorageClasses(matchesStorageClasses?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .matchesSuffixes(matchesSuffixes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .noAge(noAge?.applyValue({ args0 -> args0 }))
            .noncurrentTimeBefore(noncurrentTimeBefore?.applyValue({ args0 -> args0 }))
            .numNewerVersions(numNewerVersions?.applyValue({ args0 -> args0 }))
            .withState(withState?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BucketLifecycleRuleConditionArgs].
 */
@PulumiTagMarker
public class BucketLifecycleRuleConditionArgsBuilder internal constructor() {
    private var age: Output? = null

    private var createdBefore: Output? = null

    private var customTimeBefore: Output? = null

    private var daysSinceCustomTime: Output? = null

    private var daysSinceNoncurrentTime: Output? = null

    private var matchesPrefixes: Output>? = null

    private var matchesStorageClasses: Output>? = null

    private var matchesSuffixes: Output>? = null

    private var noAge: Output? = null

    private var noncurrentTimeBefore: Output? = null

    private var numNewerVersions: Output? = null

    private var withState: Output? = null

    /**
     * @param value Minimum age of an object in days to satisfy this condition. If not supplied alongside another condition and without setting `no_age` to `true`, a default `age` of 0 will be set.
     */
    @JvmName("elrddbwhykyaelbt")
    public suspend fun age(`value`: Output) {
        this.age = value
    }

    /**
     * @param value A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when an object is created before midnight of the specified date in UTC.
     */
    @JvmName("giugisjvafnxhsoa")
    public suspend fun createdBefore(`value`: Output) {
        this.createdBefore = value
    }

    /**
     * @param value A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when the customTime metadata for the object is set to an earlier date than the date used in this lifecycle condition.
     */
    @JvmName("kyrfubcyiyypapmt")
    public suspend fun customTimeBefore(`value`: Output) {
        this.customTimeBefore = value
    }

    /**
     * @param value Number of days elapsed since the user-specified timestamp set on an object.
     */
    @JvmName("swmyrtgpstqnujxy")
    public suspend fun daysSinceCustomTime(`value`: Output) {
        this.daysSinceCustomTime = value
    }

    /**
     * @param value Number of days elapsed since the noncurrent timestamp of an object. This
     * 										condition is relevant only for versioned objects.
     */
    @JvmName("gcmjqecclkdlvjlm")
    public suspend fun daysSinceNoncurrentTime(`value`: Output) {
        this.daysSinceNoncurrentTime = value
    }

    /**
     * @param value One or more matching name prefixes to satisfy this condition.
     */
    @JvmName("lxjesudrvpvudmpb")
    public suspend fun matchesPrefixes(`value`: Output>) {
        this.matchesPrefixes = value
    }

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

    /**
     * @param values One or more matching name prefixes to satisfy this condition.
     */
    @JvmName("odmqorledlrwimcu")
    public suspend fun matchesPrefixes(values: List>) {
        this.matchesPrefixes = Output.all(values)
    }

    /**
     * @param value [Storage Class](https://cloud.google.com/storage/docs/storage-classes) of objects to satisfy this condition. Supported values include: `STANDARD`, `MULTI_REGIONAL`, `REGIONAL`, `NEARLINE`, `COLDLINE`, `ARCHIVE`, `DURABLE_REDUCED_AVAILABILITY`.
     */
    @JvmName("abimsuffbdwtnmut")
    public suspend fun matchesStorageClasses(`value`: Output>) {
        this.matchesStorageClasses = value
    }

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

    /**
     * @param values [Storage Class](https://cloud.google.com/storage/docs/storage-classes) of objects to satisfy this condition. Supported values include: `STANDARD`, `MULTI_REGIONAL`, `REGIONAL`, `NEARLINE`, `COLDLINE`, `ARCHIVE`, `DURABLE_REDUCED_AVAILABILITY`.
     */
    @JvmName("hopbspdlwuqeabas")
    public suspend fun matchesStorageClasses(values: List>) {
        this.matchesStorageClasses = Output.all(values)
    }

    /**
     * @param value One or more matching name suffixes to satisfy this condition.
     */
    @JvmName("qnusuatqttjauwdk")
    public suspend fun matchesSuffixes(`value`: Output>) {
        this.matchesSuffixes = value
    }

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

    /**
     * @param values One or more matching name suffixes to satisfy this condition.
     */
    @JvmName("rpdsisorxusbnomw")
    public suspend fun matchesSuffixes(values: List>) {
        this.matchesSuffixes = Output.all(values)
    }

    /**
     * @param value While set `true`, `age` value will be omitted from requests. This prevents a default age of `0` from being applied, and if you do not have an `age` value set, setting this to `true` is strongly recommended. When unset and other conditions are set to zero values, this can result in a rule that applies your action to all files in the bucket.
     */
    @JvmName("btmrdjdnbtyaomae")
    public suspend fun noAge(`value`: Output) {
        this.noAge = value
    }

    /**
     * @param value Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
     */
    @JvmName("kjlrfidckbvgrqim")
    public suspend fun noncurrentTimeBefore(`value`: Output) {
        this.noncurrentTimeBefore = value
    }

    /**
     * @param value Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
     */
    @JvmName("vgkmbavagasohlmt")
    public suspend fun numNewerVersions(`value`: Output) {
        this.numNewerVersions = value
    }

    /**
     * @param value Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: `"LIVE"`, `"ARCHIVED"`, `"ANY"`.
     */
    @JvmName("emjbhwnqywtuejba")
    public suspend fun withState(`value`: Output) {
        this.withState = value
    }

    /**
     * @param value Minimum age of an object in days to satisfy this condition. If not supplied alongside another condition and without setting `no_age` to `true`, a default `age` of 0 will be set.
     */
    @JvmName("wlvlnpfgdlrximnc")
    public suspend fun age(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.age = mapped
    }

    /**
     * @param value A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when an object is created before midnight of the specified date in UTC.
     */
    @JvmName("feaqorypncqrittm")
    public suspend fun createdBefore(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.createdBefore = mapped
    }

    /**
     * @param value A date in the RFC 3339 format YYYY-MM-DD. This condition is satisfied when the customTime metadata for the object is set to an earlier date than the date used in this lifecycle condition.
     */
    @JvmName("wexmukjdvgarjvyy")
    public suspend fun customTimeBefore(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customTimeBefore = mapped
    }

    /**
     * @param value Number of days elapsed since the user-specified timestamp set on an object.
     */
    @JvmName("nwjvpswbrjhoeulr")
    public suspend fun daysSinceCustomTime(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.daysSinceCustomTime = mapped
    }

    /**
     * @param value Number of days elapsed since the noncurrent timestamp of an object. This
     * 										condition is relevant only for versioned objects.
     */
    @JvmName("scgfkfpmlehchuxm")
    public suspend fun daysSinceNoncurrentTime(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.daysSinceNoncurrentTime = mapped
    }

    /**
     * @param value One or more matching name prefixes to satisfy this condition.
     */
    @JvmName("lsdllxdbepliiqnh")
    public suspend fun matchesPrefixes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.matchesPrefixes = mapped
    }

    /**
     * @param values One or more matching name prefixes to satisfy this condition.
     */
    @JvmName("grotwkxprbibilye")
    public suspend fun matchesPrefixes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchesPrefixes = mapped
    }

    /**
     * @param value [Storage Class](https://cloud.google.com/storage/docs/storage-classes) of objects to satisfy this condition. Supported values include: `STANDARD`, `MULTI_REGIONAL`, `REGIONAL`, `NEARLINE`, `COLDLINE`, `ARCHIVE`, `DURABLE_REDUCED_AVAILABILITY`.
     */
    @JvmName("qiduwlnodeiocsxr")
    public suspend fun matchesStorageClasses(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.matchesStorageClasses = mapped
    }

    /**
     * @param values [Storage Class](https://cloud.google.com/storage/docs/storage-classes) of objects to satisfy this condition. Supported values include: `STANDARD`, `MULTI_REGIONAL`, `REGIONAL`, `NEARLINE`, `COLDLINE`, `ARCHIVE`, `DURABLE_REDUCED_AVAILABILITY`.
     */
    @JvmName("lvkykkkiusisjdsi")
    public suspend fun matchesStorageClasses(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchesStorageClasses = mapped
    }

    /**
     * @param value One or more matching name suffixes to satisfy this condition.
     */
    @JvmName("drpvlngmpuqpchvd")
    public suspend fun matchesSuffixes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.matchesSuffixes = mapped
    }

    /**
     * @param values One or more matching name suffixes to satisfy this condition.
     */
    @JvmName("xoohobfeofaipcxn")
    public suspend fun matchesSuffixes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchesSuffixes = mapped
    }

    /**
     * @param value While set `true`, `age` value will be omitted from requests. This prevents a default age of `0` from being applied, and if you do not have an `age` value set, setting this to `true` is strongly recommended. When unset and other conditions are set to zero values, this can result in a rule that applies your action to all files in the bucket.
     */
    @JvmName("enwgwxlxxmpmkxuc")
    public suspend fun noAge(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noAge = mapped
    }

    /**
     * @param value Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
     */
    @JvmName("qvcqiefxccksixak")
    public suspend fun noncurrentTimeBefore(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noncurrentTimeBefore = mapped
    }

    /**
     * @param value Relevant only for versioned objects. The number of newer versions of an object to satisfy this condition.
     */
    @JvmName("ytbbvsoyfbtjbwnh")
    public suspend fun numNewerVersions(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.numNewerVersions = mapped
    }

    /**
     * @param value Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: `"LIVE"`, `"ARCHIVED"`, `"ANY"`.
     */
    @JvmName("ckplxiaoqiifbcns")
    public suspend fun withState(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.withState = mapped
    }

    internal fun build(): BucketLifecycleRuleConditionArgs = BucketLifecycleRuleConditionArgs(
        age = age,
        createdBefore = createdBefore,
        customTimeBefore = customTimeBefore,
        daysSinceCustomTime = daysSinceCustomTime,
        daysSinceNoncurrentTime = daysSinceNoncurrentTime,
        matchesPrefixes = matchesPrefixes,
        matchesStorageClasses = matchesStorageClasses,
        matchesSuffixes = matchesSuffixes,
        noAge = noAge,
        noncurrentTimeBefore = noncurrentTimeBefore,
        numNewerVersions = numNewerVersions,
        withState = withState,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy