All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.b2bi.kotlin.Capability.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.b2bi.kotlin

import com.pulumi.awsnative.b2bi.kotlin.enums.CapabilityType
import com.pulumi.awsnative.b2bi.kotlin.outputs.CapabilityConfigurationProperties
import com.pulumi.awsnative.b2bi.kotlin.outputs.CapabilityS3Location
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.CapabilityType.Companion.toKotlin as capabilityTypeToKotlin
import com.pulumi.awsnative.b2bi.kotlin.outputs.CapabilityConfigurationProperties.Companion.toKotlin as capabilityConfigurationPropertiesToKotlin
import com.pulumi.awsnative.b2bi.kotlin.outputs.CapabilityS3Location.Companion.toKotlin as capabilityS3LocationToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

/**
 * Builder for [Capability].
 */
@PulumiTagMarker
public class CapabilityResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: CapabilityArgs = CapabilityArgs()

    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 CapabilityArgsBuilder.() -> Unit) {
        val builder = CapabilityArgsBuilder()
        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(): Capability {
        val builtJavaResource = com.pulumi.awsnative.b2bi.Capability(
            this.name,
            this.args.toJava(),
            this.opts.toJava(),
        )
        return Capability(builtJavaResource)
    }
}

/**
 * Definition of AWS::B2BI::Capability Resource Type
 */
public class Capability internal constructor(
    override val javaResource: com.pulumi.awsnative.b2bi.Capability,
) : KotlinCustomResource(javaResource, CapabilityMapper) {
    /**
     * Returns an Amazon Resource Name (ARN) for a specific AWS resource, such as a capability, partnership, profile, or transformer.
     */
    public val capabilityArn: Output
        get() = javaResource.capabilityArn().applyValue({ args0 -> args0 })

    /**
     * Returns a system-assigned unique identifier for the capability.
     */
    public val capabilityId: Output
        get() = javaResource.capabilityId().applyValue({ args0 -> args0 })

    /**
     * Specifies a structure that contains the details for a capability.
     */
    public val configuration: Output
        get() = javaResource.configuration().applyValue({ args0 ->
            args0.let({ args0 ->
                capabilityConfigurationPropertiesToKotlin(args0)
            })
        })

    /**
     * Returns a timestamp for creation date and time of the capability.
     */
    public val createdAt: Output
        get() = javaResource.createdAt().applyValue({ args0 -> args0 })

    /**
     * Specifies one or more locations in Amazon S3, each specifying an EDI document that can be used with this capability. Each item contains the name of the bucket and the key, to identify the document's location.
     */
    public val instructionsDocuments: Output>?
        get() = javaResource.instructionsDocuments().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        capabilityS3LocationToKotlin(args0)
                    })
                })
            }).orElse(null)
        })

    /**
     * Returns a timestamp that identifies the most recent date and time that the capability was modified.
     */
    public val modifiedAt: Output
        get() = javaResource.modifiedAt().applyValue({ args0 -> args0 })

    /**
     * The display name of the capability.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> args0 })

    /**
     * Specifies the key-value pairs assigned to ARNs that you can use to group and search for resources by type. You can attach this metadata to resources (capabilities, partnerships, and so on) for any purpose.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * Returns the type of the capability. Currently, only `edi` is supported.
     */
    public val type: Output
        get() = javaResource.type().applyValue({ args0 ->
            args0.let({ args0 ->
                capabilityTypeToKotlin(args0)
            })
        })
}

public object CapabilityMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.b2bi.Capability::class == javaResource::class

    override fun map(javaResource: Resource): Capability = Capability(
        javaResource as
            com.pulumi.awsnative.b2bi.Capability,
    )
}

/**
 * @see [Capability].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [Capability].
 */
public suspend fun capability(name: String, block: suspend CapabilityResourceBuilder.() -> Unit): Capability {
    val builder = CapabilityResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [Capability].
 * @param name The _unique_ name of the resulting resource.
 */
public fun capability(name: String): Capability {
    val builder = CapabilityResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy