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

com.pulumi.azurenative.appplatform.kotlin.inputs.GatewayRouteConfigPropertiesArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.azurenative.appplatform.kotlin.inputs

import com.pulumi.azurenative.appplatform.inputs.GatewayRouteConfigPropertiesArgs.builder
import com.pulumi.azurenative.appplatform.kotlin.enums.GatewayRouteConfigProtocol
import com.pulumi.core.Either
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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * API route config of the Spring Cloud Gateway
 * @property appResourceId The resource Id of the Azure Spring Apps app, required unless route defines `uri`.
 * @property filters To modify the request before sending it to the target endpoint, or the received response in app level.
 * @property openApi OpenAPI properties of Spring Cloud Gateway route config.
 * @property predicates A number of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
 * @property protocol Protocol of routed Azure Spring Apps applications.
 * @property routes Array of API routes, each route contains properties such as `title`, `uri`, `ssoEnabled`, `predicates`, `filters`.
 * @property ssoEnabled Enable Single Sign-On in app level.
 */
public data class GatewayRouteConfigPropertiesArgs(
    public val appResourceId: Output? = null,
    public val filters: Output>? = null,
    public val openApi: Output? = null,
    public val predicates: Output>? = null,
    public val protocol: Output>? = null,
    public val routes: Output>? = null,
    public val ssoEnabled: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.appplatform.inputs.GatewayRouteConfigPropertiesArgs = com.pulumi.azurenative.appplatform.inputs.GatewayRouteConfigPropertiesArgs.builder()
        .appResourceId(appResourceId?.applyValue({ args0 -> args0 }))
        .filters(filters?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
        .openApi(openApi?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
        .predicates(predicates?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
        .protocol(
            protocol?.applyValue({ args0 ->
                args0.transform({ args0 -> args0 }, { args0 ->
                    args0.let({ args0 -> args0.toJava() })
                })
            }),
        )
        .routes(routes?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
        .ssoEnabled(ssoEnabled?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [GatewayRouteConfigPropertiesArgs].
 */
@PulumiTagMarker
public class GatewayRouteConfigPropertiesArgsBuilder internal constructor() {
    private var appResourceId: Output? = null

    private var filters: Output>? = null

    private var openApi: Output? = null

    private var predicates: Output>? = null

    private var protocol: Output>? = null

    private var routes: Output>? = null

    private var ssoEnabled: Output? = null

    /**
     * @param value The resource Id of the Azure Spring Apps app, required unless route defines `uri`.
     */
    @JvmName("eocwwdtlswoaaiid")
    public suspend fun appResourceId(`value`: Output) {
        this.appResourceId = value
    }

    /**
     * @param value To modify the request before sending it to the target endpoint, or the received response in app level.
     */
    @JvmName("xqkqufcqmpcddchs")
    public suspend fun filters(`value`: Output>) {
        this.filters = value
    }

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

    /**
     * @param values To modify the request before sending it to the target endpoint, or the received response in app level.
     */
    @JvmName("hlgphatmoyyewsoh")
    public suspend fun filters(values: List>) {
        this.filters = Output.all(values)
    }

    /**
     * @param value OpenAPI properties of Spring Cloud Gateway route config.
     */
    @JvmName("bbhkumgcunqvlqic")
    public suspend fun openApi(`value`: Output) {
        this.openApi = value
    }

    /**
     * @param value A number of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
     */
    @JvmName("jrrbkmwotviqhipp")
    public suspend fun predicates(`value`: Output>) {
        this.predicates = value
    }

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

    /**
     * @param values A number of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
     */
    @JvmName("cisuawdwslxaskam")
    public suspend fun predicates(values: List>) {
        this.predicates = Output.all(values)
    }

    /**
     * @param value Protocol of routed Azure Spring Apps applications.
     */
    @JvmName("mvbfxighrbrjqswe")
    public suspend fun protocol(`value`: Output>) {
        this.protocol = value
    }

    /**
     * @param value Array of API routes, each route contains properties such as `title`, `uri`, `ssoEnabled`, `predicates`, `filters`.
     */
    @JvmName("dxjijhrnqukndxsq")
    public suspend fun routes(`value`: Output>) {
        this.routes = value
    }

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

    /**
     * @param values Array of API routes, each route contains properties such as `title`, `uri`, `ssoEnabled`, `predicates`, `filters`.
     */
    @JvmName("oupsrkmugxubcqex")
    public suspend fun routes(values: List>) {
        this.routes = Output.all(values)
    }

    /**
     * @param value Enable Single Sign-On in app level.
     */
    @JvmName("brdjgnfljxqikiri")
    public suspend fun ssoEnabled(`value`: Output) {
        this.ssoEnabled = value
    }

    /**
     * @param value The resource Id of the Azure Spring Apps app, required unless route defines `uri`.
     */
    @JvmName("cvmlwqrefoprsbti")
    public suspend fun appResourceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.appResourceId = mapped
    }

    /**
     * @param value To modify the request before sending it to the target endpoint, or the received response in app level.
     */
    @JvmName("jqlayqrtgrddlssd")
    public suspend fun filters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.filters = mapped
    }

    /**
     * @param values To modify the request before sending it to the target endpoint, or the received response in app level.
     */
    @JvmName("unkmdtlhxuxqiheb")
    public suspend fun filters(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.filters = mapped
    }

    /**
     * @param value OpenAPI properties of Spring Cloud Gateway route config.
     */
    @JvmName("nendjgejborcauax")
    public suspend fun openApi(`value`: GatewayRouteConfigOpenApiPropertiesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.openApi = mapped
    }

    /**
     * @param argument OpenAPI properties of Spring Cloud Gateway route config.
     */
    @JvmName("plmigrfompalcppv")
    public suspend fun openApi(argument: suspend GatewayRouteConfigOpenApiPropertiesArgsBuilder.() -> Unit) {
        val toBeMapped = GatewayRouteConfigOpenApiPropertiesArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.openApi = mapped
    }

    /**
     * @param value A number of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
     */
    @JvmName("xfmqkrtdmfemqcjc")
    public suspend fun predicates(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.predicates = mapped
    }

    /**
     * @param values A number of conditions to evaluate a route for each request in app level. Each predicate may be evaluated against request headers and parameter values. All of the predicates associated with a route must evaluate to true for the route to be matched to the request.
     */
    @JvmName("rmuucexboiyvgppw")
    public suspend fun predicates(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.predicates = mapped
    }

    /**
     * @param value Protocol of routed Azure Spring Apps applications.
     */
    @JvmName("hatmwiuurekiemju")
    public suspend fun protocol(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.protocol = mapped
    }

    /**
     * @param value Protocol of routed Azure Spring Apps applications.
     */
    @JvmName("clrjuuqqunhifksk")
    public fun protocol(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocol = mapped
    }

    /**
     * @param value Protocol of routed Azure Spring Apps applications.
     */
    @JvmName("qnuxixcqtqvtscff")
    public fun protocol(`value`: GatewayRouteConfigProtocol) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.protocol = mapped
    }

    /**
     * @param value Array of API routes, each route contains properties such as `title`, `uri`, `ssoEnabled`, `predicates`, `filters`.
     */
    @JvmName("xfoengqaornwakky")
    public suspend fun routes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.routes = mapped
    }

    /**
     * @param argument Array of API routes, each route contains properties such as `title`, `uri`, `ssoEnabled`, `predicates`, `filters`.
     */
    @JvmName("fplmnkbrbtdyfwqj")
    public suspend fun routes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            GatewayApiRouteArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.routes = mapped
    }

    /**
     * @param argument Array of API routes, each route contains properties such as `title`, `uri`, `ssoEnabled`, `predicates`, `filters`.
     */
    @JvmName("vgmdcfiuwawjlktl")
    public suspend fun routes(vararg argument: suspend GatewayApiRouteArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            GatewayApiRouteArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.routes = mapped
    }

    /**
     * @param argument Array of API routes, each route contains properties such as `title`, `uri`, `ssoEnabled`, `predicates`, `filters`.
     */
    @JvmName("rpocwncydgxhcthc")
    public suspend fun routes(argument: suspend GatewayApiRouteArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(GatewayApiRouteArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.routes = mapped
    }

    /**
     * @param values Array of API routes, each route contains properties such as `title`, `uri`, `ssoEnabled`, `predicates`, `filters`.
     */
    @JvmName("mdjivjafrifnbyup")
    public suspend fun routes(vararg values: GatewayApiRouteArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.routes = mapped
    }

    /**
     * @param value Enable Single Sign-On in app level.
     */
    @JvmName("etxpmwqkfyrmgopa")
    public suspend fun ssoEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ssoEnabled = mapped
    }

    internal fun build(): GatewayRouteConfigPropertiesArgs = GatewayRouteConfigPropertiesArgs(
        appResourceId = appResourceId,
        filters = filters,
        openApi = openApi,
        predicates = predicates,
        protocol = protocol,
        routes = routes,
        ssoEnabled = ssoEnabled,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy