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

com.pulumi.gcp.storage.kotlin.inputs.BucketRetentionPolicyArgs.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.storage.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.storage.inputs.BucketRetentionPolicyArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.Int
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property isLocked If set to `true`, the bucket will be [locked](https://cloud.google.com/storage/docs/using-bucket-lock#lock-bucket) and permanently restrict edits to the bucket's retention policy.  Caution: Locking a bucket is an irreversible action.
 * @property retentionPeriod The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or archived. The value must be less than 2,147,483,647 seconds.
 */
public data class BucketRetentionPolicyArgs(
    public val isLocked: Output? = null,
    public val retentionPeriod: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.storage.inputs.BucketRetentionPolicyArgs =
        com.pulumi.gcp.storage.inputs.BucketRetentionPolicyArgs.builder()
            .isLocked(isLocked?.applyValue({ args0 -> args0 }))
            .retentionPeriod(retentionPeriod.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BucketRetentionPolicyArgs].
 */
@PulumiTagMarker
public class BucketRetentionPolicyArgsBuilder internal constructor() {
    private var isLocked: Output? = null

    private var retentionPeriod: Output? = null

    /**
     * @param value If set to `true`, the bucket will be [locked](https://cloud.google.com/storage/docs/using-bucket-lock#lock-bucket) and permanently restrict edits to the bucket's retention policy.  Caution: Locking a bucket is an irreversible action.
     */
    @JvmName("gvubgdfmoyvunhwr")
    public suspend fun isLocked(`value`: Output) {
        this.isLocked = value
    }

    /**
     * @param value The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or archived. The value must be less than 2,147,483,647 seconds.
     */
    @JvmName("kwtfkgvifstpfcmq")
    public suspend fun retentionPeriod(`value`: Output) {
        this.retentionPeriod = value
    }

    /**
     * @param value If set to `true`, the bucket will be [locked](https://cloud.google.com/storage/docs/using-bucket-lock#lock-bucket) and permanently restrict edits to the bucket's retention policy.  Caution: Locking a bucket is an irreversible action.
     */
    @JvmName("tsqdxikjwcjjhptl")
    public suspend fun isLocked(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.isLocked = mapped
    }

    /**
     * @param value The period of time, in seconds, that objects in the bucket must be retained and cannot be deleted, overwritten, or archived. The value must be less than 2,147,483,647 seconds.
     */
    @JvmName("taltegxjwmdotjus")
    public suspend fun retentionPeriod(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.retentionPeriod = mapped
    }

    internal fun build(): BucketRetentionPolicyArgs = BucketRetentionPolicyArgs(
        isLocked = isLocked,
        retentionPeriod = retentionPeriod ?: throw PulumiNullFieldException("retentionPeriod"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy