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

com.pulumi.aws.batch.kotlin.inputs.SchedulingPolicyFairSharePolicyArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.batch.kotlin.inputs

import com.pulumi.aws.batch.inputs.SchedulingPolicyFairSharePolicyArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property computeReservation A value used to reserve some of the available maximum vCPU for fair share identifiers that have not yet been used. For more information, see [FairsharePolicy](https://docs.aws.amazon.com/batch/latest/APIReference/API_FairsharePolicy.html).
 * @property shareDecaySeconds
 * @property shareDistributions One or more share distribution blocks which define the weights for the fair share identifiers for the fair share policy. For more information, see [FairsharePolicy](https://docs.aws.amazon.com/batch/latest/APIReference/API_FairsharePolicy.html). The `share_distribution` block is documented below.
 */
public data class SchedulingPolicyFairSharePolicyArgs(
    public val computeReservation: Output? = null,
    public val shareDecaySeconds: Output? = null,
    public val shareDistributions: Output>? =
        null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.batch.inputs.SchedulingPolicyFairSharePolicyArgs =
        com.pulumi.aws.batch.inputs.SchedulingPolicyFairSharePolicyArgs.builder()
            .computeReservation(computeReservation?.applyValue({ args0 -> args0 }))
            .shareDecaySeconds(shareDecaySeconds?.applyValue({ args0 -> args0 }))
            .shareDistributions(
                shareDistributions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            ).build()
}

/**
 * Builder for [SchedulingPolicyFairSharePolicyArgs].
 */
@PulumiTagMarker
public class SchedulingPolicyFairSharePolicyArgsBuilder internal constructor() {
    private var computeReservation: Output? = null

    private var shareDecaySeconds: Output? = null

    private var shareDistributions:
        Output>? = null

    /**
     * @param value A value used to reserve some of the available maximum vCPU for fair share identifiers that have not yet been used. For more information, see [FairsharePolicy](https://docs.aws.amazon.com/batch/latest/APIReference/API_FairsharePolicy.html).
     */
    @JvmName("egyeqkfsgnjgkckc")
    public suspend fun computeReservation(`value`: Output) {
        this.computeReservation = value
    }

    /**
     * @param value
     */
    @JvmName("xnkgtqrvvumqbiky")
    public suspend fun shareDecaySeconds(`value`: Output) {
        this.shareDecaySeconds = value
    }

    /**
     * @param value One or more share distribution blocks which define the weights for the fair share identifiers for the fair share policy. For more information, see [FairsharePolicy](https://docs.aws.amazon.com/batch/latest/APIReference/API_FairsharePolicy.html). The `share_distribution` block is documented below.
     */
    @JvmName("ojybfeigmlxorhnb")
    public suspend fun shareDistributions(`value`: Output>) {
        this.shareDistributions = value
    }

    @JvmName("uiaimiqojkfvkmgx")
    public suspend fun shareDistributions(vararg values: Output) {
        this.shareDistributions = Output.all(values.asList())
    }

    /**
     * @param values One or more share distribution blocks which define the weights for the fair share identifiers for the fair share policy. For more information, see [FairsharePolicy](https://docs.aws.amazon.com/batch/latest/APIReference/API_FairsharePolicy.html). The `share_distribution` block is documented below.
     */
    @JvmName("onoxjcibcqyqxftu")
    public suspend fun shareDistributions(values: List>) {
        this.shareDistributions = Output.all(values)
    }

    /**
     * @param value A value used to reserve some of the available maximum vCPU for fair share identifiers that have not yet been used. For more information, see [FairsharePolicy](https://docs.aws.amazon.com/batch/latest/APIReference/API_FairsharePolicy.html).
     */
    @JvmName("vgbwalseiproyvnt")
    public suspend fun computeReservation(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.computeReservation = mapped
    }

    /**
     * @param value
     */
    @JvmName("xgdiuwnjityrjffy")
    public suspend fun shareDecaySeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.shareDecaySeconds = mapped
    }

    /**
     * @param value One or more share distribution blocks which define the weights for the fair share identifiers for the fair share policy. For more information, see [FairsharePolicy](https://docs.aws.amazon.com/batch/latest/APIReference/API_FairsharePolicy.html). The `share_distribution` block is documented below.
     */
    @JvmName("mhwejpsyhfpgnfyc")
    public suspend fun shareDistributions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.shareDistributions = mapped
    }

    /**
     * @param argument One or more share distribution blocks which define the weights for the fair share identifiers for the fair share policy. For more information, see [FairsharePolicy](https://docs.aws.amazon.com/batch/latest/APIReference/API_FairsharePolicy.html). The `share_distribution` block is documented below.
     */
    @JvmName("inxtjymwoqtyaijj")
    public suspend fun shareDistributions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SchedulingPolicyFairSharePolicyShareDistributionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.shareDistributions = mapped
    }

    /**
     * @param argument One or more share distribution blocks which define the weights for the fair share identifiers for the fair share policy. For more information, see [FairsharePolicy](https://docs.aws.amazon.com/batch/latest/APIReference/API_FairsharePolicy.html). The `share_distribution` block is documented below.
     */
    @JvmName("crsdmindibugquxq")
    public suspend fun shareDistributions(vararg argument: suspend SchedulingPolicyFairSharePolicyShareDistributionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SchedulingPolicyFairSharePolicyShareDistributionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.shareDistributions = mapped
    }

    /**
     * @param argument One or more share distribution blocks which define the weights for the fair share identifiers for the fair share policy. For more information, see [FairsharePolicy](https://docs.aws.amazon.com/batch/latest/APIReference/API_FairsharePolicy.html). The `share_distribution` block is documented below.
     */
    @JvmName("pjaybuapejspyrco")
    public suspend fun shareDistributions(argument: suspend SchedulingPolicyFairSharePolicyShareDistributionArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                SchedulingPolicyFairSharePolicyShareDistributionArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.shareDistributions = mapped
    }

    /**
     * @param values One or more share distribution blocks which define the weights for the fair share identifiers for the fair share policy. For more information, see [FairsharePolicy](https://docs.aws.amazon.com/batch/latest/APIReference/API_FairsharePolicy.html). The `share_distribution` block is documented below.
     */
    @JvmName("bvloouqlmlhnuvbj")
    public suspend fun shareDistributions(vararg values: SchedulingPolicyFairSharePolicyShareDistributionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.shareDistributions = mapped
    }

    internal fun build(): SchedulingPolicyFairSharePolicyArgs = SchedulingPolicyFairSharePolicyArgs(
        computeReservation = computeReservation,
        shareDecaySeconds = shareDecaySeconds,
        shareDistributions = shareDistributions,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy