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

com.pulumi.digitalocean.kotlin.outputs.SpacesBucketLifecycleRule.kt Maven / Gradle / Ivy

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

package com.pulumi.digitalocean.kotlin.outputs

import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress

/**
 *
 * @property abortIncompleteMultipartUploadDays Specifies the number of days after initiating a multipart
 * upload when the multipart upload must be completed or else Spaces will abort the upload.
 * @property enabled Specifies lifecycle rule status.
 * @property expiration Specifies a time period after which applicable objects expire (documented below).
 * @property id Unique identifier for the rule.
 * @property noncurrentVersionExpiration Specifies when non-current object versions expire (documented below).
 * At least one of `expiration` or `noncurrent_version_expiration` must be specified.
 * @property prefix Object key prefix identifying one or more objects to which the rule applies.
 */
public data class SpacesBucketLifecycleRule(
    public val abortIncompleteMultipartUploadDays: Int? = null,
    public val enabled: Boolean,
    public val expiration: SpacesBucketLifecycleRuleExpiration? = null,
    public val id: String? = null,
    public val noncurrentVersionExpiration: SpacesBucketLifecycleRuleNoncurrentVersionExpiration? =
        null,
    public val prefix: String? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.digitalocean.outputs.SpacesBucketLifecycleRule): SpacesBucketLifecycleRule = SpacesBucketLifecycleRule(
            abortIncompleteMultipartUploadDays = javaType.abortIncompleteMultipartUploadDays().map({ args0 ->
                args0
            }).orElse(null),
            enabled = javaType.enabled(),
            expiration = javaType.expiration().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.digitalocean.kotlin.outputs.SpacesBucketLifecycleRuleExpiration.Companion.toKotlin(args0)
                })
            }).orElse(null),
            id = javaType.id().map({ args0 -> args0 }).orElse(null),
            noncurrentVersionExpiration = javaType.noncurrentVersionExpiration().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.digitalocean.kotlin.outputs.SpacesBucketLifecycleRuleNoncurrentVersionExpiration.Companion.toKotlin(args0)
                })
            }).orElse(null),
            prefix = javaType.prefix().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy