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

com.pulumi.awsnative.networkmanager.kotlin.Link.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.networkmanager.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.networkmanager.kotlin.outputs.LinkBandwidth
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.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin
import com.pulumi.awsnative.networkmanager.kotlin.outputs.LinkBandwidth.Companion.toKotlin as linkBandwidthToKotlin

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

    public var args: LinkArgs = LinkArgs()

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

/**
 * The AWS::NetworkManager::Link type describes a link.
 */
public class Link internal constructor(
    override val javaResource: com.pulumi.awsnative.networkmanager.Link,
) : KotlinCustomResource(javaResource, LinkMapper) {
    /**
     * The Bandwidth for the link.
     */
    public val bandwidth: Output
        get() = javaResource.bandwidth().applyValue({ args0 ->
            args0.let({ args0 ->
                linkBandwidthToKotlin(args0)
            })
        })

    /**
     * The date and time that the device was created.
     */
    public val createdAt: Output
        get() = javaResource.createdAt().applyValue({ args0 -> args0 })

    /**
     * The description of the link.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The ID of the global network.
     */
    public val globalNetworkId: Output
        get() = javaResource.globalNetworkId().applyValue({ args0 -> args0 })

    /**
     * The Amazon Resource Name (ARN) of the link.
     */
    public val linkArn: Output
        get() = javaResource.linkArn().applyValue({ args0 -> args0 })

    /**
     * The ID of the link.
     */
    public val linkId: Output
        get() = javaResource.linkId().applyValue({ args0 -> args0 })

    /**
     * The provider of the link.
     */
    public val provider: Output?
        get() = javaResource.provider().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The ID of the site
     */
    public val siteId: Output
        get() = javaResource.siteId().applyValue({ args0 -> args0 })

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

    /**
     * The tags for the link.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The type of the link.
     */
    public val type: Output?
        get() = javaResource.type().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}

public object LinkMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.networkmanager.Link::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy