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

com.pulumi.awsnative.apigateway.kotlin.GatewayResponseArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.apigateway.kotlin

import com.pulumi.awsnative.apigateway.GatewayResponseArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * The ``AWS::ApiGateway::GatewayResponse`` resource creates a gateway response for your API. For more information, see [API Gateway Responses](https://docs.aws.amazon.com/apigateway/latest/developerguide/customize-gateway-responses.html#api-gateway-gatewayResponse-definition) in the *API Gateway Developer Guide*.
 * @property responseParameters Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.
 * @property responseTemplates Response templates of the GatewayResponse as a string-to-string map of key-value pairs.
 * @property responseType The response type of the associated GatewayResponse.
 * @property restApiId The string identifier of the associated RestApi.
 * @property statusCode The HTTP status code for this GatewayResponse.
 */
public data class GatewayResponseArgs(
    public val responseParameters: Output>? = null,
    public val responseTemplates: Output>? = null,
    public val responseType: Output? = null,
    public val restApiId: Output? = null,
    public val statusCode: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.apigateway.GatewayResponseArgs =
        com.pulumi.awsnative.apigateway.GatewayResponseArgs.builder()
            .responseParameters(
                responseParameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .responseTemplates(
                responseTemplates?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .responseType(responseType?.applyValue({ args0 -> args0 }))
            .restApiId(restApiId?.applyValue({ args0 -> args0 }))
            .statusCode(statusCode?.applyValue({ args0 -> args0 })).build()
}

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

    private var responseTemplates: Output>? = null

    private var responseType: Output? = null

    private var restApiId: Output? = null

    private var statusCode: Output? = null

    /**
     * @param value Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.
     */
    @JvmName("gnlplgvfdqtayokm")
    public suspend fun responseParameters(`value`: Output>) {
        this.responseParameters = value
    }

    /**
     * @param value Response templates of the GatewayResponse as a string-to-string map of key-value pairs.
     */
    @JvmName("kafcyxiqktgisagw")
    public suspend fun responseTemplates(`value`: Output>) {
        this.responseTemplates = value
    }

    /**
     * @param value The response type of the associated GatewayResponse.
     */
    @JvmName("ftpkklnirxtbeoof")
    public suspend fun responseType(`value`: Output) {
        this.responseType = value
    }

    /**
     * @param value The string identifier of the associated RestApi.
     */
    @JvmName("vhwqrskghbxgqodm")
    public suspend fun restApiId(`value`: Output) {
        this.restApiId = value
    }

    /**
     * @param value The HTTP status code for this GatewayResponse.
     */
    @JvmName("hlgxsxihtnohfhff")
    public suspend fun statusCode(`value`: Output) {
        this.statusCode = value
    }

    /**
     * @param value Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.
     */
    @JvmName("eppmggorvpxagcpf")
    public suspend fun responseParameters(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.responseParameters = mapped
    }

    /**
     * @param values Response parameters (paths, query strings and headers) of the GatewayResponse as a string-to-string map of key-value pairs.
     */
    @JvmName("yxtatuxxbeltioos")
    public fun responseParameters(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.responseParameters = mapped
    }

    /**
     * @param value Response templates of the GatewayResponse as a string-to-string map of key-value pairs.
     */
    @JvmName("gouyiqcvdbvrlrcs")
    public suspend fun responseTemplates(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.responseTemplates = mapped
    }

    /**
     * @param values Response templates of the GatewayResponse as a string-to-string map of key-value pairs.
     */
    @JvmName("ssuwdvxkwgonvoyn")
    public fun responseTemplates(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.responseTemplates = mapped
    }

    /**
     * @param value The response type of the associated GatewayResponse.
     */
    @JvmName("cenxtvxdipsegjdy")
    public suspend fun responseType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.responseType = mapped
    }

    /**
     * @param value The string identifier of the associated RestApi.
     */
    @JvmName("vnyxthqvydsnkmpp")
    public suspend fun restApiId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.restApiId = mapped
    }

    /**
     * @param value The HTTP status code for this GatewayResponse.
     */
    @JvmName("uqhebmxtlgveckul")
    public suspend fun statusCode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.statusCode = mapped
    }

    internal fun build(): GatewayResponseArgs = GatewayResponseArgs(
        responseParameters = responseParameters,
        responseTemplates = responseTemplates,
        responseType = responseType,
        restApiId = restApiId,
        statusCode = statusCode,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy