com.pulumi.awsnative.devicefarm.kotlin.TestGridProject.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.devicefarm.kotlin
import com.pulumi.awsnative.devicefarm.kotlin.outputs.TestGridProjectVpcConfig
import com.pulumi.awsnative.kotlin.outputs.Tag
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.devicefarm.kotlin.outputs.TestGridProjectVpcConfig.Companion.toKotlin as testGridProjectVpcConfigToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [TestGridProject].
*/
@PulumiTagMarker
public class TestGridProjectResourceBuilder internal constructor() {
public var name: String? = null
public var args: TestGridProjectArgs = TestGridProjectArgs()
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 TestGridProjectArgsBuilder.() -> Unit) {
val builder = TestGridProjectArgsBuilder()
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(): TestGridProject {
val builtJavaResource = com.pulumi.awsnative.devicefarm.TestGridProject(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return TestGridProject(builtJavaResource)
}
}
/**
* AWS::DeviceFarm::TestGridProject creates a new TestGrid Project
*/
public class TestGridProject internal constructor(
override val javaResource: com.pulumi.awsnative.devicefarm.TestGridProject,
) : KotlinCustomResource(javaResource, TestGridProjectMapper) {
/**
* The Amazon Resource Name (ARN) of the `TestGrid` project. 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 })
/**
* A human-readable description for the project.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* A human-readable name for the project.
*/
public val name: Output
get() = javaResource.name().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 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The VPC security groups and subnets that are attached to a project.
*/
public val vpcConfig: Output?
get() = javaResource.vpcConfig().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
testGridProjectVpcConfigToKotlin(args0)
})
}).orElse(null)
})
}
public object TestGridProjectMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.devicefarm.TestGridProject::class == javaResource::class
override fun map(javaResource: Resource): TestGridProject = TestGridProject(
javaResource as
com.pulumi.awsnative.devicefarm.TestGridProject,
)
}
/**
* @see [TestGridProject].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [TestGridProject].
*/
public suspend fun testGridProject(
name: String,
block: suspend TestGridProjectResourceBuilder.() -> Unit,
): TestGridProject {
val builder = TestGridProjectResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [TestGridProject].
* @param name The _unique_ name of the resulting resource.
*/
public fun testGridProject(name: String): TestGridProject {
val builder = TestGridProjectResourceBuilder()
builder.name(name)
return builder.build()
}