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

com.pulumi.awsnative.ivs.kotlin.PlaybackRestrictionPolicyArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.ivs.kotlin

import com.pulumi.awsnative.ivs.PlaybackRestrictionPolicyArgs.builder
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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::IVS::PlaybackRestrictionPolicy.
 * @property allowedCountries A list of country codes that control geoblocking restriction. Allowed values are the officially assigned ISO 3166-1 alpha-2 codes. Default: All countries (an empty array).
 * @property allowedOrigins A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the Origin header defined at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin
 * @property enableStrictOriginEnforcement Whether channel playback is constrained by origin site.
 * @property name Playback-restriction-policy name.
 * @property tags An array of key-value pairs to apply to this resource.
 */
public data class PlaybackRestrictionPolicyArgs(
    public val allowedCountries: Output>? = null,
    public val allowedOrigins: Output>? = null,
    public val enableStrictOriginEnforcement: Output? = null,
    public val name: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ivs.PlaybackRestrictionPolicyArgs =
        com.pulumi.awsnative.ivs.PlaybackRestrictionPolicyArgs.builder()
            .allowedCountries(allowedCountries?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .allowedOrigins(allowedOrigins?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .enableStrictOriginEnforcement(enableStrictOriginEnforcement?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var allowedOrigins: Output>? = null

    private var enableStrictOriginEnforcement: Output? = null

    private var name: Output? = null

    private var tags: Output>? = null

    /**
     * @param value A list of country codes that control geoblocking restriction. Allowed values are the officially assigned ISO 3166-1 alpha-2 codes. Default: All countries (an empty array).
     */
    @JvmName("xxywrayajwmyhcxo")
    public suspend fun allowedCountries(`value`: Output>) {
        this.allowedCountries = value
    }

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

    /**
     * @param values A list of country codes that control geoblocking restriction. Allowed values are the officially assigned ISO 3166-1 alpha-2 codes. Default: All countries (an empty array).
     */
    @JvmName("euplhtxkaqbkafqe")
    public suspend fun allowedCountries(values: List>) {
        this.allowedCountries = Output.all(values)
    }

    /**
     * @param value A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the Origin header defined at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin
     */
    @JvmName("paxmibpubismfpqa")
    public suspend fun allowedOrigins(`value`: Output>) {
        this.allowedOrigins = value
    }

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

    /**
     * @param values A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the Origin header defined at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin
     */
    @JvmName("hxborlsgxslxmybg")
    public suspend fun allowedOrigins(values: List>) {
        this.allowedOrigins = Output.all(values)
    }

    /**
     * @param value Whether channel playback is constrained by origin site.
     */
    @JvmName("ljfvhgatkqyhlvko")
    public suspend fun enableStrictOriginEnforcement(`value`: Output) {
        this.enableStrictOriginEnforcement = value
    }

    /**
     * @param value Playback-restriction-policy name.
     */
    @JvmName("heqlxsgjlmqcwtpf")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("vbblumylgmahgcoy")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("qpndwpjwwgtvgybu")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value A list of country codes that control geoblocking restriction. Allowed values are the officially assigned ISO 3166-1 alpha-2 codes. Default: All countries (an empty array).
     */
    @JvmName("huvfxdbdfdidmtpn")
    public suspend fun allowedCountries(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowedCountries = mapped
    }

    /**
     * @param values A list of country codes that control geoblocking restriction. Allowed values are the officially assigned ISO 3166-1 alpha-2 codes. Default: All countries (an empty array).
     */
    @JvmName("apwimdmwketmnqro")
    public suspend fun allowedCountries(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedCountries = mapped
    }

    /**
     * @param value A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the Origin header defined at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin
     */
    @JvmName("xufcvyfsgcehqype")
    public suspend fun allowedOrigins(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allowedOrigins = mapped
    }

    /**
     * @param values A list of origin sites that control CORS restriction. Allowed values are the same as valid values of the Origin header defined at https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin
     */
    @JvmName("pdpjmcrjgsnafjdo")
    public suspend fun allowedOrigins(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allowedOrigins = mapped
    }

    /**
     * @param value Whether channel playback is constrained by origin site.
     */
    @JvmName("jhmmcjqbiftisdhi")
    public suspend fun enableStrictOriginEnforcement(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enableStrictOriginEnforcement = mapped
    }

    /**
     * @param value Playback-restriction-policy name.
     */
    @JvmName("fdhayxibmdbumfhg")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value An array of key-value pairs to apply to this resource.
     */
    @JvmName("pdbdilxkswadfurl")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument An array of key-value pairs to apply to this resource.
     */
    @JvmName("jwlnyttfjmwwnelc")
    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 An array of key-value pairs to apply to this resource.
     */
    @JvmName("lqhesfxputtlecin")
    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 An array of key-value pairs to apply to this resource.
     */
    @JvmName("minpcyhinxsafimi")
    public suspend fun tags(argument: suspend TagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(TagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values An array of key-value pairs to apply to this resource.
     */
    @JvmName("aiamccppriklcaep")
    public suspend fun tags(vararg values: TagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): PlaybackRestrictionPolicyArgs = PlaybackRestrictionPolicyArgs(
        allowedCountries = allowedCountries,
        allowedOrigins = allowedOrigins,
        enableStrictOriginEnforcement = enableStrictOriginEnforcement,
        name = name,
        tags = tags,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy