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

com.pulumi.azure.appinsights.kotlin.inputs.StandardWebTestRequestArgs.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: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.appinsights.kotlin.inputs

import com.pulumi.azure.appinsights.inputs.StandardWebTestRequestArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
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

/**
 *
 * @property body The WebTest request body.
 * @property followRedirectsEnabled Should the following of redirects be enabled? Defaults to `true`.
 * @property headers One or more `header` blocks as defined above.
 * @property httpVerb Which HTTP verb to use for the call. Options are 'GET', 'POST', 'PUT', 'PATCH', and 'DELETE'. Defaults to `GET`.
 * @property parseDependentRequestsEnabled Should the parsing of dependend requests be enabled? Defaults to `true`.
 * @property url The WebTest request URL.
 */
public data class StandardWebTestRequestArgs(
    public val body: Output? = null,
    public val followRedirectsEnabled: Output? = null,
    public val headers: Output>? = null,
    public val httpVerb: Output? = null,
    public val parseDependentRequestsEnabled: Output? = null,
    public val url: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.appinsights.inputs.StandardWebTestRequestArgs =
        com.pulumi.azure.appinsights.inputs.StandardWebTestRequestArgs.builder()
            .body(body?.applyValue({ args0 -> args0 }))
            .followRedirectsEnabled(followRedirectsEnabled?.applyValue({ args0 -> args0 }))
            .headers(
                headers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .httpVerb(httpVerb?.applyValue({ args0 -> args0 }))
            .parseDependentRequestsEnabled(parseDependentRequestsEnabled?.applyValue({ args0 -> args0 }))
            .url(url.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [StandardWebTestRequestArgs].
 */
@PulumiTagMarker
public class StandardWebTestRequestArgsBuilder internal constructor() {
    private var body: Output? = null

    private var followRedirectsEnabled: Output? = null

    private var headers: Output>? = null

    private var httpVerb: Output? = null

    private var parseDependentRequestsEnabled: Output? = null

    private var url: Output? = null

    /**
     * @param value The WebTest request body.
     */
    @JvmName("avxbbdrqrtkfoopb")
    public suspend fun body(`value`: Output) {
        this.body = value
    }

    /**
     * @param value Should the following of redirects be enabled? Defaults to `true`.
     */
    @JvmName("mxmcitrxgcjvjrfg")
    public suspend fun followRedirectsEnabled(`value`: Output) {
        this.followRedirectsEnabled = value
    }

    /**
     * @param value One or more `header` blocks as defined above.
     */
    @JvmName("qyqwvpyhnlvihyba")
    public suspend fun headers(`value`: Output>) {
        this.headers = value
    }

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

    /**
     * @param values One or more `header` blocks as defined above.
     */
    @JvmName("hbphssxtrtqxuqjh")
    public suspend fun headers(values: List>) {
        this.headers = Output.all(values)
    }

    /**
     * @param value Which HTTP verb to use for the call. Options are 'GET', 'POST', 'PUT', 'PATCH', and 'DELETE'. Defaults to `GET`.
     */
    @JvmName("rpqxrthkwvwvyreq")
    public suspend fun httpVerb(`value`: Output) {
        this.httpVerb = value
    }

    /**
     * @param value Should the parsing of dependend requests be enabled? Defaults to `true`.
     */
    @JvmName("vkkqskyhyafnrgek")
    public suspend fun parseDependentRequestsEnabled(`value`: Output) {
        this.parseDependentRequestsEnabled = value
    }

    /**
     * @param value The WebTest request URL.
     */
    @JvmName("cqudogecqnuafwgt")
    public suspend fun url(`value`: Output) {
        this.url = value
    }

    /**
     * @param value The WebTest request body.
     */
    @JvmName("ckbstopxasoyorhq")
    public suspend fun body(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.body = mapped
    }

    /**
     * @param value Should the following of redirects be enabled? Defaults to `true`.
     */
    @JvmName("tnbmwtivjhtnoumh")
    public suspend fun followRedirectsEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.followRedirectsEnabled = mapped
    }

    /**
     * @param value One or more `header` blocks as defined above.
     */
    @JvmName("wpwihemqcnbivbnu")
    public suspend fun headers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param argument One or more `header` blocks as defined above.
     */
    @JvmName("jofuywyvbryjkkay")
    public suspend
    fun headers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            StandardWebTestRequestHeaderArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.headers = mapped
    }

    /**
     * @param argument One or more `header` blocks as defined above.
     */
    @JvmName("ectvowkuskiwxokq")
    public suspend fun headers(
        vararg
        argument: suspend StandardWebTestRequestHeaderArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            StandardWebTestRequestHeaderArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.headers = mapped
    }

    /**
     * @param argument One or more `header` blocks as defined above.
     */
    @JvmName("glimboyfuskjwdyq")
    public suspend fun headers(argument: suspend StandardWebTestRequestHeaderArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            StandardWebTestRequestHeaderArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.headers = mapped
    }

    /**
     * @param values One or more `header` blocks as defined above.
     */
    @JvmName("fmiivhuseqjunilq")
    public suspend fun headers(vararg values: StandardWebTestRequestHeaderArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.headers = mapped
    }

    /**
     * @param value Which HTTP verb to use for the call. Options are 'GET', 'POST', 'PUT', 'PATCH', and 'DELETE'. Defaults to `GET`.
     */
    @JvmName("mibqungnmvvihobk")
    public suspend fun httpVerb(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.httpVerb = mapped
    }

    /**
     * @param value Should the parsing of dependend requests be enabled? Defaults to `true`.
     */
    @JvmName("afoarvlyrdtwtjif")
    public suspend fun parseDependentRequestsEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parseDependentRequestsEnabled = mapped
    }

    /**
     * @param value The WebTest request URL.
     */
    @JvmName("arpruadexiijiqgm")
    public suspend fun url(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.url = mapped
    }

    internal fun build(): StandardWebTestRequestArgs = StandardWebTestRequestArgs(
        body = body,
        followRedirectsEnabled = followRedirectsEnabled,
        headers = headers,
        httpVerb = httpVerb,
        parseDependentRequestsEnabled = parseDependentRequestsEnabled,
        url = url ?: throw PulumiNullFieldException("url"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy