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

com.pulumi.googlenative.accesscontextmanager.v1.kotlin.inputs.IngressToArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.accesscontextmanager.v1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.accesscontextmanager.v1.inputs.IngressToArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Defines the conditions under which an IngressPolicy matches a request. Conditions are based on information about the ApiOperation intended to be performed on the target resource of the request. The request must satisfy what is defined in `operations` AND `resources` in order to match.
 * @property operations A list of ApiOperations allowed to be performed by the sources specified in corresponding IngressFrom in this ServicePerimeter.
 * @property resources A list of resources, currently only projects in the form `projects/`, protected by this ServicePerimeter that are allowed to be accessed by sources defined in the corresponding IngressFrom. If a single `*` is specified, then access to all resources inside the perimeter are allowed.
 */
public data class IngressToArgs(
    public val operations: Output>? = null,
    public val resources: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.accesscontextmanager.v1.inputs.IngressToArgs =
        com.pulumi.googlenative.accesscontextmanager.v1.inputs.IngressToArgs.builder()
            .operations(
                operations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .resources(resources?.applyValue({ args0 -> args0.map({ args0 -> args0 }) })).build()
}

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

    private var resources: Output>? = null

    /**
     * @param value A list of ApiOperations allowed to be performed by the sources specified in corresponding IngressFrom in this ServicePerimeter.
     */
    @JvmName("kwejbiwairwpabmg")
    public suspend fun operations(`value`: Output>) {
        this.operations = value
    }

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

    /**
     * @param values A list of ApiOperations allowed to be performed by the sources specified in corresponding IngressFrom in this ServicePerimeter.
     */
    @JvmName("uhlxlxyxwntlunpb")
    public suspend fun operations(values: List>) {
        this.operations = Output.all(values)
    }

    /**
     * @param value A list of resources, currently only projects in the form `projects/`, protected by this ServicePerimeter that are allowed to be accessed by sources defined in the corresponding IngressFrom. If a single `*` is specified, then access to all resources inside the perimeter are allowed.
     */
    @JvmName("xvwsdkhvgcaltwrc")
    public suspend fun resources(`value`: Output>) {
        this.resources = value
    }

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

    /**
     * @param values A list of resources, currently only projects in the form `projects/`, protected by this ServicePerimeter that are allowed to be accessed by sources defined in the corresponding IngressFrom. If a single `*` is specified, then access to all resources inside the perimeter are allowed.
     */
    @JvmName("esqnojxfbyeyjqys")
    public suspend fun resources(values: List>) {
        this.resources = Output.all(values)
    }

    /**
     * @param value A list of ApiOperations allowed to be performed by the sources specified in corresponding IngressFrom in this ServicePerimeter.
     */
    @JvmName("ibkawydbtkkhdbmt")
    public suspend fun operations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.operations = mapped
    }

    /**
     * @param argument A list of ApiOperations allowed to be performed by the sources specified in corresponding IngressFrom in this ServicePerimeter.
     */
    @JvmName("ahybhsusbigttmam")
    public suspend fun operations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ApiOperationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.operations = mapped
    }

    /**
     * @param argument A list of ApiOperations allowed to be performed by the sources specified in corresponding IngressFrom in this ServicePerimeter.
     */
    @JvmName("qemilnadnlasqovo")
    public suspend fun operations(vararg argument: suspend ApiOperationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ApiOperationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.operations = mapped
    }

    /**
     * @param argument A list of ApiOperations allowed to be performed by the sources specified in corresponding IngressFrom in this ServicePerimeter.
     */
    @JvmName("nbjbtgnvderrgmvt")
    public suspend fun operations(argument: suspend ApiOperationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ApiOperationArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.operations = mapped
    }

    /**
     * @param values A list of ApiOperations allowed to be performed by the sources specified in corresponding IngressFrom in this ServicePerimeter.
     */
    @JvmName("iybexkxfkaoaatyu")
    public suspend fun operations(vararg values: ApiOperationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.operations = mapped
    }

    /**
     * @param value A list of resources, currently only projects in the form `projects/`, protected by this ServicePerimeter that are allowed to be accessed by sources defined in the corresponding IngressFrom. If a single `*` is specified, then access to all resources inside the perimeter are allowed.
     */
    @JvmName("wrjmpbgvednkypno")
    public suspend fun resources(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resources = mapped
    }

    /**
     * @param values A list of resources, currently only projects in the form `projects/`, protected by this ServicePerimeter that are allowed to be accessed by sources defined in the corresponding IngressFrom. If a single `*` is specified, then access to all resources inside the perimeter are allowed.
     */
    @JvmName("ojkejqbsbqeyfkfl")
    public suspend fun resources(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resources = mapped
    }

    internal fun build(): IngressToArgs = IngressToArgs(
        operations = operations,
        resources = resources,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy