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

com.pulumi.kubernetes.meta.v1.kotlin.inputs.ConditionArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.kubernetes.meta.v1.kotlin.inputs

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.kubernetes.meta.v1.inputs.ConditionArgs.builder
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Condition contains details for one aspect of the current state of this API Resource.
 * @property lastTransitionTime lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
 * @property message message is a human readable message indicating details about the transition. This may be an empty string.
 * @property observedGeneration observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
 * @property reason reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
 * @property status status of the condition, one of True, False, Unknown.
 * @property type type of condition in CamelCase or in foo.example.com/CamelCase.
 */
public data class ConditionArgs(
    public val lastTransitionTime: Output,
    public val message: Output,
    public val observedGeneration: Output? = null,
    public val reason: Output,
    public val status: Output,
    public val type: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.kubernetes.meta.v1.inputs.ConditionArgs =
        com.pulumi.kubernetes.meta.v1.inputs.ConditionArgs.builder()
            .lastTransitionTime(lastTransitionTime.applyValue({ args0 -> args0 }))
            .message(message.applyValue({ args0 -> args0 }))
            .observedGeneration(observedGeneration?.applyValue({ args0 -> args0 }))
            .reason(reason.applyValue({ args0 -> args0 }))
            .status(status.applyValue({ args0 -> args0 }))
            .type(type.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ConditionArgs].
 */
@PulumiTagMarker
public class ConditionArgsBuilder internal constructor() {
    private var lastTransitionTime: Output? = null

    private var message: Output? = null

    private var observedGeneration: Output? = null

    private var reason: Output? = null

    private var status: Output? = null

    private var type: Output? = null

    /**
     * @param value lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
     */
    @JvmName("ohsmbobdywaylhcb")
    public suspend fun lastTransitionTime(`value`: Output) {
        this.lastTransitionTime = value
    }

    /**
     * @param value message is a human readable message indicating details about the transition. This may be an empty string.
     */
    @JvmName("idmunoqvrbgmgyrs")
    public suspend fun message(`value`: Output) {
        this.message = value
    }

    /**
     * @param value observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
     */
    @JvmName("kctpbeexsxlcmyyl")
    public suspend fun observedGeneration(`value`: Output) {
        this.observedGeneration = value
    }

    /**
     * @param value reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
     */
    @JvmName("ujodmdfiiphdrydg")
    public suspend fun reason(`value`: Output) {
        this.reason = value
    }

    /**
     * @param value status of the condition, one of True, False, Unknown.
     */
    @JvmName("xkpbsioepirwopxg")
    public suspend fun status(`value`: Output) {
        this.status = value
    }

    /**
     * @param value type of condition in CamelCase or in foo.example.com/CamelCase.
     */
    @JvmName("jcltiasmvkfjbmuh")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value lastTransitionTime is the last time the condition transitioned from one status to another. This should be when the underlying condition changed.  If that is not known, then using the time when the API field changed is acceptable.
     */
    @JvmName("idoevgmameyqucsj")
    public suspend fun lastTransitionTime(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.lastTransitionTime = mapped
    }

    /**
     * @param value message is a human readable message indicating details about the transition. This may be an empty string.
     */
    @JvmName("yqvhgwtunucrfixh")
    public suspend fun message(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.message = mapped
    }

    /**
     * @param value observedGeneration represents the .metadata.generation that the condition was set based upon. For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date with respect to the current state of the instance.
     */
    @JvmName("gsjvfdrbdutrkkps")
    public suspend fun observedGeneration(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.observedGeneration = mapped
    }

    /**
     * @param value reason contains a programmatic identifier indicating the reason for the condition's last transition. Producers of specific condition types may define expected values and meanings for this field, and whether the values are considered a guaranteed API. The value should be a CamelCase string. This field may not be empty.
     */
    @JvmName("rkklspgffqancecj")
    public suspend fun reason(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.reason = mapped
    }

    /**
     * @param value status of the condition, one of True, False, Unknown.
     */
    @JvmName("qnaewbkdvheedvwr")
    public suspend fun status(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.status = mapped
    }

    /**
     * @param value type of condition in CamelCase or in foo.example.com/CamelCase.
     */
    @JvmName("julifywiqcqfdjvn")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): ConditionArgs = ConditionArgs(
        lastTransitionTime = lastTransitionTime ?: throw PulumiNullFieldException("lastTransitionTime"),
        message = message ?: throw PulumiNullFieldException("message"),
        observedGeneration = observedGeneration,
        reason = reason ?: throw PulumiNullFieldException("reason"),
        status = status ?: throw PulumiNullFieldException("status"),
        type = type ?: throw PulumiNullFieldException("type"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy