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

com.pulumi.aws.s3.kotlin.inputs.BucketReplicationConfigurationArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.aws.s3.kotlin.inputs

import com.pulumi.aws.s3.inputs.BucketReplicationConfigurationArgs.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 role The ARN of the IAM role for Amazon S3 to assume when replicating the objects.
 * @property rules Specifies the rules managing the replication (documented below).
 */
public data class BucketReplicationConfigurationArgs(
    public val role: Output,
    public val rules: Output>,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.s3.inputs.BucketReplicationConfigurationArgs =
        com.pulumi.aws.s3.inputs.BucketReplicationConfigurationArgs.builder()
            .role(role.applyValue({ args0 -> args0 }))
            .rules(
                rules.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [BucketReplicationConfigurationArgs].
 */
@PulumiTagMarker
public class BucketReplicationConfigurationArgsBuilder internal constructor() {
    private var role: Output? = null

    private var rules: Output>? = null

    /**
     * @param value The ARN of the IAM role for Amazon S3 to assume when replicating the objects.
     */
    @JvmName("qndojugvluooaupw")
    public suspend fun role(`value`: Output) {
        this.role = value
    }

    /**
     * @param value Specifies the rules managing the replication (documented below).
     */
    @JvmName("rvrxmgrgeheejnwf")
    public suspend fun rules(`value`: Output>) {
        this.rules = value
    }

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

    /**
     * @param values Specifies the rules managing the replication (documented below).
     */
    @JvmName("wbjgmbsjabkxllju")
    public suspend fun rules(values: List>) {
        this.rules = Output.all(values)
    }

    /**
     * @param value The ARN of the IAM role for Amazon S3 to assume when replicating the objects.
     */
    @JvmName("onwhjktbxavelqyf")
    public suspend fun role(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.role = mapped
    }

    /**
     * @param value Specifies the rules managing the replication (documented below).
     */
    @JvmName("gyogejddnluwdmny")
    public suspend fun rules(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    /**
     * @param argument Specifies the rules managing the replication (documented below).
     */
    @JvmName("nugtihmxejsoihro")
    public suspend fun rules(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            BucketReplicationConfigurationRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument Specifies the rules managing the replication (documented below).
     */
    @JvmName("vgcvueomigabquif")
    public suspend fun rules(vararg argument: suspend BucketReplicationConfigurationRuleArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            BucketReplicationConfigurationRuleArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param argument Specifies the rules managing the replication (documented below).
     */
    @JvmName("skuixyyibijweiuo")
    public suspend fun rules(argument: suspend BucketReplicationConfigurationRuleArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            BucketReplicationConfigurationRuleArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.rules = mapped
    }

    /**
     * @param values Specifies the rules managing the replication (documented below).
     */
    @JvmName("tinlppshkjmsvkdv")
    public suspend fun rules(vararg values: BucketReplicationConfigurationRuleArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.rules = mapped
    }

    internal fun build(): BucketReplicationConfigurationArgs = BucketReplicationConfigurationArgs(
        role = role ?: throw PulumiNullFieldException("role"),
        rules = rules ?: throw PulumiNullFieldException("rules"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy