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.13.1.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. **Note** To set `0` value of `age`, `send_age_if_zero` should be set `true` otherwise `0` value of `age` field will be ignored.
 * @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 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 sendAgeIfZero While set true, `age` value will be sent in the request even for zero value of the field. This field is only useful and required for setting 0 value to the `age` field. It can be used alone or together with `age` attribute. **NOTE** `age` attibute with `0` value will be ommitted from the API request if `send_age_if_zero` field is having `false` value.
 * @property sendDaysSinceCustomTimeIfZero While set true, `days_since_custom_time` value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the `days_since_custom_time` field. It can be used alone or together with `days_since_custom_time`.
 * @property sendDaysSinceNoncurrentTimeIfZero While set true, `days_since_noncurrent_time` value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the `days_since_noncurrent_time` field. It can be used alone or together with `days_since_noncurrent_time`.
 * @property sendNumNewerVersionsIfZero While set true, `num_newer_versions` value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the `num_newer_versions` field. It can be used alone or together with `num_newer_versions`.
 * @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 noncurrentTimeBefore: Output? = null,
    public val numNewerVersions: Output? = null,
    public val sendAgeIfZero: Output? = null,
    public val sendDaysSinceCustomTimeIfZero: Output? = null,
    public val sendDaysSinceNoncurrentTimeIfZero: Output? = null,
    public val sendNumNewerVersionsIfZero: 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 }) }))
            .noncurrentTimeBefore(noncurrentTimeBefore?.applyValue({ args0 -> args0 }))
            .numNewerVersions(numNewerVersions?.applyValue({ args0 -> args0 }))
            .sendAgeIfZero(sendAgeIfZero?.applyValue({ args0 -> args0 }))
            .sendDaysSinceCustomTimeIfZero(sendDaysSinceCustomTimeIfZero?.applyValue({ args0 -> args0 }))
            .sendDaysSinceNoncurrentTimeIfZero(
                sendDaysSinceNoncurrentTimeIfZero?.applyValue({ args0 ->
                    args0
                }),
            )
            .sendNumNewerVersionsIfZero(sendNumNewerVersionsIfZero?.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 noncurrentTimeBefore: Output? = null

    private var numNewerVersions: Output? = null

    private var sendAgeIfZero: Output? = null

    private var sendDaysSinceCustomTimeIfZero: Output? = null

    private var sendDaysSinceNoncurrentTimeIfZero: Output? = null

    private var sendNumNewerVersionsIfZero: Output? = null

    private var withState: Output? = null

    /**
     * @param value Minimum age of an object in days to satisfy this condition. **Note** To set `0` value of `age`, `send_age_if_zero` should be set `true` otherwise `0` value of `age` field will be ignored.
     */
    @JvmName("poabnhmdogbaqetw")
    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("sboinvgcacygieat")
    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("emnhehpscypvfikn")
    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("daqtlgbsqjclfrqi")
    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("ccfcyhxtkqqcping")
    public suspend fun daysSinceNoncurrentTime(`value`: Output) {
        this.daysSinceNoncurrentTime = value
    }

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

    @JvmName("wxjvhwtysncubuvg")
    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("kublmlubjtaeogmv")
    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("gnowvuyvwavabfmy")
    public suspend fun matchesStorageClasses(`value`: Output>) {
        this.matchesStorageClasses = value
    }

    @JvmName("opxadapfebargajm")
    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("ymjwlfdmrmnfxmxs")
    public suspend fun matchesStorageClasses(values: List>) {
        this.matchesStorageClasses = Output.all(values)
    }

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

    @JvmName("tnqosddcmynoaccr")
    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("bndxafdsoahxadhh")
    public suspend fun matchesSuffixes(values: List>) {
        this.matchesSuffixes = Output.all(values)
    }

    /**
     * @param value Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
     */
    @JvmName("tinpmirjljorhccp")
    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("jlkyagpjnpgmldtb")
    public suspend fun numNewerVersions(`value`: Output) {
        this.numNewerVersions = value
    }

    /**
     * @param value While set true, `age` value will be sent in the request even for zero value of the field. This field is only useful and required for setting 0 value to the `age` field. It can be used alone or together with `age` attribute. **NOTE** `age` attibute with `0` value will be ommitted from the API request if `send_age_if_zero` field is having `false` value.
     */
    @JvmName("gvvjkqrsgvxlbdni")
    public suspend fun sendAgeIfZero(`value`: Output) {
        this.sendAgeIfZero = value
    }

    /**
     * @param value While set true, `days_since_custom_time` value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the `days_since_custom_time` field. It can be used alone or together with `days_since_custom_time`.
     */
    @JvmName("myrkgxvpwvepldce")
    public suspend fun sendDaysSinceCustomTimeIfZero(`value`: Output) {
        this.sendDaysSinceCustomTimeIfZero = value
    }

    /**
     * @param value While set true, `days_since_noncurrent_time` value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the `days_since_noncurrent_time` field. It can be used alone or together with `days_since_noncurrent_time`.
     */
    @JvmName("ennfetrmtnjaypqi")
    public suspend fun sendDaysSinceNoncurrentTimeIfZero(`value`: Output) {
        this.sendDaysSinceNoncurrentTimeIfZero = value
    }

    /**
     * @param value While set true, `num_newer_versions` value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the `num_newer_versions` field. It can be used alone or together with `num_newer_versions`.
     */
    @JvmName("rsfhoatjyixkqikr")
    public suspend fun sendNumNewerVersionsIfZero(`value`: Output) {
        this.sendNumNewerVersionsIfZero = value
    }

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

    /**
     * @param value Minimum age of an object in days to satisfy this condition. **Note** To set `0` value of `age`, `send_age_if_zero` should be set `true` otherwise `0` value of `age` field will be ignored.
     */
    @JvmName("larackgvoplhudin")
    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("ffcectiynvtgbylc")
    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("tctbgtrydjgiokkl")
    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("tfssfhirvemnfxrn")
    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("rxlbmpcivggkiaxh")
    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("uvroyqkcprrcxhkg")
    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("ipiwyajsmwogiruf")
    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("akigiykacdcnywtl")
    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("hobbopdwflahiujl")
    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("qgkkaddobhhvjtdo")
    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("wwmlsvkaecxoplrj")
    public suspend fun matchesSuffixes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.matchesSuffixes = mapped
    }

    /**
     * @param value Creation date of an object in RFC 3339 (e.g. 2017-06-13) to satisfy this condition.
     */
    @JvmName("rvqvvpkdbjwefxka")
    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("tcpeuwrxcmwqunqq")
    public suspend fun numNewerVersions(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.numNewerVersions = mapped
    }

    /**
     * @param value While set true, `age` value will be sent in the request even for zero value of the field. This field is only useful and required for setting 0 value to the `age` field. It can be used alone or together with `age` attribute. **NOTE** `age` attibute with `0` value will be ommitted from the API request if `send_age_if_zero` field is having `false` value.
     */
    @JvmName("pxwkbhuabppxcqvx")
    public suspend fun sendAgeIfZero(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sendAgeIfZero = mapped
    }

    /**
     * @param value While set true, `days_since_custom_time` value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the `days_since_custom_time` field. It can be used alone or together with `days_since_custom_time`.
     */
    @JvmName("gaoqylmarsvblefp")
    public suspend fun sendDaysSinceCustomTimeIfZero(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sendDaysSinceCustomTimeIfZero = mapped
    }

    /**
     * @param value While set true, `days_since_noncurrent_time` value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the `days_since_noncurrent_time` field. It can be used alone or together with `days_since_noncurrent_time`.
     */
    @JvmName("vibvqvajojbefpde")
    public suspend fun sendDaysSinceNoncurrentTimeIfZero(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sendDaysSinceNoncurrentTimeIfZero = mapped
    }

    /**
     * @param value While set true, `num_newer_versions` value will be sent in the request even for zero value of the field. This field is only useful for setting 0 value to the `num_newer_versions` field. It can be used alone or together with `num_newer_versions`.
     */
    @JvmName("swjbeeumxuqybjkx")
    public suspend fun sendNumNewerVersionsIfZero(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sendNumNewerVersionsIfZero = mapped
    }

    /**
     * @param value Match to live and/or archived objects. Unversioned buckets have only live objects. Supported values include: `"LIVE"`, `"ARCHIVED"`, `"ANY"`.
     */
    @JvmName("lsdpvmmjwfqeothc")
    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,
        noncurrentTimeBefore = noncurrentTimeBefore,
        numNewerVersions = numNewerVersions,
        sendAgeIfZero = sendAgeIfZero,
        sendDaysSinceCustomTimeIfZero = sendDaysSinceCustomTimeIfZero,
        sendDaysSinceNoncurrentTimeIfZero = sendDaysSinceNoncurrentTimeIfZero,
        sendNumNewerVersionsIfZero = sendNumNewerVersionsIfZero,
        withState = withState,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy