com.pulumi.awsnative.detective.kotlin.Graph.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.detective.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
/**
* Builder for [Graph].
*/
@PulumiTagMarker
public class GraphResourceBuilder internal constructor() {
public var name: String? = null
public var args: GraphArgs = GraphArgs()
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 GraphArgsBuilder.() -> Unit) {
val builder = GraphArgsBuilder()
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(): Graph {
val builtJavaResource = com.pulumi.awsnative.detective.Graph(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Graph(builtJavaResource)
}
}
/**
* Resource schema for AWS::Detective::Graph
*/
public class Graph internal constructor(
override val javaResource: com.pulumi.awsnative.detective.Graph,
) : KotlinCustomResource(javaResource, GraphMapper) {
/**
* The Detective graph ARN
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* Indicates whether to automatically enable new organization accounts as member accounts in the organization behavior graph.
*/
public val autoEnableMembers: Output?
get() = javaResource.autoEnableMembers().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The tag values to assign to the new behavior graph.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> toKotlin(args0) })
})
}).orElse(null)
})
}
public object GraphMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.detective.Graph::class == javaResource::class
override fun map(javaResource: Resource): Graph = Graph(
javaResource as
com.pulumi.awsnative.detective.Graph,
)
}
/**
* @see [Graph].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Graph].
*/
public suspend fun graph(name: String, block: suspend GraphResourceBuilder.() -> Unit): Graph {
val builder = GraphResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Graph].
* @param name The _unique_ name of the resulting resource.
*/
public fun graph(name: String): Graph {
val builder = GraphResourceBuilder()
builder.name(name)
return builder.build()
}