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

com.pulumi.azure.apimanagement.kotlin.inputs.ApiOperationResponseArgs.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.apimanagement.kotlin.inputs

import com.pulumi.azure.apimanagement.inputs.ApiOperationResponseArgs.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property description A description of the HTTP Response, which may include HTML tags.
 * @property headers One or more `header` blocks as defined above.
 * @property representations One or more `representation` blocks as defined below.
 * @property statusCode The HTTP Status Code.
 */
public data class ApiOperationResponseArgs(
    public val description: Output? = null,
    public val headers: Output>? = null,
    public val representations: Output>? = null,
    public val statusCode: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.apimanagement.inputs.ApiOperationResponseArgs =
        com.pulumi.azure.apimanagement.inputs.ApiOperationResponseArgs.builder()
            .description(description?.applyValue({ args0 -> args0 }))
            .headers(
                headers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .representations(
                representations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .statusCode(statusCode.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ApiOperationResponseArgs].
 */
@PulumiTagMarker
public class ApiOperationResponseArgsBuilder internal constructor() {
    private var description: Output? = null

    private var headers: Output>? = null

    private var representations: Output>? = null

    private var statusCode: Output? = null

    /**
     * @param value A description of the HTTP Response, which may include HTML tags.
     */
    @JvmName("xarfvjvcswkthjcg")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

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

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

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

    /**
     * @param value One or more `representation` blocks as defined below.
     */
    @JvmName("rneiaxuplwppmnye")
    public suspend fun representations(`value`: Output>) {
        this.representations = value
    }

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

    /**
     * @param values One or more `representation` blocks as defined below.
     */
    @JvmName("gxsvbburpytnsxhr")
    public suspend fun representations(values: List>) {
        this.representations = Output.all(values)
    }

    /**
     * @param value The HTTP Status Code.
     */
    @JvmName("xhespfjxywwdcddy")
    public suspend fun statusCode(`value`: Output) {
        this.statusCode = value
    }

    /**
     * @param value A description of the HTTP Response, which may include HTML tags.
     */
    @JvmName("bpaoxudmvownwpfr")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value One or more `header` blocks as defined above.
     */
    @JvmName("daiydqlpuflyimiq")
    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("ughlhkcfeofoxojo")
    public suspend fun headers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ApiOperationResponseHeaderArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.headers = mapped
    }

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

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

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

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

    /**
     * @param argument One or more `representation` blocks as defined below.
     */
    @JvmName("nsbuiqhynbgmdcrc")
    public suspend fun representations(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ApiOperationResponseRepresentationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.representations = mapped
    }

    /**
     * @param argument One or more `representation` blocks as defined below.
     */
    @JvmName("hkkatwolnygfssdr")
    public suspend fun representations(vararg argument: suspend ApiOperationResponseRepresentationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ApiOperationResponseRepresentationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.representations = mapped
    }

    /**
     * @param argument One or more `representation` blocks as defined below.
     */
    @JvmName("fjintvkwokaidohg")
    public suspend fun representations(argument: suspend ApiOperationResponseRepresentationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ApiOperationResponseRepresentationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.representations = mapped
    }

    /**
     * @param values One or more `representation` blocks as defined below.
     */
    @JvmName("fwvvhknucuowxlfu")
    public suspend fun representations(vararg values: ApiOperationResponseRepresentationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.representations = mapped
    }

    /**
     * @param value The HTTP Status Code.
     */
    @JvmName("gbogyyvptbromyqs")
    public suspend fun statusCode(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.statusCode = mapped
    }

    internal fun build(): ApiOperationResponseArgs = ApiOperationResponseArgs(
        description = description,
        headers = headers,
        representations = representations,
        statusCode = statusCode ?: throw PulumiNullFieldException("statusCode"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy