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

com.pulumi.aws.cloudfront.kotlin.inputs.DistributionOriginGroupArgs.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.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.cloudfront.kotlin.inputs

import com.pulumi.aws.cloudfront.inputs.DistributionOriginGroupArgs.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property failoverCriteria The failover criteria for when to failover to the secondary origin.
 * @property members Ordered member configuration blocks assigned to the origin group, where the first member is the primary origin. You must specify two members.
 * @property originId
 */
public data class DistributionOriginGroupArgs(
    public val failoverCriteria: Output,
    public val members: Output>,
    public val originId: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.cloudfront.inputs.DistributionOriginGroupArgs =
        com.pulumi.aws.cloudfront.inputs.DistributionOriginGroupArgs.builder()
            .failoverCriteria(failoverCriteria.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .members(
                members.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .originId(originId.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DistributionOriginGroupArgs].
 */
@PulumiTagMarker
public class DistributionOriginGroupArgsBuilder internal constructor() {
    private var failoverCriteria: Output? = null

    private var members: Output>? = null

    private var originId: Output? = null

    /**
     * @param value The failover criteria for when to failover to the secondary origin.
     */
    @JvmName("oiaynloosvcxbdlw")
    public suspend fun failoverCriteria(`value`: Output) {
        this.failoverCriteria = value
    }

    /**
     * @param value Ordered member configuration blocks assigned to the origin group, where the first member is the primary origin. You must specify two members.
     */
    @JvmName("uscnkqrttfkgdgun")
    public suspend fun members(`value`: Output>) {
        this.members = value
    }

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

    /**
     * @param values Ordered member configuration blocks assigned to the origin group, where the first member is the primary origin. You must specify two members.
     */
    @JvmName("axtoqvrdufsmflfc")
    public suspend fun members(values: List>) {
        this.members = Output.all(values)
    }

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

    /**
     * @param value The failover criteria for when to failover to the secondary origin.
     */
    @JvmName("gvgipdwkbydcpcos")
    public suspend fun failoverCriteria(`value`: DistributionOriginGroupFailoverCriteriaArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.failoverCriteria = mapped
    }

    /**
     * @param argument The failover criteria for when to failover to the secondary origin.
     */
    @JvmName("kiuhsmoxxfbahprn")
    public suspend fun failoverCriteria(argument: suspend DistributionOriginGroupFailoverCriteriaArgsBuilder.() -> Unit) {
        val toBeMapped = DistributionOriginGroupFailoverCriteriaArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.failoverCriteria = mapped
    }

    /**
     * @param value Ordered member configuration blocks assigned to the origin group, where the first member is the primary origin. You must specify two members.
     */
    @JvmName("ofmmyvnstkhfumpr")
    public suspend fun members(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.members = mapped
    }

    /**
     * @param argument Ordered member configuration blocks assigned to the origin group, where the first member is the primary origin. You must specify two members.
     */
    @JvmName("bkntylaqwteoavqy")
    public suspend fun members(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            DistributionOriginGroupMemberArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.members = mapped
    }

    /**
     * @param argument Ordered member configuration blocks assigned to the origin group, where the first member is the primary origin. You must specify two members.
     */
    @JvmName("wieerwnaopyvlojc")
    public suspend fun members(vararg argument: suspend DistributionOriginGroupMemberArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            DistributionOriginGroupMemberArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.members = mapped
    }

    /**
     * @param argument Ordered member configuration blocks assigned to the origin group, where the first member is the primary origin. You must specify two members.
     */
    @JvmName("yvraedqxbdjfwygy")
    public suspend fun members(argument: suspend DistributionOriginGroupMemberArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            DistributionOriginGroupMemberArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.members = mapped
    }

    /**
     * @param values Ordered member configuration blocks assigned to the origin group, where the first member is the primary origin. You must specify two members.
     */
    @JvmName("piyrgurynmeqcqar")
    public suspend fun members(vararg values: DistributionOriginGroupMemberArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.members = mapped
    }

    /**
     * @param value
     */
    @JvmName("ogiyuakclgdmjfvq")
    public suspend fun originId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.originId = mapped
    }

    internal fun build(): DistributionOriginGroupArgs = DistributionOriginGroupArgs(
        failoverCriteria = failoverCriteria ?: throw PulumiNullFieldException("failoverCriteria"),
        members = members ?: throw PulumiNullFieldException("members"),
        originId = originId ?: throw PulumiNullFieldException("originId"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy