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

com.pulumi.awsnative.devicefarm.kotlin.DevicePoolArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.devicefarm.kotlin

import com.pulumi.awsnative.devicefarm.DevicePoolArgs.builder
import com.pulumi.awsnative.devicefarm.kotlin.inputs.DevicePoolRuleArgs
import com.pulumi.awsnative.devicefarm.kotlin.inputs.DevicePoolRuleArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * AWS::DeviceFarm::DevicePool creates a new Device Pool for a given DF Project
 * @property description The device pool's description.
 * @property maxDevices The number of devices that Device Farm can add to your device pool. Device Farm adds devices that are available and meet the criteria that you assign for the `rules` parameter. Depending on how many devices meet these constraints, your device pool might contain fewer devices than the value for this parameter.
 * By specifying the maximum number of devices, you can control the costs that you incur by running tests.
 * @property name The device pool's name.
 * @property projectArn The ARN of the project for the device pool.
 * @property rules The device pool's rules.
 * @property tags An array of key-value pairs to apply to this resource.
 * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) in the *guide* .
 */
public data class DevicePoolArgs(
    public val description: Output? = null,
    public val maxDevices: Output? = null,
    public val name: Output? = null,
    public val projectArn: Output? = null,
    public val rules: Output>? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.devicefarm.DevicePoolArgs =
        com.pulumi.awsnative.devicefarm.DevicePoolArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .maxDevices(maxDevices?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .projectArn(projectArn?.applyValue({ args0 -> args0 }))
            .rules(rules?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [DevicePoolArgs].
 */
@PulumiTagMarker
public class DevicePoolArgsBuilder internal constructor() {
    private var description: Output? = null

    private var maxDevices: Output? = null

    private var name: Output? = null

    private var projectArn: Output? = null

    private var rules: Output>? = null

    private var tags: Output>? = null

    /**
     * @param value The device pool's description.
     */
    @JvmName("fqjgfijrwhdeycdv")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The number of devices that Device Farm can add to your device pool. Device Farm adds devices that are available and meet the criteria that you assign for the `rules` parameter. Depending on how many devices meet these constraints, your device pool might contain fewer devices than the value for this parameter.
     * By specifying the maximum number of devices, you can control the costs that you incur by running tests.
     */
    @JvmName("jwijameimamqlssf")
    public suspend fun maxDevices(`value`: Output) {
        this.maxDevices = value
    }

    /**
     * @param value The device pool's name.
     */
    @JvmName("uukkqruujbvqnopn")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The ARN of the project for the device pool.
     */
    @JvmName("dnihiblifqrmjkut")
    public suspend fun projectArn(`value`: Output) {
        this.projectArn = value
    }

    /**
     * @param value The device pool's rules.
     */
    @JvmName("luywppugnarokqor")
    public suspend fun rules(`value`: Output>) {
        this.rules = value
    }

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

    /**
     * @param values The device pool's rules.
     */
    @JvmName("utiwvlrqxkwonpqa")
    public suspend fun rules(values: List>) {
        this.rules = Output.all(values)
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) in the *guide* .
     */
    @JvmName("pshohrodmlpcvqip")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) in the *guide* .
     */
    @JvmName("fgicwowvhivppjcq")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The device pool's description.
     */
    @JvmName("qqchicliqhspdvpn")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The number of devices that Device Farm can add to your device pool. Device Farm adds devices that are available and meet the criteria that you assign for the `rules` parameter. Depending on how many devices meet these constraints, your device pool might contain fewer devices than the value for this parameter.
     * By specifying the maximum number of devices, you can control the costs that you incur by running tests.
     */
    @JvmName("jcnqiuybwfsiwnnu")
    public suspend fun maxDevices(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxDevices = mapped
    }

    /**
     * @param value The device pool's name.
     */
    @JvmName("nrruxpdqwblwkdvr")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The ARN of the project for the device pool.
     */
    @JvmName("xhtarcefhpjyncka")
    public suspend fun projectArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.projectArn = mapped
    }

    /**
     * @param value The device pool's rules.
     */
    @JvmName("quuihqbepqojvhmk")
    public suspend fun rules(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param argument The device pool's rules.
     */
    @JvmName("gdnwfdqyygahxscc")
    public suspend fun rules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DevicePoolRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument The device pool's rules.
     */
    @JvmName("abaiwddxathjsikc")
    public suspend fun rules(vararg argument: suspend DevicePoolRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DevicePoolRuleArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument The device pool's rules.
     */
    @JvmName("jdjnblaxajqlkptq")
    public suspend fun rules(argument: suspend DevicePoolRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(DevicePoolRuleArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param values The device pool's rules.
     */
    @JvmName("vngdslsqdriooyyb")
    public suspend fun rules(vararg values: DevicePoolRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) in the *guide* .
     */
    @JvmName("uyvhtpchhcpyjpqu")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) in the *guide* .
     */
    @JvmName("lvioqtrcwpujfskr")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) in the *guide* .
     */
    @JvmName("koknlrhueawviwty")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) in the *guide* .
     */
    @JvmName("xxkksvxbghoiobvh")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value pairs to apply to this resource.
     * For more information, see [Tag](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-resource-tags.html) in the *guide* .
     */
    @JvmName("jvptwsdvjiuuxhwu")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): DevicePoolArgs = DevicePoolArgs(
        description = description,
        maxDevices = maxDevices,
        name = name,
        projectArn = projectArn,
        rules = rules,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy