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

com.pulumi.awsnative.s3.kotlin.inputs.BucketInventoryConfigurationArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.s3.kotlin.inputs

import com.pulumi.awsnative.s3.inputs.BucketInventoryConfigurationArgs.builder
import com.pulumi.awsnative.s3.kotlin.enums.BucketInventoryConfigurationIncludedObjectVersions
import com.pulumi.awsnative.s3.kotlin.enums.BucketInventoryConfigurationOptionalFieldsItem
import com.pulumi.awsnative.s3.kotlin.enums.BucketInventoryConfigurationScheduleFrequency
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

/**
 * Specifies the inventory configuration for an Amazon S3 bucket. For more information, see [GET Bucket inventory](https://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETInventoryConfig.html) in the *Amazon S3 API Reference*.
 * @property destination Contains information about where to publish the inventory results.
 * @property enabled Specifies whether the inventory is enabled or disabled. If set to ``True``, an inventory list is generated. If set to ``False``, no inventory list is generated.
 * @property id The ID used to identify the inventory configuration.
 * @property includedObjectVersions Object versions to include in the inventory list. If set to ``All``, the list includes all the object versions, which adds the version-related fields ``VersionId``, ``IsLatest``, and ``DeleteMarker`` to the list. If set to ``Current``, the list does not contain these version-related fields.
 * @property optionalFields Contains the optional fields that are included in the inventory results.
 * @property prefix Specifies the inventory filter prefix.
 * @property scheduleFrequency Specifies the schedule for generating inventory results.
 */
public data class BucketInventoryConfigurationArgs(
    public val destination: Output,
    public val enabled: Output,
    public val id: Output,
    public val includedObjectVersions: Output,
    public val optionalFields: Output>? = null,
    public val prefix: Output? = null,
    public val scheduleFrequency: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.s3.inputs.BucketInventoryConfigurationArgs =
        com.pulumi.awsnative.s3.inputs.BucketInventoryConfigurationArgs.builder()
            .destination(destination.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .enabled(enabled.applyValue({ args0 -> args0 }))
            .id(id.applyValue({ args0 -> args0 }))
            .includedObjectVersions(
                includedObjectVersions.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .optionalFields(
                optionalFields?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .prefix(prefix?.applyValue({ args0 -> args0 }))
            .scheduleFrequency(
                scheduleFrequency.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [BucketInventoryConfigurationArgs].
 */
@PulumiTagMarker
public class BucketInventoryConfigurationArgsBuilder internal constructor() {
    private var destination: Output? = null

    private var enabled: Output? = null

    private var id: Output? = null

    private var includedObjectVersions: Output? =
        null

    private var optionalFields: Output>? = null

    private var prefix: Output? = null

    private var scheduleFrequency: Output? = null

    /**
     * @param value Contains information about where to publish the inventory results.
     */
    @JvmName("gmxkfojgagdtmlow")
    public suspend fun destination(`value`: Output) {
        this.destination = value
    }

    /**
     * @param value Specifies whether the inventory is enabled or disabled. If set to ``True``, an inventory list is generated. If set to ``False``, no inventory list is generated.
     */
    @JvmName("thowwitkticikjvm")
    public suspend fun enabled(`value`: Output) {
        this.enabled = value
    }

    /**
     * @param value The ID used to identify the inventory configuration.
     */
    @JvmName("dkavtbhgmwoojbtj")
    public suspend fun id(`value`: Output) {
        this.id = value
    }

    /**
     * @param value Object versions to include in the inventory list. If set to ``All``, the list includes all the object versions, which adds the version-related fields ``VersionId``, ``IsLatest``, and ``DeleteMarker`` to the list. If set to ``Current``, the list does not contain these version-related fields.
     */
    @JvmName("dvgholepfamyexam")
    public suspend fun includedObjectVersions(`value`: Output) {
        this.includedObjectVersions = value
    }

    /**
     * @param value Contains the optional fields that are included in the inventory results.
     */
    @JvmName("vysdbglipfjmlxyq")
    public suspend fun optionalFields(`value`: Output>) {
        this.optionalFields = value
    }

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

    /**
     * @param values Contains the optional fields that are included in the inventory results.
     */
    @JvmName("uiaqbcugbqwjxypq")
    public suspend fun optionalFields(values: List>) {
        this.optionalFields = Output.all(values)
    }

    /**
     * @param value Specifies the inventory filter prefix.
     */
    @JvmName("nopvbyhpspjltphy")
    public suspend fun prefix(`value`: Output) {
        this.prefix = value
    }

    /**
     * @param value Specifies the schedule for generating inventory results.
     */
    @JvmName("fqdfleipxywajmas")
    public suspend fun scheduleFrequency(`value`: Output) {
        this.scheduleFrequency = value
    }

    /**
     * @param value Contains information about where to publish the inventory results.
     */
    @JvmName("pictyfcjbftqdomt")
    public suspend fun destination(`value`: BucketDestinationArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.destination = mapped
    }

    /**
     * @param argument Contains information about where to publish the inventory results.
     */
    @JvmName("obmkieiodejtwmjg")
    public suspend fun destination(argument: suspend BucketDestinationArgsBuilder.() -> Unit) {
        val toBeMapped = BucketDestinationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.destination = mapped
    }

    /**
     * @param value Specifies whether the inventory is enabled or disabled. If set to ``True``, an inventory list is generated. If set to ``False``, no inventory list is generated.
     */
    @JvmName("krheteorbhclruei")
    public suspend fun enabled(`value`: Boolean) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.enabled = mapped
    }

    /**
     * @param value The ID used to identify the inventory configuration.
     */
    @JvmName("iudlfodwqqevishn")
    public suspend fun id(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.id = mapped
    }

    /**
     * @param value Object versions to include in the inventory list. If set to ``All``, the list includes all the object versions, which adds the version-related fields ``VersionId``, ``IsLatest``, and ``DeleteMarker`` to the list. If set to ``Current``, the list does not contain these version-related fields.
     */
    @JvmName("kcywycroluqyulvw")
    public suspend fun includedObjectVersions(`value`: BucketInventoryConfigurationIncludedObjectVersions) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.includedObjectVersions = mapped
    }

    /**
     * @param value Contains the optional fields that are included in the inventory results.
     */
    @JvmName("rmucbkgihtaanwvq")
    public suspend fun optionalFields(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.optionalFields = mapped
    }

    /**
     * @param values Contains the optional fields that are included in the inventory results.
     */
    @JvmName("bgkkqhcsxfvdbakf")
    public suspend fun optionalFields(vararg values: BucketInventoryConfigurationOptionalFieldsItem) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.optionalFields = mapped
    }

    /**
     * @param value Specifies the inventory filter prefix.
     */
    @JvmName("nvgmwchokhfmdobl")
    public suspend fun prefix(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.prefix = mapped
    }

    /**
     * @param value Specifies the schedule for generating inventory results.
     */
    @JvmName("wovqhuqiaebbmpvw")
    public suspend fun scheduleFrequency(`value`: BucketInventoryConfigurationScheduleFrequency) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.scheduleFrequency = mapped
    }

    internal fun build(): BucketInventoryConfigurationArgs = BucketInventoryConfigurationArgs(
        destination = destination ?: throw PulumiNullFieldException("destination"),
        enabled = enabled ?: throw PulumiNullFieldException("enabled"),
        id = id ?: throw PulumiNullFieldException("id"),
        includedObjectVersions = includedObjectVersions ?: throw
            PulumiNullFieldException("includedObjectVersions"),
        optionalFields = optionalFields,
        prefix = prefix,
        scheduleFrequency = scheduleFrequency ?: throw PulumiNullFieldException("scheduleFrequency"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy