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

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

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

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

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

/**
 *
 * @property id Canonical user id to grant for. Used only when `type` is `CanonicalUser`.
 * @property permissions List of permissions to apply for grantee. Valid values are `READ`, `WRITE`, `READ_ACP`, `WRITE_ACP`, `FULL_CONTROL`.
 * @property type Type of grantee to apply for. Valid values are `CanonicalUser` and `Group`. `AmazonCustomerByEmail` is not supported.
 * @property uri Uri address to grant for. Used only when `type` is `Group`.
 */
public data class BucketV2GrantArgs(
    public val id: Output? = null,
    public val permissions: Output>,
    public val type: Output,
    public val uri: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.s3.inputs.BucketV2GrantArgs =
        com.pulumi.aws.s3.inputs.BucketV2GrantArgs.builder()
            .id(id?.applyValue({ args0 -> args0 }))
            .permissions(permissions.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .type(type.applyValue({ args0 -> args0 }))
            .uri(uri?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BucketV2GrantArgs].
 */
@PulumiTagMarker
public class BucketV2GrantArgsBuilder internal constructor() {
    private var id: Output? = null

    private var permissions: Output>? = null

    private var type: Output? = null

    private var uri: Output? = null

    /**
     * @param value Canonical user id to grant for. Used only when `type` is `CanonicalUser`.
     */
    @JvmName("xvexiatcpwtwnwlf")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value List of permissions to apply for grantee. Valid values are `READ`, `WRITE`, `READ_ACP`, `WRITE_ACP`, `FULL_CONTROL`.
     */
    @JvmName("wffdkchynqtfbuax")
    public suspend fun permissions(`value`: Output>) {
        this.permissions = value
    }

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

    /**
     * @param values List of permissions to apply for grantee. Valid values are `READ`, `WRITE`, `READ_ACP`, `WRITE_ACP`, `FULL_CONTROL`.
     */
    @JvmName("uivmtyjevrfwingx")
    public suspend fun permissions(values: List>) {
        this.permissions = Output.all(values)
    }

    /**
     * @param value Type of grantee to apply for. Valid values are `CanonicalUser` and `Group`. `AmazonCustomerByEmail` is not supported.
     */
    @JvmName("obvmmlxmeltwkxcx")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value Uri address to grant for. Used only when `type` is `Group`.
     */
    @JvmName("smkgkydhwsvekdxg")
    public suspend fun uri(`value`: Output) {
        this.uri = value
    }

    /**
     * @param value Canonical user id to grant for. Used only when `type` is `CanonicalUser`.
     */
    @JvmName("snwarlharcrvhlct")
    public suspend fun id(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value List of permissions to apply for grantee. Valid values are `READ`, `WRITE`, `READ_ACP`, `WRITE_ACP`, `FULL_CONTROL`.
     */
    @JvmName("xihdcknihnaaqxas")
    public suspend fun permissions(`value`: List) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.permissions = mapped
    }

    /**
     * @param values List of permissions to apply for grantee. Valid values are `READ`, `WRITE`, `READ_ACP`, `WRITE_ACP`, `FULL_CONTROL`.
     */
    @JvmName("xejnllurmlhdivuj")
    public suspend fun permissions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.permissions = mapped
    }

    /**
     * @param value Type of grantee to apply for. Valid values are `CanonicalUser` and `Group`. `AmazonCustomerByEmail` is not supported.
     */
    @JvmName("peedoqjweaxkgeqm")
    public suspend fun type(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value Uri address to grant for. Used only when `type` is `Group`.
     */
    @JvmName("dfeqsquxhkhyoini")
    public suspend fun uri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.uri = mapped
    }

    internal fun build(): BucketV2GrantArgs = BucketV2GrantArgs(
        id = id,
        permissions = permissions ?: throw PulumiNullFieldException("permissions"),
        type = type ?: throw PulumiNullFieldException("type"),
        uri = uri,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy