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

com.pulumi.awsnative.location.kotlin.Map.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.location.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.location.kotlin.enums.MapPricingPlan
import com.pulumi.awsnative.location.kotlin.outputs.MapConfiguration
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.location.kotlin.enums.MapPricingPlan.Companion.toKotlin as mapPricingPlanToKotlin
import com.pulumi.awsnative.location.kotlin.outputs.MapConfiguration.Companion.toKotlin as mapConfigurationToKotlin

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

    public var args: MapArgs = MapArgs()

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

/**
 * Definition of AWS::Location::Map Resource Type
 */
public class Map internal constructor(
    override val javaResource: com.pulumi.awsnative.location.Map,
) : KotlinCustomResource(javaResource, MapMapper) {
    /**
     * The Amazon Resource Name (ARN) for the map resource. Used to specify a resource across all AWS .
     * - Format example: `arn:aws:geo:region:account-id:maps/ExampleMap`
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * Specifies the `MapConfiguration` , including the map style, for the map resource that you create. The map style defines the look of maps and the data provider for your map resource.
     */
    public val configuration: Output
        get() = javaResource.configuration().applyValue({ args0 ->
            args0.let({ args0 ->
                mapConfigurationToKotlin(args0)
            })
        })

    /**
     * The timestamp for when the map resource was created in [ISO 8601](https://docs.aws.amazon.com/https://www.iso.org/iso-8601-date-and-time-format.html) format: `YYYY-MM-DDThh:mm:ss.sssZ` .
     */
    public val createTime: Output
        get() = javaResource.createTime().applyValue({ args0 -> args0 })

    /**
     * An optional description for the map resource.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Synonym for `Arn` . The Amazon Resource Name (ARN) for the map resource. Used to specify a resource across all AWS .
     * - Format example: `arn:aws:geo:region:account-id:maps/ExampleMap`
     */
    public val mapArn: Output
        get() = javaResource.mapArn().applyValue({ args0 -> args0 })

    /**
     * The name for the map resource.
     * Requirements:
     * - Must contain only alphanumeric characters (A–Z, a–z, 0–9), hyphens (-), periods (.), and underscores (_).
     * - Must be a unique map resource name.
     * - No spaces allowed. For example, `ExampleMap` .
     */
    public val mapName: Output
        get() = javaResource.mapName().applyValue({ args0 -> args0 })

    /**
     * No longer used. If included, the only allowed value is `RequestBasedUsage` .
     * *Allowed Values* : `RequestBasedUsage`
     */
    public val pricingPlan: Output?
        get() = javaResource.pricingPlan().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    mapPricingPlanToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * An array of key-value pairs to apply to this resource.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The timestamp for when the map resource was last updated in [ISO 8601](https://docs.aws.amazon.com/https://www.iso.org/iso-8601-date-and-time-format.html) format: `YYYY-MM-DDThh:mm:ss.sssZ` .
     */
    public val updateTime: Output
        get() = javaResource.updateTime().applyValue({ args0 -> args0 })
}

public object MapMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.location.Map::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy