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

com.pulumi.gcp.apigateway.kotlin.GatewayArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 8.13.1.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.apigateway.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.apigateway.GatewayArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * A consumable API that can be used by multiple Gateways.
 * To get more information about Gateway, see:
 * * [API documentation](https://cloud.google.com/api-gateway/docs/reference/rest/v1beta/projects.locations.apis)
 * * How-to Guides
 *     * [Official Documentation](https://cloud.google.com/api-gateway/docs/quickstart)
 * ## Example Usage
 * ## Import
 * Gateway can be imported using any of these accepted formats:
 * * `projects/{{project}}/locations/{{region}}/gateways/{{gateway_id}}`
 * * `{{project}}/{{region}}/{{gateway_id}}`
 * * `{{region}}/{{gateway_id}}`
 * * `{{gateway_id}}`
 * When using the `pulumi import` command, Gateway can be imported using one of the formats above. For example:
 * ```sh
 * $ pulumi import gcp:apigateway/gateway:Gateway default projects/{{project}}/locations/{{region}}/gateways/{{gateway_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:apigateway/gateway:Gateway default {{project}}/{{region}}/{{gateway_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:apigateway/gateway:Gateway default {{region}}/{{gateway_id}}
 * ```
 * ```sh
 * $ pulumi import gcp:apigateway/gateway:Gateway default {{gateway_id}}
 * ```
 * @property apiConfig Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
 * When changing api configs please ensure the new config is a new resource and the
 * lifecycle rule `create_before_destroy` is set.
 * @property displayName A user-visible name for the API.
 * @property gatewayId Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).
 * - - -
 * @property labels Resource labels to represent user-provided metadata.
 * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
 * Please refer to the field `effective_labels` for all of the labels present on the resource.
 * @property project The ID of the project in which the resource belongs.
 * If it is not provided, the provider project is used.
 * @property region The region of the gateway for the API.
 */
public data class GatewayArgs(
    public val apiConfig: Output? = null,
    public val displayName: Output? = null,
    public val gatewayId: Output? = null,
    public val labels: Output>? = null,
    public val project: Output? = null,
    public val region: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.apigateway.GatewayArgs =
        com.pulumi.gcp.apigateway.GatewayArgs.builder()
            .apiConfig(apiConfig?.applyValue({ args0 -> args0 }))
            .displayName(displayName?.applyValue({ args0 -> args0 }))
            .gatewayId(gatewayId?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .project(project?.applyValue({ args0 -> args0 }))
            .region(region?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [GatewayArgs].
 */
@PulumiTagMarker
public class GatewayArgsBuilder internal constructor() {
    private var apiConfig: Output? = null

    private var displayName: Output? = null

    private var gatewayId: Output? = null

    private var labels: Output>? = null

    private var project: Output? = null

    private var region: Output? = null

    /**
     * @param value Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
     * When changing api configs please ensure the new config is a new resource and the
     * lifecycle rule `create_before_destroy` is set.
     */
    @JvmName("ihiebvownfmpbbdn")
    public suspend fun apiConfig(`value`: Output) {
        this.apiConfig = value
    }

    /**
     * @param value A user-visible name for the API.
     */
    @JvmName("vglfwbvshqsrigkh")
    public suspend fun displayName(`value`: Output) {
        this.displayName = value
    }

    /**
     * @param value Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).
     * - - -
     */
    @JvmName("jidhkikyqhjdixpa")
    public suspend fun gatewayId(`value`: Output) {
        this.gatewayId = value
    }

    /**
     * @param value Resource labels to represent user-provided metadata.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("bfovolysvbuiygri")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("cjcgprbfbmpsybdp")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value The region of the gateway for the API.
     */
    @JvmName("rbgflvqncfnkrpas")
    public suspend fun region(`value`: Output) {
        this.region = value
    }

    /**
     * @param value Resource name of the API Config for this Gateway. Format: projects/{project}/locations/global/apis/{api}/configs/{apiConfig}.
     * When changing api configs please ensure the new config is a new resource and the
     * lifecycle rule `create_before_destroy` is set.
     */
    @JvmName("ldfbsxiqqtctfgjt")
    public suspend fun apiConfig(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.apiConfig = mapped
    }

    /**
     * @param value A user-visible name for the API.
     */
    @JvmName("eobofwgvrggxgmjd")
    public suspend fun displayName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.displayName = mapped
    }

    /**
     * @param value Identifier to assign to the Gateway. Must be unique within scope of the parent resource(project).
     * - - -
     */
    @JvmName("jsclxtltvvhwmfrv")
    public suspend fun gatewayId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gatewayId = mapped
    }

    /**
     * @param value Resource labels to represent user-provided metadata.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("bxadxpwsccfhrylh")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Resource labels to represent user-provided metadata.
     * **Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
     * Please refer to the field `effective_labels` for all of the labels present on the resource.
     */
    @JvmName("hkelybauuxvnwdnn")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The ID of the project in which the resource belongs.
     * If it is not provided, the provider project is used.
     */
    @JvmName("fkkieelhpbidgsho")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value The region of the gateway for the API.
     */
    @JvmName("dcdncqpvjrbiktbw")
    public suspend fun region(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.region = mapped
    }

    internal fun build(): GatewayArgs = GatewayArgs(
        apiConfig = apiConfig,
        displayName = displayName,
        gatewayId = gatewayId,
        labels = labels,
        project = project,
        region = region,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy