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

com.pulumi.azurenative.cognitiveservices.kotlin.inputs.RaiPolicyPropertiesArgs.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: 2.82.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azurenative.cognitiveservices.kotlin.inputs

import com.pulumi.azurenative.cognitiveservices.inputs.RaiPolicyPropertiesArgs.builder
import com.pulumi.azurenative.cognitiveservices.kotlin.enums.RaiPolicyMode
import com.pulumi.core.Either
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

/**
 * Azure OpenAI Content Filters properties.
 * @property basePolicyName Name of the base Content Filters.
 * @property completionBlocklists The list of blocklists for completion.
 * @property contentFilters The list of Content Filters.
 * @property mode Content Filters mode.
 * @property promptBlocklists The list of blocklists for prompt.
 */
public data class RaiPolicyPropertiesArgs(
    public val basePolicyName: Output? = null,
    public val completionBlocklists: Output>? = null,
    public val contentFilters: Output>? = null,
    public val mode: Output>? = null,
    public val promptBlocklists: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azurenative.cognitiveservices.inputs.RaiPolicyPropertiesArgs =
        com.pulumi.azurenative.cognitiveservices.inputs.RaiPolicyPropertiesArgs.builder()
            .basePolicyName(basePolicyName?.applyValue({ args0 -> args0 }))
            .completionBlocklists(
                completionBlocklists?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .contentFilters(
                contentFilters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .mode(
                mode?.applyValue({ args0 ->
                    args0.transform({ args0 -> args0 }, { args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .promptBlocklists(
                promptBlocklists?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [RaiPolicyPropertiesArgs].
 */
@PulumiTagMarker
public class RaiPolicyPropertiesArgsBuilder internal constructor() {
    private var basePolicyName: Output? = null

    private var completionBlocklists: Output>? = null

    private var contentFilters: Output>? = null

    private var mode: Output>? = null

    private var promptBlocklists: Output>? = null

    /**
     * @param value Name of the base Content Filters.
     */
    @JvmName("ndxqksckvvnsojhk")
    public suspend fun basePolicyName(`value`: Output) {
        this.basePolicyName = value
    }

    /**
     * @param value The list of blocklists for completion.
     */
    @JvmName("iivgqobvuhsfxwpa")
    public suspend fun completionBlocklists(`value`: Output>) {
        this.completionBlocklists = value
    }

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

    /**
     * @param values The list of blocklists for completion.
     */
    @JvmName("adkbybvqcuxeplmp")
    public suspend fun completionBlocklists(values: List>) {
        this.completionBlocklists = Output.all(values)
    }

    /**
     * @param value The list of Content Filters.
     */
    @JvmName("rnrmsakrnkuxlmyu")
    public suspend fun contentFilters(`value`: Output>) {
        this.contentFilters = value
    }

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

    /**
     * @param values The list of Content Filters.
     */
    @JvmName("xhlnyrfvwfbrooxf")
    public suspend fun contentFilters(values: List>) {
        this.contentFilters = Output.all(values)
    }

    /**
     * @param value Content Filters mode.
     */
    @JvmName("qblbniefotlwgnay")
    public suspend fun mode(`value`: Output>) {
        this.mode = value
    }

    /**
     * @param value The list of blocklists for prompt.
     */
    @JvmName("avggilqqhqlajdwl")
    public suspend fun promptBlocklists(`value`: Output>) {
        this.promptBlocklists = value
    }

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

    /**
     * @param values The list of blocklists for prompt.
     */
    @JvmName("waupcbvasoorrthl")
    public suspend fun promptBlocklists(values: List>) {
        this.promptBlocklists = Output.all(values)
    }

    /**
     * @param value Name of the base Content Filters.
     */
    @JvmName("kmjlcnobtofejtch")
    public suspend fun basePolicyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.basePolicyName = mapped
    }

    /**
     * @param value The list of blocklists for completion.
     */
    @JvmName("ylymffebvitpxmbx")
    public suspend fun completionBlocklists(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.completionBlocklists = mapped
    }

    /**
     * @param argument The list of blocklists for completion.
     */
    @JvmName("nytxdrwcnhmmsgyv")
    public suspend fun completionBlocklists(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RaiBlocklistConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.completionBlocklists = mapped
    }

    /**
     * @param argument The list of blocklists for completion.
     */
    @JvmName("vmlqgiuhbqslaixg")
    public suspend fun completionBlocklists(vararg argument: suspend RaiBlocklistConfigArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RaiBlocklistConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.completionBlocklists = mapped
    }

    /**
     * @param argument The list of blocklists for completion.
     */
    @JvmName("dmeqvvgmwfagnrac")
    public suspend fun completionBlocklists(argument: suspend RaiBlocklistConfigArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(RaiBlocklistConfigArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.completionBlocklists = mapped
    }

    /**
     * @param values The list of blocklists for completion.
     */
    @JvmName("scymqtwaargdnams")
    public suspend fun completionBlocklists(vararg values: RaiBlocklistConfigArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.completionBlocklists = mapped
    }

    /**
     * @param value The list of Content Filters.
     */
    @JvmName("bhoamuxftyxtvkoo")
    public suspend fun contentFilters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.contentFilters = mapped
    }

    /**
     * @param argument The list of Content Filters.
     */
    @JvmName("pqurajhgsgusdcrl")
    public suspend fun contentFilters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RaiPolicyContentFilterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.contentFilters = mapped
    }

    /**
     * @param argument The list of Content Filters.
     */
    @JvmName("svlphtlddhpmxgjx")
    public suspend fun contentFilters(vararg argument: suspend RaiPolicyContentFilterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RaiPolicyContentFilterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.contentFilters = mapped
    }

    /**
     * @param argument The list of Content Filters.
     */
    @JvmName("cgcrqfegkscedbmh")
    public suspend fun contentFilters(argument: suspend RaiPolicyContentFilterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(RaiPolicyContentFilterArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.contentFilters = mapped
    }

    /**
     * @param values The list of Content Filters.
     */
    @JvmName("rpafuwjwahfdofac")
    public suspend fun contentFilters(vararg values: RaiPolicyContentFilterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.contentFilters = mapped
    }

    /**
     * @param value Content Filters mode.
     */
    @JvmName("cwnnihflxqyvohir")
    public suspend fun mode(`value`: Either?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value Content Filters mode.
     */
    @JvmName("oldbgyrjljtkytpc")
    public fun mode(`value`: String) {
        val toBeMapped = Either.ofLeft(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value Content Filters mode.
     */
    @JvmName("qkawdmeysqwexyca")
    public fun mode(`value`: RaiPolicyMode) {
        val toBeMapped = Either.ofRight(value)
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value The list of blocklists for prompt.
     */
    @JvmName("icbloyppfdcsiwxi")
    public suspend fun promptBlocklists(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.promptBlocklists = mapped
    }

    /**
     * @param argument The list of blocklists for prompt.
     */
    @JvmName("tcfrgeimvjoqkikc")
    public suspend fun promptBlocklists(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            RaiBlocklistConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.promptBlocklists = mapped
    }

    /**
     * @param argument The list of blocklists for prompt.
     */
    @JvmName("hjrkhlpkrjqmsuri")
    public suspend fun promptBlocklists(vararg argument: suspend RaiBlocklistConfigArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            RaiBlocklistConfigArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.promptBlocklists = mapped
    }

    /**
     * @param argument The list of blocklists for prompt.
     */
    @JvmName("wptlpijwojoklnvw")
    public suspend fun promptBlocklists(argument: suspend RaiBlocklistConfigArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(RaiBlocklistConfigArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.promptBlocklists = mapped
    }

    /**
     * @param values The list of blocklists for prompt.
     */
    @JvmName("yaeiyupnrqsugsfk")
    public suspend fun promptBlocklists(vararg values: RaiBlocklistConfigArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.promptBlocklists = mapped
    }

    internal fun build(): RaiPolicyPropertiesArgs = RaiPolicyPropertiesArgs(
        basePolicyName = basePolicyName,
        completionBlocklists = completionBlocklists,
        contentFilters = contentFilters,
        mode = mode,
        promptBlocklists = promptBlocklists,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy