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

com.pulumi.awsnative.devicefarm.kotlin.NetworkProfile.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.devicefarm.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List

/**
 * Builder for [NetworkProfile].
 */
@PulumiTagMarker
public class NetworkProfileResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: NetworkProfileArgs = NetworkProfileArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend NetworkProfileArgsBuilder.() -> Unit) {
        val builder = NetworkProfileArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): NetworkProfile {
        val builtJavaResource = com.pulumi.awsnative.devicefarm.NetworkProfile(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return NetworkProfile(builtJavaResource)
    }
}

/**
 * AWS::DeviceFarm::NetworkProfile creates a new DF Network Profile
 */
public class NetworkProfile internal constructor(
    override val javaResource: com.pulumi.awsnative.devicefarm.NetworkProfile,
) : KotlinCustomResource(javaResource, NetworkProfileMapper) {
    /**
     * The Amazon Resource Name (ARN) of the network profile. See [Amazon resource names](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) in the *General Reference guide* .
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * The description of the network profile.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The data throughput rate in bits per second, as an integer from 0 to 104857600.
     */
    public val downlinkBandwidthBits: Output?
        get() = javaResource.downlinkBandwidthBits().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.
     */
    public val downlinkDelayMs: Output?
        get() = javaResource.downlinkDelayMs().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.
     */
    public val downlinkJitterMs: Output?
        get() = javaResource.downlinkJitterMs().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Proportion of received packets that fail to arrive from 0 to 100 percent.
     */
    public val downlinkLossPercent: Output?
        get() = javaResource.downlinkLossPercent().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The name of the network profile.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * The Amazon Resource Name (ARN) of the specified project.
     */
    public val projectArn: Output
        get() = javaResource.projectArn().applyValue({ args0 -> args0 })

    /**
     * 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 val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> toKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The data throughput rate in bits per second, as an integer from 0 to 104857600.
     */
    public val uplinkBandwidthBits: Output?
        get() = javaResource.uplinkBandwidthBits().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Delay time for all packets to destination in milliseconds as an integer from 0 to 2000.
     */
    public val uplinkDelayMs: Output?
        get() = javaResource.uplinkDelayMs().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Time variation in the delay of received packets in milliseconds as an integer from 0 to 2000.
     */
    public val uplinkJitterMs: Output?
        get() = javaResource.uplinkJitterMs().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Proportion of transmitted packets that fail to arrive from 0 to 100 percent.
     */
    public val uplinkLossPercent: Output?
        get() = javaResource.uplinkLossPercent().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })
}

public object NetworkProfileMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.devicefarm.NetworkProfile::class == javaResource::class

    override fun map(javaResource: Resource): NetworkProfile = NetworkProfile(
        javaResource as
            com.pulumi.awsnative.devicefarm.NetworkProfile,
    )
}

/**
 * @see [NetworkProfile].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [NetworkProfile].
 */
public suspend fun networkProfile(
    name: String,
    block: suspend NetworkProfileResourceBuilder.() -> Unit,
): NetworkProfile {
    val builder = NetworkProfileResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [NetworkProfile].
 * @param name The _unique_ name of the resulting resource.
 */
public fun networkProfile(name: String): NetworkProfile {
    val builder = NetworkProfileResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy