com.pulumi.gcp.artifactregistry.kotlin.inputs.RepositoryCleanupPolicyArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-gcp-kotlin Show documentation
Show all versions of pulumi-gcp-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.gcp.artifactregistry.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.artifactregistry.inputs.RepositoryCleanupPolicyArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
*
* @property action Policy action.
* Possible values are: `DELETE`, `KEEP`.
* @property condition Policy condition for matching versions.
* Structure is documented below.
* @property id The identifier for this object. Format specified above.
* @property mostRecentVersions Policy condition for retaining a minimum number of versions. May only be
* specified with a Keep action.
* Structure is documented below.
*/
public data class RepositoryCleanupPolicyArgs(
public val action: Output? = null,
public val condition: Output? = null,
public val id: Output,
public val mostRecentVersions: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.gcp.artifactregistry.inputs.RepositoryCleanupPolicyArgs =
com.pulumi.gcp.artifactregistry.inputs.RepositoryCleanupPolicyArgs.builder()
.action(action?.applyValue({ args0 -> args0 }))
.condition(condition?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.id(id.applyValue({ args0 -> args0 }))
.mostRecentVersions(
mostRecentVersions?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
).build()
}
/**
* Builder for [RepositoryCleanupPolicyArgs].
*/
@PulumiTagMarker
public class RepositoryCleanupPolicyArgsBuilder internal constructor() {
private var action: Output? = null
private var condition: Output? = null
private var id: Output? = null
private var mostRecentVersions: Output? = null
/**
* @param value Policy action.
* Possible values are: `DELETE`, `KEEP`.
*/
@JvmName("grvircwblxapivvs")
public suspend fun action(`value`: Output) {
this.action = value
}
/**
* @param value Policy condition for matching versions.
* Structure is documented below.
*/
@JvmName("whusbucvkxvcyufd")
public suspend fun condition(`value`: Output) {
this.condition = value
}
/**
* @param value The identifier for this object. Format specified above.
*/
@JvmName("mmgxmcftrhjusiqh")
public suspend fun id(`value`: Output) {
this.id = value
}
/**
* @param value Policy condition for retaining a minimum number of versions. May only be
* specified with a Keep action.
* Structure is documented below.
*/
@JvmName("jxocsxvxaxnagcal")
public suspend fun mostRecentVersions(`value`: Output) {
this.mostRecentVersions = value
}
/**
* @param value Policy action.
* Possible values are: `DELETE`, `KEEP`.
*/
@JvmName("jwcbccixymktervj")
public suspend fun action(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.action = mapped
}
/**
* @param value Policy condition for matching versions.
* Structure is documented below.
*/
@JvmName("lquyhajkabehddtx")
public suspend fun condition(`value`: RepositoryCleanupPolicyConditionArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.condition = mapped
}
/**
* @param argument Policy condition for matching versions.
* Structure is documented below.
*/
@JvmName("tvqwexpcpjgaqhww")
public suspend fun condition(argument: suspend RepositoryCleanupPolicyConditionArgsBuilder.() -> Unit) {
val toBeMapped = RepositoryCleanupPolicyConditionArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.condition = mapped
}
/**
* @param value The identifier for this object. Format specified above.
*/
@JvmName("ccsrwitvadapjnbk")
public suspend fun id(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.id = mapped
}
/**
* @param value Policy condition for retaining a minimum number of versions. May only be
* specified with a Keep action.
* Structure is documented below.
*/
@JvmName("pctijdihuyclmwtl")
public suspend fun mostRecentVersions(`value`: RepositoryCleanupPolicyMostRecentVersionsArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.mostRecentVersions = mapped
}
/**
* @param argument Policy condition for retaining a minimum number of versions. May only be
* specified with a Keep action.
* Structure is documented below.
*/
@JvmName("ttlqebrhsecieafw")
public suspend fun mostRecentVersions(argument: suspend RepositoryCleanupPolicyMostRecentVersionsArgsBuilder.() -> Unit) {
val toBeMapped = RepositoryCleanupPolicyMostRecentVersionsArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.mostRecentVersions = mapped
}
internal fun build(): RepositoryCleanupPolicyArgs = RepositoryCleanupPolicyArgs(
action = action,
condition = condition,
id = id ?: throw PulumiNullFieldException("id"),
mostRecentVersions = mostRecentVersions,
)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy