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

com.pulumi.azure.media.kotlin.inputs.ContentKeyPolicyPolicyOptionArgs.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.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.media.kotlin.inputs

import com.pulumi.azure.media.inputs.ContentKeyPolicyPolicyOptionArgs.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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property clearKeyConfigurationEnabled Enable a configuration for non-DRM keys.
 * @property fairplayConfiguration A `fairplay_configuration` block as defined above. Check license requirements here .
 * @property name The name which should be used for this Policy Option.
 * @property openRestrictionEnabled Enable an open restriction. License or key will be delivered on every request.
 * @property playreadyConfigurationLicenses One or more `playready_configuration_license` blocks as defined above.
 * @property playreadyResponseCustomData The custom response data of the PlayReady configuration. This only applies when `playready_configuration_license` is specified.
 * @property tokenRestriction A `token_restriction` block as defined below.
 * @property widevineConfigurationTemplate The Widevine template.
 * > **NOTE:** Each policy_option can only have one type of configuration: `fairplay_configuration`, `clear_key_configuration_enabled`, `playready_configuration_license` or `widevine_configuration_template`. And is possible to assign only one type of restriction: `open_restriction_enabled` or `token_restriction`.
 */
public data class ContentKeyPolicyPolicyOptionArgs(
    public val clearKeyConfigurationEnabled: Output? = null,
    public val fairplayConfiguration: Output? =
        null,
    public val name: Output,
    public val openRestrictionEnabled: Output? = null,
    public val playreadyConfigurationLicenses:
    Output>? = null,
    public val playreadyResponseCustomData: Output? = null,
    public val tokenRestriction: Output? = null,
    public val widevineConfigurationTemplate: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.media.inputs.ContentKeyPolicyPolicyOptionArgs =
        com.pulumi.azure.media.inputs.ContentKeyPolicyPolicyOptionArgs.builder()
            .clearKeyConfigurationEnabled(clearKeyConfigurationEnabled?.applyValue({ args0 -> args0 }))
            .fairplayConfiguration(
                fairplayConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .name(name.applyValue({ args0 -> args0 }))
            .openRestrictionEnabled(openRestrictionEnabled?.applyValue({ args0 -> args0 }))
            .playreadyConfigurationLicenses(
                playreadyConfigurationLicenses?.applyValue({ args0 ->
                    args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) })
                }),
            )
            .playreadyResponseCustomData(playreadyResponseCustomData?.applyValue({ args0 -> args0 }))
            .tokenRestriction(tokenRestriction?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .widevineConfigurationTemplate(
                widevineConfigurationTemplate?.applyValue({ args0 ->
                    args0
                }),
            ).build()
}

/**
 * Builder for [ContentKeyPolicyPolicyOptionArgs].
 */
@PulumiTagMarker
public class ContentKeyPolicyPolicyOptionArgsBuilder internal constructor() {
    private var clearKeyConfigurationEnabled: Output? = null

    private var fairplayConfiguration: Output? =
        null

    private var name: Output? = null

    private var openRestrictionEnabled: Output? = null

    private var playreadyConfigurationLicenses:
        Output>? = null

    private var playreadyResponseCustomData: Output? = null

    private var tokenRestriction: Output? = null

    private var widevineConfigurationTemplate: Output? = null

    /**
     * @param value Enable a configuration for non-DRM keys.
     */
    @JvmName("hrjxnfvevixnasyh")
    public suspend fun clearKeyConfigurationEnabled(`value`: Output) {
        this.clearKeyConfigurationEnabled = value
    }

    /**
     * @param value A `fairplay_configuration` block as defined above. Check license requirements here .
     */
    @JvmName("mmvocofeexfjmjjp")
    public suspend
    fun fairplayConfiguration(`value`: Output) {
        this.fairplayConfiguration = value
    }

    /**
     * @param value The name which should be used for this Policy Option.
     */
    @JvmName("imfrbwvejeggrbcc")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Enable an open restriction. License or key will be delivered on every request.
     */
    @JvmName("gnxlmyswulfwywnx")
    public suspend fun openRestrictionEnabled(`value`: Output) {
        this.openRestrictionEnabled = value
    }

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

    @JvmName("iufvytcgdcjbipvp")
    public suspend fun playreadyConfigurationLicenses(
        vararg
        values: Output,
    ) {
        this.playreadyConfigurationLicenses = Output.all(values.asList())
    }

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

    /**
     * @param value The custom response data of the PlayReady configuration. This only applies when `playready_configuration_license` is specified.
     */
    @JvmName("kbirblpjcmlvoluj")
    public suspend fun playreadyResponseCustomData(`value`: Output) {
        this.playreadyResponseCustomData = value
    }

    /**
     * @param value A `token_restriction` block as defined below.
     */
    @JvmName("ecijuvgrpehervmq")
    public suspend
    fun tokenRestriction(`value`: Output) {
        this.tokenRestriction = value
    }

    /**
     * @param value The Widevine template.
     * > **NOTE:** Each policy_option can only have one type of configuration: `fairplay_configuration`, `clear_key_configuration_enabled`, `playready_configuration_license` or `widevine_configuration_template`. And is possible to assign only one type of restriction: `open_restriction_enabled` or `token_restriction`.
     */
    @JvmName("safaosobessbjfuj")
    public suspend fun widevineConfigurationTemplate(`value`: Output) {
        this.widevineConfigurationTemplate = value
    }

    /**
     * @param value Enable a configuration for non-DRM keys.
     */
    @JvmName("grbpnjofvkywgixc")
    public suspend fun clearKeyConfigurationEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.clearKeyConfigurationEnabled = mapped
    }

    /**
     * @param value A `fairplay_configuration` block as defined above. Check license requirements here .
     */
    @JvmName("xcicclvyyotkeygk")
    public suspend
    fun fairplayConfiguration(`value`: ContentKeyPolicyPolicyOptionFairplayConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.fairplayConfiguration = mapped
    }

    /**
     * @param argument A `fairplay_configuration` block as defined above. Check license requirements here .
     */
    @JvmName("dclwkuqcdslswujc")
    public suspend
    fun fairplayConfiguration(argument: suspend ContentKeyPolicyPolicyOptionFairplayConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ContentKeyPolicyPolicyOptionFairplayConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.fairplayConfiguration = mapped
    }

    /**
     * @param value The name which should be used for this Policy Option.
     */
    @JvmName("wmeqatobhukrynnk")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Enable an open restriction. License or key will be delivered on every request.
     */
    @JvmName("qernmavlnqnhyhil")
    public suspend fun openRestrictionEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.openRestrictionEnabled = mapped
    }

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

    /**
     * @param argument One or more `playready_configuration_license` blocks as defined above.
     */
    @JvmName("atbolrdqxpemrjop")
    public suspend
    fun playreadyConfigurationLicenses(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ContentKeyPolicyPolicyOptionPlayreadyConfigurationLicenseArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.playreadyConfigurationLicenses = mapped
    }

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

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

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

    /**
     * @param value The custom response data of the PlayReady configuration. This only applies when `playready_configuration_license` is specified.
     */
    @JvmName("wjuehyootvpahhwg")
    public suspend fun playreadyResponseCustomData(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.playreadyResponseCustomData = mapped
    }

    /**
     * @param value A `token_restriction` block as defined below.
     */
    @JvmName("vrlyqhfmwcwefwpj")
    public suspend fun tokenRestriction(`value`: ContentKeyPolicyPolicyOptionTokenRestrictionArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tokenRestriction = mapped
    }

    /**
     * @param argument A `token_restriction` block as defined below.
     */
    @JvmName("shckonskvqtkshuy")
    public suspend
    fun tokenRestriction(argument: suspend ContentKeyPolicyPolicyOptionTokenRestrictionArgsBuilder.() -> Unit) {
        val toBeMapped = ContentKeyPolicyPolicyOptionTokenRestrictionArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.tokenRestriction = mapped
    }

    /**
     * @param value The Widevine template.
     * > **NOTE:** Each policy_option can only have one type of configuration: `fairplay_configuration`, `clear_key_configuration_enabled`, `playready_configuration_license` or `widevine_configuration_template`. And is possible to assign only one type of restriction: `open_restriction_enabled` or `token_restriction`.
     */
    @JvmName("fllenxtyhklsbdni")
    public suspend fun widevineConfigurationTemplate(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.widevineConfigurationTemplate = mapped
    }

    internal fun build(): ContentKeyPolicyPolicyOptionArgs = ContentKeyPolicyPolicyOptionArgs(
        clearKeyConfigurationEnabled = clearKeyConfigurationEnabled,
        fairplayConfiguration = fairplayConfiguration,
        name = name ?: throw PulumiNullFieldException("name"),
        openRestrictionEnabled = openRestrictionEnabled,
        playreadyConfigurationLicenses = playreadyConfigurationLicenses,
        playreadyResponseCustomData = playreadyResponseCustomData,
        tokenRestriction = tokenRestriction,
        widevineConfigurationTemplate = widevineConfigurationTemplate,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy