com.pulumi.awsnative.forecast.kotlin.DatasetGroup.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.forecast.kotlin
import com.pulumi.awsnative.forecast.kotlin.enums.DatasetGroupDomain
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.forecast.kotlin.enums.DatasetGroupDomain.Companion.toKotlin as datasetGroupDomainToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [DatasetGroup].
*/
@PulumiTagMarker
public class DatasetGroupResourceBuilder internal constructor() {
public var name: String? = null
public var args: DatasetGroupArgs = DatasetGroupArgs()
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 DatasetGroupArgsBuilder.() -> Unit) {
val builder = DatasetGroupArgsBuilder()
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(): DatasetGroup {
val builtJavaResource = com.pulumi.awsnative.forecast.DatasetGroup(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return DatasetGroup(builtJavaResource)
}
}
/**
* Represents a dataset group that holds a collection of related datasets
*/
public class DatasetGroup internal constructor(
override val javaResource: com.pulumi.awsnative.forecast.DatasetGroup,
) : KotlinCustomResource(javaResource, DatasetGroupMapper) {
/**
* An array of Amazon Resource Names (ARNs) of the datasets that you want to include in the dataset group.
*/
public val datasetArns: Output>?
get() = javaResource.datasetArns().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0
})
}).orElse(null)
})
/**
* The Amazon Resource Name (ARN) of the dataset group to delete.
*/
public val datasetGroupArn: Output
get() = javaResource.datasetGroupArn().applyValue({ args0 -> args0 })
/**
* A name for the dataset group.
*/
public val datasetGroupName: Output
get() = javaResource.datasetGroupName().applyValue({ args0 -> args0 })
/**
* The domain associated with the dataset group. When you add a dataset to a dataset group, this value and the value specified for the Domain parameter of the CreateDataset operation must match.
*/
public val domain: Output
get() = javaResource.domain().applyValue({ args0 ->
args0.let({ args0 ->
datasetGroupDomainToKotlin(args0)
})
})
/**
* The tags of Application Insights application.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
}
public object DatasetGroupMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.forecast.DatasetGroup::class == javaResource::class
override fun map(javaResource: Resource): DatasetGroup = DatasetGroup(
javaResource as
com.pulumi.awsnative.forecast.DatasetGroup,
)
}
/**
* @see [DatasetGroup].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [DatasetGroup].
*/
public suspend fun datasetGroup(
name: String,
block: suspend DatasetGroupResourceBuilder.() -> Unit,
): DatasetGroup {
val builder = DatasetGroupResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [DatasetGroup].
* @param name The _unique_ name of the resulting resource.
*/
public fun datasetGroup(name: String): DatasetGroup {
val builder = DatasetGroupResourceBuilder()
builder.name(name)
return builder.build()
}