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

com.pulumi.awsnative.bedrock.kotlin.GuardrailArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.bedrock.kotlin

import com.pulumi.awsnative.bedrock.GuardrailArgs.builder
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailContentPolicyConfigArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailContentPolicyConfigArgsBuilder
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailContextualGroundingPolicyConfigArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailContextualGroundingPolicyConfigArgsBuilder
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailSensitiveInformationPolicyConfigArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailSensitiveInformationPolicyConfigArgsBuilder
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailTopicPolicyConfigArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailTopicPolicyConfigArgsBuilder
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailWordPolicyConfigArgs
import com.pulumi.awsnative.bedrock.kotlin.inputs.GuardrailWordPolicyConfigArgsBuilder
import com.pulumi.awsnative.kotlin.inputs.TagArgs
import com.pulumi.awsnative.kotlin.inputs.TagArgsBuilder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Definition of AWS::Bedrock::Guardrail Resource Type
 * @property blockedInputMessaging Messaging for when violations are detected in text
 * @property blockedOutputsMessaging Messaging for when violations are detected in text
 * @property contentPolicyConfig The content filter policies to configure for the guardrail.
 * @property contextualGroundingPolicyConfig
 * @property description Description of the guardrail or its version
 * @property kmsKeyArn The KMS key with which the guardrail was encrypted at rest
 * @property name Name of the guardrail
 * @property sensitiveInformationPolicyConfig The sensitive information policy to configure for the guardrail.
 * @property tags List of Tags
 * @property topicPolicyConfig The topic policies to configure for the guardrail.
 * @property wordPolicyConfig The word policy you configure for the guardrail.
 */
public data class GuardrailArgs(
    public val blockedInputMessaging: Output? = null,
    public val blockedOutputsMessaging: Output? = null,
    public val contentPolicyConfig: Output? = null,
    public val contextualGroundingPolicyConfig: Output? =
        null,
    public val description: Output? = null,
    public val kmsKeyArn: Output? = null,
    public val name: Output? = null,
    public val sensitiveInformationPolicyConfig: Output? = null,
    public val tags: Output>? = null,
    public val topicPolicyConfig: Output? = null,
    public val wordPolicyConfig: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.bedrock.GuardrailArgs =
        com.pulumi.awsnative.bedrock.GuardrailArgs.builder()
            .blockedInputMessaging(blockedInputMessaging?.applyValue({ args0 -> args0 }))
            .blockedOutputsMessaging(blockedOutputsMessaging?.applyValue({ args0 -> args0 }))
            .contentPolicyConfig(
                contentPolicyConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .contextualGroundingPolicyConfig(
                contextualGroundingPolicyConfig?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .description(description?.applyValue({ args0 -> args0 }))
            .kmsKeyArn(kmsKeyArn?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .sensitiveInformationPolicyConfig(
                sensitiveInformationPolicyConfig?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .topicPolicyConfig(topicPolicyConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .wordPolicyConfig(
                wordPolicyConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [GuardrailArgs].
 */
@PulumiTagMarker
public class GuardrailArgsBuilder internal constructor() {
    private var blockedInputMessaging: Output? = null

    private var blockedOutputsMessaging: Output? = null

    private var contentPolicyConfig: Output? = null

    private var contextualGroundingPolicyConfig: Output? =
        null

    private var description: Output? = null

    private var kmsKeyArn: Output? = null

    private var name: Output? = null

    private var sensitiveInformationPolicyConfig:
        Output? = null

    private var tags: Output>? = null

    private var topicPolicyConfig: Output? = null

    private var wordPolicyConfig: Output? = null

    /**
     * @param value Messaging for when violations are detected in text
     */
    @JvmName("tebhmijoragkselh")
    public suspend fun blockedInputMessaging(`value`: Output) {
        this.blockedInputMessaging = value
    }

    /**
     * @param value Messaging for when violations are detected in text
     */
    @JvmName("swkxctrjkbidgstp")
    public suspend fun blockedOutputsMessaging(`value`: Output) {
        this.blockedOutputsMessaging = value
    }

    /**
     * @param value The content filter policies to configure for the guardrail.
     */
    @JvmName("kdehkjhxvnvvlnlw")
    public suspend fun contentPolicyConfig(`value`: Output) {
        this.contentPolicyConfig = value
    }

    /**
     * @param value
     */
    @JvmName("kswnewutcktdclkr")
    public suspend fun contextualGroundingPolicyConfig(`value`: Output) {
        this.contextualGroundingPolicyConfig = value
    }

    /**
     * @param value Description of the guardrail or its version
     */
    @JvmName("ihqnsaaxdggrbkdd")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The KMS key with which the guardrail was encrypted at rest
     */
    @JvmName("yarbkquqqawyinew")
    public suspend fun kmsKeyArn(`value`: Output) {
        this.kmsKeyArn = value
    }

    /**
     * @param value Name of the guardrail
     */
    @JvmName("syquxrbydrddufqy")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value The sensitive information policy to configure for the guardrail.
     */
    @JvmName("owfgcpkekpuguctb")
    public suspend fun sensitiveInformationPolicyConfig(`value`: Output) {
        this.sensitiveInformationPolicyConfig = value
    }

    /**
     * @param value List of Tags
     */
    @JvmName("mvocioclihnwkqvy")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values List of Tags
     */
    @JvmName("ivnhsjxxockeyjet")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The topic policies to configure for the guardrail.
     */
    @JvmName("yojhfqugikiobxaj")
    public suspend fun topicPolicyConfig(`value`: Output) {
        this.topicPolicyConfig = value
    }

    /**
     * @param value The word policy you configure for the guardrail.
     */
    @JvmName("dkmoyrqqbmqliywh")
    public suspend fun wordPolicyConfig(`value`: Output) {
        this.wordPolicyConfig = value
    }

    /**
     * @param value Messaging for when violations are detected in text
     */
    @JvmName("rfeaoogslgqgfhsy")
    public suspend fun blockedInputMessaging(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.blockedInputMessaging = mapped
    }

    /**
     * @param value Messaging for when violations are detected in text
     */
    @JvmName("jkglqowlcaqhpoir")
    public suspend fun blockedOutputsMessaging(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.blockedOutputsMessaging = mapped
    }

    /**
     * @param value The content filter policies to configure for the guardrail.
     */
    @JvmName("tivbtijabjmvtpuc")
    public suspend fun contentPolicyConfig(`value`: GuardrailContentPolicyConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentPolicyConfig = mapped
    }

    /**
     * @param argument The content filter policies to configure for the guardrail.
     */
    @JvmName("girdvjqstyycetxk")
    public suspend fun contentPolicyConfig(argument: suspend GuardrailContentPolicyConfigArgsBuilder.() -> Unit) {
        val toBeMapped = GuardrailContentPolicyConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.contentPolicyConfig = mapped
    }

    /**
     * @param value
     */
    @JvmName("jwtbbbhkaaixytqk")
    public suspend fun contextualGroundingPolicyConfig(`value`: GuardrailContextualGroundingPolicyConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contextualGroundingPolicyConfig = mapped
    }

    /**
     * @param argument
     */
    @JvmName("odynymbtwvqxgvij")
    public suspend fun contextualGroundingPolicyConfig(argument: suspend GuardrailContextualGroundingPolicyConfigArgsBuilder.() -> Unit) {
        val toBeMapped = GuardrailContextualGroundingPolicyConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.contextualGroundingPolicyConfig = mapped
    }

    /**
     * @param value Description of the guardrail or its version
     */
    @JvmName("vosoowpoxdknengk")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The KMS key with which the guardrail was encrypted at rest
     */
    @JvmName("fsbdjbhftxwmyqcy")
    public suspend fun kmsKeyArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyArn = mapped
    }

    /**
     * @param value Name of the guardrail
     */
    @JvmName("ltqfpdyusupgfsrx")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value The sensitive information policy to configure for the guardrail.
     */
    @JvmName("nnfrndoycjljrsaj")
    public suspend fun sensitiveInformationPolicyConfig(`value`: GuardrailSensitiveInformationPolicyConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sensitiveInformationPolicyConfig = mapped
    }

    /**
     * @param argument The sensitive information policy to configure for the guardrail.
     */
    @JvmName("xjwnxpfjladimxtt")
    public suspend fun sensitiveInformationPolicyConfig(argument: suspend GuardrailSensitiveInformationPolicyConfigArgsBuilder.() -> Unit) {
        val toBeMapped = GuardrailSensitiveInformationPolicyConfigArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.sensitiveInformationPolicyConfig = mapped
    }

    /**
     * @param value List of Tags
     */
    @JvmName("vhabrcgktckqamat")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument List of Tags
     */
    @JvmName("ibqwvkkkcyivwsju")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument List of Tags
     */
    @JvmName("brqbuskjvlywlwdi")
    public suspend fun tags(vararg argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map { TagArgsBuilder().applySuspend { it() }.build() }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument List of Tags
     */
    @JvmName("ymtbpheygntkehfp")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values List of Tags
     */
    @JvmName("olsrqnhwqsokqxdj")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The topic policies to configure for the guardrail.
     */
    @JvmName("dxyjdaetaysrgnkn")
    public suspend fun topicPolicyConfig(`value`: GuardrailTopicPolicyConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.topicPolicyConfig = mapped
    }

    /**
     * @param argument The topic policies to configure for the guardrail.
     */
    @JvmName("xuyuidfokhyfgkaq")
    public suspend fun topicPolicyConfig(argument: suspend GuardrailTopicPolicyConfigArgsBuilder.() -> Unit) {
        val toBeMapped = GuardrailTopicPolicyConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.topicPolicyConfig = mapped
    }

    /**
     * @param value The word policy you configure for the guardrail.
     */
    @JvmName("rlkwtadfhdnxxopn")
    public suspend fun wordPolicyConfig(`value`: GuardrailWordPolicyConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.wordPolicyConfig = mapped
    }

    /**
     * @param argument The word policy you configure for the guardrail.
     */
    @JvmName("fqdpfoottbkihkmw")
    public suspend fun wordPolicyConfig(argument: suspend GuardrailWordPolicyConfigArgsBuilder.() -> Unit) {
        val toBeMapped = GuardrailWordPolicyConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.wordPolicyConfig = mapped
    }

    internal fun build(): GuardrailArgs = GuardrailArgs(
        blockedInputMessaging = blockedInputMessaging,
        blockedOutputsMessaging = blockedOutputsMessaging,
        contentPolicyConfig = contentPolicyConfig,
        contextualGroundingPolicyConfig = contextualGroundingPolicyConfig,
        description = description,
        kmsKeyArn = kmsKeyArn,
        name = name,
        sensitiveInformationPolicyConfig = sensitiveInformationPolicyConfig,
        tags = tags,
        topicPolicyConfig = topicPolicyConfig,
        wordPolicyConfig = wordPolicyConfig,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy