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

com.pulumi.awsnative.refactorspaces.kotlin.Service.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.ServiceEndpointType
import com.pulumi.awsnative.refactorspaces.kotlin.outputs.ServiceLambdaEndpointInput
import com.pulumi.awsnative.refactorspaces.kotlin.outputs.ServiceUrlEndpointInput
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.ServiceEndpointType.Companion.toKotlin as serviceEndpointTypeToKotlin
import com.pulumi.awsnative.refactorspaces.kotlin.outputs.ServiceLambdaEndpointInput.Companion.toKotlin as serviceLambdaEndpointInputToKotlin
import com.pulumi.awsnative.refactorspaces.kotlin.outputs.ServiceUrlEndpointInput.Companion.toKotlin as serviceUrlEndpointInputToKotlin

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

    public var args: ServiceArgs = ServiceArgs()

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

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

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

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

    /**
     * The endpoint type of the service.
     */
    public val endpointType: Output
        get() = javaResource.endpointType().applyValue({ args0 ->
            args0.let({ args0 ->
                serviceEndpointTypeToKotlin(args0)
            })
        })

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

    /**
     * A summary of the configuration for the AWS Lambda endpoint type.
     */
    public val lambdaEndpoint: Output?
        get() = javaResource.lambdaEndpoint().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> serviceLambdaEndpointInputToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The name of the service.
     */
    public val name: Output
        get() = javaResource.name().applyValue({ args0 -> 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 summary of the configuration for the URL endpoint type.
     */
    public val urlEndpoint: Output?
        get() = javaResource.urlEndpoint().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    serviceUrlEndpointInputToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The ID of the virtual private cloud (VPC).
     */
    public val vpcId: Output?
        get() = javaResource.vpcId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}

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

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

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

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy