com.pulumi.awsnative.apigateway.kotlin.RequestValidatorArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.apigateway.kotlin
import com.pulumi.awsnative.apigateway.RequestValidatorArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
* The ``AWS::ApiGateway::RequestValidator`` resource sets up basic validation rules for incoming requests to your API. For more information, see [Enable Basic Request Validation for an API in API Gateway](https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-method-request-validation.html) in the *API Gateway Developer Guide*.
* @property name The name of this RequestValidator
* @property restApiId The string identifier of the associated RestApi.
* @property validateRequestBody A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
* @property validateRequestParameters A Boolean flag to indicate whether to validate request parameters (``true``) or not (``false``).
*/
public data class RequestValidatorArgs(
public val name: Output? = null,
public val restApiId: Output? = null,
public val validateRequestBody: Output? = null,
public val validateRequestParameters: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.apigateway.RequestValidatorArgs =
com.pulumi.awsnative.apigateway.RequestValidatorArgs.builder()
.name(name?.applyValue({ args0 -> args0 }))
.restApiId(restApiId?.applyValue({ args0 -> args0 }))
.validateRequestBody(validateRequestBody?.applyValue({ args0 -> args0 }))
.validateRequestParameters(validateRequestParameters?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [RequestValidatorArgs].
*/
@PulumiTagMarker
public class RequestValidatorArgsBuilder internal constructor() {
private var name: Output? = null
private var restApiId: Output? = null
private var validateRequestBody: Output? = null
private var validateRequestParameters: Output? = null
/**
* @param value The name of this RequestValidator
*/
@JvmName("dbbswxitbgnhohev")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value The string identifier of the associated RestApi.
*/
@JvmName("cnehlifuoiyxpxeo")
public suspend fun restApiId(`value`: Output) {
this.restApiId = value
}
/**
* @param value A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
*/
@JvmName("wunvqdxfuepanuxk")
public suspend fun validateRequestBody(`value`: Output) {
this.validateRequestBody = value
}
/**
* @param value A Boolean flag to indicate whether to validate request parameters (``true``) or not (``false``).
*/
@JvmName("krpyqjkogmwisbcv")
public suspend fun validateRequestParameters(`value`: Output) {
this.validateRequestParameters = value
}
/**
* @param value The name of this RequestValidator
*/
@JvmName("kvdmjjykbfenwhsr")
public suspend fun name(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value The string identifier of the associated RestApi.
*/
@JvmName("mkfeyvoydvnhhnpd")
public suspend fun restApiId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.restApiId = mapped
}
/**
* @param value A Boolean flag to indicate whether to validate a request body according to the configured Model schema.
*/
@JvmName("qakoujrpjqefales")
public suspend fun validateRequestBody(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.validateRequestBody = mapped
}
/**
* @param value A Boolean flag to indicate whether to validate request parameters (``true``) or not (``false``).
*/
@JvmName("uscwuvqksghykomr")
public suspend fun validateRequestParameters(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.validateRequestParameters = mapped
}
internal fun build(): RequestValidatorArgs = RequestValidatorArgs(
name = name,
restApiId = restApiId,
validateRequestBody = validateRequestBody,
validateRequestParameters = validateRequestParameters,
)
}