![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.frauddetector.kotlin.Variable.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.frauddetector.kotlin
import com.pulumi.awsnative.frauddetector.kotlin.enums.VariableDataSource
import com.pulumi.awsnative.frauddetector.kotlin.enums.VariableDataType
import com.pulumi.awsnative.frauddetector.kotlin.enums.VariableType
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.frauddetector.kotlin.enums.VariableDataSource.Companion.toKotlin as variableDataSourceToKotlin
import com.pulumi.awsnative.frauddetector.kotlin.enums.VariableDataType.Companion.toKotlin as variableDataTypeToKotlin
import com.pulumi.awsnative.frauddetector.kotlin.enums.VariableType.Companion.toKotlin as variableTypeToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [Variable].
*/
@PulumiTagMarker
public class VariableResourceBuilder internal constructor() {
public var name: String? = null
public var args: VariableArgs = VariableArgs()
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 VariableArgsBuilder.() -> Unit) {
val builder = VariableArgsBuilder()
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(): Variable {
val builtJavaResource = com.pulumi.awsnative.frauddetector.Variable(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Variable(builtJavaResource)
}
}
/**
* A resource schema for a Variable in Amazon Fraud Detector.
*/
public class Variable internal constructor(
override val javaResource: com.pulumi.awsnative.frauddetector.Variable,
) : KotlinCustomResource(javaResource, VariableMapper) {
/**
* The ARN of the variable.
*/
public val arn: Output
get() = javaResource.arn().applyValue({ args0 -> args0 })
/**
* The time when the variable was created.
*/
public val createdTime: Output
get() = javaResource.createdTime().applyValue({ args0 -> args0 })
/**
* The source of the data.
*/
public val dataSource: Output
get() = javaResource.dataSource().applyValue({ args0 ->
args0.let({ args0 ->
variableDataSourceToKotlin(args0)
})
})
/**
* The data type.
*/
public val dataType: Output
get() = javaResource.dataType().applyValue({ args0 ->
args0.let({ args0 ->
variableDataTypeToKotlin(args0)
})
})
/**
* The default value for the variable when no value is received.
*/
public val defaultValue: Output
get() = javaResource.defaultValue().applyValue({ args0 -> args0 })
/**
* The description.
*/
public val description: Output?
get() = javaResource.description().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* The time when the variable was last updated.
*/
public val lastUpdatedTime: Output
get() = javaResource.lastUpdatedTime().applyValue({ args0 -> args0 })
/**
* The name of the variable.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Tags associated with this variable.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* The variable type. For more information see https://docs.aws.amazon.com/frauddetector/latest/ug/create-a-variable.html#variable-types
*/
public val variableType: Output?
get() = javaResource.variableType().applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
variableTypeToKotlin(args0)
})
}).orElse(null)
})
}
public object VariableMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.frauddetector.Variable::class == javaResource::class
override fun map(javaResource: Resource): Variable = Variable(
javaResource as
com.pulumi.awsnative.frauddetector.Variable,
)
}
/**
* @see [Variable].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Variable].
*/
public suspend fun variable(name: String, block: suspend VariableResourceBuilder.() -> Unit): Variable {
val builder = VariableResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Variable].
* @param name The _unique_ name of the resulting resource.
*/
public fun variable(name: String): Variable {
val builder = VariableResourceBuilder()
builder.name(name)
return builder.build()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy