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

com.pulumi.awsnative.location.kotlin.RouteCalculator.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.RouteCalculatorPricingPlan
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.RouteCalculatorPricingPlan.Companion.toKotlin as routeCalculatorPricingPlanToKotlin

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

    public var args: RouteCalculatorArgs = RouteCalculatorArgs()

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

/**
 * Definition of AWS::Location::RouteCalculator Resource Type
 */
public class RouteCalculator internal constructor(
    override val javaResource: com.pulumi.awsnative.location.RouteCalculator,
) : KotlinCustomResource(javaResource, RouteCalculatorMapper) {
    /**
     * The Amazon Resource Name (ARN) for the route calculator resource. Use the ARN when you specify a resource across all AWS .
     * - Format example: `arn:aws:geo:region:account-id:route-calculator/ExampleCalculator`
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * Synonym for `Arn` . The Amazon Resource Name (ARN) for the route calculator resource. Use the ARN when you specify a resource across all AWS .
     * - Format example: `arn:aws:geo:region:account-id:route-calculator/ExampleCalculator`
     */
    public val calculatorArn: Output
        get() = javaResource.calculatorArn().applyValue({ args0 -> args0 })

    /**
     * The name of the route calculator resource.
     * Requirements:
     * - Can use alphanumeric characters (A–Z, a–z, 0–9) , hyphens (-), periods (.), and underscores (_).
     * - Must be a unique Route calculator resource name.
     * - No spaces allowed. For example, `ExampleRouteCalculator` .
     */
    public val calculatorName: Output
        get() = javaResource.calculatorName().applyValue({ args0 -> args0 })

    /**
     * The timestamp for when the route calculator 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 })

    /**
     * Specifies the data provider of traffic and road network data.
     * > This field is case-sensitive. Enter the valid values as shown. For example, entering `HERE` returns an error.
     * Valid values include:
     * - `Esri` – For additional information about [Esri](https://docs.aws.amazon.com/location/latest/developerguide/esri.html) 's coverage in your region of interest, see [Esri details on street networks and traffic coverage](https://docs.aws.amazon.com/https://doc.arcgis.com/en/arcgis-online/reference/network-coverage.htm) .
     * Route calculators that use Esri as a data source only calculate routes that are shorter than 400 km.
     * - `Grab` – Grab provides routing functionality for Southeast Asia. For additional information about [GrabMaps](https://docs.aws.amazon.com/location/latest/developerguide/grab.html) ' coverage, see [GrabMaps countries and areas covered](https://docs.aws.amazon.com/location/latest/developerguide/grab.html#grab-coverage-area) .
     * - `Here` – For additional information about [HERE Technologies](https://docs.aws.amazon.com/location/latest/developerguide/HERE.html) ' coverage in your region of interest, see [HERE car routing coverage](https://docs.aws.amazon.com/https://developer.here.com/documentation/routing-api/dev_guide/topics/coverage/car-routing.html) and [HERE truck routing coverage](https://docs.aws.amazon.com/https://developer.here.com/documentation/routing-api/dev_guide/topics/coverage/truck-routing.html) .
     * For additional information , see [Data providers](https://docs.aws.amazon.com/location/latest/developerguide/what-is-data-provider.html) on the *Amazon Location Service Developer Guide* .
     */
    public val dataSource: Output
        get() = javaResource.dataSource().applyValue({ args0 -> args0 })

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

    /**
     * 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 ->
                    routeCalculatorPricingPlanToKotlin(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 route calculator 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 RouteCalculatorMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.location.RouteCalculator::class == javaResource::class

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy