com.pulumi.awsnative.b2bi.kotlin.Transformer.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.b2bi.kotlin
import com.pulumi.awsnative.b2bi.kotlin.enums.TransformerFileFormat
import com.pulumi.awsnative.b2bi.kotlin.enums.TransformerStatus
import com.pulumi.awsnative.b2bi.kotlin.outputs.TransformerEdiTypeProperties
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.b2bi.kotlin.enums.TransformerFileFormat.Companion.toKotlin as transformerFileFormatToKotlin
import com.pulumi.awsnative.b2bi.kotlin.enums.TransformerStatus.Companion.toKotlin as transformerStatusToKotlin
import com.pulumi.awsnative.b2bi.kotlin.outputs.TransformerEdiTypeProperties.Companion.toKotlin as transformerEdiTypePropertiesToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
/**
* Builder for [Transformer].
*/
@PulumiTagMarker
public class TransformerResourceBuilder internal constructor() {
public var name: String? = null
public var args: TransformerArgs = TransformerArgs()
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 TransformerArgsBuilder.() -> Unit) {
val builder = TransformerArgsBuilder()
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(): Transformer {
val builtJavaResource = com.pulumi.awsnative.b2bi.Transformer(
this.name,
this.args.toJava(),
this.opts.toJava(),
)
return Transformer(builtJavaResource)
}
}
/**
* Definition of AWS::B2BI::Transformer Resource Type
*/
public class Transformer internal constructor(
override val javaResource: com.pulumi.awsnative.b2bi.Transformer,
) : KotlinCustomResource(javaResource, TransformerMapper) {
/**
* Returns a timestamp indicating when the transformer was created. For example, `2023-07-20T19:58:44.624Z` .
*/
public val createdAt: Output
get() = javaResource.createdAt().applyValue({ args0 -> args0 })
/**
* Returns the details for the EDI standard that is being used for the transformer. Currently, only X12 is supported. X12 is a set of standards and corresponding messages that define specific business documents.
*/
public val ediType: Output
get() = javaResource.ediType().applyValue({ args0 ->
args0.let({ args0 ->
transformerEdiTypePropertiesToKotlin(args0)
})
})
/**
* Returns that the currently supported file formats for EDI transformations are `JSON` and `XML` .
*/
public val fileFormat: Output
get() = javaResource.fileFormat().applyValue({ args0 ->
args0.let({ args0 ->
transformerFileFormatToKotlin(args0)
})
})
/**
* Returns a sample EDI document that is used by a transformer as a guide for processing the EDI data.
*/
public val mappingTemplate: Output
get() = javaResource.mappingTemplate().applyValue({ args0 -> args0 })
/**
* Returns a timestamp representing the date and time for the most recent change for the transformer object.
*/
public val modifiedAt: Output
get() = javaResource.modifiedAt().applyValue({ args0 -> args0 })
/**
* Returns the descriptive name for the transformer.
*/
public val name: Output
get() = javaResource.name().applyValue({ args0 -> args0 })
/**
* Returns a sample EDI document that is used by a transformer as a guide for processing the EDI data.
*/
public val sampleDocument: Output?
get() = javaResource.sampleDocument().applyValue({ args0 ->
args0.map({ args0 ->
args0
}).orElse(null)
})
/**
* Returns the state of the newly created transformer. The transformer can be either `active` or `inactive` . For the transformer to be used in a capability, its status must `active` .
*/
public val status: Output
get() = javaResource.status().applyValue({ args0 ->
args0.let({ args0 ->
transformerStatusToKotlin(args0)
})
})
/**
* A key-value pair for a specific transformer. Tags are metadata that you can use to search for and group capabilities for various purposes.
*/
public val tags: Output>?
get() = javaResource.tags().applyValue({ args0 ->
args0.map({ args0 ->
args0.map({ args0 ->
args0.let({ args0 -> tagToKotlin(args0) })
})
}).orElse(null)
})
/**
* Returns an Amazon Resource Name (ARN) for a specific transformer.
*/
public val transformerArn: Output
get() = javaResource.transformerArn().applyValue({ args0 -> args0 })
/**
* The system-assigned unique identifier for the transformer.
*/
public val transformerId: Output
get() = javaResource.transformerId().applyValue({ args0 -> args0 })
}
public object TransformerMapper : ResourceMapper {
override fun supportsMappingOfType(javaResource: Resource): Boolean =
com.pulumi.awsnative.b2bi.Transformer::class == javaResource::class
override fun map(javaResource: Resource): Transformer = Transformer(
javaResource as
com.pulumi.awsnative.b2bi.Transformer,
)
}
/**
* @see [Transformer].
* @param name The _unique_ name of the resulting resource.
* @param block Builder for [Transformer].
*/
public suspend fun transformer(name: String, block: suspend TransformerResourceBuilder.() -> Unit): Transformer {
val builder = TransformerResourceBuilder()
builder.name(name)
block(builder)
return builder.build()
}
/**
* @see [Transformer].
* @param name The _unique_ name of the resulting resource.
*/
public fun transformer(name: String): Transformer {
val builder = TransformerResourceBuilder()
builder.name(name)
return builder.build()
}