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

com.pulumi.awsnative.refactorspaces.kotlin.Route.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.refactorspaces.kotlin

import com.pulumi.awsnative.kotlin.outputs.Tag
import com.pulumi.awsnative.refactorspaces.kotlin.enums.RouteType
import com.pulumi.awsnative.refactorspaces.kotlin.outputs.RouteDefaultRouteInput
import com.pulumi.awsnative.refactorspaces.kotlin.outputs.RouteUriPathRouteInput
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.refactorspaces.kotlin.enums.RouteType.Companion.toKotlin as routeTypeToKotlin
import com.pulumi.awsnative.refactorspaces.kotlin.outputs.RouteDefaultRouteInput.Companion.toKotlin as routeDefaultRouteInputToKotlin
import com.pulumi.awsnative.refactorspaces.kotlin.outputs.RouteUriPathRouteInput.Companion.toKotlin as routeUriPathRouteInputToKotlin

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

    public var args: RouteArgs = RouteArgs()

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

/**
 * Definition of AWS::RefactorSpaces::Route Resource Type
 */
public class Route internal constructor(
    override val javaResource: com.pulumi.awsnative.refactorspaces.Route,
) : KotlinCustomResource(javaResource, RouteMapper) {
    /**
     * The unique identifier of the application.
     */
    public val applicationIdentifier: Output
        get() = javaResource.applicationIdentifier().applyValue({ args0 -> args0 })

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

    /**
     * Configuration for the default route type.
     */
    public val defaultRoute: Output?
        get() = javaResource.defaultRoute().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    routeDefaultRouteInputToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The unique identifier of the environment.
     */
    public val environmentIdentifier: Output
        get() = javaResource.environmentIdentifier().applyValue({ args0 -> args0 })

    /**
     * A mapping of Amazon API Gateway path resources to resource IDs.
     */
    public val pathResourceToId: Output
        get() = javaResource.pathResourceToId().applyValue({ args0 -> args0 })

    /**
     * The unique identifier of the route.
     */
    public val routeIdentifier: Output
        get() = javaResource.routeIdentifier().applyValue({ args0 -> args0 })

    /**
     * The route type of the route.
     */
    public val routeType: Output
        get() = javaResource.routeType().applyValue({ args0 ->
            args0.let({ args0 ->
                routeTypeToKotlin(args0)
            })
        })

    /**
     * The unique identifier of the service.
     */
    public val serviceIdentifier: Output
        get() = javaResource.serviceIdentifier().applyValue({ args0 -> args0 })

    /**
     * Metadata that you can assign to help organize the frameworks that you create. Each tag is a key-value pair.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 -> tagToKotlin(args0) })
                })
            }).orElse(null)
        })

    /**
     * The configuration for the URI path route type.
     */
    public val uriPathRoute: Output?
        get() = javaResource.uriPathRoute().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    routeUriPathRouteInputToKotlin(args0)
                })
            }).orElse(null)
        })
}

public object RouteMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.refactorspaces.Route::class == javaResource::class

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

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

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




© 2015 - 2025 Weber Informatics LLC | Privacy Policy