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

com.pulumi.gcp.networkservices.kotlin.inputs.GrpcRouteRuleActionArgs.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.networkservices.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionArgs.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

/**
 *
 * @property destinations The destination to which traffic should be forwarded.
 * Structure is documented below.
 * @property faultInjectionPolicy The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure.
 * Structure is documented below.
 * @property retryPolicy Specifies the retry policy associated with this route.
 * Structure is documented below.
 * @property timeout Specifies the timeout for selected route.
 */
public data class GrpcRouteRuleActionArgs(
    public val destinations: Output>? = null,
    public val faultInjectionPolicy: Output? = null,
    public val retryPolicy: Output? = null,
    public val timeout: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionArgs =
        com.pulumi.gcp.networkservices.inputs.GrpcRouteRuleActionArgs.builder()
            .destinations(
                destinations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .faultInjectionPolicy(
                faultInjectionPolicy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .retryPolicy(retryPolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .timeout(timeout?.applyValue({ args0 -> args0 })).build()
}

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

    private var faultInjectionPolicy: Output? = null

    private var retryPolicy: Output? = null

    private var timeout: Output? = null

    /**
     * @param value The destination to which traffic should be forwarded.
     * Structure is documented below.
     */
    @JvmName("njpdqwpfhwtiwtpo")
    public suspend fun destinations(`value`: Output>) {
        this.destinations = value
    }

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

    /**
     * @param values The destination to which traffic should be forwarded.
     * Structure is documented below.
     */
    @JvmName("fmfgrxrraefftsqn")
    public suspend fun destinations(values: List>) {
        this.destinations = Output.all(values)
    }

    /**
     * @param value The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure.
     * Structure is documented below.
     */
    @JvmName("vkoygrpuvssxbpam")
    public suspend fun faultInjectionPolicy(`value`: Output) {
        this.faultInjectionPolicy = value
    }

    /**
     * @param value Specifies the retry policy associated with this route.
     * Structure is documented below.
     */
    @JvmName("xamkbgpmmmjdxuud")
    public suspend fun retryPolicy(`value`: Output) {
        this.retryPolicy = value
    }

    /**
     * @param value Specifies the timeout for selected route.
     */
    @JvmName("gmqgpbfgmqdrkywp")
    public suspend fun timeout(`value`: Output) {
        this.timeout = value
    }

    /**
     * @param value The destination to which traffic should be forwarded.
     * Structure is documented below.
     */
    @JvmName("rvscithfisspirgg")
    public suspend fun destinations(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.destinations = mapped
    }

    /**
     * @param argument The destination to which traffic should be forwarded.
     * Structure is documented below.
     */
    @JvmName("vhlyyhflcnmnsukt")
    public suspend fun destinations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GrpcRouteRuleActionDestinationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.destinations = mapped
    }

    /**
     * @param argument The destination to which traffic should be forwarded.
     * Structure is documented below.
     */
    @JvmName("blnkigndwreihlag")
    public suspend fun destinations(vararg argument: suspend GrpcRouteRuleActionDestinationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GrpcRouteRuleActionDestinationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.destinations = mapped
    }

    /**
     * @param argument The destination to which traffic should be forwarded.
     * Structure is documented below.
     */
    @JvmName("wkelmaeojtpkmgei")
    public suspend fun destinations(argument: suspend GrpcRouteRuleActionDestinationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            GrpcRouteRuleActionDestinationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.destinations = mapped
    }

    /**
     * @param values The destination to which traffic should be forwarded.
     * Structure is documented below.
     */
    @JvmName("aalkguqjmiyrbbhn")
    public suspend fun destinations(vararg values: GrpcRouteRuleActionDestinationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destinations = mapped
    }

    /**
     * @param value The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure.
     * Structure is documented below.
     */
    @JvmName("cmjsccdeqeuswxgp")
    public suspend fun faultInjectionPolicy(`value`: GrpcRouteRuleActionFaultInjectionPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.faultInjectionPolicy = mapped
    }

    /**
     * @param argument The specification for fault injection introduced into traffic to test the resiliency of clients to backend service failure.
     * Structure is documented below.
     */
    @JvmName("vkgkavkqmwwrfdge")
    public suspend fun faultInjectionPolicy(argument: suspend GrpcRouteRuleActionFaultInjectionPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = GrpcRouteRuleActionFaultInjectionPolicyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.faultInjectionPolicy = mapped
    }

    /**
     * @param value Specifies the retry policy associated with this route.
     * Structure is documented below.
     */
    @JvmName("yfsnbnibymlepiyh")
    public suspend fun retryPolicy(`value`: GrpcRouteRuleActionRetryPolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.retryPolicy = mapped
    }

    /**
     * @param argument Specifies the retry policy associated with this route.
     * Structure is documented below.
     */
    @JvmName("djdjbrrtqjnagymk")
    public suspend fun retryPolicy(argument: suspend GrpcRouteRuleActionRetryPolicyArgsBuilder.() -> Unit) {
        val toBeMapped = GrpcRouteRuleActionRetryPolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.retryPolicy = mapped
    }

    /**
     * @param value Specifies the timeout for selected route.
     */
    @JvmName("utkeyvkikcmxwalu")
    public suspend fun timeout(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeout = mapped
    }

    internal fun build(): GrpcRouteRuleActionArgs = GrpcRouteRuleActionArgs(
        destinations = destinations,
        faultInjectionPolicy = faultInjectionPolicy,
        retryPolicy = retryPolicy,
        timeout = timeout,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy