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

com.pulumi.gcp.projects.kotlin.inputs.ApiKeyRestrictionsApiTargetArgs.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.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.projects.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.projects.inputs.ApiKeyRestrictionsApiTargetArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property methods Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples: `google.cloud.translate.v2.TranslateService.GetSupportedLanguage` `TranslateText` `Get*` `translate.googleapis.com.Get*`
 * @property service The service for this restriction. It should be the canonical service name, for example: `translate.googleapis.com`. You can use `gcloud services list` to get a list of services that are enabled in the project.
 */
public data class ApiKeyRestrictionsApiTargetArgs(
    public val methods: Output>? = null,
    public val service: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.projects.inputs.ApiKeyRestrictionsApiTargetArgs =
        com.pulumi.gcp.projects.inputs.ApiKeyRestrictionsApiTargetArgs.builder()
            .methods(methods?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .service(service.applyValue({ args0 -> args0 })).build()
}

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

    private var service: Output? = null

    /**
     * @param value Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples: `google.cloud.translate.v2.TranslateService.GetSupportedLanguage` `TranslateText` `Get*` `translate.googleapis.com.Get*`
     */
    @JvmName("vaktjaofdyaelent")
    public suspend fun methods(`value`: Output>) {
        this.methods = value
    }

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

    /**
     * @param values Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples: `google.cloud.translate.v2.TranslateService.GetSupportedLanguage` `TranslateText` `Get*` `translate.googleapis.com.Get*`
     */
    @JvmName("uwqdfvcxyembuqkq")
    public suspend fun methods(values: List>) {
        this.methods = Output.all(values)
    }

    /**
     * @param value The service for this restriction. It should be the canonical service name, for example: `translate.googleapis.com`. You can use `gcloud services list` to get a list of services that are enabled in the project.
     */
    @JvmName("eobvyolxwhbnwfup")
    public suspend fun service(`value`: Output) {
        this.service = value
    }

    /**
     * @param value Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples: `google.cloud.translate.v2.TranslateService.GetSupportedLanguage` `TranslateText` `Get*` `translate.googleapis.com.Get*`
     */
    @JvmName("gnhvdteptpeihvsr")
    public suspend fun methods(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.methods = mapped
    }

    /**
     * @param values Optional. List of one or more methods that can be called. If empty, all methods for the service are allowed. A wildcard (*) can be used as the last symbol. Valid examples: `google.cloud.translate.v2.TranslateService.GetSupportedLanguage` `TranslateText` `Get*` `translate.googleapis.com.Get*`
     */
    @JvmName("nccdpsbvsyaqfakm")
    public suspend fun methods(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.methods = mapped
    }

    /**
     * @param value The service for this restriction. It should be the canonical service name, for example: `translate.googleapis.com`. You can use `gcloud services list` to get a list of services that are enabled in the project.
     */
    @JvmName("kbcrnhfjrlciavra")
    public suspend fun service(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.service = mapped
    }

    internal fun build(): ApiKeyRestrictionsApiTargetArgs = ApiKeyRestrictionsApiTargetArgs(
        methods = methods,
        service = service ?: throw PulumiNullFieldException("service"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy