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

com.pulumi.awsnative.iotwireless.kotlin.WirelessGateway.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: 0.122.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.iotwireless.kotlin

import com.pulumi.awsnative.iotwireless.kotlin.outputs.WirelessGatewayLoRaWanGateway
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.iotwireless.kotlin.outputs.WirelessGatewayLoRaWanGateway.Companion.toKotlin as wirelessGatewayLoRaWanGatewayToKotlin
import com.pulumi.awsnative.kotlin.outputs.Tag.Companion.toKotlin as tagToKotlin

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

    public var args: WirelessGatewayArgs = WirelessGatewayArgs()

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

/**
 * Create and manage wireless gateways, including LoRa gateways.
 */
public class WirelessGateway internal constructor(
    override val javaResource: com.pulumi.awsnative.iotwireless.WirelessGateway,
) : KotlinCustomResource(javaResource, WirelessGatewayMapper) {
    /**
     * Arn for Wireless Gateway. Returned upon successful create.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * Id for Wireless Gateway. Returned upon successful create.
     */
    public val awsId: Output
        get() = javaResource.awsId().applyValue({ args0 -> args0 })

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

    /**
     * The date and time when the most recent uplink was received.
     */
    public val lastUplinkReceivedAt: Output?
        get() = javaResource.lastUplinkReceivedAt().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The combination of Package, Station and Model which represents the version of the LoRaWAN Wireless Gateway.
     */
    public val loRaWan: Output
        get() = javaResource.loRaWan().applyValue({ args0 ->
            args0.let({ args0 ->
                wirelessGatewayLoRaWanGatewayToKotlin(args0)
            })
        })

    /**
     * Name of Wireless Gateway.
     */
    public val name: Output?
        get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * A list of key-value pairs that contain metadata for the gateway.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * Thing Arn. Passed into Update to associate a Thing with the Wireless Gateway.
     */
    public val thingArn: Output?
        get() = javaResource.thingArn().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Thing Name. If there is a Thing created, this can be returned with a Get call.
     */
    public val thingName: Output?
        get() = javaResource.thingName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}

public object WirelessGatewayMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.iotwireless.WirelessGateway::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy