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

com.pulumi.aws.apigateway.kotlin.UsagePlanArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.aws.apigateway.kotlin

import com.pulumi.aws.apigateway.UsagePlanArgs.builder
import com.pulumi.aws.apigateway.kotlin.inputs.UsagePlanApiStageArgs
import com.pulumi.aws.apigateway.kotlin.inputs.UsagePlanApiStageArgsBuilder
import com.pulumi.aws.apigateway.kotlin.inputs.UsagePlanQuotaSettingsArgs
import com.pulumi.aws.apigateway.kotlin.inputs.UsagePlanQuotaSettingsArgsBuilder
import com.pulumi.aws.apigateway.kotlin.inputs.UsagePlanThrottleSettingsArgs
import com.pulumi.aws.apigateway.kotlin.inputs.UsagePlanThrottleSettingsArgsBuilder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Provides an API Gateway Usage Plan.
 * ## Import
 * Using `pulumi import`, import AWS API Gateway Usage Plan using the `id`. For example:
 * ```sh
 * $ pulumi import aws:apigateway/usagePlan:UsagePlan myusageplan 
 * ```
 * @property apiStages Associated API stages of the usage plan.
 * @property description Description of a usage plan.
 * @property name Name of the usage plan.
 * @property productCode AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
 * @property quotaSettings Quota of the usage plan.
 * @property tags
 * @property throttleSettings Throttling limits of the usage plan.
 */
public data class UsagePlanArgs(
    public val apiStages: Output>? = null,
    public val description: Output? = null,
    public val name: Output? = null,
    public val productCode: Output? = null,
    public val quotaSettings: Output? = null,
    public val tags: Output>? = null,
    public val throttleSettings: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.apigateway.UsagePlanArgs =
        com.pulumi.aws.apigateway.UsagePlanArgs.builder()
            .apiStages(
                apiStages?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .productCode(productCode?.applyValue({ args0 -> args0 }))
            .quotaSettings(quotaSettings?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .throttleSettings(
                throttleSettings?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [UsagePlanArgs].
 */
@PulumiTagMarker
public class UsagePlanArgsBuilder internal constructor() {
    private var apiStages: Output>? = null

    private var description: Output? = null

    private var name: Output? = null

    private var productCode: Output? = null

    private var quotaSettings: Output? = null

    private var tags: Output>? = null

    private var throttleSettings: Output? = null

    /**
     * @param value Associated API stages of the usage plan.
     */
    @JvmName("grdsrinpeogkpetu")
    public suspend fun apiStages(`value`: Output>) {
        this.apiStages = value
    }

    @JvmName("arpahitytatamfgg")
    public suspend fun apiStages(vararg values: Output) {
        this.apiStages = Output.all(values.asList())
    }

    /**
     * @param values Associated API stages of the usage plan.
     */
    @JvmName("qvakleukkiteejbk")
    public suspend fun apiStages(values: List>) {
        this.apiStages = Output.all(values)
    }

    /**
     * @param value Description of a usage plan.
     */
    @JvmName("gekxnqhxogrsuamj")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value Name of the usage plan.
     */
    @JvmName("mnndndkmtylxyipk")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
     */
    @JvmName("obtbepeioxmfxadv")
    public suspend fun productCode(`value`: Output) {
        this.productCode = value
    }

    /**
     * @param value Quota of the usage plan.
     */
    @JvmName("rhveeujrtgcyrvlk")
    public suspend fun quotaSettings(`value`: Output) {
        this.quotaSettings = value
    }

    /**
     * @param value
     */
    @JvmName("bmtuexviceutdvqy")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Throttling limits of the usage plan.
     */
    @JvmName("xbqussjpisrlsmjh")
    public suspend fun throttleSettings(`value`: Output) {
        this.throttleSettings = value
    }

    /**
     * @param value Associated API stages of the usage plan.
     */
    @JvmName("wrmfuywbfylyvfqs")
    public suspend fun apiStages(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiStages = mapped
    }

    /**
     * @param argument Associated API stages of the usage plan.
     */
    @JvmName("fugtvgknorwgdwtf")
    public suspend fun apiStages(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            UsagePlanApiStageArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.apiStages = mapped
    }

    /**
     * @param argument Associated API stages of the usage plan.
     */
    @JvmName("yceiomqsxiudoidx")
    public suspend fun apiStages(vararg argument: suspend UsagePlanApiStageArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            UsagePlanApiStageArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.apiStages = mapped
    }

    /**
     * @param argument Associated API stages of the usage plan.
     */
    @JvmName("odeudaaqpmrrfuhq")
    public suspend fun apiStages(argument: suspend UsagePlanApiStageArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(UsagePlanApiStageArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.apiStages = mapped
    }

    /**
     * @param values Associated API stages of the usage plan.
     */
    @JvmName("tysjtblpyjjubqic")
    public suspend fun apiStages(vararg values: UsagePlanApiStageArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.apiStages = mapped
    }

    /**
     * @param value Description of a usage plan.
     */
    @JvmName("vkilublnmykjolpv")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value Name of the usage plan.
     */
    @JvmName("vpqwjvbabjhrmuyt")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value AWS Marketplace product identifier to associate with the usage plan as a SaaS product on AWS Marketplace.
     */
    @JvmName("wonikplpfuroaunv")
    public suspend fun productCode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.productCode = mapped
    }

    /**
     * @param value Quota of the usage plan.
     */
    @JvmName("mbuqbfkxdulstabq")
    public suspend fun quotaSettings(`value`: UsagePlanQuotaSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.quotaSettings = mapped
    }

    /**
     * @param argument Quota of the usage plan.
     */
    @JvmName("omwjnfomfndlxayf")
    public suspend fun quotaSettings(argument: suspend UsagePlanQuotaSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = UsagePlanQuotaSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.quotaSettings = mapped
    }

    /**
     * @param value
     */
    @JvmName("egpnwyedywleppsn")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values
     */
    @JvmName("khavghwxgffnbibd")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Throttling limits of the usage plan.
     */
    @JvmName("rlswwuabmhwuvctt")
    public suspend fun throttleSettings(`value`: UsagePlanThrottleSettingsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.throttleSettings = mapped
    }

    /**
     * @param argument Throttling limits of the usage plan.
     */
    @JvmName("rxmlndprxrdwhobn")
    public suspend fun throttleSettings(argument: suspend UsagePlanThrottleSettingsArgsBuilder.() -> Unit) {
        val toBeMapped = UsagePlanThrottleSettingsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.throttleSettings = mapped
    }

    internal fun build(): UsagePlanArgs = UsagePlanArgs(
        apiStages = apiStages,
        description = description,
        name = name,
        productCode = productCode,
        quotaSettings = quotaSettings,
        tags = tags,
        throttleSettings = throttleSettings,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy