com.pulumi.azurenative.devopsinfrastructure.kotlin.inputs.StatefulArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azurenative.devopsinfrastructure.kotlin.inputs
import com.pulumi.azurenative.devopsinfrastructure.inputs.StatefulArgs.builder
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 kotlin.Any
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* Stateful profile meaning that the machines will be returned to the pool after running a job.
* @property kind Discriminator property for AgentProfile.
* Expected value is 'Stateful'.
* @property maxAgentLifetime How long should stateful machines be kept around. The maximum is one week.
* @property resourcePredictions Defines pool buffer.
*/
public data class StatefulArgs(
public val kind: Output,
public val maxAgentLifetime: Output,
public val resourcePredictions: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azurenative.devopsinfrastructure.inputs.StatefulArgs =
com.pulumi.azurenative.devopsinfrastructure.inputs.StatefulArgs.builder()
.kind(kind.applyValue({ args0 -> args0 }))
.maxAgentLifetime(maxAgentLifetime.applyValue({ args0 -> args0 }))
.resourcePredictions(resourcePredictions?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [StatefulArgs].
*/
@PulumiTagMarker
public class StatefulArgsBuilder internal constructor() {
private var kind: Output? = null
private var maxAgentLifetime: Output? = null
private var resourcePredictions: Output? = null
/**
* @param value Discriminator property for AgentProfile.
* Expected value is 'Stateful'.
*/
@JvmName("mswfxmqcgmjyfkrf")
public suspend fun kind(`value`: Output) {
this.kind = value
}
/**
* @param value How long should stateful machines be kept around. The maximum is one week.
*/
@JvmName("btfymjyfswrpgtia")
public suspend fun maxAgentLifetime(`value`: Output) {
this.maxAgentLifetime = value
}
/**
* @param value Defines pool buffer.
*/
@JvmName("qoytkfflrsmfjktq")
public suspend fun resourcePredictions(`value`: Output) {
this.resourcePredictions = value
}
/**
* @param value Discriminator property for AgentProfile.
* Expected value is 'Stateful'.
*/
@JvmName("reecvxdxabffwfrh")
public suspend fun kind(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.kind = mapped
}
/**
* @param value How long should stateful machines be kept around. The maximum is one week.
*/
@JvmName("uuklivhfwukhjkia")
public suspend fun maxAgentLifetime(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.maxAgentLifetime = mapped
}
/**
* @param value Defines pool buffer.
*/
@JvmName("exuifvvvtpencdxu")
public suspend fun resourcePredictions(`value`: Any?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourcePredictions = mapped
}
internal fun build(): StatefulArgs = StatefulArgs(
kind = kind ?: throw PulumiNullFieldException("kind"),
maxAgentLifetime = maxAgentLifetime ?: throw PulumiNullFieldException("maxAgentLifetime"),
resourcePredictions = resourcePredictions,
)
}